@nocobase/plugin-flow-engine 2.1.0-alpha.23 → 2.1.0-alpha.25
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/skills/frontend-developer/SKILLS.md +2 -2
- 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/action-scope.d.ts +1 -0
- package/dist/server/flow-surfaces/action-scope.js +4 -0
- package/dist/server/flow-surfaces/apply/compiler.js +4 -2
- package/dist/server/flow-surfaces/association-interfaces.d.ts +10 -0
- package/dist/server/flow-surfaces/association-interfaces.js +39 -0
- package/dist/server/flow-surfaces/association-title-field.d.ts +1 -1
- package/dist/server/flow-surfaces/association-title-field.js +38 -4
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +72 -5
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +9 -1
- package/dist/server/flow-surfaces/builder.d.ts +27 -1
- package/dist/server/flow-surfaces/builder.js +105 -5
- package/dist/server/flow-surfaces/catalog.d.ts +2 -1
- package/dist/server/flow-surfaces/catalog.js +316 -119
- package/dist/server/flow-surfaces/compose-compiler.d.ts +8 -0
- package/dist/server/flow-surfaces/compose-compiler.js +9 -1
- package/dist/server/flow-surfaces/configure-options.js +72 -6
- package/dist/server/flow-surfaces/core-field-default-bindings.d.ts +12 -0
- package/dist/server/flow-surfaces/core-field-default-bindings.js +157 -0
- package/dist/server/flow-surfaces/default-action-popup.js +2 -2
- package/dist/server/flow-surfaces/default-block-actions.js +24 -0
- package/dist/server/flow-surfaces/field-binding-registry.d.ts +1 -0
- package/dist/server/flow-surfaces/field-binding-registry.js +5 -0
- package/dist/server/flow-surfaces/field-semantics.d.ts +1 -1
- package/dist/server/flow-surfaces/field-semantics.js +7 -4
- package/dist/server/flow-surfaces/field-type-resolver.d.ts +46 -0
- package/dist/server/flow-surfaces/field-type-resolver.js +322 -0
- package/dist/server/flow-surfaces/index.js +61 -2
- package/dist/server/flow-surfaces/node-use-sets.js +4 -0
- package/dist/server/flow-surfaces/placement.js +3 -0
- package/dist/server/flow-surfaces/public-data-surface-default-filter.d.ts +4 -0
- package/dist/server/flow-surfaces/public-data-surface-default-filter.js +45 -4
- package/dist/server/flow-surfaces/service-helpers.js +3 -70
- package/dist/server/flow-surfaces/service-utils.d.ts +13 -1
- package/dist/server/flow-surfaces/service-utils.js +58 -6
- package/dist/server/flow-surfaces/service.d.ts +59 -2
- package/dist/server/flow-surfaces/service.js +2269 -234
- package/dist/server/flow-surfaces/support-matrix.d.ts +1 -1
- package/dist/server/flow-surfaces/support-matrix.js +23 -0
- package/dist/server/flow-surfaces/surface-context.js +8 -5
- package/dist/swagger/flow-surfaces.d.ts +173 -2
- package/dist/swagger/flow-surfaces.examples.d.ts +59 -15
- package/dist/swagger/flow-surfaces.examples.js +69 -11
- package/dist/swagger/flow-surfaces.js +86 -17
- package/dist/swagger/index.d.ts +173 -2
- package/package.json +2 -2
|
@@ -44,7 +44,8 @@ __export(builder_exports, {
|
|
|
44
44
|
buildPersistedRootPageModel: () => buildPersistedRootPageModel,
|
|
45
45
|
buildPopupPageTree: () => buildPopupPageTree,
|
|
46
46
|
buildStandaloneFieldNode: () => buildStandaloneFieldNode,
|
|
47
|
-
buildSyntheticRootPageTabModel: () => buildSyntheticRootPageTabModel
|
|
47
|
+
buildSyntheticRootPageTabModel: () => buildSyntheticRootPageTabModel,
|
|
48
|
+
getStandaloneFieldDefaults: () => getStandaloneFieldDefaults
|
|
48
49
|
});
|
|
49
50
|
module.exports = __toCommonJS(builder_exports);
|
|
50
51
|
var import_utils = require("@nocobase/utils");
|
|
@@ -119,6 +120,8 @@ const JS_ITEM_DEFAULT_CODE = [
|
|
|
119
120
|
const JS_COLUMN_DEFAULT_CODE = `ctx.render('<span class="nb-js-column">JS column</span>');`;
|
|
120
121
|
const CALENDAR_QUICK_CREATE_ACTION_KEY = "quickCreateAction";
|
|
121
122
|
const CALENDAR_EVENT_VIEW_ACTION_KEY = "eventViewAction";
|
|
123
|
+
const KANBAN_QUICK_CREATE_ACTION_KEY = "quickCreateAction";
|
|
124
|
+
const KANBAN_CARD_VIEW_ACTION_KEY = "cardViewAction";
|
|
122
125
|
const CALENDAR_READONLY_ACTION_MODEL_USES = /* @__PURE__ */ new Set([
|
|
123
126
|
"CalendarNavActionModel",
|
|
124
127
|
"CalendarTitleActionModel",
|
|
@@ -264,7 +267,7 @@ function buildBlockTree(options) {
|
|
|
264
267
|
import_lodash.default.set(baseStepParams, ["resourceSettings", "init"], normalizedResourceInit);
|
|
265
268
|
}
|
|
266
269
|
const model = {
|
|
267
|
-
...use === "CalendarBlockModel" ? { uid: (0, import_utils.uid)() } : {},
|
|
270
|
+
...use === "CalendarBlockModel" || use === "KanbanBlockModel" ? { uid: (0, import_utils.uid)() } : {},
|
|
268
271
|
use,
|
|
269
272
|
...typeof (approvalBlockDefaults == null ? void 0 : approvalBlockDefaults.async) === "boolean" ? { async: approvalBlockDefaults.async } : {},
|
|
270
273
|
props: import_lodash.default.merge(
|
|
@@ -359,6 +362,31 @@ function buildBlockTree(options) {
|
|
|
359
362
|
}
|
|
360
363
|
}
|
|
361
364
|
};
|
|
365
|
+
} else if (use === "KanbanBlockModel") {
|
|
366
|
+
const blockUid = model.uid || (0, import_utils.uid)();
|
|
367
|
+
model.uid = blockUid;
|
|
368
|
+
model.subModels = {
|
|
369
|
+
item: {
|
|
370
|
+
uid: (0, import_utils.uid)(),
|
|
371
|
+
use: "KanbanCardItemModel",
|
|
372
|
+
subModels: {
|
|
373
|
+
grid: {
|
|
374
|
+
uid: (0, import_utils.uid)(),
|
|
375
|
+
use: "DetailsGridModel"
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
[KANBAN_QUICK_CREATE_ACTION_KEY]: buildKanbanPopupActionNode({
|
|
380
|
+
actionKey: KANBAN_QUICK_CREATE_ACTION_KEY,
|
|
381
|
+
blockUid,
|
|
382
|
+
resourceInit: normalizedResourceInit
|
|
383
|
+
}),
|
|
384
|
+
[KANBAN_CARD_VIEW_ACTION_KEY]: buildKanbanPopupActionNode({
|
|
385
|
+
actionKey: KANBAN_CARD_VIEW_ACTION_KEY,
|
|
386
|
+
blockUid,
|
|
387
|
+
resourceInit: normalizedResourceInit
|
|
388
|
+
})
|
|
389
|
+
};
|
|
362
390
|
} else if (use === "CalendarBlockModel") {
|
|
363
391
|
const blockUid = model.uid || (0, import_utils.uid)();
|
|
364
392
|
model.uid = blockUid;
|
|
@@ -379,6 +407,47 @@ function buildBlockTree(options) {
|
|
|
379
407
|
}
|
|
380
408
|
return assignClientKeysToUids(model, {});
|
|
381
409
|
}
|
|
410
|
+
function buildKanbanPopupActionNode(options) {
|
|
411
|
+
const actionUid = options.actionKey === KANBAN_QUICK_CREATE_ACTION_KEY ? `${options.blockUid}-quick-create-action` : `${options.blockUid}-card-view-action`;
|
|
412
|
+
return {
|
|
413
|
+
uid: actionUid,
|
|
414
|
+
use: options.actionKey === KANBAN_QUICK_CREATE_ACTION_KEY ? "KanbanQuickCreateActionModel" : "KanbanCardViewActionModel",
|
|
415
|
+
stepParams: {
|
|
416
|
+
popupSettings: {
|
|
417
|
+
openView: buildKanbanPopupOpenView({
|
|
418
|
+
actionUid,
|
|
419
|
+
resourceInit: options.resourceInit,
|
|
420
|
+
popupSettings: options.popupSettings
|
|
421
|
+
})
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
function buildKanbanPopupOpenView(options) {
|
|
427
|
+
var _a, _b, _c;
|
|
428
|
+
const defaults = import_lodash.default.pickBy(
|
|
429
|
+
{
|
|
430
|
+
mode: "drawer",
|
|
431
|
+
size: "medium",
|
|
432
|
+
pageModelClass: "ChildPageModel",
|
|
433
|
+
uid: options.actionUid,
|
|
434
|
+
collectionName: (_a = options.resourceInit) == null ? void 0 : _a.collectionName,
|
|
435
|
+
dataSourceKey: ((_b = options.resourceInit) == null ? void 0 : _b.dataSourceKey) || (((_c = options.resourceInit) == null ? void 0 : _c.collectionName) ? "main" : void 0)
|
|
436
|
+
},
|
|
437
|
+
(value) => !import_lodash.default.isUndefined(value)
|
|
438
|
+
);
|
|
439
|
+
const current = import_lodash.default.cloneDeep(options.popupSettings || {});
|
|
440
|
+
return import_lodash.default.pickBy(
|
|
441
|
+
{
|
|
442
|
+
...defaults,
|
|
443
|
+
...current,
|
|
444
|
+
uid: current.uid || defaults.uid,
|
|
445
|
+
collectionName: current.collectionName || defaults.collectionName,
|
|
446
|
+
dataSourceKey: current.dataSourceKey || defaults.dataSourceKey
|
|
447
|
+
},
|
|
448
|
+
(value) => !import_lodash.default.isUndefined(value)
|
|
449
|
+
);
|
|
450
|
+
}
|
|
382
451
|
function buildCalendarPopupActionNode(options) {
|
|
383
452
|
const actionUid = `${options.blockUid}-${options.actionKey}`;
|
|
384
453
|
return {
|
|
@@ -527,7 +596,8 @@ function buildFieldTree(params) {
|
|
|
527
596
|
init: initPayload
|
|
528
597
|
}
|
|
529
598
|
})
|
|
530
|
-
)
|
|
599
|
+
),
|
|
600
|
+
...fieldDefaults.subModels ? { subModels: import_lodash.default.cloneDeep(fieldDefaults.subModels) } : {}
|
|
531
601
|
}
|
|
532
602
|
}
|
|
533
603
|
}
|
|
@@ -910,7 +980,7 @@ function inferActionDefaultProps(use, scope) {
|
|
|
910
980
|
);
|
|
911
981
|
}
|
|
912
982
|
function applyContainerActionStyle(props, containerUse) {
|
|
913
|
-
if (containerUse
|
|
983
|
+
if (["TableActionsColumnModel", "ListItemModel", "GridCardItemModel"].includes(String(containerUse || "").trim())) {
|
|
914
984
|
return {
|
|
915
985
|
...props,
|
|
916
986
|
type: "link",
|
|
@@ -963,10 +1033,39 @@ function buildBlockDefaults(use) {
|
|
|
963
1033
|
}
|
|
964
1034
|
};
|
|
965
1035
|
}
|
|
1036
|
+
if (use === "TreeBlockModel") {
|
|
1037
|
+
return {
|
|
1038
|
+
props: {
|
|
1039
|
+
searchable: true,
|
|
1040
|
+
defaultExpandAll: false,
|
|
1041
|
+
includeDescendants: true
|
|
1042
|
+
}
|
|
1043
|
+
};
|
|
1044
|
+
}
|
|
966
1045
|
return {};
|
|
967
1046
|
}
|
|
968
1047
|
function getStandaloneFieldDefaults(use) {
|
|
969
1048
|
switch (use) {
|
|
1049
|
+
case "PopupSubTableFieldModel":
|
|
1050
|
+
return {
|
|
1051
|
+
subModels: {
|
|
1052
|
+
subTableColumns: [
|
|
1053
|
+
{
|
|
1054
|
+
use: "PopupSubTableActionsColumnModel",
|
|
1055
|
+
subModels: {
|
|
1056
|
+
actions: [
|
|
1057
|
+
{
|
|
1058
|
+
use: "PopupSubTableEditActionModel"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
use: "PopupSubTableRemoveActionModel"
|
|
1062
|
+
}
|
|
1063
|
+
]
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
]
|
|
1067
|
+
}
|
|
1068
|
+
};
|
|
970
1069
|
case "JSFieldModel":
|
|
971
1070
|
return {
|
|
972
1071
|
stepParams: {
|
|
@@ -1025,5 +1124,6 @@ function humanizeActionTitle(use) {
|
|
|
1025
1124
|
buildPersistedRootPageModel,
|
|
1026
1125
|
buildPopupPageTree,
|
|
1027
1126
|
buildStandaloneFieldNode,
|
|
1028
|
-
buildSyntheticRootPageTabModel
|
|
1127
|
+
buildSyntheticRootPageTabModel,
|
|
1128
|
+
getStandaloneFieldDefaults
|
|
1029
1129
|
});
|
|
@@ -14,11 +14,12 @@ export declare function getSupportedFieldComponentUseSet(input: {
|
|
|
14
14
|
enabledPackages?: ReadonlySet<string>;
|
|
15
15
|
dataSourceKey?: string;
|
|
16
16
|
getCollection?: (dataSourceKey: string, collectionName: string) => any;
|
|
17
|
-
}): Set<
|
|
17
|
+
}): Set<string>;
|
|
18
18
|
export declare function resolveSupportedFieldCapability(input: {
|
|
19
19
|
containerUse: string;
|
|
20
20
|
field?: any;
|
|
21
21
|
requestedFieldUse?: string;
|
|
22
|
+
requestedFieldUseMode?: 'fieldUse' | 'fieldType';
|
|
22
23
|
requestedWrapperUse?: string;
|
|
23
24
|
allowUnresolvedFieldUse?: boolean;
|
|
24
25
|
requestedRenderer?: string;
|