@nocobase/plugin-flow-engine 2.1.0-alpha.15 → 2.1.0-alpha.17
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 +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/{compiler.d.ts → apply/compiler.d.ts} +1 -10
- package/dist/server/flow-surfaces/{compiler.js → apply/compiler.js} +41 -280
- package/dist/server/flow-surfaces/apply/layout.d.ts +34 -0
- package/dist/server/flow-surfaces/apply/layout.js +175 -0
- package/dist/server/flow-surfaces/apply/matching.d.ts +16 -0
- package/dist/server/flow-surfaces/apply/matching.js +181 -0
- package/dist/server/flow-surfaces/association-title-field.d.ts +20 -0
- package/dist/server/flow-surfaces/association-title-field.js +158 -0
- package/dist/server/flow-surfaces/blueprint/compile-blocks.d.ts +14 -0
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +717 -0
- package/dist/server/flow-surfaces/blueprint/compile-plan.d.ts +13 -0
- package/dist/server/flow-surfaces/blueprint/compile-plan.js +308 -0
- package/dist/server/flow-surfaces/blueprint/compile-reaction.d.ts +11 -0
- package/dist/server/flow-surfaces/blueprint/compile-reaction.js +72 -0
- package/dist/server/flow-surfaces/blueprint/index.d.ts +12 -0
- package/dist/server/flow-surfaces/blueprint/index.js +44 -0
- package/dist/server/flow-surfaces/blueprint/normalize-document.d.ts +10 -0
- package/dist/server/flow-surfaces/blueprint/normalize-document.js +296 -0
- package/dist/server/flow-surfaces/blueprint/private-utils.d.ts +26 -0
- package/dist/server/flow-surfaces/blueprint/private-utils.js +182 -0
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +153 -0
- package/dist/server/flow-surfaces/blueprint/public-types.js +24 -0
- package/dist/server/flow-surfaces/catalog-smart.d.ts +18 -0
- package/dist/server/flow-surfaces/catalog-smart.js +239 -0
- package/dist/server/flow-surfaces/catalog-smart.projector.d.ts +15 -0
- package/dist/server/flow-surfaces/catalog-smart.projector.js +157 -0
- package/dist/server/flow-surfaces/catalog-smart.types.d.ts +99 -0
- package/dist/server/flow-surfaces/catalog-smart.types.js +24 -0
- package/dist/server/flow-surfaces/catalog.d.ts +3 -0
- package/dist/server/flow-surfaces/catalog.js +163 -34
- package/dist/server/flow-surfaces/compose-compiler.d.ts +104 -0
- package/dist/server/flow-surfaces/compose-compiler.js +162 -0
- package/dist/server/flow-surfaces/compose-runtime.d.ts +89 -0
- package/dist/server/flow-surfaces/compose-runtime.js +338 -0
- package/dist/server/flow-surfaces/configure-options.js +12 -3
- package/dist/server/flow-surfaces/constants.d.ts +3 -2
- package/dist/server/flow-surfaces/constants.js +36 -3
- package/dist/server/flow-surfaces/default-action-popup.d.ts +52 -0
- package/dist/server/flow-surfaces/default-action-popup.js +258 -0
- package/dist/server/flow-surfaces/executor.d.ts +10 -0
- package/dist/server/flow-surfaces/executor.js +59 -24
- package/dist/server/flow-surfaces/field-binding-registry.d.ts +23 -0
- package/dist/server/flow-surfaces/field-binding-registry.js +391 -0
- package/dist/server/flow-surfaces/field-semantics.d.ts +1 -1
- package/dist/server/flow-surfaces/index.js +75 -0
- package/dist/server/flow-surfaces/node-use-sets.d.ts +15 -0
- package/dist/server/flow-surfaces/node-use-sets.js +114 -0
- package/dist/server/flow-surfaces/payload-shape.d.ts +9 -0
- package/dist/server/flow-surfaces/payload-shape.js +61 -0
- package/dist/server/flow-surfaces/placement.js +2 -6
- package/dist/server/flow-surfaces/planning/action-specs.d.ts +179 -0
- package/dist/server/flow-surfaces/planning/action-specs.js +190 -0
- package/dist/server/flow-surfaces/planning/compiler.d.ts +37 -0
- package/dist/server/flow-surfaces/planning/compiler.js +376 -0
- package/dist/server/flow-surfaces/planning/context.d.ts +30 -0
- package/dist/server/flow-surfaces/planning/context.js +139 -0
- package/dist/server/flow-surfaces/planning/created-keys.d.ts +34 -0
- package/dist/server/flow-surfaces/planning/created-keys.js +375 -0
- package/dist/server/flow-surfaces/planning/key-kind.d.ts +11 -0
- package/dist/server/flow-surfaces/planning/key-kind.js +86 -0
- package/dist/server/flow-surfaces/planning/key-persistence.d.ts +34 -0
- package/dist/server/flow-surfaces/planning/key-persistence.js +148 -0
- package/dist/server/flow-surfaces/planning/key-registry.d.ts +40 -0
- package/dist/server/flow-surfaces/planning/key-registry.js +206 -0
- package/dist/server/flow-surfaces/planning/runtime.d.ts +37 -0
- package/dist/server/flow-surfaces/planning/runtime.js +259 -0
- package/dist/server/flow-surfaces/planning/step-link.d.ts +14 -0
- package/dist/server/flow-surfaces/planning/step-link.js +104 -0
- package/dist/server/flow-surfaces/planning/types.d.ts +55 -0
- package/dist/server/flow-surfaces/planning/types.js +24 -0
- package/dist/server/flow-surfaces/reaction/errors.d.ts +20 -0
- package/dist/server/flow-surfaces/reaction/errors.js +69 -0
- package/dist/server/flow-surfaces/reaction/field-value.d.ts +34 -0
- package/dist/server/flow-surfaces/reaction/field-value.js +181 -0
- package/dist/server/flow-surfaces/reaction/fingerprint.d.ts +16 -0
- package/dist/server/flow-surfaces/reaction/fingerprint.js +71 -0
- package/dist/server/flow-surfaces/reaction/linkage.d.ts +136 -0
- package/dist/server/flow-surfaces/reaction/linkage.js +882 -0
- package/dist/server/flow-surfaces/reaction/meta.d.ts +11 -0
- package/dist/server/flow-surfaces/reaction/meta.js +451 -0
- package/dist/server/flow-surfaces/reaction/registry.d.ts +136 -0
- package/dist/server/flow-surfaces/reaction/registry.js +186 -0
- package/dist/server/flow-surfaces/reaction/resolver.d.ts +22 -0
- package/dist/server/flow-surfaces/reaction/resolver.js +202 -0
- package/dist/server/flow-surfaces/reaction/types.d.ts +241 -0
- package/dist/server/flow-surfaces/reaction/types.js +24 -0
- package/dist/server/flow-surfaces/reaction/utils.d.ts +17 -0
- package/dist/server/flow-surfaces/reaction/utils.js +67 -0
- package/dist/server/flow-surfaces/reaction/value-expr.d.ts +15 -0
- package/dist/server/flow-surfaces/reaction/value-expr.js +209 -0
- package/dist/server/flow-surfaces/reference-guards.d.ts +19 -0
- package/dist/server/flow-surfaces/reference-guards.js +103 -0
- package/dist/server/flow-surfaces/service-helpers.d.ts +42 -0
- package/dist/server/flow-surfaces/service-helpers.js +377 -0
- package/dist/server/flow-surfaces/service-utils.d.ts +105 -0
- package/dist/server/flow-surfaces/service-utils.js +760 -0
- package/dist/server/flow-surfaces/service.d.ts +199 -104
- package/dist/server/flow-surfaces/service.js +4158 -1890
- package/dist/server/flow-surfaces/template-compatibility.d.ts +42 -0
- package/dist/server/flow-surfaces/template-compatibility.js +189 -0
- package/dist/server/flow-surfaces/template-service-utils.d.ts +62 -0
- package/dist/server/flow-surfaces/template-service-utils.js +281 -0
- package/dist/server/flow-surfaces/types.d.ts +129 -37
- package/dist/swagger/flow-surfaces.d.ts +3777 -1581
- package/dist/swagger/flow-surfaces.examples.d.ts +1246 -0
- package/dist/swagger/flow-surfaces.examples.js +1396 -0
- package/dist/swagger/flow-surfaces.js +2020 -1469
- package/dist/swagger/flow-surfaces.template-action-docs.d.ts +62 -0
- package/dist/swagger/flow-surfaces.template-action-docs.js +121 -0
- package/dist/swagger/flow-surfaces.template-schemas.d.ts +239 -0
- package/dist/swagger/flow-surfaces.template-schemas.js +255 -0
- package/dist/swagger/index.d.ts +3777 -1581
- package/package.json +2 -2
|
@@ -6,16 +6,35 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import { FLOW_SURFACE_MUTATE_OP_TYPES } from './constants';
|
|
9
|
+
import { FLOW_SURFACE_MUTATE_OP_TYPES, FLOW_SURFACE_PLAN_STEP_ACTIONS } from './constants';
|
|
10
10
|
export type FlowSurfaceNodeDomain = 'props' | 'decoratorProps' | 'stepParams' | 'flowRegistry';
|
|
11
11
|
export type FlowSurfaceMergeStrategy = 'deep' | 'replace';
|
|
12
12
|
export type FlowSurfaceActionScope = 'block' | 'record' | 'form' | 'filterForm' | 'actionPanel';
|
|
13
|
+
export type FlowSurfaceContainerKind = 'page' | 'tab' | 'grid' | 'block' | 'node';
|
|
13
14
|
export type FlowSurfaceReadLocator = {
|
|
14
15
|
uid?: string;
|
|
15
16
|
pageSchemaUid?: string;
|
|
16
17
|
tabSchemaUid?: string;
|
|
17
18
|
routeId?: string;
|
|
18
19
|
};
|
|
20
|
+
export type FlowSurfacePlanStepLink = {
|
|
21
|
+
step: string;
|
|
22
|
+
path?: string;
|
|
23
|
+
};
|
|
24
|
+
export type FlowSurfaceKeySelector = {
|
|
25
|
+
key: string;
|
|
26
|
+
};
|
|
27
|
+
export type FlowSurfaceLocatorSelector = {
|
|
28
|
+
locator: FlowSurfaceReadLocator;
|
|
29
|
+
};
|
|
30
|
+
export type FlowSurfaceSurfaceSelector = FlowSurfaceKeySelector | FlowSurfaceLocatorSelector;
|
|
31
|
+
export type FlowSurfacePlanSelector = FlowSurfaceSurfaceSelector | FlowSurfacePlanStepLink;
|
|
32
|
+
export type FlowSurfaceBindKey = {
|
|
33
|
+
key: string;
|
|
34
|
+
locator: FlowSurfaceReadLocator;
|
|
35
|
+
expectedKind?: 'page' | 'tab' | 'grid' | 'block' | 'fieldHost' | 'action' | 'popupHost' | 'popupPage' | 'popupTab' | 'node';
|
|
36
|
+
rebind?: boolean;
|
|
37
|
+
};
|
|
19
38
|
export type FlowSurfaceWriteTarget = {
|
|
20
39
|
uid: string;
|
|
21
40
|
};
|
|
@@ -29,34 +48,11 @@ export type FlowSurfaceConfigureOption = {
|
|
|
29
48
|
supportsFlowContext?: boolean;
|
|
30
49
|
};
|
|
31
50
|
export type FlowSurfaceConfigureOptions = Record<string, FlowSurfaceConfigureOption>;
|
|
32
|
-
export type FlowSurfaceResourceBindingKey = 'currentCollection' | 'currentRecord' | 'associatedRecords' | 'otherRecords';
|
|
33
|
-
export type FlowSurfaceResourceBindingAssociationField = {
|
|
34
|
-
key: string;
|
|
35
|
-
label: string;
|
|
36
|
-
collectionName: string;
|
|
37
|
-
associationName?: string;
|
|
38
|
-
};
|
|
39
|
-
export type FlowSurfaceResourceBindingOption = {
|
|
40
|
-
key: FlowSurfaceResourceBindingKey;
|
|
41
|
-
label: string;
|
|
42
|
-
description?: string;
|
|
43
|
-
requires?: string[];
|
|
44
|
-
dataSourceKey?: string;
|
|
45
|
-
collectionName?: string;
|
|
46
|
-
associationFields?: FlowSurfaceResourceBindingAssociationField[];
|
|
47
|
-
};
|
|
48
|
-
export type FlowSurfaceSemanticResourceInput = {
|
|
49
|
-
binding: FlowSurfaceResourceBindingKey;
|
|
50
|
-
dataSourceKey?: string;
|
|
51
|
-
collectionName?: string;
|
|
52
|
-
associationField?: string;
|
|
53
|
-
};
|
|
54
51
|
export type FlowSurfaceReadTarget = {
|
|
55
52
|
locator: FlowSurfaceReadLocator;
|
|
56
53
|
uid: string;
|
|
57
54
|
kind: FlowSurfaceContainerKind;
|
|
58
55
|
};
|
|
59
|
-
export type FlowSurfaceContainerKind = 'page' | 'tab' | 'grid' | 'block' | 'node';
|
|
60
56
|
export type FlowSurfaceDomainContract = {
|
|
61
57
|
allowedKeys: string[];
|
|
62
58
|
wildcard?: boolean;
|
|
@@ -89,6 +85,28 @@ export type FlowSurfaceNodeContract = {
|
|
|
89
85
|
layoutCapabilities?: FlowSurfaceLayoutCapabilities;
|
|
90
86
|
eventBindings?: Record<string, FlowSurfaceEventBindingContract>;
|
|
91
87
|
};
|
|
88
|
+
export type FlowSurfaceResourceBindingKey = 'currentCollection' | 'currentRecord' | 'associatedRecords' | 'otherRecords';
|
|
89
|
+
export type FlowSurfaceResourceBindingAssociationField = {
|
|
90
|
+
key: string;
|
|
91
|
+
label: string;
|
|
92
|
+
collectionName: string;
|
|
93
|
+
associationName?: string;
|
|
94
|
+
};
|
|
95
|
+
export type FlowSurfaceResourceBindingOption = {
|
|
96
|
+
key: FlowSurfaceResourceBindingKey;
|
|
97
|
+
label: string;
|
|
98
|
+
description?: string;
|
|
99
|
+
requires?: string[];
|
|
100
|
+
dataSourceKey?: string;
|
|
101
|
+
collectionName?: string;
|
|
102
|
+
associationFields?: FlowSurfaceResourceBindingAssociationField[];
|
|
103
|
+
};
|
|
104
|
+
export type FlowSurfaceSemanticResourceInput = {
|
|
105
|
+
binding: FlowSurfaceResourceBindingKey;
|
|
106
|
+
dataSourceKey?: string;
|
|
107
|
+
collectionName?: string;
|
|
108
|
+
associationField?: string;
|
|
109
|
+
};
|
|
92
110
|
export type FlowSurfaceCatalogItem = {
|
|
93
111
|
key: string;
|
|
94
112
|
label: string;
|
|
@@ -98,18 +116,82 @@ export type FlowSurfaceCatalogItem = {
|
|
|
98
116
|
scene?: string;
|
|
99
117
|
requiredInitParams?: string[];
|
|
100
118
|
allowedContainerUses?: string[];
|
|
101
|
-
editableDomains
|
|
102
|
-
settingsSchema
|
|
119
|
+
editableDomains?: FlowSurfaceNodeDomain[];
|
|
120
|
+
settingsSchema?: Record<string, any>;
|
|
103
121
|
settingsContract?: Partial<Record<FlowSurfaceNodeDomain, FlowSurfaceDomainContract>>;
|
|
104
122
|
configureOptions?: FlowSurfaceConfigureOptions;
|
|
105
123
|
resourceBindings?: FlowSurfaceResourceBindingOption[];
|
|
106
124
|
eventCapabilities?: FlowSurfaceEventCapabilities;
|
|
107
125
|
layoutCapabilities?: FlowSurfaceLayoutCapabilities;
|
|
108
126
|
createSupported?: boolean;
|
|
127
|
+
fieldUse?: string;
|
|
128
|
+
wrapperUse?: string;
|
|
129
|
+
renderer?: string;
|
|
130
|
+
type?: string;
|
|
131
|
+
associationPathName?: string;
|
|
132
|
+
defaultTargetUid?: string;
|
|
133
|
+
targetBlockUid?: string;
|
|
134
|
+
};
|
|
135
|
+
export type FlowSurfaceCatalogSection = 'blocks' | 'fields' | 'actions' | 'recordActions' | 'node';
|
|
136
|
+
export type FlowSurfaceCatalogExpand = 'item.configureOptions' | 'item.contracts' | 'item.allowedContainerUses' | 'node.contracts';
|
|
137
|
+
export type FlowSurfaceCatalogPopupScenario = {
|
|
138
|
+
kind: 'plainPopup' | 'recordPopup' | 'associationPopup';
|
|
139
|
+
scene: 'new' | 'one' | 'many' | 'select' | 'subForm' | 'bulkEditForm' | 'generic';
|
|
140
|
+
hasCurrentRecord: boolean;
|
|
141
|
+
hasAssociationContext: boolean;
|
|
142
|
+
};
|
|
143
|
+
export type FlowSurfaceCatalogFieldContainerScenario = {
|
|
144
|
+
kind: 'form' | 'details' | 'table' | 'filter-form';
|
|
145
|
+
targetMode?: 'single' | 'multiple';
|
|
146
|
+
};
|
|
147
|
+
export type FlowSurfaceCatalogActionContainerScenario = {
|
|
148
|
+
scope: FlowSurfaceActionScope;
|
|
149
|
+
ownerUse?: string;
|
|
150
|
+
recordActionContainerUse?: string;
|
|
151
|
+
};
|
|
152
|
+
export type FlowSurfaceCatalogScenario = {
|
|
153
|
+
surfaceKind: 'global' | FlowSurfaceContainerKind;
|
|
154
|
+
popup?: FlowSurfaceCatalogPopupScenario;
|
|
155
|
+
fieldContainer?: FlowSurfaceCatalogFieldContainerScenario;
|
|
156
|
+
actionContainer?: FlowSurfaceCatalogActionContainerScenario;
|
|
157
|
+
};
|
|
158
|
+
export type FlowSurfaceCatalogNodeInfo = {
|
|
159
|
+
editableDomains: FlowSurfaceNodeDomain[];
|
|
160
|
+
configureOptions: FlowSurfaceConfigureOptions;
|
|
161
|
+
settingsSchema?: Record<string, any>;
|
|
162
|
+
settingsContract?: Partial<Record<FlowSurfaceNodeDomain, FlowSurfaceDomainContract>>;
|
|
163
|
+
eventCapabilities?: FlowSurfaceEventCapabilities;
|
|
164
|
+
layoutCapabilities?: FlowSurfaceLayoutCapabilities;
|
|
165
|
+
};
|
|
166
|
+
export type FlowSurfaceCatalogValues = {
|
|
167
|
+
target?: FlowSurfaceWriteTarget;
|
|
168
|
+
sections?: FlowSurfaceCatalogSection[];
|
|
169
|
+
expand?: FlowSurfaceCatalogExpand[];
|
|
170
|
+
};
|
|
171
|
+
export type FlowSurfaceResolvedTarget = {
|
|
172
|
+
target: FlowSurfaceResolveTarget;
|
|
173
|
+
uid: string;
|
|
174
|
+
kind: FlowSurfaceContainerKind;
|
|
175
|
+
node?: any;
|
|
176
|
+
route?: any;
|
|
177
|
+
pageRoute?: any;
|
|
178
|
+
tabRoute?: any;
|
|
179
|
+
pageModel?: any;
|
|
180
|
+
};
|
|
181
|
+
export type FlowSurfaceCatalogResponse = {
|
|
182
|
+
target: FlowSurfaceResolvedTarget | null;
|
|
183
|
+
scenario: FlowSurfaceCatalogScenario;
|
|
184
|
+
selectedSections: FlowSurfaceCatalogSection[];
|
|
185
|
+
blocks?: FlowSurfaceCatalogItem[];
|
|
186
|
+
fields?: FlowSurfaceCatalogItem[];
|
|
187
|
+
actions?: FlowSurfaceCatalogItem[];
|
|
188
|
+
recordActions?: FlowSurfaceCatalogItem[];
|
|
189
|
+
node?: FlowSurfaceCatalogNodeInfo;
|
|
109
190
|
};
|
|
110
191
|
export type FlowSurfaceNodeSpec = {
|
|
111
192
|
uid?: string;
|
|
112
193
|
clientKey?: string;
|
|
194
|
+
sortIndex?: number;
|
|
113
195
|
use: string;
|
|
114
196
|
props?: Record<string, any>;
|
|
115
197
|
decoratorProps?: Record<string, any>;
|
|
@@ -168,6 +250,26 @@ export type FlowSurfaceContextValues = {
|
|
|
168
250
|
export type FlowSurfaceContextResponse = {
|
|
169
251
|
vars: Record<string, FlowSurfaceContextVarInfo>;
|
|
170
252
|
};
|
|
253
|
+
export type FlowSurfaceDescribeValues = {
|
|
254
|
+
locator: FlowSurfaceReadLocator;
|
|
255
|
+
bindKeys?: FlowSurfaceBindKey[];
|
|
256
|
+
};
|
|
257
|
+
export type FlowSurfacePlanStepAction = (typeof FLOW_SURFACE_PLAN_STEP_ACTIONS)[number];
|
|
258
|
+
export type FlowSurfacePlanStep = {
|
|
259
|
+
id?: string;
|
|
260
|
+
action: FlowSurfacePlanStepAction;
|
|
261
|
+
selectors?: {
|
|
262
|
+
target?: FlowSurfacePlanSelector;
|
|
263
|
+
source?: FlowSurfacePlanSelector;
|
|
264
|
+
};
|
|
265
|
+
values?: Record<string, any>;
|
|
266
|
+
};
|
|
267
|
+
export type FlowSurfacePlanRequestValues = {
|
|
268
|
+
surface?: FlowSurfaceSurfaceSelector;
|
|
269
|
+
plan: {
|
|
270
|
+
steps?: FlowSurfacePlanStep[];
|
|
271
|
+
};
|
|
272
|
+
};
|
|
171
273
|
export type FlowSurfaceMutateOpType = (typeof FLOW_SURFACE_MUTATE_OP_TYPES)[number];
|
|
172
274
|
export type FlowSurfaceMutateOp = {
|
|
173
275
|
opId?: string;
|
|
@@ -175,18 +277,8 @@ export type FlowSurfaceMutateOp = {
|
|
|
175
277
|
target?: FlowSurfaceWriteTarget;
|
|
176
278
|
values?: Record<string, any>;
|
|
177
279
|
};
|
|
178
|
-
export type FlowSurfaceResolvedTarget = {
|
|
179
|
-
target: FlowSurfaceResolveTarget;
|
|
180
|
-
uid: string;
|
|
181
|
-
kind: FlowSurfaceContainerKind;
|
|
182
|
-
node?: any;
|
|
183
|
-
route?: any;
|
|
184
|
-
pageRoute?: any;
|
|
185
|
-
tabRoute?: any;
|
|
186
|
-
pageModel?: any;
|
|
187
|
-
};
|
|
188
280
|
export type FlowSurfaceExecutorContext = {
|
|
189
281
|
transaction?: any;
|
|
190
|
-
|
|
282
|
+
keys: Map<string, any>;
|
|
191
283
|
clientKeyToUid: Record<string, string>;
|
|
192
284
|
};
|