@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
|
@@ -310,58 +310,7 @@ function collectDirectDomErrors(path, source, scan, modelUse, surface, errors) {
|
|
|
310
310
|
);
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
scan.windowDocumentNavigatorAliases.forEach((entry) => {
|
|
315
|
-
errors.push(
|
|
316
|
-
(0, import_errors.buildRunJsAuthoringError)({
|
|
317
|
-
path,
|
|
318
|
-
repairClass: "blocked-global-stop",
|
|
319
|
-
message: `flowSurfaces authoring ${path} cannot alias forbidden global ${entry.root}`,
|
|
320
|
-
modelUse,
|
|
321
|
-
surface,
|
|
322
|
-
index: entry.index,
|
|
323
|
-
source,
|
|
324
|
-
details: {
|
|
325
|
-
global: entry.root,
|
|
326
|
-
alias: entry.alias
|
|
327
|
-
}
|
|
328
|
-
})
|
|
329
|
-
);
|
|
330
|
-
});
|
|
331
|
-
scan.windowDocumentNavigatorUses.forEach((entry) => {
|
|
332
|
-
errors.push(
|
|
333
|
-
(0, import_errors.buildRunJsAuthoringError)({
|
|
334
|
-
path,
|
|
335
|
-
repairClass: "blocked-global-stop",
|
|
336
|
-
ruleId: `runjs-${entry.root}-property-blocked`,
|
|
337
|
-
message: `flowSurfaces authoring ${path} cannot access ${entry.root}.${entry.member} in RunJS`,
|
|
338
|
-
modelUse,
|
|
339
|
-
surface,
|
|
340
|
-
index: entry.index,
|
|
341
|
-
source,
|
|
342
|
-
details: {
|
|
343
|
-
global: entry.root,
|
|
344
|
-
member: entry.member
|
|
345
|
-
}
|
|
346
|
-
})
|
|
347
|
-
);
|
|
348
|
-
});
|
|
349
|
-
scan.forbiddenBareGlobals.forEach((entry) => {
|
|
350
|
-
errors.push(
|
|
351
|
-
(0, import_errors.buildRunJsAuthoringError)({
|
|
352
|
-
path,
|
|
353
|
-
repairClass: "blocked-global-stop",
|
|
354
|
-
message: `flowSurfaces authoring ${path} cannot access forbidden global ${entry.name}`,
|
|
355
|
-
modelUse,
|
|
356
|
-
surface,
|
|
357
|
-
index: entry.index,
|
|
358
|
-
source,
|
|
359
|
-
details: {
|
|
360
|
-
global: entry.name
|
|
361
|
-
}
|
|
362
|
-
})
|
|
363
|
-
);
|
|
364
|
-
});
|
|
313
|
+
function collectUnknownGlobalErrors(path, source, scan, modelUse, surface, errors) {
|
|
365
314
|
scan.unknownBareGlobals.forEach((entry) => {
|
|
366
315
|
const suggestion = entry.suggestedCapability ? `; use ${entry.suggestedCapability} or assign it to a local variable first` : "; declare or import it before using it";
|
|
367
316
|
errors.push(
|
|
@@ -840,7 +789,14 @@ const RUNJS_INSPECTION_VALIDATORS = [
|
|
|
840
789
|
),
|
|
841
790
|
createLegacyValidator("dom-global", (runtime, errors) => {
|
|
842
791
|
collectDirectDomErrors(runtime.input.path, runtime.source, runtime.scan, runtime.modelUse, runtime.surface, errors);
|
|
843
|
-
|
|
792
|
+
collectUnknownGlobalErrors(
|
|
793
|
+
runtime.input.path,
|
|
794
|
+
runtime.source,
|
|
795
|
+
runtime.scan,
|
|
796
|
+
runtime.modelUse,
|
|
797
|
+
runtime.surface,
|
|
798
|
+
errors
|
|
799
|
+
);
|
|
844
800
|
}),
|
|
845
801
|
createLegacyValidator(
|
|
846
802
|
"react-runtime",
|
|
@@ -54,6 +54,7 @@ export declare class FlowSurfacesService {
|
|
|
54
54
|
get repository(): FlowModelRepository;
|
|
55
55
|
get locator(): SurfaceLocator;
|
|
56
56
|
private get routeSync();
|
|
57
|
+
private get navigationTargets();
|
|
57
58
|
private getFlowTemplateRepository;
|
|
58
59
|
private getFlowTemplateRepositorySafe;
|
|
59
60
|
private getFlowTemplateUsageRepository;
|
|
@@ -82,6 +83,27 @@ export declare class FlowSurfacesService {
|
|
|
82
83
|
private assertMenuRouteUpdatable;
|
|
83
84
|
private assertMenuParentNotSelfOrDescendant;
|
|
84
85
|
private buildMenuResult;
|
|
86
|
+
private hasDesktopRouteUiLayoutsRelation;
|
|
87
|
+
private normalizeDesktopRouteRelationId;
|
|
88
|
+
private readDesktopRouteUiLayoutUids;
|
|
89
|
+
private resolveDefaultDesktopRouteUiLayoutUids;
|
|
90
|
+
private findDesktopRouteUiLayoutByUid;
|
|
91
|
+
private getDesktopRouteUiLayoutTypeByUid;
|
|
92
|
+
private isMobileDesktopRouteUiLayoutUid;
|
|
93
|
+
private resolveInheritedDesktopRouteUiLayoutUids;
|
|
94
|
+
private normalizeExplicitDesktopRouteLayoutUid;
|
|
95
|
+
private normalizeDesktopRouteLayoutUidFilter;
|
|
96
|
+
private resolveDesktopRouteLayoutUidFilter;
|
|
97
|
+
private assertNavigationTargetIsExclusive;
|
|
98
|
+
private readDesktopRouteScope;
|
|
99
|
+
private resolveRequestedDesktopRouteScope;
|
|
100
|
+
private resolveExistingDesktopRouteScope;
|
|
101
|
+
private attachDesktopRouteScopeToRouteAndChildren;
|
|
102
|
+
private assertEnabledDesktopRouteUiLayoutUid;
|
|
103
|
+
private assertDesktopRouteBelongsToUiLayout;
|
|
104
|
+
private setDesktopRouteUiLayouts;
|
|
105
|
+
private attachDesktopRouteUiLayoutsToRouteAndChildren;
|
|
106
|
+
private ensureDesktopRouteUiLayouts;
|
|
85
107
|
private isValidMenuIconName;
|
|
86
108
|
private assertVisibleNavigationIcon;
|
|
87
109
|
private assertVisibleNavigationRouteIconUpdate;
|
|
@@ -142,6 +164,7 @@ export declare class FlowSurfacesService {
|
|
|
142
164
|
private getCollectionFilterTargetKey;
|
|
143
165
|
private normalizeFlowContextTemplateValue;
|
|
144
166
|
private isSameConfiguredFlowContextValue;
|
|
167
|
+
private isPopupCurrentRecordFilterByTkMatch;
|
|
145
168
|
private isPopupAssociatedRecordsSourceIdMatch;
|
|
146
169
|
private classifyPopupRawResourceInit;
|
|
147
170
|
private resolvePopupAssociationField;
|
|
@@ -160,6 +183,7 @@ export declare class FlowSurfacesService {
|
|
|
160
183
|
private persistReactionSlot;
|
|
161
184
|
private buildLinkageWriteResult;
|
|
162
185
|
private getLiveLinkageCapability;
|
|
186
|
+
private getLiveFieldValueCapability;
|
|
163
187
|
getReactionMeta(values: FlowSurfaceGetReactionMetaValues, options?: {
|
|
164
188
|
transaction?: any;
|
|
165
189
|
}): Promise<FlowSurfaceGetReactionMetaResult>;
|
|
@@ -182,6 +206,17 @@ export declare class FlowSurfacesService {
|
|
|
182
206
|
private buildSurfaceReadPayload;
|
|
183
207
|
private buildSurfaceContextFingerprint;
|
|
184
208
|
get(input: Record<string, any>, options?: FlowSurfaceReadOptions): Promise<Record<string, any>>;
|
|
209
|
+
exportBlueprint(input: Record<string, unknown>, options?: FlowSurfaceReadOptions): Promise<{
|
|
210
|
+
document: FlowSurfaceApplyBlueprintDocument;
|
|
211
|
+
source: {
|
|
212
|
+
target: {
|
|
213
|
+
pageSchemaUid: string;
|
|
214
|
+
};
|
|
215
|
+
pageTitle?: string;
|
|
216
|
+
};
|
|
217
|
+
warnings: string[];
|
|
218
|
+
unsupported: import("./blueprint/export-document").FlowSurfaceExportBlueprintUnsupportedItem[];
|
|
219
|
+
}>;
|
|
185
220
|
private getDeclaredKeyPersistenceDeps;
|
|
186
221
|
private patchDeclaredKeyModel;
|
|
187
222
|
private persistCreatedKeysForAction;
|
|
@@ -192,6 +227,8 @@ export declare class FlowSurfacesService {
|
|
|
192
227
|
private dispatchPlanOnlyAction;
|
|
193
228
|
private resolveApplyBlueprintReplaceTargetInfo;
|
|
194
229
|
private resolveApplyBlueprintCreateNavigationGroup;
|
|
230
|
+
private normalizeApplyBlueprintCreateMobileNavigation;
|
|
231
|
+
private assertApplyBlueprintCreateNavigationTarget;
|
|
195
232
|
private resolveApplyBlueprintCreatePageIdentity;
|
|
196
233
|
private prepareApplyBlueprintRequest;
|
|
197
234
|
private prevalidateApplyBlueprintChartAssets;
|
|
@@ -288,6 +325,7 @@ export declare class FlowSurfacesService {
|
|
|
288
325
|
private createFlowTemplateReferenceBlockModel;
|
|
289
326
|
private buildPopupTemplateReferenceOpenView;
|
|
290
327
|
private shouldHydrateDetachedPopupTemplateBlockResourceContext;
|
|
328
|
+
private resolveDetachedPopupTemplateBlockCurrentRecordFilterByTk;
|
|
291
329
|
private collectDetachedPopupTemplateBlockResourceContextPatches;
|
|
292
330
|
private hydrateDetachedPopupTemplateBlockResourceContext;
|
|
293
331
|
private hydrateDetachedPopupTemplateSourceContext;
|
|
@@ -358,8 +396,13 @@ export declare class FlowSurfacesService {
|
|
|
358
396
|
uid: any;
|
|
359
397
|
updated: string[];
|
|
360
398
|
}>;
|
|
399
|
+
listNavigationTargets(_values?: Record<string, any>, options?: {
|
|
400
|
+
transaction?: any;
|
|
401
|
+
currentRoles?: FlowSurfaceRequestRoles;
|
|
402
|
+
}): Promise<import("./navigation-targets").FlowSurfaceNavigationTargetsResult>;
|
|
361
403
|
createMenu(values: Record<string, any>, options?: {
|
|
362
404
|
transaction?: any;
|
|
405
|
+
currentRoles?: FlowSurfaceRequestRoles;
|
|
363
406
|
}): Promise<{
|
|
364
407
|
routeId: any;
|
|
365
408
|
type: any;
|
|
@@ -367,6 +410,7 @@ export declare class FlowSurfacesService {
|
|
|
367
410
|
}>;
|
|
368
411
|
updateMenu(values: Record<string, any>, options?: {
|
|
369
412
|
transaction?: any;
|
|
413
|
+
currentRoles?: FlowSurfaceRequestRoles;
|
|
370
414
|
}): Promise<{
|
|
371
415
|
routeId: any;
|
|
372
416
|
type: any;
|
|
@@ -375,6 +419,7 @@ export declare class FlowSurfacesService {
|
|
|
375
419
|
private initializeFlowPageForRoute;
|
|
376
420
|
createPage(values: Record<string, any>, options?: {
|
|
377
421
|
transaction?: any;
|
|
422
|
+
currentRoles?: FlowSurfaceRequestRoles;
|
|
378
423
|
}): Promise<any>;
|
|
379
424
|
destroyPage(values: Record<string, any>, options?: {
|
|
380
425
|
transaction?: any;
|
|
@@ -736,6 +781,9 @@ export declare class FlowSurfacesService {
|
|
|
736
781
|
private syncFilterActionSettingsForUpdateSettings;
|
|
737
782
|
private resolveFilterActionDefaultFilterRequiredFieldCount;
|
|
738
783
|
private syncMirroredStepParamsForUpdateSettings;
|
|
784
|
+
private syncActionButtonSettingsForUpdateSettings;
|
|
785
|
+
private supportsActionButtonSettingsSync;
|
|
786
|
+
private pickRequestedActionButtonSettings;
|
|
739
787
|
private syncCreatedFieldWrapperTitleFieldStepParams;
|
|
740
788
|
private syncUpdateActionAssignedValuesForUpdateSettings;
|
|
741
789
|
private syncActionTriggerWorkflowsForUpdateSettings;
|
|
@@ -916,6 +964,12 @@ export declare class FlowSurfacesService {
|
|
|
916
964
|
private normalizeRemoveNodeTarget;
|
|
917
965
|
private assertRemoveNodeResolvedTarget;
|
|
918
966
|
private normalizeGetTarget;
|
|
967
|
+
private normalizeExportBlueprintRequest;
|
|
968
|
+
private normalizeExportBlueprintUnsupportedPolicy;
|
|
969
|
+
private normalizeExportBlueprintLocatorValue;
|
|
970
|
+
private readRouteString;
|
|
971
|
+
private resolveExportBlueprintPageSchemaUid;
|
|
972
|
+
private assertExportBlueprintRootTarget;
|
|
919
973
|
private normalizeContextPath;
|
|
920
974
|
private normalizeContextMaxDepth;
|
|
921
975
|
private buildReadTargetSummary;
|
|
@@ -1038,14 +1092,19 @@ export declare class FlowSurfacesService {
|
|
|
1038
1092
|
private stableSerializeAIEmployeeValue;
|
|
1039
1093
|
private buildAIEmployeeActionDedupIdentity;
|
|
1040
1094
|
private normalizeAIEmployeeWorkContextForDedupIdentity;
|
|
1095
|
+
private normalizeAIEmployeeActionWorkContextForDedupIdentity;
|
|
1096
|
+
private normalizeAIEmployeeDefaultActionWorkContextForSelfUid;
|
|
1097
|
+
private normalizeAIEmployeeTaskWorkContextForDedupIdentity;
|
|
1041
1098
|
private normalizeAIEmployeeTasksForDedupIdentity;
|
|
1042
1099
|
private assertNoDuplicateAIEmployeeAction;
|
|
1100
|
+
private assertNoDuplicateAIEmployeeActionForUpdateSettings;
|
|
1043
1101
|
private hasAIEmployeePublicSettings;
|
|
1044
1102
|
private assertOnlyAIEmployeePublicSettings;
|
|
1045
1103
|
private aiEmployeeNestedRepairHint;
|
|
1046
1104
|
private assertOnlyAIEmployeeNestedPublicSettings;
|
|
1047
1105
|
private assertNoAIEmployeeInternalPropSettings;
|
|
1048
1106
|
private readAIEmployeePersistedTasks;
|
|
1107
|
+
private normalizeAIEmployeeLegacyInheritedTaskWorkContext;
|
|
1049
1108
|
private buildAIEmployeeTaskStepParams;
|
|
1050
1109
|
private mergeAIEmployeeActionSettingsPayload;
|
|
1051
1110
|
private syncAIEmployeeTaskStepParamsForUpdateSettings;
|
|
@@ -1058,6 +1117,7 @@ export declare class FlowSurfacesService {
|
|
|
1058
1117
|
private normalizeAIEmployeeUsername;
|
|
1059
1118
|
private assertAIEmployeeWorkContextType;
|
|
1060
1119
|
private normalizeAIEmployeeWorkContext;
|
|
1120
|
+
private normalizeAIEmployeeEffectiveActionWorkContext;
|
|
1061
1121
|
private normalizeAIEmployeeTaskModel;
|
|
1062
1122
|
private normalizeAIEmployeeSkillSettings;
|
|
1063
1123
|
private collectAIEmployeePromptVariables;
|
|
@@ -1080,14 +1140,19 @@ export declare class FlowSurfacesService {
|
|
|
1080
1140
|
private normalizeAIEmployeeTaskMessage;
|
|
1081
1141
|
private normalizeAIEmployeeTaskPatch;
|
|
1082
1142
|
private normalizeAIEmployeeTasks;
|
|
1143
|
+
private withAIEmployeeTaskDefaultWorkContext;
|
|
1144
|
+
private shouldMaterializeAIEmployeeTaskDefaultWorkContext;
|
|
1145
|
+
private rebaseAIEmployeeInheritedTaskWorkContext;
|
|
1083
1146
|
private normalizeAIEmployeeActionSettingsReferences;
|
|
1084
1147
|
private normalizeAIEmployeeActionPublicSettings;
|
|
1085
1148
|
private resolveAIEmployeeActionSelfUid;
|
|
1149
|
+
private resolveAIEmployeeActionSelfUidFromParentNode;
|
|
1086
1150
|
private configureActionNode;
|
|
1087
1151
|
private normalizeActionPanelActionChanges;
|
|
1088
1152
|
private buildFieldCatalog;
|
|
1089
1153
|
private getFieldMenuCatalogMode;
|
|
1090
1154
|
private resolveRegisteredFieldBinding;
|
|
1155
|
+
private isCollectionTitleField;
|
|
1091
1156
|
private resolveAssociationLeafDisplaySemantics;
|
|
1092
1157
|
private buildFieldMenuDirectCandidates;
|
|
1093
1158
|
private collectFieldMenuAssociationLeafCandidates;
|