@nocobase/plugin-flow-engine 2.1.0-beta.23 → 2.1.0-beta.25
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/index.js +1 -0
- 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/blueprint/compile-blocks.d.ts +2 -1
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +142 -22
- package/dist/server/flow-surfaces/blueprint/compile-plan.d.ts +2 -1
- package/dist/server/flow-surfaces/blueprint/compile-plan.js +8 -8
- package/dist/server/flow-surfaces/blueprint/normalize-document.js +5 -14
- package/dist/server/flow-surfaces/blueprint/private-utils.d.ts +0 -1
- package/dist/server/flow-surfaces/blueprint/private-utils.js +0 -3
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +1 -1
- package/dist/server/flow-surfaces/builder.d.ts +1 -0
- package/dist/server/flow-surfaces/builder.js +167 -53
- package/dist/server/flow-surfaces/catalog.js +59 -3
- package/dist/server/flow-surfaces/compose-compiler.d.ts +0 -1
- package/dist/server/flow-surfaces/compose-compiler.js +0 -1
- package/dist/server/flow-surfaces/configure-options.js +4 -4
- package/dist/server/flow-surfaces/contract-guard.js +11 -3
- package/dist/server/flow-surfaces/default-block-actions.js +11 -10
- package/dist/server/flow-surfaces/field-type-resolver.d.ts +0 -1
- package/dist/server/flow-surfaces/field-type-resolver.js +3 -13
- package/dist/server/flow-surfaces/hidden-popup-calendar.d.ts +86 -0
- package/dist/server/flow-surfaces/hidden-popup-calendar.js +554 -0
- package/dist/server/flow-surfaces/hidden-popup-contract.d.ts +116 -0
- package/dist/server/flow-surfaces/hidden-popup-contract.js +611 -0
- package/dist/server/flow-surfaces/hidden-popup-kanban.d.ts +62 -0
- package/dist/server/flow-surfaces/hidden-popup-kanban.js +651 -0
- package/dist/server/flow-surfaces/placement.js +1 -0
- package/dist/server/flow-surfaces/public-compatibility.d.ts +28 -0
- package/dist/server/flow-surfaces/public-compatibility.js +161 -0
- package/dist/server/flow-surfaces/service-utils.d.ts +0 -1
- package/dist/server/flow-surfaces/service-utils.js +0 -6
- package/dist/server/flow-surfaces/service.d.ts +66 -10
- package/dist/server/flow-surfaces/service.js +1677 -795
- package/dist/swagger/flow-surfaces.d.ts +0 -29
- package/dist/swagger/flow-surfaces.js +8 -17
- package/dist/swagger/index.d.ts +0 -29
- package/package.json +2 -2
|
@@ -129,13 +129,6 @@ declare const _default: {
|
|
|
129
129
|
};
|
|
130
130
|
description: string;
|
|
131
131
|
};
|
|
132
|
-
selectorFields: {
|
|
133
|
-
type: string;
|
|
134
|
-
items: {
|
|
135
|
-
type: string;
|
|
136
|
-
};
|
|
137
|
-
description: string;
|
|
138
|
-
};
|
|
139
132
|
titleField: {
|
|
140
133
|
type: string;
|
|
141
134
|
};
|
|
@@ -197,7 +190,6 @@ declare const _default: {
|
|
|
197
190
|
fieldPath?: undefined;
|
|
198
191
|
fieldType?: undefined;
|
|
199
192
|
fields?: undefined;
|
|
200
|
-
selectorFields?: undefined;
|
|
201
193
|
titleField?: undefined;
|
|
202
194
|
openMode?: undefined;
|
|
203
195
|
popupSize?: undefined;
|
|
@@ -2083,13 +2075,6 @@ declare const _default: {
|
|
|
2083
2075
|
};
|
|
2084
2076
|
description: string;
|
|
2085
2077
|
};
|
|
2086
|
-
selectorFields: {
|
|
2087
|
-
type: string;
|
|
2088
|
-
items: {
|
|
2089
|
-
type: string;
|
|
2090
|
-
};
|
|
2091
|
-
description: string;
|
|
2092
|
-
};
|
|
2093
2078
|
titleField: {
|
|
2094
2079
|
type: string;
|
|
2095
2080
|
};
|
|
@@ -3409,13 +3394,6 @@ declare const _default: {
|
|
|
3409
3394
|
};
|
|
3410
3395
|
description: string;
|
|
3411
3396
|
};
|
|
3412
|
-
selectorFields: {
|
|
3413
|
-
type: string;
|
|
3414
|
-
items: {
|
|
3415
|
-
type: string;
|
|
3416
|
-
};
|
|
3417
|
-
description: string;
|
|
3418
|
-
};
|
|
3419
3397
|
titleField: {
|
|
3420
3398
|
type: string;
|
|
3421
3399
|
};
|
|
@@ -3715,13 +3693,6 @@ declare const _default: {
|
|
|
3715
3693
|
};
|
|
3716
3694
|
description: string;
|
|
3717
3695
|
};
|
|
3718
|
-
selectorFields: {
|
|
3719
|
-
type: string;
|
|
3720
|
-
items: {
|
|
3721
|
-
type: string;
|
|
3722
|
-
};
|
|
3723
|
-
description: string;
|
|
3724
|
-
};
|
|
3725
3696
|
titleField: {
|
|
3726
3697
|
type: string;
|
|
3727
3698
|
};
|
|
@@ -156,12 +156,7 @@ const RELATION_FIELD_TYPE_SCHEMA = {
|
|
|
156
156
|
const RELATION_TARGET_FIELDS_SCHEMA = {
|
|
157
157
|
type: "array",
|
|
158
158
|
items: { type: "string" },
|
|
159
|
-
description: "Relation target record fields
|
|
160
|
-
};
|
|
161
|
-
const RELATION_SELECTOR_FIELDS_SCHEMA = {
|
|
162
|
-
type: "array",
|
|
163
|
-
items: { type: "string" },
|
|
164
|
-
description: "Record picker selector table fields. Do not mix with fields on the same field object."
|
|
159
|
+
description: "Relation target record fields. For picker fields, these become selector table columns; for nested relation fields, these become sub-table columns or embedded sub-form/detail fields."
|
|
165
160
|
};
|
|
166
161
|
const ADD_CHILD_TREE_TABLE_NOTE = "`addChild` is only valid when the live target `catalog.recordActions` exposes it, which normally means a table bound to a tree collection with `treeTable` enabled.";
|
|
167
162
|
const APPLY_BLUEPRINT_ADD_CHILD_NOTE = "`addChild` is not auto-promoted from `actions`; author it only under `recordActions`, and only when the live target `catalog.recordActions` exposes it for a tree table.";
|
|
@@ -498,7 +493,7 @@ const actionDocs = {
|
|
|
498
493
|
tags: [FLOW_SURFACES_TAG],
|
|
499
494
|
summary: "Apply a page blueprint to create or replace one Modern page",
|
|
500
495
|
description: valuesCompatibilityNote(
|
|
501
|
-
'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`
|
|
496
|
+
'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` has the highest priority when targeting an existing menu group. If `routeId` is present, applyBlueprint ignores `title`, `icon`, `tooltip`, and `hideInMenu` on `navigation.group`; applyBlueprint create mode does not mutate existing group metadata, so callers should use `updateMenu` separately when that is required. When `routeId` is omitted and `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. Metadata such as `icon`, `tooltip`, and `hideInMenu` is used only when a new group is created and is ignored when an existing group is reused. `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.'
|
|
502
497
|
),
|
|
503
498
|
requestBody: {
|
|
504
499
|
required: true,
|
|
@@ -838,7 +833,7 @@ const actionDocs = {
|
|
|
838
833
|
tags: [FLOW_SURFACES_TAG],
|
|
839
834
|
summary: "Add a field wrapper and inner field under a field container",
|
|
840
835
|
description: valuesCompatibilityNote(
|
|
841
|
-
"Automatically derives the wrapper/inner-field combination from the container use and the field interface. Relation fields can request a public `fieldType` such as `picker`, `subTable`, or `popupSubTable`, with optional flat `fields
|
|
836
|
+
"Automatically derives the wrapper/inner-field combination from the container use and the field interface. Relation fields can request a public `fieldType` such as `picker`, `subTable`, or `popupSubTable`, with optional flat `fields` and `titleField`. For picker fields, `fields` configures selector table columns; for nested relation fields, `fields` configures nested fields/columns. Direct add does not accept raw `wrapperProps` / `fieldProps` / `props` / `decoratorProps` / `stepParams` / `flowRegistry` or internal field model keys. Use `settings` and reuse the public configuration semantics from `configure.changes` plus the catalog item/node `configureOptions`. Popup-capable fields can also pass `popup` directly to append a local popup subtree or `popup.template` to reuse a saved popup template in `reference` / `copy` mode. `popup.tryTemplate=true` asks the backend to auto-select a compatible popup template first, preferring the same relation when one exists and otherwise falling back to a compatible non-relation template. It may be combined with `popup.saveAsTemplate={ name, description }`: a hit reuses the matched template directly, while a miss requires explicit local `popup.blocks` so the fallback popup can be saved as a template reference. When `popup.template` is present, `popup.title` still applies, while local `popup.mode` / `popup.blocks` / `popup.layout` are accepted but ignored. If local openView is enabled but no popup content is provided, the server fills in the popup page/tab/grid shell automatically. Under approval forms, direct field creation preserves the `PatternFormFieldModel` inner node semantics and does not allow standalone `jsItem`."
|
|
842
837
|
),
|
|
843
838
|
requestBody: {
|
|
844
839
|
required: true,
|
|
@@ -2153,7 +2148,6 @@ const schemas = {
|
|
|
2153
2148
|
},
|
|
2154
2149
|
fieldType: RELATION_FIELD_TYPE_SCHEMA,
|
|
2155
2150
|
fields: RELATION_TARGET_FIELDS_SCHEMA,
|
|
2156
|
-
selectorFields: RELATION_SELECTOR_FIELDS_SCHEMA,
|
|
2157
2151
|
titleField: { type: "string" },
|
|
2158
2152
|
openMode: { type: "string", example: "drawer" },
|
|
2159
2153
|
popupSize: { type: "string", example: "medium" },
|
|
@@ -3421,7 +3415,6 @@ const schemas = {
|
|
|
3421
3415
|
type: { type: "string" },
|
|
3422
3416
|
fieldType: RELATION_FIELD_TYPE_SCHEMA,
|
|
3423
3417
|
fields: RELATION_TARGET_FIELDS_SCHEMA,
|
|
3424
|
-
selectorFields: RELATION_SELECTOR_FIELDS_SCHEMA,
|
|
3425
3418
|
titleField: { type: "string" },
|
|
3426
3419
|
openMode: { type: "string", example: "drawer" },
|
|
3427
3420
|
popupSize: { type: "string", example: "medium" },
|
|
@@ -3579,23 +3572,23 @@ const schemas = {
|
|
|
3579
3572
|
properties: {
|
|
3580
3573
|
routeId: {
|
|
3581
3574
|
...STRING_OR_INTEGER_SCHEMA,
|
|
3582
|
-
description: "Preferred existing menu-group route id
|
|
3575
|
+
description: "Preferred existing menu-group route id. When present, routeId has the highest priority and title/icon/tooltip/hideInMenu are ignored. applyBlueprint create mode does not mutate existing group metadata; use low-level updateMenu separately when needed."
|
|
3583
3576
|
},
|
|
3584
3577
|
title: {
|
|
3585
3578
|
type: "string",
|
|
3586
|
-
description: "Group title for create mode. When `routeId` is omitted, applyBlueprint reuses a same-title group if the match is unique, creates one when no group exists, and rejects ambiguous multi-match cases.
|
|
3579
|
+
description: "Group title for create mode. When `routeId` is omitted, applyBlueprint reuses a same-title group if the match is unique, creates one when no group exists, and rejects ambiguous multi-match cases. If an existing group is reused, group metadata is ignored; use low-level updateMenu to change existing group metadata."
|
|
3587
3580
|
},
|
|
3588
3581
|
icon: {
|
|
3589
3582
|
type: "string",
|
|
3590
|
-
description: "Group icon used only when create mode actually creates a new menu group.
|
|
3583
|
+
description: "Group icon used only when create mode actually creates a new menu group. Ignored when routeId is present or when title resolves to an existing group."
|
|
3591
3584
|
},
|
|
3592
3585
|
tooltip: {
|
|
3593
3586
|
type: "string",
|
|
3594
|
-
description: "Group tooltip used only when create mode actually creates a new menu group.
|
|
3587
|
+
description: "Group tooltip used only when create mode actually creates a new menu group. Ignored when routeId is present or when title resolves to an existing group."
|
|
3595
3588
|
},
|
|
3596
3589
|
hideInMenu: {
|
|
3597
3590
|
type: "boolean",
|
|
3598
|
-
description: "Group hidden-state used only when create mode actually creates a new menu group.
|
|
3591
|
+
description: "Group hidden-state used only when create mode actually creates a new menu group. Ignored when routeId is present or when title resolves to an existing group."
|
|
3599
3592
|
}
|
|
3600
3593
|
},
|
|
3601
3594
|
additionalProperties: false
|
|
@@ -4425,7 +4418,6 @@ const schemas = {
|
|
|
4425
4418
|
},
|
|
4426
4419
|
fieldType: RELATION_FIELD_TYPE_SCHEMA,
|
|
4427
4420
|
fields: RELATION_TARGET_FIELDS_SCHEMA,
|
|
4428
|
-
selectorFields: RELATION_SELECTOR_FIELDS_SCHEMA,
|
|
4429
4421
|
titleField: { type: "string" },
|
|
4430
4422
|
openMode: { type: "string", example: "drawer" },
|
|
4431
4423
|
popupSize: { type: "string", example: "medium" },
|
|
@@ -4656,7 +4648,6 @@ const schemas = {
|
|
|
4656
4648
|
},
|
|
4657
4649
|
fieldType: RELATION_FIELD_TYPE_SCHEMA,
|
|
4658
4650
|
fields: RELATION_TARGET_FIELDS_SCHEMA,
|
|
4659
|
-
selectorFields: RELATION_SELECTOR_FIELDS_SCHEMA,
|
|
4660
4651
|
titleField: { type: "string" },
|
|
4661
4652
|
openMode: { type: "string", example: "drawer" },
|
|
4662
4653
|
popupSize: { type: "string", example: "medium" },
|
package/dist/swagger/index.d.ts
CHANGED
|
@@ -129,13 +129,6 @@ declare const _default: {
|
|
|
129
129
|
};
|
|
130
130
|
description: string;
|
|
131
131
|
};
|
|
132
|
-
selectorFields: {
|
|
133
|
-
type: string;
|
|
134
|
-
items: {
|
|
135
|
-
type: string;
|
|
136
|
-
};
|
|
137
|
-
description: string;
|
|
138
|
-
};
|
|
139
132
|
titleField: {
|
|
140
133
|
type: string;
|
|
141
134
|
};
|
|
@@ -197,7 +190,6 @@ declare const _default: {
|
|
|
197
190
|
fieldPath?: undefined;
|
|
198
191
|
fieldType?: undefined;
|
|
199
192
|
fields?: undefined;
|
|
200
|
-
selectorFields?: undefined;
|
|
201
193
|
titleField?: undefined;
|
|
202
194
|
openMode?: undefined;
|
|
203
195
|
popupSize?: undefined;
|
|
@@ -2083,13 +2075,6 @@ declare const _default: {
|
|
|
2083
2075
|
};
|
|
2084
2076
|
description: string;
|
|
2085
2077
|
};
|
|
2086
|
-
selectorFields: {
|
|
2087
|
-
type: string;
|
|
2088
|
-
items: {
|
|
2089
|
-
type: string;
|
|
2090
|
-
};
|
|
2091
|
-
description: string;
|
|
2092
|
-
};
|
|
2093
2078
|
titleField: {
|
|
2094
2079
|
type: string;
|
|
2095
2080
|
};
|
|
@@ -3409,13 +3394,6 @@ declare const _default: {
|
|
|
3409
3394
|
};
|
|
3410
3395
|
description: string;
|
|
3411
3396
|
};
|
|
3412
|
-
selectorFields: {
|
|
3413
|
-
type: string;
|
|
3414
|
-
items: {
|
|
3415
|
-
type: string;
|
|
3416
|
-
};
|
|
3417
|
-
description: string;
|
|
3418
|
-
};
|
|
3419
3397
|
titleField: {
|
|
3420
3398
|
type: string;
|
|
3421
3399
|
};
|
|
@@ -3715,13 +3693,6 @@ declare const _default: {
|
|
|
3715
3693
|
};
|
|
3716
3694
|
description: string;
|
|
3717
3695
|
};
|
|
3718
|
-
selectorFields: {
|
|
3719
|
-
type: string;
|
|
3720
|
-
items: {
|
|
3721
|
-
type: string;
|
|
3722
|
-
};
|
|
3723
|
-
description: string;
|
|
3724
|
-
};
|
|
3725
3696
|
titleField: {
|
|
3726
3697
|
type: string;
|
|
3727
3698
|
};
|
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.25",
|
|
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": "824f8b8200e9fe086135768934d3ef427b212446"
|
|
28
28
|
}
|