@nocobase/plugin-flow-engine 2.2.0-alpha.1 → 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/prompt.md +2 -0
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/SKILLS.md +1 -0
- 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 +4 -4
- 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/client/index.js +1 -1
- package/dist/externalVersion.js +9 -9
- package/dist/locale/en-US.json +3 -0
- package/dist/locale/index.d.ts +6 -0
- package/dist/locale/zh-CN.json +3 -0
- 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/{runjs-authoring/blocked-global-stop/index.d.ts → approval/authoring-validation.d.ts} +1 -2
- package/dist/server/flow-surfaces/approval/authoring-validation.js +1151 -0
- package/dist/server/flow-surfaces/approval/blueprint-service.js +2 -0
- package/dist/server/flow-surfaces/authoring-validation.d.ts +3 -1
- package/dist/server/flow-surfaces/authoring-validation.js +645 -59
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +7 -3
- package/dist/server/flow-surfaces/blueprint/compile-plan.js +23 -15
- package/dist/server/flow-surfaces/blueprint/export-document.d.ts +50 -0
- package/dist/server/flow-surfaces/blueprint/export-document.js +2510 -0
- 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 +43 -5
- package/dist/server/flow-surfaces/catalog.js +13 -2
- package/dist/server/flow-surfaces/configure-options.js +5 -3
- package/dist/server/flow-surfaces/constants.d.ts +16 -2
- package/dist/server/flow-surfaces/constants.js +2 -0
- package/dist/server/flow-surfaces/contract-guard.js +37 -5
- package/dist/server/flow-surfaces/default-action-popup.d.ts +2 -0
- package/dist/server/flow-surfaces/default-action-popup.js +27 -13
- package/dist/server/flow-surfaces/errors.d.ts +2 -2
- package/dist/server/flow-surfaces/errors.js +4 -4
- package/dist/server/flow-surfaces/filter-group.d.ts +19 -2
- package/dist/server/flow-surfaces/filter-group.js +232 -3
- 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/planning/compiler.d.ts +1 -0
- package/dist/server/flow-surfaces/planning/compiler.js +205 -82
- package/dist/server/flow-surfaces/planning/key-registry.d.ts +1 -1
- package/dist/server/flow-surfaces/planning/runtime.js +1 -0
- package/dist/server/flow-surfaces/planning/step-link.d.ts +1 -1
- package/dist/server/flow-surfaces/planning/step-link.js +22 -3
- package/dist/server/flow-surfaces/public-data-surface-default-filter.js +0 -9
- package/dist/server/flow-surfaces/reaction/field-value.d.ts +9 -0
- package/dist/server/flow-surfaces/reaction/field-value.js +51 -2
- package/dist/server/flow-surfaces/reaction/linkage.d.ts +6 -1
- package/dist/server/flow-surfaces/reaction/linkage.js +18 -3
- package/dist/server/flow-surfaces/reaction/meta.js +19 -1
- package/dist/server/flow-surfaces/reaction/types.d.ts +19 -0
- package/dist/server/flow-surfaces/relation-backing-foreign-key.d.ts +10 -0
- package/dist/server/flow-surfaces/relation-backing-foreign-key.js +79 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/source.d.ts +1 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/source.js +20 -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/filter.js +12 -2
- package/dist/server/flow-surfaces/runjs-authoring/scan/index.d.ts +0 -14
- package/dist/server/flow-surfaces/runjs-authoring/scan/index.js +10 -8
- 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 +65 -0
- package/dist/server/flow-surfaces/service.js +1372 -148
- package/dist/server/flow-surfaces/types.d.ts +2 -1
- package/dist/server/variables/records.js +7 -2
- package/dist/server/variables/registry.js +3 -0
- package/dist/swagger/flow-surfaces.d.ts +289 -0
- package/dist/swagger/flow-surfaces.examples.d.ts +11 -0
- package/dist/swagger/flow-surfaces.examples.js +11 -0
- package/dist/swagger/flow-surfaces.js +261 -11
- package/dist/swagger/index.d.ts +289 -0
- package/package.json +2 -2
- package/dist/server/flow-surfaces/runjs-authoring/blocked-global-stop/index.js +0 -40
|
@@ -960,10 +960,14 @@ function resolveApplyBlueprintAssociationContext(input) {
|
|
|
960
960
|
}
|
|
961
961
|
const targetCollection = (0, import_service_helpers.resolveFieldTargetCollection)(field, dataSourceKey, input.getCollection);
|
|
962
962
|
const targetCollectionName = normalizeMetadataText(input.targetCollectionName) || normalizeMetadataText((0, import_service_helpers.getCollectionName)(targetCollection)) || normalizeMetadataText((0, import_service_helpers.getFieldTarget)(field));
|
|
963
|
+
const resolvedAssociationName = (0, import_service_helpers.resolveAssociationNameFromField)(
|
|
964
|
+
field,
|
|
965
|
+
associationPath.includes(".") ? void 0 : sourceCollection
|
|
966
|
+
);
|
|
963
967
|
return {
|
|
964
968
|
dataSourceKey,
|
|
965
969
|
surfaceCollectionName: targetCollectionName || void 0,
|
|
966
|
-
associationName:
|
|
970
|
+
associationName: resolvedAssociationName || `${sourceCollectionName}.${associationPath || associationFieldPath}`
|
|
967
971
|
};
|
|
968
972
|
}
|
|
969
973
|
function getApplyBlueprintBlockResourceObject(block) {
|
|
@@ -1018,7 +1022,7 @@ function resolveApplyBlueprintBlockResourceContext(block, parentContext, getColl
|
|
|
1018
1022
|
return {
|
|
1019
1023
|
dataSourceKey,
|
|
1020
1024
|
surfaceCollectionName: directCollectionName || (associatedContext == null ? void 0 : associatedContext.surfaceCollectionName) || (parentContext == null ? void 0 : parentContext.surfaceCollectionName),
|
|
1021
|
-
associationName: (
|
|
1025
|
+
associationName: (associatedContext == null ? void 0 : associatedContext.associationName) || (parentContext == null ? void 0 : parentContext.associationName)
|
|
1022
1026
|
};
|
|
1023
1027
|
}
|
|
1024
1028
|
return {
|
|
@@ -1665,7 +1669,7 @@ function compileField(input, index, scopePrefix, assets, localBlockKeys, context
|
|
|
1665
1669
|
hostBlock: popupOptions.hostBlock,
|
|
1666
1670
|
dataSourceKey: (fieldAssociationContext == null ? void 0 : fieldAssociationContext.dataSourceKey) || popupOptions.dataSourceKey,
|
|
1667
1671
|
surfaceCollectionName: (fieldAssociationContext == null ? void 0 : fieldAssociationContext.surfaceCollectionName) || popupOptions.surfaceCollectionName,
|
|
1668
|
-
associationName:
|
|
1672
|
+
associationName: (fieldAssociationContext == null ? void 0 : fieldAssociationContext.associationName) || popupOptions.associationName
|
|
1669
1673
|
});
|
|
1670
1674
|
settings = resolvePopupTitleSettings(settings, popupResult.popupTitle);
|
|
1671
1675
|
const popup = shouldAttachDefaultPopupMetadata(popupInput, void 0) ? attachCompiledPopupDefaults(popupResult.popup, popupDefaultsMetadata) : popupResult.popup;
|
|
@@ -83,19 +83,23 @@ function buildTabSelectorFromUid(uid) {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
function compileCreatePlan(document, getCollection) {
|
|
86
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
|
|
86
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
|
|
87
87
|
const steps = [];
|
|
88
88
|
const chrome = buildPageChrome(document);
|
|
89
|
-
|
|
89
|
+
const layoutUid = (_a = document.navigation) == null ? void 0 : _a.layoutUid;
|
|
90
|
+
const portalUid = (_b = document.navigation) == null ? void 0 : _b.portalUid;
|
|
91
|
+
if (import_lodash.default.isPlainObject((_c = document.navigation) == null ? void 0 : _c.group) && import_lodash.default.isUndefined(document.navigation.group.routeId)) {
|
|
90
92
|
steps.push({
|
|
91
93
|
id: CREATE_MENU_GROUP_STEP_ID,
|
|
92
94
|
action: "createMenu",
|
|
93
95
|
values: (0, import_service_utils.buildDefinedPayload)({
|
|
94
|
-
|
|
96
|
+
layoutUid,
|
|
97
|
+
portalUid,
|
|
98
|
+
title: (_e = (_d = document.navigation) == null ? void 0 : _d.group) == null ? void 0 : _e.title,
|
|
95
99
|
type: "group",
|
|
96
|
-
icon: (
|
|
97
|
-
tooltip: (
|
|
98
|
-
hideInMenu: (
|
|
100
|
+
icon: (_g = (_f = document.navigation) == null ? void 0 : _f.group) == null ? void 0 : _g.icon,
|
|
101
|
+
tooltip: (_i = (_h = document.navigation) == null ? void 0 : _h.group) == null ? void 0 : _i.tooltip,
|
|
102
|
+
hideInMenu: (_k = (_j = document.navigation) == null ? void 0 : _j.group) == null ? void 0 : _k.hideInMenu
|
|
99
103
|
})
|
|
100
104
|
});
|
|
101
105
|
}
|
|
@@ -103,25 +107,29 @@ function compileCreatePlan(document, getCollection) {
|
|
|
103
107
|
id: CREATE_MENU_ITEM_STEP_ID,
|
|
104
108
|
action: "createMenu",
|
|
105
109
|
values: (0, import_service_utils.buildDefinedPayload)({
|
|
106
|
-
|
|
110
|
+
layoutUid,
|
|
111
|
+
portalUid,
|
|
112
|
+
title: ((_m = (_l = document.navigation) == null ? void 0 : _l.item) == null ? void 0 : _m.title) || chrome.pageTitle,
|
|
107
113
|
type: "item",
|
|
108
|
-
icon: ((
|
|
109
|
-
tooltip: (
|
|
110
|
-
hideInMenu: (
|
|
111
|
-
parentMenuRouteId: import_lodash.default.isUndefined((
|
|
114
|
+
icon: ((_o = (_n = document.navigation) == null ? void 0 : _n.item) == null ? void 0 : _o.icon) || ((_p = document.page) == null ? void 0 : _p.icon) || "FileOutlined",
|
|
115
|
+
tooltip: (_r = (_q = document.navigation) == null ? void 0 : _q.item) == null ? void 0 : _r.tooltip,
|
|
116
|
+
hideInMenu: (_t = (_s = document.navigation) == null ? void 0 : _s.item) == null ? void 0 : _t.hideInMenu,
|
|
117
|
+
parentMenuRouteId: import_lodash.default.isUndefined((_v = (_u = document.navigation) == null ? void 0 : _u.group) == null ? void 0 : _v.routeId) ? ((_x = (_w = document.navigation) == null ? void 0 : _w.group) == null ? void 0 : _x.title) ? { step: CREATE_MENU_GROUP_STEP_ID, path: "routeId" } : void 0 : (_z = (_y = document.navigation) == null ? void 0 : _y.group) == null ? void 0 : _z.routeId
|
|
112
118
|
})
|
|
113
119
|
});
|
|
114
120
|
steps.push({
|
|
115
121
|
id: CREATE_PAGE_STEP_ID,
|
|
116
122
|
action: "createPage",
|
|
117
123
|
values: (0, import_service_utils.buildDefinedPayload)({
|
|
124
|
+
layoutUid,
|
|
125
|
+
portalUid,
|
|
118
126
|
menuRouteId: { step: CREATE_MENU_ITEM_STEP_ID, path: "routeId" },
|
|
119
127
|
title: chrome.pageTitle,
|
|
120
|
-
icon: (
|
|
121
|
-
documentTitle: (
|
|
122
|
-
enableHeader: (
|
|
128
|
+
icon: (_A = document.page) == null ? void 0 : _A.icon,
|
|
129
|
+
documentTitle: (_B = document.page) == null ? void 0 : _B.documentTitle,
|
|
130
|
+
enableHeader: (_C = document.page) == null ? void 0 : _C.enableHeader,
|
|
123
131
|
enableTabs: chrome.enableTabs,
|
|
124
|
-
displayTitle: (
|
|
132
|
+
displayTitle: (_D = document.page) == null ? void 0 : _D.displayTitle,
|
|
125
133
|
tabTitle: chrome.tabTitle,
|
|
126
134
|
tabIcon: chrome.tabIcon,
|
|
127
135
|
tabDocumentTitle: chrome.tabDocumentTitle,
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { FlowSurfaceApplyBlueprintDocument } from './public-types';
|
|
10
|
+
export type FlowSurfaceExportBlueprintUnsupportedPolicy = 'error' | 'warn';
|
|
11
|
+
export type FlowSurfaceExportBlueprintUnsupportedItem = {
|
|
12
|
+
kind: 'page' | 'tab' | 'block' | 'field' | 'action' | 'recordAction' | 'reaction' | 'layout' | 'popup';
|
|
13
|
+
use?: string;
|
|
14
|
+
type?: string;
|
|
15
|
+
path: string;
|
|
16
|
+
reasonCode: string;
|
|
17
|
+
manualAction: string;
|
|
18
|
+
};
|
|
19
|
+
export type FlowSurfaceExportBlueprintResult = {
|
|
20
|
+
document: FlowSurfaceApplyBlueprintDocument;
|
|
21
|
+
source: {
|
|
22
|
+
target: {
|
|
23
|
+
pageSchemaUid: string;
|
|
24
|
+
};
|
|
25
|
+
pageTitle?: string;
|
|
26
|
+
};
|
|
27
|
+
warnings: string[];
|
|
28
|
+
unsupported: FlowSurfaceExportBlueprintUnsupportedItem[];
|
|
29
|
+
};
|
|
30
|
+
type FlowSurfaceExportNode = Record<string, unknown> & {
|
|
31
|
+
uid?: string;
|
|
32
|
+
use?: string;
|
|
33
|
+
props?: Record<string, unknown>;
|
|
34
|
+
decoratorProps?: Record<string, unknown>;
|
|
35
|
+
stepParams?: Record<string, unknown>;
|
|
36
|
+
flowRegistry?: Record<string, unknown>;
|
|
37
|
+
template?: Record<string, unknown>;
|
|
38
|
+
fieldsTemplate?: Record<string, unknown>;
|
|
39
|
+
popup?: Record<string, unknown>;
|
|
40
|
+
subModels?: Record<string, unknown>;
|
|
41
|
+
};
|
|
42
|
+
export declare function exportFlowSurfaceBlueprintDocument(input: {
|
|
43
|
+
page: FlowSurfaceExportNode;
|
|
44
|
+
pageRoute?: Record<string, unknown>;
|
|
45
|
+
target: {
|
|
46
|
+
pageSchemaUid: string;
|
|
47
|
+
};
|
|
48
|
+
unsupportedPolicy?: FlowSurfaceExportBlueprintUnsupportedPolicy;
|
|
49
|
+
}): FlowSurfaceExportBlueprintResult;
|
|
50
|
+
export {};
|