@nocobase/plugin-flow-engine 2.2.0-beta.1 → 2.2.0-beta.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/client/index.js +1 -1
- package/dist/externalVersion.js +9 -9
- package/dist/locale/en-US.json +1 -0
- package/dist/locale/index.d.ts +2 -0
- package/dist/locale/zh-CN.json +1 -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 +2 -1
- package/dist/server/flow-surfaces/authoring-validation.js +495 -57
- package/dist/server/flow-surfaces/blueprint/compile-plan.js +19 -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 +2 -1
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +1 -0
- package/dist/server/flow-surfaces/builder.js +40 -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 +9 -2
- package/dist/server/flow-surfaces/constants.js +1 -0
- package/dist/server/flow-surfaces/contract-guard.js +24 -2
- 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/filter-group.d.ts +19 -2
- package/dist/server/flow-surfaces/filter-group.js +232 -3
- 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 +11 -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 +53 -0
- package/dist/server/flow-surfaces/service.js +990 -122
- package/dist/server/flow-surfaces/types.d.ts +2 -1
- package/dist/server/variables/registry.js +3 -0
- package/dist/swagger/flow-surfaces.d.ts +193 -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 +179 -10
- package/dist/swagger/index.d.ts +193 -0
- package/package.json +2 -2
- package/dist/server/flow-surfaces/runjs-authoring/blocked-global-stop/index.js +0 -40
|
@@ -83,19 +83,21 @@ 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;
|
|
87
87
|
const steps = [];
|
|
88
88
|
const chrome = buildPageChrome(document);
|
|
89
|
-
|
|
89
|
+
const layoutUid = (_a = document.navigation) == null ? void 0 : _a.layoutUid;
|
|
90
|
+
if (import_lodash.default.isPlainObject((_b = document.navigation) == null ? void 0 : _b.group) && import_lodash.default.isUndefined(document.navigation.group.routeId)) {
|
|
90
91
|
steps.push({
|
|
91
92
|
id: CREATE_MENU_GROUP_STEP_ID,
|
|
92
93
|
action: "createMenu",
|
|
93
94
|
values: (0, import_service_utils.buildDefinedPayload)({
|
|
94
|
-
|
|
95
|
+
layoutUid,
|
|
96
|
+
title: (_d = (_c = document.navigation) == null ? void 0 : _c.group) == null ? void 0 : _d.title,
|
|
95
97
|
type: "group",
|
|
96
|
-
icon: (
|
|
97
|
-
tooltip: (
|
|
98
|
-
hideInMenu: (
|
|
98
|
+
icon: (_f = (_e = document.navigation) == null ? void 0 : _e.group) == null ? void 0 : _f.icon,
|
|
99
|
+
tooltip: (_h = (_g = document.navigation) == null ? void 0 : _g.group) == null ? void 0 : _h.tooltip,
|
|
100
|
+
hideInMenu: (_j = (_i = document.navigation) == null ? void 0 : _i.group) == null ? void 0 : _j.hideInMenu
|
|
99
101
|
})
|
|
100
102
|
});
|
|
101
103
|
}
|
|
@@ -103,25 +105,27 @@ function compileCreatePlan(document, getCollection) {
|
|
|
103
105
|
id: CREATE_MENU_ITEM_STEP_ID,
|
|
104
106
|
action: "createMenu",
|
|
105
107
|
values: (0, import_service_utils.buildDefinedPayload)({
|
|
106
|
-
|
|
108
|
+
layoutUid,
|
|
109
|
+
title: ((_l = (_k = document.navigation) == null ? void 0 : _k.item) == null ? void 0 : _l.title) || chrome.pageTitle,
|
|
107
110
|
type: "item",
|
|
108
|
-
icon: ((
|
|
109
|
-
tooltip: (
|
|
110
|
-
hideInMenu: (
|
|
111
|
-
parentMenuRouteId: import_lodash.default.isUndefined((
|
|
111
|
+
icon: ((_n = (_m = document.navigation) == null ? void 0 : _m.item) == null ? void 0 : _n.icon) || ((_o = document.page) == null ? void 0 : _o.icon) || "FileOutlined",
|
|
112
|
+
tooltip: (_q = (_p = document.navigation) == null ? void 0 : _p.item) == null ? void 0 : _q.tooltip,
|
|
113
|
+
hideInMenu: (_s = (_r = document.navigation) == null ? void 0 : _r.item) == null ? void 0 : _s.hideInMenu,
|
|
114
|
+
parentMenuRouteId: import_lodash.default.isUndefined((_u = (_t = document.navigation) == null ? void 0 : _t.group) == null ? void 0 : _u.routeId) ? ((_w = (_v = document.navigation) == null ? void 0 : _v.group) == null ? void 0 : _w.title) ? { step: CREATE_MENU_GROUP_STEP_ID, path: "routeId" } : void 0 : (_y = (_x = document.navigation) == null ? void 0 : _x.group) == null ? void 0 : _y.routeId
|
|
112
115
|
})
|
|
113
116
|
});
|
|
114
117
|
steps.push({
|
|
115
118
|
id: CREATE_PAGE_STEP_ID,
|
|
116
119
|
action: "createPage",
|
|
117
120
|
values: (0, import_service_utils.buildDefinedPayload)({
|
|
121
|
+
layoutUid,
|
|
118
122
|
menuRouteId: { step: CREATE_MENU_ITEM_STEP_ID, path: "routeId" },
|
|
119
123
|
title: chrome.pageTitle,
|
|
120
|
-
icon: (
|
|
121
|
-
documentTitle: (
|
|
122
|
-
enableHeader: (
|
|
124
|
+
icon: (_z = document.page) == null ? void 0 : _z.icon,
|
|
125
|
+
documentTitle: (_A = document.page) == null ? void 0 : _A.documentTitle,
|
|
126
|
+
enableHeader: (_B = document.page) == null ? void 0 : _B.enableHeader,
|
|
123
127
|
enableTabs: chrome.enableTabs,
|
|
124
|
-
displayTitle: (
|
|
128
|
+
displayTitle: (_C = document.page) == null ? void 0 : _C.displayTitle,
|
|
125
129
|
tabTitle: chrome.tabTitle,
|
|
126
130
|
tabIcon: chrome.tabIcon,
|
|
127
131
|
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 {};
|