@nocobase/plugin-flow-engine 2.1.0-alpha.19 → 2.1.0-alpha.20

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.
@@ -569,6 +569,12 @@ declare const _default: {
569
569
  $ref: string;
570
570
  };
571
571
  };
572
+ fieldsLayout: {
573
+ allOf: {
574
+ $ref: string;
575
+ }[];
576
+ description: string;
577
+ };
572
578
  actions: {
573
579
  type: string;
574
580
  description: string;
@@ -589,6 +595,9 @@ declare const _default: {
589
595
  FlowSurfaceApprovalBlueprintBlockSpec: {
590
596
  type: string;
591
597
  required: string[];
598
+ anyOf: {
599
+ required: string[];
600
+ }[];
592
601
  properties: {
593
602
  key: {
594
603
  type: string;
@@ -597,6 +606,9 @@ declare const _default: {
597
606
  type: string;
598
607
  enum: string[];
599
608
  };
609
+ template: {
610
+ $ref: string;
611
+ };
600
612
  resource: {
601
613
  $ref: string;
602
614
  };
@@ -2164,6 +2176,12 @@ declare const _default: {
2164
2176
  $ref: string;
2165
2177
  };
2166
2178
  };
2179
+ fieldsLayout: {
2180
+ allOf: {
2181
+ $ref: string;
2182
+ }[];
2183
+ description: string;
2184
+ };
2167
2185
  actions: {
2168
2186
  type: string;
2169
2187
  description: string;
@@ -60,7 +60,16 @@ export declare const flowSurfaceExamples: {
60
60
  key: string;
61
61
  type: string;
62
62
  collection: string;
63
- fields: string[];
63
+ fields: (string | {
64
+ key: string;
65
+ field: string;
66
+ })[];
67
+ fieldsLayout: {
68
+ rows: (string[] | {
69
+ key: string;
70
+ span: number;
71
+ }[])[];
72
+ };
64
73
  actions: string[];
65
74
  } | {
66
75
  key: string;
@@ -71,6 +80,7 @@ export declare const flowSurfaceExamples: {
71
80
  key: string;
72
81
  type: string;
73
82
  }[];
83
+ fieldsLayout?: undefined;
74
84
  })[];
75
85
  layout: {
76
86
  rows: string[][];
@@ -318,6 +328,12 @@ export declare const flowSurfaceExamples: {
318
328
  fieldPath: string;
319
329
  target: string;
320
330
  }[];
331
+ fieldsLayout: {
332
+ rows: {
333
+ key: string;
334
+ span: number;
335
+ }[][];
336
+ };
321
337
  actions: string[];
322
338
  recordActions?: undefined;
323
339
  } | {
@@ -346,6 +362,7 @@ export declare const flowSurfaceExamples: {
346
362
  }[];
347
363
  };
348
364
  })[];
365
+ fieldsLayout?: undefined;
349
366
  })[];
350
367
  layout: {
351
368
  rows: {
@@ -87,7 +87,26 @@ const flowSurfaceExamples = {
87
87
  key: "employeeForm",
88
88
  type: "createForm",
89
89
  collection: "employees",
90
- fields: ["nickname", "status", "amount", "taxRate", "subtotal", "total"],
90
+ fields: [
91
+ { key: "nicknameField", field: "nickname" },
92
+ { key: "statusField", field: "status" },
93
+ "amount",
94
+ "taxRate",
95
+ "subtotal",
96
+ "total"
97
+ ],
98
+ fieldsLayout: {
99
+ rows: [
100
+ ["nicknameField"],
101
+ [
102
+ { key: "statusField", span: 12 },
103
+ { key: "amount", span: 12 }
104
+ ],
105
+ ["taxRate"],
106
+ ["subtotal"],
107
+ ["total"]
108
+ ]
109
+ },
91
110
  actions: ["submit"]
92
111
  },
93
112
  {
@@ -437,6 +456,14 @@ const flowSurfaceExamples = {
437
456
  target: "table"
438
457
  }
439
458
  ],
459
+ fieldsLayout: {
460
+ rows: [
461
+ [
462
+ { key: "nickname", span: 12 },
463
+ { key: "username", span: 12 }
464
+ ]
465
+ ]
466
+ },
440
467
  actions: ["submit", "reset", "collapse"]
441
468
  },
442
469
  {
@@ -491,7 +491,7 @@ const actionDocs = {
491
491
  tags: [FLOW_SURFACES_TAG],
492
492
  summary: "Apply an approval blueprint to initiator, approver, or task-card surfaces",
493
493
  description: valuesCompatibilityNote(
494
- "Builds workflow-approval configuration surfaces through the existing flowSurfaces orchestration layer instead of a separate approval resource. This is the preferred whole-surface bootstrap / replace entry for approval initiator, approver, and task-card UIs. Unlike route-backed `applyBlueprint`, this action targets approval-bound FlowModel roots stored on approval workflow trigger config (`workflow.config.approvalUid` / `workflow.config.taskCardUid`) or approval node config (`node.config.approvalUid` / `node.config.taskCardUid`). The backend creates or reuses the correct approval root automatically, rewrites the binding uid, applies a `replace` blueprint to that root, and reconciles approval runtime config derived from approval actions such as withdraw / approve / reject / return / delegate / add-assignee. `surface='initiator'` requires `workflowId` and writes page-like `blocks + layout` into `TriggerChildPageModel -> TriggerChildPageTabModel -> TriggerBlockGridModel`. `surface='approver'` requires `nodeId` and writes page-like `blocks + layout` into `ApprovalChildPageModel -> ApprovalChildPageTabModel -> ApprovalBlockGridModel`. `surface='taskCard'` requires exactly one of `workflowId` or `nodeId` and writes `fields + layout` into `ApplyTaskCardDetailsModel` or `ApprovalTaskCardDetailsModel`. This v1 action does not cover legacy schema-config wiring; it focuses on approval FlowModel construction, binding persistence, and approval runtime-config synchronization. When `layout` is omitted, the backend generates a simple top-to-bottom layout for the resulting blocks or fields."
494
+ "Builds workflow-approval configuration surfaces through the existing flowSurfaces orchestration layer instead of a separate approval resource. This is the preferred whole-surface bootstrap / replace entry for approval initiator, approver, and task-card UIs. Unlike route-backed `applyBlueprint`, this action targets approval-bound FlowModel roots stored on approval workflow trigger config (`workflow.config.approvalUid` / `workflow.config.taskCardUid`) or approval node config (`node.config.approvalUid` / `node.config.taskCardUid`). The backend creates or reuses the correct approval root automatically, rewrites the binding uid, applies a `replace` blueprint to that root, and reconciles approval runtime config derived from approval actions such as withdraw / approve / reject / return / delegate / add-assignee. `surface='initiator'` requires `workflowId` and writes page-like `blocks + layout` into `TriggerChildPageModel -> TriggerChildPageTabModel -> TriggerBlockGridModel`. `surface='approver'` requires `nodeId` and writes page-like `blocks + layout` into `ApprovalChildPageModel -> ApprovalChildPageTabModel -> ApprovalBlockGridModel`. Page-like `blocks[]` may either declare a concrete `type` or reuse a saved block template through `template: { uid, mode }`. `surface='taskCard'` requires exactly one of `workflowId` or `nodeId` and writes `fields + layout` into `ApplyTaskCardDetailsModel` or `ApprovalTaskCardDetailsModel`. This v1 action does not cover legacy schema-config wiring; it focuses on approval FlowModel construction, binding persistence, and approval runtime-config synchronization. When `layout` is omitted, the backend generates a simple top-to-bottom layout for the resulting blocks or fields."
495
495
  ),
496
496
  requestBody: {
497
497
  required: true,
@@ -568,7 +568,7 @@ const actionDocs = {
568
568
  tags: [FLOW_SURFACES_TAG],
569
569
  summary: "Apply simple semantic changes to a page, tab, block, field or action",
570
570
  description: valuesCompatibilityNote(
571
- "Uses simple `changes` to update high-frequency settings such as page/tab titles, table pageSize, field clickToOpen, and action openView/confirm without requiring the caller to know internal paths. For advanced reaction authoring, prefer `getReactionMeta` + `set*Rules`; the raw `assignRules` / `linkageRules` examples here are compatibility-only. Check `catalog.node.configureOptions` together with the relevant catalog item `configureOptions` before calling this action. On approval action nodes, this route also accepts approval-specific keys such as `approvalReturn` and `assigneesScope`, and flowSurfaces persists the matching approval runtime config. It does not replace `applyApprovalBlueprint` for whole-surface approval bootstrap."
571
+ "Uses simple `changes` to update high-frequency settings such as page/tab titles, table pageSize, field clickToOpen, and action openView/confirm without requiring the caller to know internal paths. For advanced reaction authoring, prefer `getReactionMeta` + `set*Rules`; the raw `assignRules` / `linkageRules` examples here are compatibility-only. Check `catalog.node.configureOptions` together with the relevant catalog item `configureOptions` before calling this action. On approval action nodes, this route also accepts approval-specific keys such as `confirm`, `assignValues`, `commentFormUid`, `approvalReturn`, and `assigneesScope`, and flowSurfaces persists the matching approval runtime config. It does not replace `applyApprovalBlueprint` for whole-surface approval bootstrap."
572
572
  ),
573
573
  requestBody: {
574
574
  required: true,
@@ -2392,6 +2392,10 @@ const schemas = {
2392
2392
  type: "array",
2393
2393
  items: ref("FlowSurfaceComposeFieldSpec")
2394
2394
  },
2395
+ fieldsLayout: {
2396
+ allOf: [ref("FlowSurfaceComposeLayout")],
2397
+ description: "Optional inner field-grid layout for `createForm`, `editForm`, `details`, or `filterForm`. Uses the same public `{ rows: [[...]] }` shape as top-level layout, but references field keys inside the current block and must place every created field exactly once."
2398
+ },
2395
2399
  actions: {
2396
2400
  type: "array",
2397
2401
  description: "Block-level actions. For table/list/gridCard, prefer block-wide collection actions here.",
@@ -2407,7 +2411,8 @@ const schemas = {
2407
2411
  },
2408
2412
  FlowSurfaceApprovalBlueprintBlockSpec: {
2409
2413
  type: "object",
2410
- required: ["key", "type"],
2414
+ required: ["key"],
2415
+ anyOf: [{ required: ["type"] }, { required: ["template"] }],
2411
2416
  properties: {
2412
2417
  key: {
2413
2418
  type: "string"
@@ -2416,6 +2421,7 @@ const schemas = {
2416
2421
  type: "string",
2417
2422
  enum: APPROVAL_BLUEPRINT_BLOCK_TYPE_ENUM
2418
2423
  },
2424
+ template: ref("FlowSurfaceBlockTemplateRef"),
2419
2425
  resource: ref("FlowSurfaceBlockResourceInput"),
2420
2426
  settings: ANY_OBJECT_SCHEMA,
2421
2427
  fields: {
@@ -3276,7 +3282,7 @@ const schemas = {
3276
3282
  },
3277
3283
  FlowSurfaceApplyBlueprintLayout: {
3278
3284
  type: "object",
3279
- description: "Layout object allowed only on tabs and inline popup documents, never on individual blocks.",
3285
+ description: "Layout object used by tab/popup `layout` and field-grid-block `fieldsLayout`. Block-level `layout` is still not allowed; use `fieldsLayout` only on `createForm`, `editForm`, `details`, or `filterForm`.",
3280
3286
  properties: {
3281
3287
  rows: {
3282
3288
  type: "array",
@@ -3406,7 +3412,7 @@ const schemas = {
3406
3412
  },
3407
3413
  FlowSurfaceApplyBlueprintBlockSpec: {
3408
3414
  type: "object",
3409
- description: "Public applyBlueprint block spec. Blocks do not accept a `layout` property; use tab.layout or popup.layout instead. Generic `form` is not supported here; use `editForm` or `createForm`.",
3415
+ description: "Public applyBlueprint block spec. Blocks do not accept a `layout` property; use tab.layout or popup.layout instead. `fieldsLayout` is available only on `createForm`, `editForm`, `details`, and `filterForm`. Generic `form` is not supported here; use `editForm` or `createForm`.",
3410
3416
  anyOf: [{ required: ["type"] }, { required: ["template"] }],
3411
3417
  properties: {
3412
3418
  key: { type: "string" },
@@ -3440,6 +3446,10 @@ const schemas = {
3440
3446
  type: "array",
3441
3447
  items: ref("FlowSurfaceApplyBlueprintFieldSpec")
3442
3448
  },
3449
+ fieldsLayout: {
3450
+ allOf: [ref("FlowSurfaceApplyBlueprintLayout")],
3451
+ description: "Optional inner field-grid layout for `createForm`, `editForm`, `details`, or `filterForm`. Uses the same public `{ rows: [[...]] }` shape as tab/popup layout, but references field keys inside the current block and must place every created field exactly once."
3452
+ },
3443
3453
  actions: {
3444
3454
  type: "array",
3445
3455
  description: `Block-level actions. On record-capable blocks, \`view\`, \`edit\`, \`updateRecord\`, \`delete\`, and \`duplicate\` should normally go to \`recordActions\`; applyBlueprint auto-promotes those common record actions when they are written here. ${APPLY_BLUEPRINT_ADD_CHILD_NOTE}`,
@@ -3629,7 +3639,7 @@ const schemas = {
3629
3639
  FlowSurfaceApplyApprovalBlueprintRequest: {
3630
3640
  type: "object",
3631
3641
  required: ["surface"],
3632
- description: "Simplified approval-surface blueprint request for workflow approval UIs. This is the preferred bootstrap / replace route for approval initiator, approver, and task-card surfaces. `version` may be omitted and defaults to '1'. `mode` may be omitted and defaults to `replace`; v1 only supports `replace`. Runtime validation enforces binding rules: `initiator` requires `workflowId`, `approver` requires `nodeId`, and `taskCard` requires exactly one of `workflowId` or `nodeId`. Page-like surfaces (`initiator`, `approver`) accept `blocks + layout`; `taskCard` accepts `fields + layout`. This route does not perform schema wiring, but it does persist binding fields and reconcile approval runtime config from approval actions.",
3642
+ description: "Simplified approval-surface blueprint request for workflow approval UIs. This is the preferred bootstrap / replace route for approval initiator, approver, and task-card surfaces. `version` may be omitted and defaults to '1'. `mode` may be omitted and defaults to `replace`; v1 only supports `replace`. Runtime validation enforces binding rules: `initiator` requires `workflowId`, `approver` requires `nodeId`, and `taskCard` requires exactly one of `workflowId` or `nodeId`. Page-like surfaces (`initiator`, `approver`) accept `blocks + layout`; each block may declare `type` directly or reuse `template: { uid, mode }`. `taskCard` accepts `fields + layout`. This route does not perform schema wiring, but it does persist binding fields and reconcile approval runtime config from approval actions.",
3633
3643
  properties: {
3634
3644
  version: {
3635
3645
  type: "string",
@@ -569,6 +569,12 @@ declare const _default: {
569
569
  $ref: string;
570
570
  };
571
571
  };
572
+ fieldsLayout: {
573
+ allOf: {
574
+ $ref: string;
575
+ }[];
576
+ description: string;
577
+ };
572
578
  actions: {
573
579
  type: string;
574
580
  description: string;
@@ -589,6 +595,9 @@ declare const _default: {
589
595
  FlowSurfaceApprovalBlueprintBlockSpec: {
590
596
  type: string;
591
597
  required: string[];
598
+ anyOf: {
599
+ required: string[];
600
+ }[];
592
601
  properties: {
593
602
  key: {
594
603
  type: string;
@@ -597,6 +606,9 @@ declare const _default: {
597
606
  type: string;
598
607
  enum: string[];
599
608
  };
609
+ template: {
610
+ $ref: string;
611
+ };
600
612
  resource: {
601
613
  $ref: string;
602
614
  };
@@ -2164,6 +2176,12 @@ declare const _default: {
2164
2176
  $ref: string;
2165
2177
  };
2166
2178
  };
2179
+ fieldsLayout: {
2180
+ allOf: {
2181
+ $ref: string;
2182
+ }[];
2183
+ description: string;
2184
+ };
2167
2185
  actions: {
2168
2186
  type: string;
2169
2187
  description: string;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "前端流引擎",
5
5
  "description": "",
6
6
  "description.zh-CN": "",
7
- "version": "2.1.0-alpha.19",
7
+ "version": "2.1.0-alpha.20",
8
8
  "main": "./dist/server/index.js",
9
9
  "license": "Apache-2.0",
10
10
  "devDependencies": {
@@ -24,5 +24,5 @@
24
24
  "@nocobase/test": "2.x",
25
25
  "@nocobase/utils": "2.x"
26
26
  },
27
- "gitHead": "3d13700360eac1c0f9dbf6a5f167ed396a294a3c"
27
+ "gitHead": "3d1535db6bf93ca23257faf474afee0d565f54c6"
28
28
  }