@nocobase/plugin-workflow-manual 0.21.0-alpha.9 → 1.0.0-alpha.10

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 (87) hide show
  1. package/dist/client/WorkflowTodo.d.ts +8 -0
  2. package/dist/client/WorkflowTodoBlockInitializer.d.ts +8 -0
  3. package/dist/client/index.d.ts +8 -0
  4. package/dist/client/index.js +13 -4
  5. package/dist/client/instruction/AssigneesSelect.d.ts +8 -0
  6. package/dist/client/instruction/FormBlockInitializer.d.ts +8 -0
  7. package/dist/client/instruction/FormBlockProvider.d.ts +8 -0
  8. package/dist/client/instruction/ModeConfig.d.ts +8 -0
  9. package/dist/client/instruction/SchemaConfig.d.ts +8 -0
  10. package/dist/client/instruction/createManualFormBlockUISchema.d.ts +8 -0
  11. package/dist/client/instruction/forms/create.d.ts +8 -0
  12. package/dist/client/instruction/forms/custom.d.ts +8 -0
  13. package/dist/client/instruction/forms/update.d.ts +8 -0
  14. package/dist/client/instruction/index.d.ts +8 -0
  15. package/dist/client/instruction/utils.d.ts +8 -0
  16. package/dist/externalVersion.js +18 -9
  17. package/dist/index.d.ts +8 -0
  18. package/dist/index.js +9 -0
  19. package/dist/locale/index.d.ts +8 -0
  20. package/dist/locale/index.js +9 -0
  21. package/dist/server/ManualInstruction.d.ts +8 -0
  22. package/dist/server/ManualInstruction.js +16 -3
  23. package/dist/server/Plugin.d.ts +8 -0
  24. package/dist/server/Plugin.js +9 -0
  25. package/dist/server/actions.d.ts +8 -0
  26. package/dist/server/actions.js +10 -1
  27. package/dist/server/collections/1-users_jobs.d.ts +8 -0
  28. package/dist/server/collections/1-users_jobs.js +9 -0
  29. package/dist/server/collections/2-jobs.d.ts +8 -0
  30. package/dist/server/collections/2-jobs.js +9 -0
  31. package/dist/server/collections/3-users.d.ts +8 -0
  32. package/dist/server/collections/3-users.js +9 -0
  33. package/dist/server/forms/create.d.ts +8 -0
  34. package/dist/server/forms/create.js +9 -0
  35. package/dist/server/forms/index.d.ts +8 -0
  36. package/dist/server/forms/index.js +9 -0
  37. package/dist/server/forms/update.d.ts +8 -0
  38. package/dist/server/forms/update.js +9 -0
  39. package/dist/server/index.d.ts +8 -0
  40. package/dist/server/index.js +9 -0
  41. package/dist/server/migrations/20240325213145-fix-schema.d.ts +9 -0
  42. package/dist/server/migrations/20240325213145-fix-schema.js +10 -0
  43. package/package.json +9 -9
  44. package/src/client/WorkflowTodo.tsx +0 -647
  45. package/src/client/WorkflowTodoBlockInitializer.tsx +0 -32
  46. package/src/client/__e2e__/assignees.test.ts +0 -0
  47. package/src/client/__e2e__/createRecordForm.test.ts +0 -2287
  48. package/src/client/__e2e__/customFormBlocks.test.ts +0 -1933
  49. package/src/client/__e2e__/datablocks.test.ts +0 -1208
  50. package/src/client/__e2e__/updateRecordForm.test.ts +0 -2338
  51. package/src/client/__e2e__/workflowTodo.test.ts +0 -242
  52. package/src/client/index.ts +0 -51
  53. package/src/client/instruction/AssigneesSelect.tsx +0 -39
  54. package/src/client/instruction/FormBlockInitializer.tsx +0 -79
  55. package/src/client/instruction/FormBlockProvider.tsx +0 -97
  56. package/src/client/instruction/ModeConfig.tsx +0 -85
  57. package/src/client/instruction/SchemaConfig.tsx +0 -659
  58. package/src/client/instruction/createManualFormBlockUISchema.ts +0 -5
  59. package/src/client/instruction/forms/create.tsx +0 -123
  60. package/src/client/instruction/forms/custom.tsx +0 -439
  61. package/src/client/instruction/forms/update.tsx +0 -167
  62. package/src/client/instruction/index.tsx +0 -160
  63. package/src/client/instruction/utils.ts +0 -19
  64. package/src/index.ts +0 -2
  65. package/src/locale/en-US.json +0 -30
  66. package/src/locale/index.ts +0 -14
  67. package/src/locale/ko_KR.json +0 -32
  68. package/src/locale/zh-CN.json +0 -32
  69. package/src/server/ManualInstruction.ts +0 -152
  70. package/src/server/Plugin.ts +0 -43
  71. package/src/server/__tests__/collections/categories.ts +0 -15
  72. package/src/server/__tests__/collections/comments.ts +0 -24
  73. package/src/server/__tests__/collections/posts.ts +0 -40
  74. package/src/server/__tests__/collections/replies.ts +0 -9
  75. package/src/server/__tests__/collections/tags.ts +0 -15
  76. package/src/server/__tests__/data-source.test.ts +0 -223
  77. package/src/server/__tests__/form.test.ts +0 -637
  78. package/src/server/__tests__/mode.test.ts +0 -561
  79. package/src/server/actions.ts +0 -100
  80. package/src/server/collections/1-users_jobs.ts +0 -52
  81. package/src/server/collections/2-jobs.ts +0 -19
  82. package/src/server/collections/3-users.ts +0 -17
  83. package/src/server/forms/create.ts +0 -30
  84. package/src/server/forms/index.ts +0 -13
  85. package/src/server/forms/update.ts +0 -30
  86. package/src/server/index.ts +0 -1
  87. package/src/server/migrations/20240325213145-fix-schema.ts +0 -81
@@ -1,3 +1,12 @@
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
+
1
10
  var __create = Object.create;
2
11
  var __defProp = Object.defineProperty;
3
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -63,7 +72,7 @@ async function submit(context, next) {
63
72
  userJob.execution.workflow = userJob.workflow;
64
73
  const processor = plugin.createProcessor(userJob.execution);
65
74
  await processor.prepare();
66
- const assignees = processor.getParsedValue(userJob.node.config.assignees ?? [], userJob.nodeId);
75
+ const assignees = processor.getParsedValue(userJob.node.config.assignees ?? [], userJob.nodeId).flat().filter(Boolean);
67
76
  if (!assignees.includes(currentUser.id) || userJob.userId !== currentUser.id) {
68
77
  return context.throw(403);
69
78
  }
@@ -1,2 +1,10 @@
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
+ */
1
9
  declare const _default: import("@nocobase/database").CollectionOptions;
2
10
  export default _default;
@@ -1,3 +1,12 @@
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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
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
+ */
1
9
  declare const _default: {
2
10
  collectionOptions: import("@nocobase/database").CollectionOptions;
3
11
  mergeOptions: import("deepmerge").Options;
@@ -1,3 +1,12 @@
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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
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
+ */
1
9
  declare const _default: {
2
10
  collectionOptions: import("@nocobase/database").CollectionOptions;
3
11
  mergeOptions: import("deepmerge").Options;
@@ -1,3 +1,12 @@
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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
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
+ */
1
9
  import { Processor } from '@nocobase/plugin-workflow';
2
10
  import ManualInstruction from '../ManualInstruction';
3
11
  export default function (this: ManualInstruction, instance: any, { dataSource, collection }: {
@@ -1,3 +1,12 @@
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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
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
+ */
1
9
  import { Processor } from '@nocobase/plugin-workflow';
2
10
  import ManualInstruction from '../ManualInstruction';
3
11
  export type FormHandler = (this: ManualInstruction, instance: any, formConfig: any, processor: Processor) => Promise<void>;
@@ -1,3 +1,12 @@
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
+
1
10
  var __create = Object.create;
2
11
  var __defProp = Object.defineProperty;
3
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,3 +1,11 @@
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
+ */
1
9
  import { Processor } from '@nocobase/plugin-workflow';
2
10
  import ManualInstruction from '../ManualInstruction';
3
11
  export default function (this: ManualInstruction, instance: any, { dataSource, collection, filter }: {
@@ -1,3 +1,12 @@
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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +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
+ */
1
9
  export { default } from './Plugin';
@@ -1,3 +1,12 @@
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
+
1
10
  var __create = Object.create;
2
11
  var __defProp = Object.defineProperty;
3
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,13 @@
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
+ */
1
9
  import { Migration } from '@nocobase/server';
2
10
  export default class extends Migration {
11
+ appVersion: string;
3
12
  up(): Promise<void>;
4
13
  }
@@ -1,3 +1,12 @@
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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -53,6 +62,7 @@ function migrateSchema(schema) {
53
62
  return schema;
54
63
  }
55
64
  class fix_schema_default extends import_server.Migration {
65
+ appVersion = "<0.21.0-alpha.15";
56
66
  async up() {
57
67
  const { db } = this.context;
58
68
  const NodeRepo = db.getRepository("flow_nodes");
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "工作流:人工处理节点",
5
5
  "description": "Could be used for workflows which some of decisions are made by users.",
6
6
  "description.zh-CN": "用于人工控制部分决策的流程。",
7
- "version": "0.21.0-alpha.9",
7
+ "version": "1.0.0-alpha.10",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/workflow-manual",
@@ -21,16 +21,16 @@
21
21
  "react-router-dom": "^6.11.2"
22
22
  },
23
23
  "peerDependencies": {
24
- "@nocobase/client": "0.x",
25
- "@nocobase/database": "0.x",
26
- "@nocobase/plugin-collection-manager": "0.x",
27
- "@nocobase/plugin-users": "0.x",
24
+ "@nocobase/client": "1.x",
25
+ "@nocobase/database": "1.x",
26
+ "@nocobase/plugin-data-source-main": "1.x",
27
+ "@nocobase/plugin-users": "1.x",
28
28
  "@nocobase/plugin-workflow": ">=0.17.0-alpha.3",
29
- "@nocobase/server": "0.x",
30
- "@nocobase/test": "0.x",
31
- "@nocobase/utils": "0.x"
29
+ "@nocobase/server": "1.x",
30
+ "@nocobase/test": "1.x",
31
+ "@nocobase/utils": "1.x"
32
32
  },
33
- "gitHead": "a6fe6c4ee532c04e5a50ec777bf76436ca624cbd",
33
+ "gitHead": "39c634c88f835f8eadedf72ca11a9fb3323a50f8",
34
34
  "keywords": [
35
35
  "Workflow"
36
36
  ]