@nocobase/plugin-flow-engine 2.1.0-beta.17 → 2.1.0-beta.19
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.
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/SKILLS.md +2 -2
- package/dist/externalVersion.js +10 -10
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-surfaces/action-scope.d.ts +1 -0
- package/dist/server/flow-surfaces/action-scope.js +4 -0
- package/dist/server/flow-surfaces/association-title-field.d.ts +1 -1
- package/dist/server/flow-surfaces/association-title-field.js +38 -4
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +24 -2
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +1 -1
- package/dist/server/flow-surfaces/builder.js +69 -1
- package/dist/server/flow-surfaces/catalog.d.ts +1 -1
- package/dist/server/flow-surfaces/catalog.js +187 -106
- package/dist/server/flow-surfaces/compose-compiler.js +1 -1
- package/dist/server/flow-surfaces/configure-options.js +33 -0
- package/dist/server/flow-surfaces/core-field-default-bindings.d.ts +12 -0
- package/dist/server/flow-surfaces/core-field-default-bindings.js +157 -0
- package/dist/server/flow-surfaces/default-block-actions.js +24 -0
- package/dist/server/flow-surfaces/field-semantics.js +3 -1
- package/dist/server/flow-surfaces/index.js +61 -2
- package/dist/server/flow-surfaces/node-use-sets.js +3 -0
- package/dist/server/flow-surfaces/placement.js +3 -0
- package/dist/server/flow-surfaces/public-data-surface-default-filter.d.ts +4 -0
- package/dist/server/flow-surfaces/public-data-surface-default-filter.js +45 -4
- package/dist/server/flow-surfaces/service-helpers.js +3 -70
- package/dist/server/flow-surfaces/service.d.ts +42 -1
- package/dist/server/flow-surfaces/service.js +1392 -124
- package/dist/server/flow-surfaces/support-matrix.d.ts +1 -1
- package/dist/server/flow-surfaces/support-matrix.js +12 -0
- package/dist/server/flow-surfaces/surface-context.js +8 -5
- package/dist/swagger/flow-surfaces.examples.d.ts +39 -0
- package/dist/swagger/flow-surfaces.examples.js +47 -0
- package/dist/swagger/flow-surfaces.js +15 -8
- package/package.json +2 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
export type FormalFlowSurfaceBlockKey = 'js-block' | 'table' | 'calendar' | 'create-form' | 'edit-form' | 'details' | 'filter-form' | 'list' | 'grid-card' | 'markdown' | 'iframe' | 'map' | 'chart' | 'comments' | 'action-panel';
|
|
9
|
+
export type FormalFlowSurfaceBlockKey = 'js-block' | 'table' | 'calendar' | 'kanban' | 'create-form' | 'edit-form' | 'details' | 'filter-form' | 'list' | 'grid-card' | 'markdown' | 'iframe' | 'map' | 'chart' | 'comments' | 'action-panel';
|
|
10
10
|
export type FlowSurfaceBlockSupportEntry = {
|
|
11
11
|
key: string;
|
|
12
12
|
formalKey?: FormalFlowSurfaceBlockKey;
|
|
@@ -72,6 +72,18 @@ const FLOW_SURFACE_BLOCK_SUPPORT_MATRIX = [
|
|
|
72
72
|
readbackSupported: true,
|
|
73
73
|
createSupported: true
|
|
74
74
|
},
|
|
75
|
+
{
|
|
76
|
+
key: "kanban",
|
|
77
|
+
formalKey: "kanban",
|
|
78
|
+
label: "Kanban",
|
|
79
|
+
modelUse: "KanbanBlockModel",
|
|
80
|
+
ownerPlugin: "@nocobase/plugin-kanban",
|
|
81
|
+
topLevelAddable: true,
|
|
82
|
+
formalBuiltin: true,
|
|
83
|
+
fixtureCaptured: true,
|
|
84
|
+
readbackSupported: true,
|
|
85
|
+
createSupported: true
|
|
86
|
+
},
|
|
75
87
|
{
|
|
76
88
|
key: "createForm",
|
|
77
89
|
formalKey: "create-form",
|
|
@@ -48,6 +48,7 @@ var import_placement = require("./placement");
|
|
|
48
48
|
const FILTER_TARGET_BLOCK_USES = /* @__PURE__ */ new Set([
|
|
49
49
|
"TableBlockModel",
|
|
50
50
|
"CalendarBlockModel",
|
|
51
|
+
"KanbanBlockModel",
|
|
51
52
|
"DetailsBlockModel",
|
|
52
53
|
"ListBlockModel",
|
|
53
54
|
"GridCardBlockModel",
|
|
@@ -55,8 +56,10 @@ const FILTER_TARGET_BLOCK_USES = /* @__PURE__ */ new Set([
|
|
|
55
56
|
"MapBlockModel",
|
|
56
57
|
"CommentsBlockModel"
|
|
57
58
|
]);
|
|
58
|
-
const
|
|
59
|
-
const
|
|
59
|
+
const DETAILS_CARD_BLOCK_USES = /* @__PURE__ */ new Set(["ListBlockModel", "GridCardBlockModel", "KanbanBlockModel"]);
|
|
60
|
+
const DETAILS_CARD_ITEM_USES = /* @__PURE__ */ new Set(["ListItemModel", "GridCardItemModel", "KanbanCardItemModel"]);
|
|
61
|
+
const RECORD_ACTION_ITEM_USES = /* @__PURE__ */ new Set(["ListItemModel", "GridCardItemModel"]);
|
|
62
|
+
const BLOCK_ACTION_CONTAINER_USES = /* @__PURE__ */ new Set(["ListBlockModel", "GridCardBlockModel", "KanbanBlockModel"]);
|
|
60
63
|
function getDefaultGridUse(ownerUse, fallbackUse) {
|
|
61
64
|
return (0, import_approval.getApprovalDefaultGridUse)(ownerUse) || fallbackUse;
|
|
62
65
|
}
|
|
@@ -257,7 +260,7 @@ class FlowSurfaceContextResolver {
|
|
|
257
260
|
wrapperUse: getFieldWrapperUse(use, "DetailsItemModel")
|
|
258
261
|
};
|
|
259
262
|
}
|
|
260
|
-
if (
|
|
263
|
+
if (DETAILS_CARD_BLOCK_USES.has(use)) {
|
|
261
264
|
const itemUid = (_f = (_e = node.subModels) == null ? void 0 : _e.item) == null ? void 0 : _f.uid;
|
|
262
265
|
if (!itemUid) {
|
|
263
266
|
(0, import_errors.throwBadRequest)(`flowSurfaces addField target '${use}' is missing its item subtree`);
|
|
@@ -271,7 +274,7 @@ class FlowSurfaceContextResolver {
|
|
|
271
274
|
wrapperUse: "DetailsItemModel"
|
|
272
275
|
};
|
|
273
276
|
}
|
|
274
|
-
if (
|
|
277
|
+
if (DETAILS_CARD_ITEM_USES.has(use)) {
|
|
275
278
|
return {
|
|
276
279
|
ownerUid: node.uid,
|
|
277
280
|
ownerUse: use,
|
|
@@ -331,7 +334,7 @@ class FlowSurfaceContextResolver {
|
|
|
331
334
|
var _a;
|
|
332
335
|
const resolved = await this.locator.resolve(target, { transaction });
|
|
333
336
|
const node = resolved.node || await this.repository.findModelById(resolved.uid, { transaction, includeAsyncNode: true });
|
|
334
|
-
if (["TableBlockModel", "CalendarBlockModel", "TableActionsColumnModel"].includes(node == null ? void 0 : node.use) || (node == null ? void 0 : node.use) === "ActionPanelBlockModel" ||
|
|
337
|
+
if (["TableBlockModel", "CalendarBlockModel", "TableActionsColumnModel"].includes(node == null ? void 0 : node.use) || (node == null ? void 0 : node.use) === "ActionPanelBlockModel" || BLOCK_ACTION_CONTAINER_USES.has(node == null ? void 0 : node.use) || RECORD_ACTION_ITEM_USES.has(node == null ? void 0 : node.use)) {
|
|
335
338
|
return {
|
|
336
339
|
parentUid: node.uid,
|
|
337
340
|
subKey: "actions",
|
|
@@ -180,6 +180,45 @@ export declare const flowSurfaceExamples: {
|
|
|
180
180
|
}[];
|
|
181
181
|
}[];
|
|
182
182
|
};
|
|
183
|
+
applyBlueprintCalendar: {
|
|
184
|
+
version: string;
|
|
185
|
+
mode: string;
|
|
186
|
+
navigation: {
|
|
187
|
+
item: {
|
|
188
|
+
title: string;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
page: {
|
|
192
|
+
title: string;
|
|
193
|
+
documentTitle: string;
|
|
194
|
+
};
|
|
195
|
+
tabs: {
|
|
196
|
+
key: string;
|
|
197
|
+
title: string;
|
|
198
|
+
blocks: {
|
|
199
|
+
key: string;
|
|
200
|
+
type: string;
|
|
201
|
+
collection: string;
|
|
202
|
+
defaultFilter: {
|
|
203
|
+
logic: string;
|
|
204
|
+
items: {
|
|
205
|
+
path: string;
|
|
206
|
+
operator: string;
|
|
207
|
+
value: string;
|
|
208
|
+
}[];
|
|
209
|
+
};
|
|
210
|
+
settings: {
|
|
211
|
+
title: string;
|
|
212
|
+
titleField: string;
|
|
213
|
+
colorField: string;
|
|
214
|
+
startField: string;
|
|
215
|
+
endField: string;
|
|
216
|
+
defaultView: string;
|
|
217
|
+
};
|
|
218
|
+
actions: string[];
|
|
219
|
+
}[];
|
|
220
|
+
}[];
|
|
221
|
+
};
|
|
183
222
|
applyApprovalBlueprintInitiator: {
|
|
184
223
|
version: string;
|
|
185
224
|
surface: string;
|
|
@@ -297,6 +297,53 @@ const flowSurfaceExamples = {
|
|
|
297
297
|
}
|
|
298
298
|
]
|
|
299
299
|
},
|
|
300
|
+
applyBlueprintCalendar: {
|
|
301
|
+
version: "1",
|
|
302
|
+
mode: "create",
|
|
303
|
+
navigation: {
|
|
304
|
+
item: {
|
|
305
|
+
title: "Calendar"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
page: {
|
|
309
|
+
title: "Calendar",
|
|
310
|
+
documentTitle: "Team calendar"
|
|
311
|
+
},
|
|
312
|
+
tabs: [
|
|
313
|
+
{
|
|
314
|
+
key: "schedule",
|
|
315
|
+
title: "Schedule",
|
|
316
|
+
blocks: [
|
|
317
|
+
{
|
|
318
|
+
key: "eventsCalendar",
|
|
319
|
+
type: "calendar",
|
|
320
|
+
collection: "calendar_events",
|
|
321
|
+
defaultFilter: makePublicBlockDefaultFilter([
|
|
322
|
+
{
|
|
323
|
+
path: "title",
|
|
324
|
+
operator: "$includes",
|
|
325
|
+
value: ""
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
path: "status",
|
|
329
|
+
operator: "$eq",
|
|
330
|
+
value: "planned"
|
|
331
|
+
}
|
|
332
|
+
]),
|
|
333
|
+
settings: {
|
|
334
|
+
title: "Team events",
|
|
335
|
+
titleField: "title",
|
|
336
|
+
colorField: "status",
|
|
337
|
+
startField: "startsAt",
|
|
338
|
+
endField: "endsAt",
|
|
339
|
+
defaultView: "week"
|
|
340
|
+
},
|
|
341
|
+
actions: ["filter", "addNew", "refresh", "today", "turnPages", "title", "selectView"]
|
|
342
|
+
}
|
|
343
|
+
]
|
|
344
|
+
}
|
|
345
|
+
]
|
|
346
|
+
},
|
|
300
347
|
applyApprovalBlueprintInitiator: {
|
|
301
348
|
version: "1",
|
|
302
349
|
surface: "initiator",
|
|
@@ -43,8 +43,9 @@ const FILTER_GROUP_EXAMPLE = {
|
|
|
43
43
|
logic: "$and",
|
|
44
44
|
items: []
|
|
45
45
|
};
|
|
46
|
-
const PUBLIC_DATA_SURFACE_BLOCK_DEFAULT_FILTER_DESCRIPTION =
|
|
47
|
-
const
|
|
46
|
+
const PUBLIC_DATA_SURFACE_BLOCK_DEFAULT_FILTER_DESCRIPTION = 'Supported only on direct `table`, `list`, `gridCard`, `calendar`, or `kanban` blocks. The backend runtime keeps this input optional and compatibility-tolerant: omitted, `{}`, `null`, or `{ logic: "$and", items: [] }` normalize to the empty filter group. When a non-empty value is provided, it backfills the default `filter` action `settings.defaultFilter` when that action exists or is auto-created. If the filter action already provides `settings.defaultFilter`, the action-level value wins.';
|
|
47
|
+
const APPLY_BLUEPRINT_DATA_SURFACE_BLOCK_DEFAULT_FILTER_DESCRIPTION = "Supported only on direct `table`, `list`, `gridCard`, `calendar`, or `kanban` blocks, and must contain at least one concrete filter item. Backfills the default `filter` action `settings.defaultFilter` when that action exists or is auto-created. If the filter action already provides `settings.defaultFilter`, the action-level value wins.";
|
|
48
|
+
const DIRECT_ADD_DEFAULT_FILTER_COMPAT_DESCRIPTION = "Public block-level `defaultFilter` is supported on direct `table` / `list` / `gridCard` / `calendar` / `kanban` creates. Backend runtime compatibility is preserved: omitted or empty values remain accepted and normalize to the empty filter group. Legacy `defaultActionSettings.filter.defaultFilter` remains supported for compatibility and wins when both are provided.";
|
|
48
49
|
const STRING_OR_INTEGER_SCHEMA = {
|
|
49
50
|
oneOf: [{ type: "string" }, { type: "integer" }]
|
|
50
51
|
};
|
|
@@ -119,6 +120,8 @@ const RECORD_ACTION_TYPE_ENUM = [
|
|
|
119
120
|
];
|
|
120
121
|
const APPLY_BLUEPRINT_BLOCK_TYPE_ENUM = [
|
|
121
122
|
"table",
|
|
123
|
+
"calendar",
|
|
124
|
+
"kanban",
|
|
122
125
|
"createForm",
|
|
123
126
|
"editForm",
|
|
124
127
|
"details",
|
|
@@ -468,7 +471,7 @@ const actionDocs = {
|
|
|
468
471
|
tags: [FLOW_SURFACES_TAG],
|
|
469
472
|
summary: "Apply a page blueprint to create or replace one Modern page",
|
|
470
473
|
description: valuesCompatibilityNote(
|
|
471
|
-
'Accepts one simplified JSON page blueprint and compiles it to internal flow-surface operations. The public blueprint describes page structure (`create` or `replace`, page metadata, ordered tabs, blocks, fields, actions, inline popups, optional reusable assets) and optional top-level `reaction.items[]` for whole-page interaction authoring. Each reaction item targets an explicit local key / bind key produced by the same blueprint run. Only explicitly listed reaction items are written. `rules: []` clears the targeted slot. Repeating the same `(type, target)` reaction slot in one blueprint is invalid. In `replace`, reaction targets always bind to the newly produced blueprint result, not historical nodes from the previous page version; if a slot must exist in the resulting surface, include it explicitly instead of relying on omission. Localized reaction edits on an existing surface should use `getReactionMeta` + `set*Rules` instead of applying a whole page blueprint again. The request body is that page-document JSON object itself and must not be JSON-stringified. Wrong: `{ "requestBody": "{\\"version\\":\\"1\\"}" }`. Internal planning details stay hidden. In `create`, `navigation.group.routeId` is the preferred way to target an existing menu group. It is exact-targeting only and cannot be mixed with existing-group metadata such as `icon`, `tooltip`, or `hideInMenu`; applyBlueprint create mode does not mutate existing group metadata, so callers should use `updateMenu` separately when that is required. When only `navigation.group.title` is provided, applyBlueprint reuses one existing same-title group when it is unique, creates a new group when none exists, and rejects ambiguous multi-match cases. Same-title reuse is title-only; if an existing group\'s metadata must change, use low-level `updateMenu` instead of applyBlueprint create. `replace` uses `target.pageSchemaUid`, updates only the explicit page-level fields provided in `page`, maps blueprint tabs to existing route-backed tab slots by index, rewrites each slot in order, removes trailing old tabs, and appends extra new tabs when needed. Tab and block keys are optional in the public blueprint; omit them unless custom layout or cross-block targeting needs a stable in-document identifier. `layout` is only allowed on tabs and inline popup documents; blocks themselves do not accept a `layout` property. Public applyBlueprint blocks do not support generic `form`; use `editForm` or `createForm`. Direct `table` / `list` / `gridCard` blocks may also provide block-level `defaultFilter`, which backfills the default `filter` action `settings.defaultFilter`; explicit filter-action `settings.defaultFilter` still wins. Inline popup documents may set `popup.tryTemplate=true` to ask the backend for the best compatible popup template before falling back to local popup content. Inline popup documents may also combine `popup.tryTemplate` with `popup.saveAsTemplate={ name, description, local? }`: a hit binds the matched template immediately and lets later inline popups in the same blueprint reuse that final bound template through `popup.template={ local, mode }`, while a miss requires explicit local `popup.blocks` so the fallback popup can be saved and reused. Custom `edit` popups that provide `popup.blocks` must include exactly one `editForm` block; that `editForm` may omit `resource` and then inherits the opener\'s current-record context. When layout is omitted, applyBlueprint auto-generates a simple top-to-bottom layout. When a `replace` run expands a page to multiple tabs while the current page still has `enableTabs=false`, callers must set `page.enableTabs=true` explicitly. The response hides execution internals and returns only the resolved page target and final surface readback.'
|
|
474
|
+
'Accepts one simplified JSON page blueprint and compiles it to internal flow-surface operations. The public blueprint describes page structure (`create` or `replace`, page metadata, ordered tabs, blocks, fields, actions, inline popups, optional reusable assets) and optional top-level `reaction.items[]` for whole-page interaction authoring. Each reaction item targets an explicit local key / bind key produced by the same blueprint run. Only explicitly listed reaction items are written. `rules: []` clears the targeted slot. Repeating the same `(type, target)` reaction slot in one blueprint is invalid. In `replace`, reaction targets always bind to the newly produced blueprint result, not historical nodes from the previous page version; if a slot must exist in the resulting surface, include it explicitly instead of relying on omission. Localized reaction edits on an existing surface should use `getReactionMeta` + `set*Rules` instead of applying a whole page blueprint again. The request body is that page-document JSON object itself and must not be JSON-stringified. Wrong: `{ "requestBody": "{\\"version\\":\\"1\\"}" }`. Internal planning details stay hidden. In `create`, `navigation.group.routeId` is the preferred way to target an existing menu group. It is exact-targeting only and cannot be mixed with existing-group metadata such as `icon`, `tooltip`, or `hideInMenu`; applyBlueprint create mode does not mutate existing group metadata, so callers should use `updateMenu` separately when that is required. When only `navigation.group.title` is provided, applyBlueprint reuses one existing same-title group when it is unique, creates a new group when none exists, and rejects ambiguous multi-match cases. Same-title reuse is title-only; if an existing group\'s metadata must change, use low-level `updateMenu` instead of applyBlueprint create. `replace` uses `target.pageSchemaUid`, updates only the explicit page-level fields provided in `page`, maps blueprint tabs to existing route-backed tab slots by index, rewrites each slot in order, removes trailing old tabs, and appends extra new tabs when needed. Tab and block keys are optional in the public blueprint; omit them unless custom layout or cross-block targeting needs a stable in-document identifier. `layout` is only allowed on tabs and inline popup documents; blocks themselves do not accept a `layout` property. Public applyBlueprint blocks do not support generic `form`; use `editForm` or `createForm`. Direct `table` / `list` / `gridCard` / `calendar` / `kanban` blocks may also provide non-empty block-level `defaultFilter`, which backfills the default `filter` action `settings.defaultFilter`; explicit filter-action `settings.defaultFilter` still wins. Inline popup documents may set `popup.tryTemplate=true` to ask the backend for the best compatible popup template before falling back to local popup content. Inline popup documents may also combine `popup.tryTemplate` with `popup.saveAsTemplate={ name, description, local? }`: a hit binds the matched template immediately and lets later inline popups in the same blueprint reuse that final bound template through `popup.template={ local, mode }`, while a miss requires explicit local `popup.blocks` so the fallback popup can be saved and reused. Custom `edit` popups that provide `popup.blocks` must include exactly one `editForm` block; that `editForm` may omit `resource` and then inherits the opener\'s current-record context. When layout is omitted, applyBlueprint auto-generates a simple top-to-bottom layout. When a `replace` run expands a page to multiple tabs while the current page still has `enableTabs=false`, callers must set `page.enableTabs=true` explicitly. The response hides execution internals and returns only the resolved page target and final surface readback.'
|
|
472
475
|
),
|
|
473
476
|
requestBody: {
|
|
474
477
|
required: true,
|
|
@@ -484,6 +487,10 @@ const actionDocs = {
|
|
|
484
487
|
replacePage: {
|
|
485
488
|
summary: "Replace one existing Modern page by pageSchemaUid",
|
|
486
489
|
value: import_flow_surfaces.flowSurfaceExamples.applyBlueprintReplace
|
|
490
|
+
},
|
|
491
|
+
calendarPage: {
|
|
492
|
+
summary: "Create a direct calendar block with block-level defaultFilter",
|
|
493
|
+
value: import_flow_surfaces.flowSurfaceExamples.applyBlueprintCalendar
|
|
487
494
|
}
|
|
488
495
|
}
|
|
489
496
|
}
|
|
@@ -526,7 +533,7 @@ const actionDocs = {
|
|
|
526
533
|
tags: [FLOW_SURFACES_TAG],
|
|
527
534
|
summary: "Compose blocks, fields, actions and simple layout under an existing surface",
|
|
528
535
|
description: valuesCompatibilityNote(
|
|
529
|
-
'Organizes content under an existing page/tab/grid/popup using the public block/action/field semantics as a low-level building primitive. The caller does not need to pass raw `use`, `fieldUse`, or `stepParams`. Blocks, fields, and actions can declare stable `key` values, and the compose result returns the same keys so later orchestration can reference nested popup or form nodes deterministically. Direct `table` / `list` / `gridCard` blocks may provide block-level `defaultFilter
|
|
536
|
+
'Organizes content under an existing page/tab/grid/popup using the public block/action/field semantics as a low-level building primitive. The caller does not need to pass raw `use`, `fieldUse`, or `stepParams`. Blocks, fields, and actions can declare stable `key` values, and the compose result returns the same keys so later orchestration can reference nested popup or form nodes deterministically. Direct `table` / `list` / `gridCard` / `calendar` / `kanban` blocks may provide block-level `defaultFilter`; backend runtime compatibility remains compatibility-tolerant for omitted or empty values, and any provided value backfills the default `filter` action `settings.defaultFilter`. Explicit filter-action `settings.defaultFilter` still wins. Blocks may be created from `template`, and form templates can set `template.usage="fields"` to import only their grid fields. Popup-capable actions and fields may reuse `popup.template`, set `popup.tryTemplate=true` to ask the backend for one compatible popup template before falling back to local/default popup behavior, or combine `popup.tryTemplate` with `popup.saveAsTemplate={ name, description, local? }`: a hit binds the matched template immediately and lets later popup-capable fields/actions in the same compose call reuse that final bound template through `popup.template={ local, mode }`, while a miss requires explicit local `popup.blocks` so the fallback popup can be saved and reused. For collection blocks under a popup, check `catalog.blocks[].resourceBindings` first. The `select / subForm / bulkEditForm` scene is currently recognized only, and popup collection block creation is not supported in that scene. For approval surfaces, use `applyApprovalBlueprint` first to bootstrap or replace the bound approval root; use `compose` only after that root already exists.'
|
|
530
537
|
),
|
|
531
538
|
requestBody: {
|
|
532
539
|
required: true,
|
|
@@ -766,7 +773,7 @@ const actionDocs = {
|
|
|
766
773
|
tags: [FLOW_SURFACES_TAG],
|
|
767
774
|
summary: "Add a block under a surface or grid container",
|
|
768
775
|
description: valuesCompatibilityNote(
|
|
769
|
-
'Creates a block by catalog key or an explicitly supported block use. It can also create from `template`, using `mode="reference"` or `mode="copy"`. Form templates may set `template.usage="fields"` to create a fresh host block and import only its grid fields. Popup-capable host nodes automatically receive the popup shell. For collection blocks under a popup, check `catalog.blocks[].resourceBindings` first, then pass the semantic `resource.binding`. The lower-level `resourceInit` is still accepted for compatibility, but the server validates it against popup semantics. `resource` and `resourceInit` are mutually exclusive. Direct `table` / `list` / `gridCard` creation may also provide block-level `defaultFilter
|
|
776
|
+
'Creates a block by catalog key or an explicitly supported block use. It can also create from `template`, using `mode="reference"` or `mode="copy"`. Form templates may set `template.usage="fields"` to create a fresh host block and import only its grid fields. Popup-capable host nodes automatically receive the popup shell. For collection blocks under a popup, check `catalog.blocks[].resourceBindings` first, then pass the semantic `resource.binding`. The lower-level `resourceInit` is still accepted for compatibility, but the server validates it against popup semantics. `resource` and `resourceInit` are mutually exclusive. Direct `table` / `list` / `gridCard` / `calendar` / `kanban` creation may also provide block-level `defaultFilter`; backend runtime compatibility remains tolerant of omitted or empty values, and any provided value backfills the auto-created default filter action. Legacy `defaultActionSettings.filter.defaultFilter` is still supported for compatibility and wins when both are provided. The `select / subForm / bulkEditForm` scene is currently recognized only, and popup collection block creation is not supported in that scene. Direct add does not accept raw `props` / `decoratorProps` / `stepParams` / `flowRegistry`. Use `settings` and reuse the public configuration semantics from `configure.changes` plus the catalog item/node `configureOptions`. Approval block keys are only exposed under approval grids and do not auto-create an approval root; bootstrap approval surfaces with `applyApprovalBlueprint` first.'
|
|
770
777
|
),
|
|
771
778
|
requestBody: {
|
|
772
779
|
required: true,
|
|
@@ -934,7 +941,7 @@ const actionDocs = {
|
|
|
934
941
|
tags: [FLOW_SURFACES_TAG],
|
|
935
942
|
summary: "Add multiple blocks sequentially under the same target",
|
|
936
943
|
description: valuesCompatibilityNote(
|
|
937
|
-
"Creates multiple blocks sequentially under the same target. Each item may include `settings`, `defaultFilter`, `defaultActionSettings`, or `template`, but raw `props` / `decoratorProps` / `stepParams` / `flowRegistry` are not accepted. Direct `table` / `list` / `gridCard` items may use block-level `defaultFilter` to backfill the auto-created default filter action. Legacy `defaultActionSettings.filter.defaultFilter` is still supported for compatibility and wins when both are provided. Partial-success semantics apply: a failure in one item does not roll back the others. Results are returned in input order as `index/key/ok/result/error`, and each `error` always includes `message/type/code/status`."
|
|
944
|
+
"Creates multiple blocks sequentially under the same target. Each item may include `settings`, `defaultFilter`, `defaultActionSettings`, or `template`, but raw `props` / `decoratorProps` / `stepParams` / `flowRegistry` are not accepted. Direct `table` / `list` / `gridCard` / `calendar` / `kanban` items may use block-level `defaultFilter` to backfill the auto-created default filter action; backend runtime compatibility remains tolerant of omitted or empty values. Legacy `defaultActionSettings.filter.defaultFilter` is still supported for compatibility and wins when both are provided. Partial-success semantics apply: a failure in one item does not roll back the others. Results are returned in input order as `index/key/ok/result/error`, and each `error` always includes `message/type/code/status`."
|
|
938
945
|
),
|
|
939
946
|
requestBody: requestBody("FlowSurfaceAddBlocksRequest", import_flow_surfaces.flowSurfaceExamples.addBlocks),
|
|
940
947
|
responses: responses("FlowSurfaceAddBlocksResult")
|
|
@@ -2431,7 +2438,7 @@ const schemas = {
|
|
|
2431
2438
|
},
|
|
2432
2439
|
actions: {
|
|
2433
2440
|
type: "array",
|
|
2434
|
-
description: "Block-level actions. For table/list/gridCard, prefer block-wide collection actions here.",
|
|
2441
|
+
description: "Block-level actions. For table/list/gridCard/calendar/kanban, prefer block-wide collection actions here.",
|
|
2435
2442
|
items: ref("FlowSurfaceComposeActionSpec")
|
|
2436
2443
|
},
|
|
2437
2444
|
recordActions: {
|
|
@@ -3477,7 +3484,7 @@ const schemas = {
|
|
|
3477
3484
|
settings: ANY_OBJECT_SCHEMA,
|
|
3478
3485
|
defaultFilter: {
|
|
3479
3486
|
allOf: [ref("FlowSurfaceFilterGroup")],
|
|
3480
|
-
description:
|
|
3487
|
+
description: APPLY_BLUEPRINT_DATA_SURFACE_BLOCK_DEFAULT_FILTER_DESCRIPTION
|
|
3481
3488
|
},
|
|
3482
3489
|
fields: {
|
|
3483
3490
|
type: "array",
|
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-beta.
|
|
7
|
+
"version": "2.1.0-beta.19",
|
|
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": "
|
|
27
|
+
"gitHead": "d89ab08dbcb25877de69827d5bad6823c27b2cbb"
|
|
28
28
|
}
|