@nocobase/plugin-flow-engine 2.1.0-beta.35 → 2.1.0-beta.36
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/externalVersion.js +9 -9
- package/dist/node_modules/@ant-design/icons-svg/package.json +1 -1
- package/dist/node_modules/acorn/LICENSE +21 -0
- package/dist/node_modules/acorn/bin/acorn +4 -0
- package/dist/node_modules/acorn/dist/acorn.d.mts +857 -0
- package/dist/node_modules/acorn/dist/acorn.d.ts +857 -0
- package/dist/node_modules/acorn/dist/acorn.js +1 -0
- package/dist/node_modules/acorn/dist/bin.js +90 -0
- package/dist/node_modules/acorn/package.json +1 -0
- package/dist/node_modules/acorn-jsx/LICENSE +19 -0
- package/dist/node_modules/acorn-jsx/index.d.ts +12 -0
- package/dist/node_modules/acorn-jsx/index.js +1 -0
- package/dist/node_modules/acorn-jsx/package.json +1 -0
- package/dist/node_modules/acorn-jsx/xhtml.js +255 -0
- package/dist/node_modules/acorn-walk/LICENSE +21 -0
- package/dist/node_modules/acorn-walk/dist/walk.d.mts +177 -0
- package/dist/node_modules/acorn-walk/dist/walk.d.ts +177 -0
- package/dist/node_modules/acorn-walk/dist/walk.js +1 -0
- package/dist/node_modules/acorn-walk/node_modules/acorn/bin/acorn +4 -0
- package/dist/node_modules/acorn-walk/node_modules/acorn/dist/acorn.d.mts +866 -0
- package/dist/node_modules/acorn-walk/node_modules/acorn/dist/acorn.d.ts +866 -0
- package/dist/node_modules/acorn-walk/node_modules/acorn/dist/acorn.js +6174 -0
- package/dist/node_modules/acorn-walk/node_modules/acorn/dist/bin.js +90 -0
- package/dist/node_modules/acorn-walk/node_modules/acorn/package.json +50 -0
- package/dist/node_modules/acorn-walk/package.json +1 -0
- 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 +2 -0
- package/dist/server/flow-surfaces/action-scope.js +8 -0
- package/dist/server/flow-surfaces/authoring-validation.d.ts +3 -0
- package/dist/server/flow-surfaces/authoring-validation.js +317 -9
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +143 -3
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +1 -1
- package/dist/server/flow-surfaces/builder.js +54 -1
- package/dist/server/flow-surfaces/catalog.js +148 -2
- package/dist/server/flow-surfaces/chart-config.d.ts +58 -54
- package/dist/server/flow-surfaces/chart-config.js +18 -5
- package/dist/server/flow-surfaces/compose-compiler.d.ts +1 -1
- package/dist/server/flow-surfaces/compose-runtime.d.ts +1 -0
- package/dist/server/flow-surfaces/compose-runtime.js +24 -6
- package/dist/server/flow-surfaces/configure-options.js +40 -1
- package/dist/server/flow-surfaces/default-block-actions.js +11 -0
- package/dist/server/flow-surfaces/index.js +4 -2
- package/dist/server/flow-surfaces/node-use-sets.js +2 -0
- package/dist/server/flow-surfaces/runjs-authoring/index.d.ts +14 -2
- package/dist/server/flow-surfaces/runjs-authoring/index.js +4213 -242
- package/dist/server/flow-surfaces/runjs-authoring/nested-runjs-stop/index.d.ts +10 -0
- package/dist/server/flow-surfaces/runjs-authoring/nested-runjs-stop/index.js +40 -0
- package/dist/server/flow-surfaces/runjs-authoring/rules.js +6 -0
- package/dist/server/flow-surfaces/runjs-authoring/source-limit-stop/index.d.ts +10 -0
- package/dist/server/flow-surfaces/runjs-authoring/source-limit-stop/index.js +40 -0
- package/dist/server/flow-surfaces/runjs-authoring/syntax-stop/index.d.ts +10 -0
- package/dist/server/flow-surfaces/runjs-authoring/syntax-stop/index.js +40 -0
- package/dist/server/flow-surfaces/runjs-authoring/types.d.ts +1 -1
- package/dist/server/flow-surfaces/service-utils.d.ts +1 -1
- package/dist/server/flow-surfaces/service-utils.js +3 -0
- package/dist/server/flow-surfaces/service.d.ts +61 -3
- package/dist/server/flow-surfaces/service.js +1199 -101
- package/dist/server/flow-surfaces/support-matrix.d.ts +1 -1
- package/dist/server/flow-surfaces/support-matrix.js +13 -1
- package/dist/server/flow-surfaces/surface-context.js +4 -13
- package/dist/swagger/flow-surfaces.d.ts +147 -0
- package/dist/swagger/flow-surfaces.examples.d.ts +194 -1
- package/dist/swagger/flow-surfaces.examples.js +75 -3
- package/dist/swagger/flow-surfaces.js +180 -7
- package/dist/swagger/index.d.ts +147 -0
- package/package.json +5 -2
|
@@ -138,6 +138,17 @@ const FLOW_SURFACE_DEFAULT_BLOCK_ACTIONS = {
|
|
|
138
138
|
[FLOW_SURFACE_INTERNAL_AUTO_SAVE_DEFAULT_POPUP_TEMPLATE_KEY]: true
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
+
],
|
|
142
|
+
comments: [
|
|
143
|
+
{ type: "edit", scope: "recordActions" },
|
|
144
|
+
{ type: "delete", scope: "recordActions" },
|
|
145
|
+
{ type: "quoteReply", scope: "recordActions" }
|
|
146
|
+
],
|
|
147
|
+
recordHistory: [
|
|
148
|
+
{ type: "filter", scope: "actions" },
|
|
149
|
+
{ type: "refresh", scope: "actions" },
|
|
150
|
+
{ type: "expandAll", scope: "actions" },
|
|
151
|
+
{ type: "collapseAll", scope: "actions" }
|
|
141
152
|
]
|
|
142
153
|
};
|
|
143
154
|
function cloneDefaultActionDescriptor(descriptor) {
|
|
@@ -263,15 +263,17 @@ function registerFlowSurfacesResource(plugin) {
|
|
|
263
263
|
actionName,
|
|
264
264
|
async (ctx, next) => {
|
|
265
265
|
await runFlowSurfaceAction(ctx, next, async () => {
|
|
266
|
+
var _a;
|
|
266
267
|
const definition = import_constants.FLOW_SURFACE_ACTION_DEFINITIONS[actionName];
|
|
267
268
|
const values = definition.valueSource === "read" ? getReadValues(ctx) : getValues(ctx);
|
|
268
269
|
const t = getFlowSurfaceTranslate(ctx);
|
|
270
|
+
const currentRoles = (_a = ctx.state) == null ? void 0 : _a.currentRoles;
|
|
269
271
|
if (definition.transaction) {
|
|
270
272
|
return service.transaction(
|
|
271
|
-
(transaction) => invokeFlowSurfaceServiceAction(service, actionName, values, { transaction, t })
|
|
273
|
+
(transaction) => invokeFlowSurfaceServiceAction(service, actionName, values, { transaction, currentRoles, t })
|
|
272
274
|
);
|
|
273
275
|
}
|
|
274
|
-
return invokeFlowSurfaceServiceAction(service, actionName, values, { t });
|
|
276
|
+
return invokeFlowSurfaceServiceAction(service, actionName, values, { currentRoles, t });
|
|
275
277
|
});
|
|
276
278
|
}
|
|
277
279
|
])
|
|
@@ -50,6 +50,7 @@ const COLLECTION_BLOCK_USES = /* @__PURE__ */ new Set([
|
|
|
50
50
|
"GridCardBlockModel",
|
|
51
51
|
"MapBlockModel",
|
|
52
52
|
"CommentsBlockModel",
|
|
53
|
+
"RecordHistoryBlockModel",
|
|
53
54
|
...import_approval.APPROVAL_FORM_BLOCK_USES,
|
|
54
55
|
...import_approval.APPROVAL_DETAILS_BLOCK_USES
|
|
55
56
|
]);
|
|
@@ -107,6 +108,7 @@ const ACTION_BUTTON_USES = /* @__PURE__ */ new Set([
|
|
|
107
108
|
"JSItemActionModel",
|
|
108
109
|
"FilterFormJSActionModel",
|
|
109
110
|
"JSActionModel",
|
|
111
|
+
"AIEmployeeButtonModel",
|
|
110
112
|
"CalendarTodayActionModel",
|
|
111
113
|
"CalendarNavActionModel",
|
|
112
114
|
"CalendarTitleActionModel",
|
|
@@ -12,10 +12,22 @@ type FlowSurfaceAuthoringWriteAction = 'applyBlueprint' | 'compose' | 'addBlock'
|
|
|
12
12
|
type RunJsAuthoringContext = {
|
|
13
13
|
authoringActionName?: FlowSurfaceAuthoringWriteAction;
|
|
14
14
|
applyBlueprintScriptAssets?: Record<string, any>;
|
|
15
|
+
currentCollectionName?: string;
|
|
16
|
+
currentDataSourceKey?: string;
|
|
15
17
|
currentNode?: any;
|
|
18
|
+
getCollection?: (dataSourceKey: string, collectionName: string) => any;
|
|
16
19
|
hostBlockType?: string;
|
|
20
|
+
hostCollectionName?: string;
|
|
21
|
+
hostDataSourceKey?: string;
|
|
22
|
+
runJsSourceBudget?: RunJsSourceBudget;
|
|
23
|
+
};
|
|
24
|
+
type RunJsSourceBudget = {
|
|
25
|
+
count: number;
|
|
26
|
+
countLimitReported?: boolean;
|
|
27
|
+
totalLength: number;
|
|
28
|
+
totalLimitReported?: boolean;
|
|
17
29
|
};
|
|
18
30
|
export declare function collectRunJsAuthoringErrors(actionName: FlowSurfaceAuthoringWriteAction, values: any, context?: RunJsAuthoringContext): FlowSurfaceErrorItemInput[];
|
|
19
|
-
export declare function collectFlowRegistryRunJsAuthoringErrors(flowRegistry: any, path?: string): FlowSurfaceErrorItemInput[];
|
|
20
|
-
export declare function inspectRunJsAuthoringCode(input: RunJsAuthoringInspectionInput): FlowSurfaceErrorItemInput[];
|
|
31
|
+
export declare function collectFlowRegistryRunJsAuthoringErrors(flowRegistry: any, path?: string, context?: RunJsAuthoringContext): FlowSurfaceErrorItemInput[];
|
|
32
|
+
export declare function inspectRunJsAuthoringCode(input: RunJsAuthoringInspectionInput, context?: RunJsAuthoringContext): FlowSurfaceErrorItemInput[];
|
|
21
33
|
export {};
|