@nocobase/plugin-flow-engine 2.1.31 → 2.2.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.
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextApis.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextEnvs.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextVars.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/lintAndTestJS.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/patchJSCode.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/readJSCode.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/writeJSCode.js +2 -2
- package/dist/ai/docs/runjs/context/ai.md +206 -0
- package/dist/externalVersion.js +9 -9
- package/dist/node_modules/@ant-design/icons-svg/package.json +1 -1
- package/dist/node_modules/acorn/package.json +1 -1
- package/dist/node_modules/acorn-jsx/package.json +1 -1
- package/dist/node_modules/acorn-walk/package.json +1 -1
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-surfaces/authoring-validation.d.ts +3 -1
- package/dist/server/flow-surfaces/authoring-validation.js +30 -10
- package/dist/server/flow-surfaces/blueprint/compile-plan.js +23 -15
- package/dist/server/flow-surfaces/blueprint/normalize-document.js +18 -1
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +2 -0
- package/dist/server/flow-surfaces/builder.js +24 -4
- package/dist/server/flow-surfaces/constants.d.ts +9 -2
- package/dist/server/flow-surfaces/constants.js +1 -0
- package/dist/server/flow-surfaces/errors.d.ts +2 -2
- package/dist/server/flow-surfaces/errors.js +4 -4
- package/dist/server/flow-surfaces/navigation-targets.d.ts +73 -0
- package/dist/server/flow-surfaces/navigation-targets.js +439 -0
- package/dist/server/flow-surfaces/runjs-authoring/rules.js +0 -2
- package/dist/server/flow-surfaces/runjs-authoring/runtime/constants.d.ts +0 -1
- package/dist/server/flow-surfaces/runjs-authoring/runtime/constants.js +12 -19
- package/dist/server/flow-surfaces/runjs-authoring/runtime/types.d.ts +0 -12
- package/dist/server/flow-surfaces/runjs-authoring/scan/index.d.ts +0 -14
- package/dist/server/flow-surfaces/runjs-authoring/scan/index.js +1 -7
- package/dist/server/flow-surfaces/runjs-authoring/scan/source-patterns.d.ts +0 -14
- package/dist/server/flow-surfaces/runjs-authoring/scan/source-patterns.js +18 -73
- package/dist/server/flow-surfaces/runjs-authoring/types.d.ts +1 -1
- package/dist/server/flow-surfaces/runjs-authoring/validators/index.js +9 -53
- package/dist/server/flow-surfaces/service.d.ts +31 -0
- package/dist/server/flow-surfaces/service.js +749 -53
- package/dist/swagger/flow-surfaces.d.ts +108 -0
- package/dist/swagger/flow-surfaces.js +101 -8
- package/dist/swagger/index.d.ts +108 -0
- package/package.json +2 -2
- package/dist/server/flow-surfaces/runjs-authoring/blocked-global-stop/index.d.ts +0 -10
- package/dist/server/flow-surfaces/runjs-authoring/blocked-global-stop/index.js +0 -40
|
@@ -2604,6 +2604,86 @@ declare const _default: {
|
|
|
2604
2604
|
};
|
|
2605
2605
|
additionalProperties: boolean;
|
|
2606
2606
|
};
|
|
2607
|
+
FlowSurfaceListNavigationTargetsRequest: {
|
|
2608
|
+
type: string;
|
|
2609
|
+
properties: {};
|
|
2610
|
+
additionalProperties: boolean;
|
|
2611
|
+
};
|
|
2612
|
+
FlowSurfaceNavigationTargetCapabilities: {
|
|
2613
|
+
type: string;
|
|
2614
|
+
required: string[];
|
|
2615
|
+
properties: {
|
|
2616
|
+
multiPortal: {
|
|
2617
|
+
type: string;
|
|
2618
|
+
description: string;
|
|
2619
|
+
};
|
|
2620
|
+
};
|
|
2621
|
+
additionalProperties: boolean;
|
|
2622
|
+
};
|
|
2623
|
+
FlowSurfaceNavigationTarget: {
|
|
2624
|
+
type: string;
|
|
2625
|
+
required: string[];
|
|
2626
|
+
properties: {
|
|
2627
|
+
kind: {
|
|
2628
|
+
type: string;
|
|
2629
|
+
enum: string[];
|
|
2630
|
+
};
|
|
2631
|
+
uid: {
|
|
2632
|
+
type: string;
|
|
2633
|
+
description: string;
|
|
2634
|
+
};
|
|
2635
|
+
title: {
|
|
2636
|
+
type: string;
|
|
2637
|
+
};
|
|
2638
|
+
icon: {
|
|
2639
|
+
type: string;
|
|
2640
|
+
nullable: boolean;
|
|
2641
|
+
};
|
|
2642
|
+
layoutUid: {
|
|
2643
|
+
type: string;
|
|
2644
|
+
};
|
|
2645
|
+
layoutType: {
|
|
2646
|
+
type: string;
|
|
2647
|
+
};
|
|
2648
|
+
routeName: {
|
|
2649
|
+
type: string;
|
|
2650
|
+
};
|
|
2651
|
+
routePath: {
|
|
2652
|
+
type: string;
|
|
2653
|
+
};
|
|
2654
|
+
authCheck: {
|
|
2655
|
+
type: string;
|
|
2656
|
+
};
|
|
2657
|
+
default: {
|
|
2658
|
+
type: string;
|
|
2659
|
+
};
|
|
2660
|
+
portalUid: {
|
|
2661
|
+
type: string;
|
|
2662
|
+
description: string;
|
|
2663
|
+
};
|
|
2664
|
+
};
|
|
2665
|
+
additionalProperties: boolean;
|
|
2666
|
+
};
|
|
2667
|
+
FlowSurfaceListNavigationTargetsResult: {
|
|
2668
|
+
type: string;
|
|
2669
|
+
required: string[];
|
|
2670
|
+
properties: {
|
|
2671
|
+
version: {
|
|
2672
|
+
type: string;
|
|
2673
|
+
enum: string[];
|
|
2674
|
+
};
|
|
2675
|
+
capabilities: {
|
|
2676
|
+
$ref: string;
|
|
2677
|
+
};
|
|
2678
|
+
targets: {
|
|
2679
|
+
type: string;
|
|
2680
|
+
items: {
|
|
2681
|
+
$ref: string;
|
|
2682
|
+
};
|
|
2683
|
+
};
|
|
2684
|
+
};
|
|
2685
|
+
additionalProperties: boolean;
|
|
2686
|
+
};
|
|
2607
2687
|
FlowSurfaceApplyBlueprintNavigationGroup: {
|
|
2608
2688
|
type: string;
|
|
2609
2689
|
properties: {
|
|
@@ -2635,6 +2715,14 @@ declare const _default: {
|
|
|
2635
2715
|
FlowSurfaceApplyBlueprintNavigation: {
|
|
2636
2716
|
type: string;
|
|
2637
2717
|
properties: {
|
|
2718
|
+
layoutUid: {
|
|
2719
|
+
type: string;
|
|
2720
|
+
description: string;
|
|
2721
|
+
};
|
|
2722
|
+
portalUid: {
|
|
2723
|
+
type: string;
|
|
2724
|
+
description: string;
|
|
2725
|
+
};
|
|
2638
2726
|
group: {
|
|
2639
2727
|
$ref: string;
|
|
2640
2728
|
};
|
|
@@ -3148,6 +3236,14 @@ declare const _default: {
|
|
|
3148
3236
|
type: string;
|
|
3149
3237
|
required: string[];
|
|
3150
3238
|
properties: {
|
|
3239
|
+
layoutUid: {
|
|
3240
|
+
type: string;
|
|
3241
|
+
description: string;
|
|
3242
|
+
};
|
|
3243
|
+
portalUid: {
|
|
3244
|
+
type: string;
|
|
3245
|
+
description: string;
|
|
3246
|
+
};
|
|
3151
3247
|
title: {
|
|
3152
3248
|
type: string;
|
|
3153
3249
|
};
|
|
@@ -3223,6 +3319,10 @@ declare const _default: {
|
|
|
3223
3319
|
type: string;
|
|
3224
3320
|
}[];
|
|
3225
3321
|
};
|
|
3322
|
+
portalUid: {
|
|
3323
|
+
type: string;
|
|
3324
|
+
description: string;
|
|
3325
|
+
};
|
|
3226
3326
|
title: {
|
|
3227
3327
|
type: string;
|
|
3228
3328
|
};
|
|
@@ -3270,6 +3370,14 @@ declare const _default: {
|
|
|
3270
3370
|
FlowSurfaceCreatePageRequest: {
|
|
3271
3371
|
type: string;
|
|
3272
3372
|
properties: {
|
|
3373
|
+
layoutUid: {
|
|
3374
|
+
type: string;
|
|
3375
|
+
description: string;
|
|
3376
|
+
};
|
|
3377
|
+
portalUid: {
|
|
3378
|
+
type: string;
|
|
3379
|
+
description: string;
|
|
3380
|
+
};
|
|
3273
3381
|
menuRouteId: {
|
|
3274
3382
|
oneOf: {
|
|
3275
3383
|
type: string;
|
|
@@ -500,7 +500,7 @@ function buildReactionCapabilitySchema(kind, ruleSchemaName, extraProperties = {
|
|
|
500
500
|
additionalProperties: false
|
|
501
501
|
};
|
|
502
502
|
}
|
|
503
|
-
const FLOW_SURFACES_READ_ACL_NOTE = "Read actions (`get` / `describeSurface` / `exportBlueprint` / `catalog` / `context` / `getReactionMeta` / `getEventFlowMeta` / `listTemplates` / `getTemplate`) are open to `loggedIn` by default. Write actions still require the `ui.flowSurfaces` snippet.";
|
|
503
|
+
const FLOW_SURFACES_READ_ACL_NOTE = "Read actions (`get` / `describeSurface` / `exportBlueprint` / `listNavigationTargets` / `catalog` / `context` / `getReactionMeta` / `getEventFlowMeta` / `listTemplates` / `getTemplate`) are open to `loggedIn` by default. Write actions still require the `ui.flowSurfaces` snippet.";
|
|
504
504
|
const templateActionDocs = (0, import_flow_surfaces2.createFlowSurfaceTemplateActionDocs)({
|
|
505
505
|
tag: FLOW_SURFACES_TAG,
|
|
506
506
|
readAclNote: FLOW_SURFACES_READ_ACL_NOTE,
|
|
@@ -619,11 +619,20 @@ const actionDocs = {
|
|
|
619
619
|
requestBody: requestBody("FlowSurfaceExportBlueprintRequest", import_flow_surfaces.flowSurfaceExamples.exportBlueprint),
|
|
620
620
|
responses: responses("FlowSurfaceExportBlueprintResponse")
|
|
621
621
|
},
|
|
622
|
+
listNavigationTargets: {
|
|
623
|
+
tags: [FLOW_SURFACES_TAG],
|
|
624
|
+
summary: "List available UI layouts and role-accessible Multi-portal entries",
|
|
625
|
+
description: valuesCompatibilityNote(
|
|
626
|
+
`Returns the default Admin target, enabled UI layouts, and enabled custom Multi-portal targets visible to the current roles. capabilities.multiPortal=false and an empty custom-portal set are normal when the commercial Multi-portal capability is not installed. Reserved default portal records are never returned as custom workspaces; Admin and Mobile use their ordinary layout uids. Call this action only when the user explicitly names a workspace or asks to discover navigation targets. ${FLOW_SURFACES_READ_ACL_NOTE}`
|
|
627
|
+
),
|
|
628
|
+
requestBody: requestBody("FlowSurfaceListNavigationTargetsRequest", {}),
|
|
629
|
+
responses: responses("FlowSurfaceListNavigationTargetsResult")
|
|
630
|
+
},
|
|
622
631
|
applyBlueprint: {
|
|
623
632
|
tags: [FLOW_SURFACES_TAG],
|
|
624
633
|
summary: "Apply a page blueprint to create or replace one Modern page",
|
|
625
634
|
description: valuesCompatibilityNote(
|
|
626
|
-
`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\`. AI employee actions use \`type: "aiEmployee"\` plus public \`settings.username\`, \`workContext\`, \`tasks\`, \`auto\`, and \`style\`; work context may target \`self\` or a same-blueprint block key and is persisted as real Flow Model \`uid\` values. For JS blocks/fields/actions, \`script\` is a non-empty string asset key into \`assets.scripts\`; put inline JS in \`settings.code\` and \`settings.version\`. Direct \`table\` / \`list\` / \`gridCard\` / \`calendar\` / \`kanban\` blocks may omit \`defaultFilter\`; the backend generates one from live metadata with up to 4 scalar/filterable fields. Explicit values must contain at least the smaller of 3 and the collection eligible-field count, and values with more than 4 fields are truncated before persistence. A valid explicit or generated block-level value backfills the default \`filter\` action \`settings.defaultFilter\`; explicit filter-action \`settings.defaultFilter\` still wins. ${TREE_TABLE_RECORD_ACTION_DEFAULTS_NOTE} ${APPLY_BLUEPRINT_TREE_TABLE_TITLE_FIELD_NOTE} 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.`
|
|
635
|
+
`In create mode, \`navigation.portalUid\` targets one enabled, role-accessible Multi-portal entry and is mutually exclusive with \`navigation.layoutUid\`. Portal-backed mobile layouts ignore \`navigation.group\`, while desktop-backed portals scope group reuse and duplicate-page identity to that portal. If Multi-portal is unavailable, ordinary requests without \`portalUid\` keep their existing Admin behavior. 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.layoutUid\` optionally scopes menu group reuse, duplicate page identity checks, and newly created routes to an enabled UI layout such as \`admin-layout-model\` or \`mobile-layout-model\`; when the target layout type is mobile, applyBlueprint ignores \`navigation.group\` and creates a root-level mobile tab page. When \`layoutUid\` is omitted, routes keep the existing admin/default inheritance behavior. In non-mobile \`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 in the target layout 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\`. AI employee actions use \`type: "aiEmployee"\` plus public \`settings.username\`, \`workContext\`, \`tasks\`, \`auto\`, and \`style\`; work context may target \`self\` or a same-blueprint block key and is persisted as real Flow Model \`uid\` values. For JS blocks/fields/actions, \`script\` is a non-empty string asset key into \`assets.scripts\`; put inline JS in \`settings.code\` and \`settings.version\`. Direct \`table\` / \`list\` / \`gridCard\` / \`calendar\` / \`kanban\` blocks may omit \`defaultFilter\`; the backend generates one from live metadata with up to 4 scalar/filterable fields. Explicit values must contain at least the smaller of 3 and the collection eligible-field count, and values with more than 4 fields are truncated before persistence. A valid explicit or generated block-level value backfills the default \`filter\` action \`settings.defaultFilter\`; explicit filter-action \`settings.defaultFilter\` still wins. ${TREE_TABLE_RECORD_ACTION_DEFAULTS_NOTE} ${APPLY_BLUEPRINT_TREE_TABLE_TITLE_FIELD_NOTE} 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.`
|
|
627
636
|
),
|
|
628
637
|
requestBody: {
|
|
629
638
|
required: true,
|
|
@@ -809,7 +818,7 @@ const actionDocs = {
|
|
|
809
818
|
tags: [FLOW_SURFACES_TAG],
|
|
810
819
|
summary: "Create a group menu or a bindable V2 menu item",
|
|
811
820
|
description: valuesCompatibilityNote(
|
|
812
|
-
'Creates a FlowSurfaces menu node. `type="group"` creates a menu group. `type="item"` creates a menu item that can be bound to a modern page (v2), and automatically fills in the flowPage route, the default hidden tab route, and the RootPageModel anchor.'
|
|
821
|
+
'Creates a FlowSurfaces menu node. `type="group"` creates a menu group. `type="item"` creates a menu item that can be bound to a modern page (v2), and automatically fills in the flowPage route, the default hidden tab route, and the RootPageModel anchor. Optional `layoutUid` scopes the route to an enabled UI layout. Optional `portalUid` scopes it to one enabled, role-accessible Multi-portal entry and is mutually exclusive with `layoutUid`. Omitted values keep the existing parent/default admin inheritance.'
|
|
813
822
|
),
|
|
814
823
|
requestBody: requestBody("FlowSurfaceCreateMenuRequest", import_flow_surfaces.flowSurfaceExamples.createMenu),
|
|
815
824
|
responses: responses("FlowSurfaceCreateMenuResult")
|
|
@@ -818,7 +827,7 @@ const actionDocs = {
|
|
|
818
827
|
tags: [FLOW_SURFACES_TAG],
|
|
819
828
|
summary: "Update menu title/icon/tooltip or move it under another group",
|
|
820
829
|
description: valuesCompatibilityNote(
|
|
821
|
-
"Updates menu display information, or moves a group / item to the top level or under another group. Only `group` and `flowPage` menu nodes are supported."
|
|
830
|
+
"Updates menu display information, or moves a group / item to the top level or under another group. Only `group` and `flowPage` menu nodes are supported. Pass `portalUid` when explicitly targeting a Multi-portal entry; the route and new parent must already belong to that portal."
|
|
822
831
|
),
|
|
823
832
|
requestBody: requestBody("FlowSurfaceUpdateMenuRequest", import_flow_surfaces.flowSurfaceExamples.updateMenu),
|
|
824
833
|
responses: responses("FlowSurfaceUpdateMenuResult")
|
|
@@ -827,7 +836,7 @@ const actionDocs = {
|
|
|
827
836
|
tags: [FLOW_SURFACES_TAG],
|
|
828
837
|
summary: "Initialize a modern page for an existing bindable menu item",
|
|
829
838
|
description: valuesCompatibilityNote(
|
|
830
|
-
"Initializes a modern page (v2) for an existing bindable menu item through `menuRouteId` first, and fills in the default BlockGridModel. In compatibility mode, if `menuRouteId` is omitted, the old behavior still applies and a top-level menu plus page will be created automatically. Before initialization, do not call page/tab lifecycle actions such as `addTab`, `updateTab`, `moveTab`, `removeTab`, or `destroyPage`."
|
|
839
|
+
"Initializes a modern page (v2) for an existing bindable menu item through `menuRouteId` first, and fills in the default BlockGridModel. Optional `layoutUid` asserts that the existing menu route belongs to the target UI layout. Optional `portalUid` asserts that it belongs to one enabled, role-accessible Multi-portal entry and is mutually exclusive with `layoutUid`. Omitted values preserve the route scope and keep default admin compatibility. In compatibility mode, if `menuRouteId` is omitted, the old behavior still applies and a top-level menu plus page will be created automatically. Before initialization, do not call page/tab lifecycle actions such as `addTab`, `updateTab`, `moveTab`, `removeTab`, or `destroyPage`."
|
|
831
840
|
),
|
|
832
841
|
requestBody: requestBody("FlowSurfaceCreatePageRequest", import_flow_surfaces.flowSurfaceExamples.createPage),
|
|
833
842
|
responses: responses("FlowSurfaceCreatePageResult")
|
|
@@ -4162,16 +4171,72 @@ const schemas = {
|
|
|
4162
4171
|
},
|
|
4163
4172
|
additionalProperties: false
|
|
4164
4173
|
},
|
|
4174
|
+
FlowSurfaceListNavigationTargetsRequest: {
|
|
4175
|
+
type: "object",
|
|
4176
|
+
properties: {},
|
|
4177
|
+
additionalProperties: false
|
|
4178
|
+
},
|
|
4179
|
+
FlowSurfaceNavigationTargetCapabilities: {
|
|
4180
|
+
type: "object",
|
|
4181
|
+
required: ["multiPortal"],
|
|
4182
|
+
properties: {
|
|
4183
|
+
multiPortal: {
|
|
4184
|
+
type: "boolean",
|
|
4185
|
+
description: "Whether the optional Multi-portal collections and desktop-route relation are available."
|
|
4186
|
+
}
|
|
4187
|
+
},
|
|
4188
|
+
additionalProperties: false
|
|
4189
|
+
},
|
|
4190
|
+
FlowSurfaceNavigationTarget: {
|
|
4191
|
+
type: "object",
|
|
4192
|
+
required: ["kind", "uid", "title", "layoutUid"],
|
|
4193
|
+
properties: {
|
|
4194
|
+
kind: {
|
|
4195
|
+
type: "string",
|
|
4196
|
+
enum: ["layout", "portal"]
|
|
4197
|
+
},
|
|
4198
|
+
uid: {
|
|
4199
|
+
type: "string",
|
|
4200
|
+
description: "Stable target uid used for exact matching. Portal targets use their portal uid."
|
|
4201
|
+
},
|
|
4202
|
+
title: { type: "string" },
|
|
4203
|
+
icon: { type: "string", nullable: true },
|
|
4204
|
+
layoutUid: { type: "string" },
|
|
4205
|
+
layoutType: { type: "string" },
|
|
4206
|
+
routeName: { type: "string" },
|
|
4207
|
+
routePath: { type: "string" },
|
|
4208
|
+
authCheck: { type: "boolean" },
|
|
4209
|
+
default: { type: "boolean" },
|
|
4210
|
+
portalUid: {
|
|
4211
|
+
type: "string",
|
|
4212
|
+
description: "Present only for a custom Multi-portal target."
|
|
4213
|
+
}
|
|
4214
|
+
},
|
|
4215
|
+
additionalProperties: false
|
|
4216
|
+
},
|
|
4217
|
+
FlowSurfaceListNavigationTargetsResult: {
|
|
4218
|
+
type: "object",
|
|
4219
|
+
required: ["version", "capabilities", "targets"],
|
|
4220
|
+
properties: {
|
|
4221
|
+
version: { type: "string", enum: ["1"] },
|
|
4222
|
+
capabilities: ref("FlowSurfaceNavigationTargetCapabilities"),
|
|
4223
|
+
targets: {
|
|
4224
|
+
type: "array",
|
|
4225
|
+
items: ref("FlowSurfaceNavigationTarget")
|
|
4226
|
+
}
|
|
4227
|
+
},
|
|
4228
|
+
additionalProperties: false
|
|
4229
|
+
},
|
|
4165
4230
|
FlowSurfaceApplyBlueprintNavigationGroup: {
|
|
4166
4231
|
type: "object",
|
|
4167
4232
|
properties: {
|
|
4168
4233
|
routeId: {
|
|
4169
4234
|
...STRING_OR_INTEGER_SCHEMA,
|
|
4170
|
-
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."
|
|
4235
|
+
description: "Preferred existing menu-group route id for non-mobile create mode. When present, routeId has the highest priority and title/icon/tooltip/hideInMenu are ignored. Ignored when navigation.layoutUid targets a mobile layout or navigation.portalUid resolves to a mobile-backed portal because mobile pages are created as root tabs. applyBlueprint create mode does not mutate existing group metadata; use low-level updateMenu separately when needed."
|
|
4171
4236
|
},
|
|
4172
4237
|
title: {
|
|
4173
4238
|
type: "string",
|
|
4174
|
-
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."
|
|
4239
|
+
description: "Group title for non-mobile 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. Ignored when navigation.layoutUid targets a mobile layout or navigation.portalUid resolves to a mobile-backed portal because mobile pages are created as root tabs. If an existing group is reused, group metadata is ignored; use low-level updateMenu to change existing group metadata."
|
|
4175
4240
|
},
|
|
4176
4241
|
icon: {
|
|
4177
4242
|
type: "string",
|
|
@@ -4191,6 +4256,14 @@ const schemas = {
|
|
|
4191
4256
|
FlowSurfaceApplyBlueprintNavigation: {
|
|
4192
4257
|
type: "object",
|
|
4193
4258
|
properties: {
|
|
4259
|
+
layoutUid: {
|
|
4260
|
+
type: "string",
|
|
4261
|
+
description: "Optional enabled UI layout uid that scopes create-mode route lookup and newly created routes. Use `mobile-layout-model` for mobile pages; mobile layouts ignore navigation.group and create a root-level tab page. When omitted, the server preserves the existing parent/default admin layout behavior."
|
|
4262
|
+
},
|
|
4263
|
+
portalUid: {
|
|
4264
|
+
type: "string",
|
|
4265
|
+
description: "Optional enabled, role-accessible custom Multi-portal uid. Mutually exclusive with layoutUid. The portal backing layout decides desktop vs mobile behavior, and route lookup plus duplicate-page identity are scoped to the portal."
|
|
4266
|
+
},
|
|
4194
4267
|
group: ref("FlowSurfaceApplyBlueprintNavigationGroup"),
|
|
4195
4268
|
item: {
|
|
4196
4269
|
type: "object",
|
|
@@ -4406,7 +4479,7 @@ const schemas = {
|
|
|
4406
4479
|
FlowSurfaceApplyBlueprintRequest: {
|
|
4407
4480
|
type: "object",
|
|
4408
4481
|
required: ["mode", "tabs"],
|
|
4409
|
-
description: `Simplified page-structure request object for applyBlueprint. \`version\` may be omitted and defaults to '1'. Runtime validation enforces mode-specific rules: create does not accept target, while replace requires target.pageSchemaUid and does not use navigation. For JS blocks/fields/actions, \`script\` is a non-empty string asset key into \`assets.scripts\`, and referenced script assets must provide non-empty \`code\`; put inline JS in \`settings.code\` and \`settings.version\`. ${TREE_TABLE_RECORD_ACTION_DEFAULTS_NOTE} ${APPLY_BLUEPRINT_TREE_TABLE_TITLE_FIELD_NOTE} \`defaults.collections\` may provide main data-source collection-level fieldGroups, popup metadata with required \`name\` and \`description\`, and formBehavior for generated default add/edit popup forms; use \`defaults.dataSources.<dataSourceKey>.collections\` for external data sources. v1 does not support \`defaults.blocks\`.`,
|
|
4482
|
+
description: `Simplified page-structure request object for applyBlueprint. \`version\` may be omitted and defaults to '1'. Runtime validation enforces mode-specific rules: create does not accept target, while replace requires target.pageSchemaUid and does not use navigation. In create mode, \`navigation.layoutUid\` scopes menu group reuse, duplicate page identity, and newly created routes to the target layout; use \`mobile-layout-model\` for mobile pages, where \`navigation.group\` is ignored and the page is created as a root tab, and omit it for default admin behavior. For JS blocks/fields/actions, \`script\` is a non-empty string asset key into \`assets.scripts\`, and referenced script assets must provide non-empty \`code\`; put inline JS in \`settings.code\` and \`settings.version\`. ${TREE_TABLE_RECORD_ACTION_DEFAULTS_NOTE} ${APPLY_BLUEPRINT_TREE_TABLE_TITLE_FIELD_NOTE} \`defaults.collections\` may provide main data-source collection-level fieldGroups, popup metadata with required \`name\` and \`description\`, and formBehavior for generated default add/edit popup forms; use \`defaults.dataSources.<dataSourceKey>.collections\` for external data sources. v1 does not support \`defaults.blocks\`.`,
|
|
4410
4483
|
properties: {
|
|
4411
4484
|
version: {
|
|
4412
4485
|
type: "string",
|
|
@@ -4578,6 +4651,14 @@ const schemas = {
|
|
|
4578
4651
|
type: "object",
|
|
4579
4652
|
required: ["title"],
|
|
4580
4653
|
properties: {
|
|
4654
|
+
layoutUid: {
|
|
4655
|
+
type: "string",
|
|
4656
|
+
description: "Optional enabled UI layout uid for the created menu route, for example `mobile-layout-model`. When omitted, the route inherits its parent layout or the default admin layout."
|
|
4657
|
+
},
|
|
4658
|
+
portalUid: {
|
|
4659
|
+
type: "string",
|
|
4660
|
+
description: "Optional enabled, role-accessible custom Multi-portal uid. Mutually exclusive with layoutUid. When omitted, a portal parent is inherited and root creates keep default Admin behavior."
|
|
4661
|
+
},
|
|
4581
4662
|
title: {
|
|
4582
4663
|
type: "string"
|
|
4583
4664
|
},
|
|
@@ -4635,6 +4716,10 @@ const schemas = {
|
|
|
4635
4716
|
required: ["menuRouteId"],
|
|
4636
4717
|
properties: {
|
|
4637
4718
|
menuRouteId: STRING_OR_INTEGER_SCHEMA,
|
|
4719
|
+
portalUid: {
|
|
4720
|
+
type: "string",
|
|
4721
|
+
description: "Optional custom Multi-portal uid used to assert the route and any new parent are in the same accessible workspace."
|
|
4722
|
+
},
|
|
4638
4723
|
title: {
|
|
4639
4724
|
type: "string"
|
|
4640
4725
|
},
|
|
@@ -4674,6 +4759,14 @@ const schemas = {
|
|
|
4674
4759
|
FlowSurfaceCreatePageRequest: {
|
|
4675
4760
|
type: "object",
|
|
4676
4761
|
properties: {
|
|
4762
|
+
layoutUid: {
|
|
4763
|
+
type: "string",
|
|
4764
|
+
description: "Optional enabled UI layout uid. With `menuRouteId`, the existing route must already belong to this layout. Without `menuRouteId`, the compatibility create-menu fallback creates the route in this layout."
|
|
4765
|
+
},
|
|
4766
|
+
portalUid: {
|
|
4767
|
+
type: "string",
|
|
4768
|
+
description: "Optional enabled, role-accessible custom Multi-portal uid. Mutually exclusive with layoutUid. With menuRouteId, the route must already belong to this portal."
|
|
4769
|
+
},
|
|
4677
4770
|
menuRouteId: STRING_OR_INTEGER_SCHEMA,
|
|
4678
4771
|
pageSchemaUid: {
|
|
4679
4772
|
type: "string"
|
package/dist/swagger/index.d.ts
CHANGED
|
@@ -2604,6 +2604,86 @@ declare const _default: {
|
|
|
2604
2604
|
};
|
|
2605
2605
|
additionalProperties: boolean;
|
|
2606
2606
|
};
|
|
2607
|
+
FlowSurfaceListNavigationTargetsRequest: {
|
|
2608
|
+
type: string;
|
|
2609
|
+
properties: {};
|
|
2610
|
+
additionalProperties: boolean;
|
|
2611
|
+
};
|
|
2612
|
+
FlowSurfaceNavigationTargetCapabilities: {
|
|
2613
|
+
type: string;
|
|
2614
|
+
required: string[];
|
|
2615
|
+
properties: {
|
|
2616
|
+
multiPortal: {
|
|
2617
|
+
type: string;
|
|
2618
|
+
description: string;
|
|
2619
|
+
};
|
|
2620
|
+
};
|
|
2621
|
+
additionalProperties: boolean;
|
|
2622
|
+
};
|
|
2623
|
+
FlowSurfaceNavigationTarget: {
|
|
2624
|
+
type: string;
|
|
2625
|
+
required: string[];
|
|
2626
|
+
properties: {
|
|
2627
|
+
kind: {
|
|
2628
|
+
type: string;
|
|
2629
|
+
enum: string[];
|
|
2630
|
+
};
|
|
2631
|
+
uid: {
|
|
2632
|
+
type: string;
|
|
2633
|
+
description: string;
|
|
2634
|
+
};
|
|
2635
|
+
title: {
|
|
2636
|
+
type: string;
|
|
2637
|
+
};
|
|
2638
|
+
icon: {
|
|
2639
|
+
type: string;
|
|
2640
|
+
nullable: boolean;
|
|
2641
|
+
};
|
|
2642
|
+
layoutUid: {
|
|
2643
|
+
type: string;
|
|
2644
|
+
};
|
|
2645
|
+
layoutType: {
|
|
2646
|
+
type: string;
|
|
2647
|
+
};
|
|
2648
|
+
routeName: {
|
|
2649
|
+
type: string;
|
|
2650
|
+
};
|
|
2651
|
+
routePath: {
|
|
2652
|
+
type: string;
|
|
2653
|
+
};
|
|
2654
|
+
authCheck: {
|
|
2655
|
+
type: string;
|
|
2656
|
+
};
|
|
2657
|
+
default: {
|
|
2658
|
+
type: string;
|
|
2659
|
+
};
|
|
2660
|
+
portalUid: {
|
|
2661
|
+
type: string;
|
|
2662
|
+
description: string;
|
|
2663
|
+
};
|
|
2664
|
+
};
|
|
2665
|
+
additionalProperties: boolean;
|
|
2666
|
+
};
|
|
2667
|
+
FlowSurfaceListNavigationTargetsResult: {
|
|
2668
|
+
type: string;
|
|
2669
|
+
required: string[];
|
|
2670
|
+
properties: {
|
|
2671
|
+
version: {
|
|
2672
|
+
type: string;
|
|
2673
|
+
enum: string[];
|
|
2674
|
+
};
|
|
2675
|
+
capabilities: {
|
|
2676
|
+
$ref: string;
|
|
2677
|
+
};
|
|
2678
|
+
targets: {
|
|
2679
|
+
type: string;
|
|
2680
|
+
items: {
|
|
2681
|
+
$ref: string;
|
|
2682
|
+
};
|
|
2683
|
+
};
|
|
2684
|
+
};
|
|
2685
|
+
additionalProperties: boolean;
|
|
2686
|
+
};
|
|
2607
2687
|
FlowSurfaceApplyBlueprintNavigationGroup: {
|
|
2608
2688
|
type: string;
|
|
2609
2689
|
properties: {
|
|
@@ -2635,6 +2715,14 @@ declare const _default: {
|
|
|
2635
2715
|
FlowSurfaceApplyBlueprintNavigation: {
|
|
2636
2716
|
type: string;
|
|
2637
2717
|
properties: {
|
|
2718
|
+
layoutUid: {
|
|
2719
|
+
type: string;
|
|
2720
|
+
description: string;
|
|
2721
|
+
};
|
|
2722
|
+
portalUid: {
|
|
2723
|
+
type: string;
|
|
2724
|
+
description: string;
|
|
2725
|
+
};
|
|
2638
2726
|
group: {
|
|
2639
2727
|
$ref: string;
|
|
2640
2728
|
};
|
|
@@ -3148,6 +3236,14 @@ declare const _default: {
|
|
|
3148
3236
|
type: string;
|
|
3149
3237
|
required: string[];
|
|
3150
3238
|
properties: {
|
|
3239
|
+
layoutUid: {
|
|
3240
|
+
type: string;
|
|
3241
|
+
description: string;
|
|
3242
|
+
};
|
|
3243
|
+
portalUid: {
|
|
3244
|
+
type: string;
|
|
3245
|
+
description: string;
|
|
3246
|
+
};
|
|
3151
3247
|
title: {
|
|
3152
3248
|
type: string;
|
|
3153
3249
|
};
|
|
@@ -3223,6 +3319,10 @@ declare const _default: {
|
|
|
3223
3319
|
type: string;
|
|
3224
3320
|
}[];
|
|
3225
3321
|
};
|
|
3322
|
+
portalUid: {
|
|
3323
|
+
type: string;
|
|
3324
|
+
description: string;
|
|
3325
|
+
};
|
|
3226
3326
|
title: {
|
|
3227
3327
|
type: string;
|
|
3228
3328
|
};
|
|
@@ -3270,6 +3370,14 @@ declare const _default: {
|
|
|
3270
3370
|
FlowSurfaceCreatePageRequest: {
|
|
3271
3371
|
type: string;
|
|
3272
3372
|
properties: {
|
|
3373
|
+
layoutUid: {
|
|
3374
|
+
type: string;
|
|
3375
|
+
description: string;
|
|
3376
|
+
};
|
|
3377
|
+
portalUid: {
|
|
3378
|
+
type: string;
|
|
3379
|
+
description: string;
|
|
3380
|
+
};
|
|
3273
3381
|
menuRouteId: {
|
|
3274
3382
|
oneOf: {
|
|
3275
3383
|
type: 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.
|
|
7
|
+
"version": "2.2.0-alpha.10",
|
|
8
8
|
"main": "./dist/server/index.js",
|
|
9
9
|
"license": "Apache-2.0",
|
|
10
10
|
"devDependencies": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"@nocobase/test": "2.x",
|
|
27
27
|
"@nocobase/utils": "2.x"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "b5a3f131bb0a4a2fbfd96852896bccadc933d834"
|
|
30
30
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
import type { RunJsAuthoringRuleDefinition } from '../types';
|
|
10
|
-
export declare const blockedGlobalStopRule: RunJsAuthoringRuleDefinition;
|
|
@@ -1,40 +0,0 @@
|
|
|
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 blocked_global_stop_exports = {};
|
|
28
|
-
__export(blocked_global_stop_exports, {
|
|
29
|
-
blockedGlobalStopRule: () => blockedGlobalStopRule
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(blocked_global_stop_exports);
|
|
32
|
-
const blockedGlobalStopRule = {
|
|
33
|
-
repairClass: "blocked-global-stop",
|
|
34
|
-
defaultRuleId: "runjs-global-blocked",
|
|
35
|
-
suggestedAction: "Replace forbidden browser/runtime globals with supported ctx APIs."
|
|
36
|
-
};
|
|
37
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
-
0 && (module.exports = {
|
|
39
|
-
blockedGlobalStopRule
|
|
40
|
-
});
|