@nocobase/plugin-flow-engine 2.1.0-beta.15 → 2.1.0-beta.16
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/index.d.ts +10 -0
- package/dist/ai/ai-employees/nathan/index.js +41 -0
- package/dist/ai/ai-employees/nathan/prompt.md +132 -0
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/SKILLS.md +69 -0
- package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextApis.js +2 -2
- package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextEnvs.js +2 -2
- package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextVars.js +2 -2
- package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/lintAndTestJS.js +2 -2
- package/dist/ai/docs/runjs/context/block-model.md +35 -35
- package/dist/ai/docs/runjs/context/collection-field.md +53 -51
- package/dist/ai/docs/runjs/context/collection.md +39 -39
- package/dist/ai/docs/runjs/context/data-source-manager.md +40 -30
- package/dist/ai/docs/runjs/context/data-source.md +52 -44
- package/dist/ai/docs/runjs/context/element.md +44 -38
- package/dist/ai/docs/runjs/context/exit-all.md +37 -35
- package/dist/ai/docs/runjs/context/exit.md +38 -35
- package/dist/ai/docs/runjs/context/filter-manager.md +36 -30
- package/dist/ai/docs/runjs/context/form.md +57 -57
- package/dist/ai/docs/runjs/context/get-model.md +22 -21
- package/dist/ai/docs/runjs/context/get-value.md +20 -19
- package/dist/ai/docs/runjs/context/get-var.md +61 -55
- package/dist/ai/docs/runjs/context/i18n.md +17 -14
- package/dist/ai/docs/runjs/context/import-async.md +333 -45
- package/dist/ai/docs/runjs/context/init-resource.md +20 -20
- package/dist/ai/docs/runjs/context/libs.md +31 -31
- package/dist/ai/docs/runjs/context/location.md +34 -31
- package/dist/ai/docs/runjs/context/logger.md +41 -40
- package/dist/ai/docs/runjs/context/make-resource.md +27 -26
- package/dist/ai/docs/runjs/context/message.md +42 -41
- package/dist/ai/docs/runjs/context/modal.md +44 -44
- package/dist/ai/docs/runjs/context/model.md +36 -33
- package/dist/ai/docs/runjs/context/notification.md +41 -40
- package/dist/ai/docs/runjs/context/off.md +14 -14
- package/dist/ai/docs/runjs/context/on.md +30 -29
- package/dist/ai/docs/runjs/context/open-view.md +40 -40
- package/dist/ai/docs/runjs/context/render.md +37 -32
- package/dist/ai/docs/runjs/context/request.md +46 -45
- package/dist/ai/docs/runjs/context/require-async.md +28 -25
- package/dist/ai/docs/runjs/context/resource.md +34 -34
- package/dist/ai/docs/runjs/context/route.md +36 -34
- package/dist/ai/docs/runjs/context/router.md +43 -31
- package/dist/ai/docs/runjs/context/set-value.md +18 -17
- package/dist/ai/docs/runjs/context/t.md +20 -17
- package/dist/ai/docs/runjs/context/view.md +49 -46
- package/dist/ai/docs/runjs/document.md +1 -0
- package/dist/ai/docs/runjs/import-modules.md +32 -32
- package/dist/ai/docs/runjs/index.md +13 -13
- package/dist/ai/docs/runjs/jsx.md +19 -19
- package/dist/ai/docs/runjs/model/form-block-model.md +1 -3
- package/dist/ai/docs/runjs/render.md +15 -15
- package/dist/ai/docs/runjs/resource/api-resource.md +53 -53
- package/dist/ai/docs/runjs/resource/multi-record-resource.md +64 -64
- package/dist/ai/docs/runjs/resource/single-record-resource.md +55 -55
- package/dist/ai/docs/runjs/resource/sql-resource.md +57 -57
- package/dist/ai/docs/runjs/window.md +5 -5
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +11 -10
- package/dist/node_modules/ses/dist/ses.cjs +1 -1
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/index.cjs +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-surfaces/action-scope.d.ts +38 -0
- package/dist/server/flow-surfaces/action-scope.js +152 -0
- package/dist/server/flow-surfaces/apply/compiler.d.ts +13 -0
- package/dist/server/flow-surfaces/apply/compiler.js +969 -0
- 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/approval/blueprint-service.d.ts +84 -0
- package/dist/server/flow-surfaces/approval/blueprint-service.js +589 -0
- package/dist/server/flow-surfaces/approval/blueprint.d.ts +21 -0
- package/dist/server/flow-surfaces/approval/blueprint.js +187 -0
- package/dist/server/flow-surfaces/approval/builder.d.ts +225 -0
- package/dist/server/flow-surfaces/approval/builder.js +384 -0
- package/dist/server/flow-surfaces/approval/catalog-specs.d.ts +33 -0
- package/dist/server/flow-surfaces/approval/catalog-specs.js +156 -0
- package/dist/server/flow-surfaces/approval/index.d.ts +14 -0
- package/dist/server/flow-surfaces/approval/index.js +40 -0
- package/dist/server/flow-surfaces/approval/runtime-config.d.ts +44 -0
- package/dist/server/flow-surfaces/approval/runtime-config.js +299 -0
- package/dist/server/flow-surfaces/approval/semantic-use.d.ts +23 -0
- package/dist/server/flow-surfaces/approval/semantic-use.js +155 -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 +1007 -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/defaults.d.ts +26 -0
- package/dist/server/flow-surfaces/blueprint/defaults.js +133 -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 +416 -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 +193 -0
- package/dist/server/flow-surfaces/blueprint/public-types.js +24 -0
- package/dist/server/flow-surfaces/builder.d.ts +211 -0
- package/dist/server/flow-surfaces/builder.js +1029 -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 +78 -0
- package/dist/server/flow-surfaces/catalog.js +3496 -0
- package/dist/server/flow-surfaces/chart-config.d.ts +121 -0
- package/dist/server/flow-surfaces/chart-config.js +1394 -0
- package/dist/server/flow-surfaces/compose-compiler.d.ts +108 -0
- package/dist/server/flow-surfaces/compose-compiler.js +167 -0
- package/dist/server/flow-surfaces/compose-runtime.d.ts +93 -0
- package/dist/server/flow-surfaces/compose-runtime.js +375 -0
- package/dist/server/flow-surfaces/configure-options.d.ts +23 -0
- package/dist/server/flow-surfaces/configure-options.js +827 -0
- package/dist/server/flow-surfaces/constants.d.ts +351 -0
- package/dist/server/flow-surfaces/constants.js +104 -0
- package/dist/server/flow-surfaces/context.d.ts +72 -0
- package/dist/server/flow-surfaces/context.js +556 -0
- package/dist/server/flow-surfaces/contract-guard.d.ts +19 -0
- package/dist/server/flow-surfaces/contract-guard.js +402 -0
- package/dist/server/flow-surfaces/default-action-popup.d.ts +63 -0
- package/dist/server/flow-surfaces/default-action-popup.js +322 -0
- package/dist/server/flow-surfaces/default-block-actions.d.ts +32 -0
- package/dist/server/flow-surfaces/default-block-actions.js +185 -0
- package/dist/server/flow-surfaces/errors.d.ts +47 -0
- package/dist/server/flow-surfaces/errors.js +145 -0
- package/dist/server/flow-surfaces/executor.d.ts +23 -0
- package/dist/server/flow-surfaces/executor.js +132 -0
- 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 +15 -0
- package/dist/server/flow-surfaces/field-semantics.js +81 -0
- package/dist/server/flow-surfaces/filter-group.d.ts +15 -0
- package/dist/server/flow-surfaces/filter-group.js +94 -0
- package/dist/server/flow-surfaces/index.d.ts +11 -0
- package/dist/server/flow-surfaces/index.js +243 -0
- package/dist/server/flow-surfaces/locator.d.ts +28 -0
- package/dist/server/flow-surfaces/locator.js +240 -0
- package/dist/server/flow-surfaces/node-use-sets.d.ts +15 -0
- package/dist/server/flow-surfaces/node-use-sets.js +131 -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.d.ts +33 -0
- package/dist/server/flow-surfaces/placement.js +195 -0
- 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 +88 -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/public-data-surface-default-filter.d.ts +20 -0
- package/dist/server/flow-surfaces/public-data-surface-default-filter.js +111 -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 +156 -0
- package/dist/server/flow-surfaces/reaction/registry.js +206 -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/route-sync.d.ts +47 -0
- package/dist/server/flow-surfaces/route-sync.js +392 -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 +108 -0
- package/dist/server/flow-surfaces/service-utils.js +811 -0
- package/dist/server/flow-surfaces/service.d.ts +773 -0
- package/dist/server/flow-surfaces/service.js +13008 -0
- package/dist/server/flow-surfaces/support-matrix.d.ts +31 -0
- package/dist/server/flow-surfaces/support-matrix.js +259 -0
- package/dist/server/flow-surfaces/surface-context.d.ts +52 -0
- package/dist/server/flow-surfaces/surface-context.js +437 -0
- 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-display.d.ts +20 -0
- package/dist/server/flow-surfaces/template-display.js +289 -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 +288 -0
- package/dist/server/flow-surfaces/types.js +24 -0
- package/dist/server/plugin.js +2 -0
- package/dist/swagger/flow-surfaces.d.ts +5964 -0
- package/dist/swagger/flow-surfaces.examples.d.ts +1533 -0
- package/dist/swagger/flow-surfaces.examples.js +1758 -0
- package/dist/swagger/flow-surfaces.js +5315 -0
- 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 +5969 -0
- package/dist/swagger/index.js +50 -0
- package/package.json +2 -2
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextApis.d.ts +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextEnvs.d.ts +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/getContextVars.d.ts +0 -0
- /package/dist/ai/{tools → ai-employees/nathan/skills/frontend-developer/tools}/lintAndTestJS.d.ts +0 -0
|
@@ -0,0 +1,402 @@
|
|
|
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
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var contract_guard_exports = {};
|
|
38
|
+
__export(contract_guard_exports, {
|
|
39
|
+
FlowSurfaceContractGuard: () => FlowSurfaceContractGuard
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(contract_guard_exports);
|
|
42
|
+
var import_lodash = __toESM(require("lodash"));
|
|
43
|
+
var import_catalog = require("./catalog");
|
|
44
|
+
var import_errors = require("./errors");
|
|
45
|
+
var import_filter_group = require("./filter-group");
|
|
46
|
+
const EMPTY_GRID_ITEM_UID = "__EMPTY__";
|
|
47
|
+
class FlowSurfaceContractGuard {
|
|
48
|
+
mergeDomainValue(domain, currentValue, nextValue, contract, use) {
|
|
49
|
+
if (!import_lodash.default.isPlainObject(nextValue)) {
|
|
50
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces updateSettings domain '${domain}' on '${use}' requires an object payload`);
|
|
51
|
+
}
|
|
52
|
+
if (contract.wildcard) {
|
|
53
|
+
if (!Object.keys(nextValue).length) {
|
|
54
|
+
return {};
|
|
55
|
+
}
|
|
56
|
+
return contract.mergeStrategy === "replace" ? import_lodash.default.cloneDeep(nextValue) : import_lodash.default.merge({}, currentValue || {}, nextValue);
|
|
57
|
+
}
|
|
58
|
+
if (contract.groups) {
|
|
59
|
+
const unknownGroups = Object.keys(nextValue).filter((key) => !contract.allowedKeys.includes(key));
|
|
60
|
+
if (unknownGroups.length) {
|
|
61
|
+
(0, import_errors.throwBadRequest)(
|
|
62
|
+
`flowSurfaces updateSettings domain '${domain}' on '${use}' does not allow groups: ${unknownGroups.join(
|
|
63
|
+
", "
|
|
64
|
+
)}`
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
const next2 = import_lodash.default.cloneDeep(currentValue || {});
|
|
68
|
+
Object.entries(nextValue).forEach(([groupKey, value]) => {
|
|
69
|
+
var _a;
|
|
70
|
+
const groupContract = (_a = contract.groups) == null ? void 0 : _a[groupKey];
|
|
71
|
+
if (!groupContract) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (value === null || import_lodash.default.isPlainObject(value) && !Object.keys(value).length) {
|
|
75
|
+
if (!groupContract.clearable) {
|
|
76
|
+
(0, import_errors.throwBadRequest)(
|
|
77
|
+
`flowSurfaces updateSettings domain '${domain}.${groupKey}' on '${use}' does not support clearing`
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
next2[groupKey] = {};
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (!import_lodash.default.isPlainObject(value)) {
|
|
84
|
+
(0, import_errors.throwBadRequest)(
|
|
85
|
+
`flowSurfaces updateSettings domain '${domain}.${groupKey}' on '${use}' requires an object payload`
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
const normalizedValue2 = normalizeGroupValue(value, groupContract, {
|
|
89
|
+
domain,
|
|
90
|
+
groupKey,
|
|
91
|
+
use
|
|
92
|
+
});
|
|
93
|
+
const invalidPaths = collectLeafPaths(normalizedValue2).filter(
|
|
94
|
+
(path) => !isAllowedGroupPath(groupContract, path)
|
|
95
|
+
);
|
|
96
|
+
if (invalidPaths.length) {
|
|
97
|
+
(0, import_errors.throwBadRequest)(
|
|
98
|
+
`flowSurfaces updateSettings domain '${domain}.${groupKey}' on '${use}' does not allow paths: ${invalidPaths.join(
|
|
99
|
+
", "
|
|
100
|
+
)}`
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
const invalidValueTypes2 = collectTypedValueErrors(normalizedValue2, groupContract.pathSchemas || {});
|
|
104
|
+
if (invalidValueTypes2.length) {
|
|
105
|
+
(0, import_errors.throwBadRequest)(
|
|
106
|
+
`flowSurfaces updateSettings domain '${domain}.${groupKey}' on '${use}' has invalid values: ${invalidValueTypes2.join(
|
|
107
|
+
", "
|
|
108
|
+
)}`
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
next2[groupKey] = groupContract.mergeStrategy === "replace" ? import_lodash.default.cloneDeep(normalizedValue2) : import_lodash.default.merge({}, (currentValue == null ? void 0 : currentValue[groupKey]) || {}, normalizedValue2);
|
|
112
|
+
});
|
|
113
|
+
return next2;
|
|
114
|
+
}
|
|
115
|
+
const unknownKeys = Object.keys(nextValue).filter((key) => !contract.allowedKeys.includes(key));
|
|
116
|
+
if (unknownKeys.length) {
|
|
117
|
+
(0, import_errors.throwBadRequest)(
|
|
118
|
+
`flowSurfaces updateSettings domain '${domain}' on '${use}' does not allow keys: ${unknownKeys.join(", ")}`
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
const normalizedValue = normalizeDomainValue(nextValue, contract, {
|
|
122
|
+
domain,
|
|
123
|
+
use
|
|
124
|
+
});
|
|
125
|
+
if (!Object.keys(normalizedValue).length) {
|
|
126
|
+
return {};
|
|
127
|
+
}
|
|
128
|
+
const invalidValueTypes = collectTypedValueErrors(normalizedValue, contract.pathSchemas || {});
|
|
129
|
+
if (invalidValueTypes.length) {
|
|
130
|
+
(0, import_errors.throwBadRequest)(
|
|
131
|
+
`flowSurfaces updateSettings domain '${domain}' on '${use}' has invalid values: ${invalidValueTypes.join(
|
|
132
|
+
", "
|
|
133
|
+
)}`
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
const next = import_lodash.default.cloneDeep(currentValue || {});
|
|
137
|
+
Object.entries(normalizedValue).forEach(([key, value]) => {
|
|
138
|
+
next[key] = contract.mergeStrategy === "replace" || !import_lodash.default.isPlainObject(value) || !Object.keys(value).length ? import_lodash.default.cloneDeep(value) : import_lodash.default.merge({}, (currentValue == null ? void 0 : currentValue[key]) || {}, value);
|
|
139
|
+
});
|
|
140
|
+
return next;
|
|
141
|
+
}
|
|
142
|
+
validateFlowRegistry(node, flowRegistry) {
|
|
143
|
+
var _a, _b, _c;
|
|
144
|
+
if (!import_lodash.default.isPlainObject(flowRegistry)) {
|
|
145
|
+
(0, import_errors.throwBadRequest)("flowSurfaces setEventFlows requires an object flowRegistry");
|
|
146
|
+
}
|
|
147
|
+
const contract = (0, import_catalog.getNodeContract)(node == null ? void 0 : node.use);
|
|
148
|
+
const allowedDirectEvents = new Set(((_a = contract.eventCapabilities) == null ? void 0 : _a.direct) || []);
|
|
149
|
+
const allowedObjectEvents = new Set(((_b = contract.eventCapabilities) == null ? void 0 : _b.object) || []);
|
|
150
|
+
const stepParamGroups = ((_c = contract.domains.stepParams) == null ? void 0 : _c.groups) || {};
|
|
151
|
+
Object.entries(flowRegistry).forEach(([key, flow]) => {
|
|
152
|
+
var _a2, _b2;
|
|
153
|
+
if (!import_lodash.default.isPlainObject(flow)) {
|
|
154
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces flow '${key}' must be an object`);
|
|
155
|
+
}
|
|
156
|
+
const on = flow.on;
|
|
157
|
+
if (!on) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const onObj = typeof on === "string" ? { eventName: on } : on;
|
|
161
|
+
const eventName = onObj == null ? void 0 : onObj.eventName;
|
|
162
|
+
if (!eventName || typeof eventName !== "string") {
|
|
163
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces flow '${key}' has invalid eventName`);
|
|
164
|
+
}
|
|
165
|
+
if (typeof on === "string" && !allowedDirectEvents.has(eventName)) {
|
|
166
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces flow '${key}' event '${eventName}' is not allowed on '${node == null ? void 0 : node.use}'`);
|
|
167
|
+
}
|
|
168
|
+
if (typeof on !== "string" && !allowedObjectEvents.has(eventName)) {
|
|
169
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces flow '${key}' event '${eventName}' is not allowed on '${node == null ? void 0 : node.use}'`);
|
|
170
|
+
}
|
|
171
|
+
const phase = onObj == null ? void 0 : onObj.phase;
|
|
172
|
+
const allowedPhases = ["beforeAllFlows", "afterAllFlows", "beforeFlow", "afterFlow", "beforeStep", "afterStep"];
|
|
173
|
+
if (phase && !allowedPhases.includes(phase)) {
|
|
174
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces flow '${key}' has invalid phase '${phase}'`);
|
|
175
|
+
}
|
|
176
|
+
if (["beforeFlow", "afterFlow", "beforeStep", "afterStep"].includes(phase) && !onObj.flowKey) {
|
|
177
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces flow '${key}' requires flowKey for phase '${phase}'`);
|
|
178
|
+
}
|
|
179
|
+
if (["beforeStep", "afterStep"].includes(phase) && !onObj.stepKey) {
|
|
180
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces flow '${key}' requires stepKey for phase '${phase}'`);
|
|
181
|
+
}
|
|
182
|
+
if (onObj.flowKey && !stepParamGroups[onObj.flowKey]) {
|
|
183
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces flow '${key}' references unknown flowKey '${onObj.flowKey}' on '${node == null ? void 0 : node.use}'`);
|
|
184
|
+
}
|
|
185
|
+
const allowedStepKeys = (_a2 = stepParamGroups[onObj.flowKey]) == null ? void 0 : _a2.eventBindingSteps;
|
|
186
|
+
if (onObj.stepKey && allowedStepKeys !== "*" && Array.isArray(allowedStepKeys) && !allowedStepKeys.includes(onObj.stepKey)) {
|
|
187
|
+
(0, import_errors.throwBadRequest)(
|
|
188
|
+
`flowSurfaces flow '${key}' references unknown stepKey '${onObj.stepKey}' for flowKey '${onObj.flowKey}' on '${node == null ? void 0 : node.use}'`
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
if (onObj.flowKey) {
|
|
192
|
+
const flowGroupContract = stepParamGroups[onObj.flowKey];
|
|
193
|
+
const flowGroup = (_b2 = node == null ? void 0 : node.stepParams) == null ? void 0 : _b2[onObj.flowKey];
|
|
194
|
+
const contractDefinesFlow = isContractDefinedFlowGroup(flowGroupContract);
|
|
195
|
+
const implicitStepAvailable = isImplicitContractStep(flowGroupContract, onObj.stepKey);
|
|
196
|
+
if ((!import_lodash.default.isPlainObject(flowGroup) || !Object.keys(flowGroup).length) && !contractDefinesFlow) {
|
|
197
|
+
(0, import_errors.throwBadRequest)(
|
|
198
|
+
`flowSurfaces flow '${key}' references unavailable flowKey '${onObj.flowKey}' on '${node == null ? void 0 : node.use}'`
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
if (onObj.stepKey && import_lodash.default.isNil(flowGroup == null ? void 0 : flowGroup[onObj.stepKey]) && !implicitStepAvailable) {
|
|
202
|
+
(0, import_errors.throwBadRequest)(
|
|
203
|
+
`flowSurfaces flow '${key}' references unavailable stepKey '${onObj.stepKey}' for flowKey '${onObj.flowKey}' on '${node == null ? void 0 : node.use}'`
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
validateLayout(grid, layout) {
|
|
210
|
+
var _a;
|
|
211
|
+
const itemUids = new Set(import_lodash.default.castArray(((_a = grid == null ? void 0 : grid.subModels) == null ? void 0 : _a.items) || []).map((item) => item.uid));
|
|
212
|
+
const seen = /* @__PURE__ */ new Set();
|
|
213
|
+
Object.entries(layout.rows || {}).forEach(([rowId, cells]) => {
|
|
214
|
+
var _a2;
|
|
215
|
+
import_lodash.default.castArray(cells).forEach((cell) => {
|
|
216
|
+
import_lodash.default.castArray(cell).forEach((itemUid) => {
|
|
217
|
+
if (itemUid === EMPTY_GRID_ITEM_UID) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
if (!itemUids.has(itemUid)) {
|
|
221
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces layout item '${itemUid}' does not exist under grid '${grid.uid}'`);
|
|
222
|
+
}
|
|
223
|
+
if (seen.has(itemUid)) {
|
|
224
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces layout item '${itemUid}' is duplicated under grid '${grid.uid}'`);
|
|
225
|
+
}
|
|
226
|
+
seen.add(itemUid);
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
const sizeArray = (_a2 = layout.sizes) == null ? void 0 : _a2[rowId];
|
|
230
|
+
if (!sizeArray) {
|
|
231
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces layout row '${rowId}' requires sizes definition`);
|
|
232
|
+
}
|
|
233
|
+
if (sizeArray.length !== import_lodash.default.castArray(cells).length) {
|
|
234
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces layout sizes length of row '${rowId}' does not match columns length`);
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
const declaredRows = Object.keys(layout.rows || {});
|
|
238
|
+
if (import_lodash.default.difference(declaredRows, layout.rowOrder || []).length || import_lodash.default.difference(layout.rowOrder || [], declaredRows).length) {
|
|
239
|
+
(0, import_errors.throwBadRequest)("flowSurfaces layout rowOrder must match rows");
|
|
240
|
+
}
|
|
241
|
+
if ((layout.rowOrder || []).length !== new Set(layout.rowOrder || []).size) {
|
|
242
|
+
(0, import_errors.throwBadRequest)("flowSurfaces layout rowOrder contains duplicate row ids");
|
|
243
|
+
}
|
|
244
|
+
if (seen.size !== itemUids.size) {
|
|
245
|
+
const missing = Array.from(itemUids).filter((uid) => !seen.has(uid));
|
|
246
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces layout must cover all grid children, missing: ${missing.join(", ")}`);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
validateNodeTreeAgainstContract(node) {
|
|
250
|
+
if (!(node == null ? void 0 : node.use)) {
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
const contract = (0, import_catalog.getNodeContract)(node.use);
|
|
254
|
+
["props", "decoratorProps", "stepParams", "flowRegistry"].forEach((domain) => {
|
|
255
|
+
if (import_lodash.default.isUndefined(node[domain])) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
if (import_lodash.default.isPlainObject(node[domain]) && !Object.keys(node[domain]).length) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
if (!contract.editableDomains.includes(domain)) {
|
|
262
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces create tree domain '${domain}' is not editable on '${node.use}'`);
|
|
263
|
+
}
|
|
264
|
+
const domainContract = contract.domains[domain];
|
|
265
|
+
if (!domainContract) {
|
|
266
|
+
(0, import_errors.throwBadRequest)(`flowSurfaces create tree domain '${domain}' is not supported by '${node.use}'`);
|
|
267
|
+
}
|
|
268
|
+
node[domain] = this.mergeDomainValue(domain, void 0, node[domain], domainContract, node.use);
|
|
269
|
+
});
|
|
270
|
+
if (import_lodash.default.isPlainObject(node.flowRegistry) && Object.keys(node.flowRegistry).length) {
|
|
271
|
+
this.validateFlowRegistry(node, node.flowRegistry);
|
|
272
|
+
}
|
|
273
|
+
Object.values(node.subModels || {}).forEach((value) => {
|
|
274
|
+
import_lodash.default.castArray(value).forEach((child) => this.validateNodeTreeAgainstContract(child));
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
function matchesContractPath(pattern, path) {
|
|
279
|
+
if (pattern === "*") {
|
|
280
|
+
return true;
|
|
281
|
+
}
|
|
282
|
+
if (pattern === path) {
|
|
283
|
+
return true;
|
|
284
|
+
}
|
|
285
|
+
if (pattern.endsWith(".*")) {
|
|
286
|
+
const prefix = pattern.slice(0, -2);
|
|
287
|
+
return path === prefix || path.startsWith(`${prefix}.`);
|
|
288
|
+
}
|
|
289
|
+
return false;
|
|
290
|
+
}
|
|
291
|
+
function isAllowedGroupPath(groupContract, path) {
|
|
292
|
+
return groupContract.allowedPaths.some((pattern) => {
|
|
293
|
+
var _a;
|
|
294
|
+
if (matchesContractPath(pattern, path)) {
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
const schema = (_a = groupContract.pathSchemas) == null ? void 0 : _a[pattern];
|
|
298
|
+
return (schema == null ? void 0 : schema.type) === "object" && path.startsWith(`${pattern}.`);
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
function collectLeafPaths(value, prefix = "") {
|
|
302
|
+
if (!import_lodash.default.isPlainObject(value) || !Object.keys(value).length) {
|
|
303
|
+
return prefix ? [prefix] : [];
|
|
304
|
+
}
|
|
305
|
+
return Object.entries(value).flatMap(([key, nested]) => collectLeafPaths(nested, prefix ? `${prefix}.${key}` : key));
|
|
306
|
+
}
|
|
307
|
+
function collectTypedValueErrors(value, pathSchemas) {
|
|
308
|
+
return Object.entries(pathSchemas).flatMap(([path, schema]) => {
|
|
309
|
+
if (!import_lodash.default.has(value, path)) {
|
|
310
|
+
return [];
|
|
311
|
+
}
|
|
312
|
+
const candidate = import_lodash.default.get(value, path);
|
|
313
|
+
return collectSchemaValueErrors(candidate, schema, path);
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
function collectSchemaValueErrors(value, schema, path) {
|
|
317
|
+
if (value === null) {
|
|
318
|
+
return (schema == null ? void 0 : schema.nullable) === true ? [] : [`${path} expected ${(schema == null ? void 0 : schema.type) || "value"}`];
|
|
319
|
+
}
|
|
320
|
+
switch (schema == null ? void 0 : schema.type) {
|
|
321
|
+
case "string":
|
|
322
|
+
return typeof value === "string" ? [] : [`${path} expected string`];
|
|
323
|
+
case "boolean":
|
|
324
|
+
return typeof value === "boolean" ? [] : [`${path} expected boolean`];
|
|
325
|
+
case "number":
|
|
326
|
+
return typeof value === "number" && Number.isFinite(value) ? [] : [`${path} expected number`];
|
|
327
|
+
case "object":
|
|
328
|
+
return import_lodash.default.isPlainObject(value) ? [] : [`${path} expected object`];
|
|
329
|
+
case "array":
|
|
330
|
+
if (!Array.isArray(value)) {
|
|
331
|
+
return [`${path} expected array`];
|
|
332
|
+
}
|
|
333
|
+
if (!schema.items) {
|
|
334
|
+
return [];
|
|
335
|
+
}
|
|
336
|
+
return value.flatMap((item, index) => collectSchemaValueErrors(item, schema.items, `${path}[${index}]`));
|
|
337
|
+
default:
|
|
338
|
+
return [];
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
function normalizeDomainValue(value, contract, context) {
|
|
342
|
+
const normalized = import_lodash.default.cloneDeep(value);
|
|
343
|
+
Object.entries(contract.pathSchemas || {}).forEach(([path, schema]) => {
|
|
344
|
+
if (!import_lodash.default.has(normalized, path) || !isFilterGroupSchema(schema)) {
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
import_lodash.default.set(normalized, path, normalizeFilterGroupValue(import_lodash.default.get(normalized, path), context, path));
|
|
348
|
+
});
|
|
349
|
+
return normalized;
|
|
350
|
+
}
|
|
351
|
+
function normalizeGroupValue(value, groupContract, context) {
|
|
352
|
+
const normalized = import_lodash.default.cloneDeep(value);
|
|
353
|
+
Object.entries(groupContract.pathSchemas || {}).forEach(([path, schema]) => {
|
|
354
|
+
if (!import_lodash.default.has(normalized, path) || !isFilterGroupSchema(schema)) {
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
import_lodash.default.set(normalized, path, normalizeFilterGroupValue(import_lodash.default.get(normalized, path), context, path));
|
|
358
|
+
});
|
|
359
|
+
return normalized;
|
|
360
|
+
}
|
|
361
|
+
function isFilterGroupSchema(schema) {
|
|
362
|
+
return (schema == null ? void 0 : schema["x-flowSurfaceFormat"]) === "filter-group";
|
|
363
|
+
}
|
|
364
|
+
function normalizeFilterGroupValue(value, context, path) {
|
|
365
|
+
const domainPath = context.groupKey ? `${context.domain}.${context.groupKey}.${path}` : `${context.domain}.${path}`;
|
|
366
|
+
return (0, import_filter_group.normalizeFlowSurfaceFilterGroupValue)(
|
|
367
|
+
value,
|
|
368
|
+
`flowSurfaces updateSettings domain '${domainPath}' on '${context.use}' expects FilterGroup like ${import_filter_group.FLOW_SURFACE_FILTER_GROUP_EXAMPLE}`
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
function isContractDefinedFlowGroup(groupContract) {
|
|
372
|
+
if (!groupContract) {
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
if (!Array.isArray(groupContract.allowedPaths) || groupContract.allowedPaths.length === 0) {
|
|
376
|
+
return true;
|
|
377
|
+
}
|
|
378
|
+
return hasImplicitContractSteps(groupContract);
|
|
379
|
+
}
|
|
380
|
+
function hasImplicitContractSteps(groupContract) {
|
|
381
|
+
if (groupContract.eventBindingSteps === "*") {
|
|
382
|
+
return false;
|
|
383
|
+
}
|
|
384
|
+
return import_lodash.default.castArray(groupContract.eventBindingSteps || []).some(
|
|
385
|
+
(stepKey) => isImplicitContractStep(groupContract, stepKey)
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
function isImplicitContractStep(groupContract, stepKey) {
|
|
389
|
+
if (!groupContract || !stepKey) {
|
|
390
|
+
return false;
|
|
391
|
+
}
|
|
392
|
+
if (groupContract.eventBindingSteps !== "*" && !import_lodash.default.castArray(groupContract.eventBindingSteps || []).includes(stepKey)) {
|
|
393
|
+
return false;
|
|
394
|
+
}
|
|
395
|
+
return !import_lodash.default.castArray(groupContract.allowedPaths || []).some(
|
|
396
|
+
(pattern) => pattern === stepKey || pattern === `${stepKey}.*` || pattern.startsWith(`${stepKey}.`)
|
|
397
|
+
);
|
|
398
|
+
}
|
|
399
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
400
|
+
0 && (module.exports = {
|
|
401
|
+
FlowSurfaceContractGuard
|
|
402
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
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 _ from 'lodash';
|
|
10
|
+
export type FlowSurfaceDefaultActionPopupType = 'addNew' | 'view' | 'edit';
|
|
11
|
+
export type FlowSurfaceDefaultActionPopupUse = 'AddNewActionModel' | 'ViewActionModel' | 'EditActionModel';
|
|
12
|
+
type FlowSurfaceDefaultActionPopupSubmitAction = {
|
|
13
|
+
key: string;
|
|
14
|
+
type: 'submit';
|
|
15
|
+
settings: {
|
|
16
|
+
title: string;
|
|
17
|
+
type: string;
|
|
18
|
+
confirm: boolean;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type FlowSurfaceDefaultActionPopupConfig = {
|
|
22
|
+
type: FlowSurfaceDefaultActionPopupType;
|
|
23
|
+
use: FlowSurfaceDefaultActionPopupUse;
|
|
24
|
+
defaultButtonTitle: string;
|
|
25
|
+
defaultPopupTabTitle: string;
|
|
26
|
+
blockKey: string;
|
|
27
|
+
blockType: 'createForm' | 'editForm' | 'details';
|
|
28
|
+
blockUse: 'CreateFormModel' | 'EditFormModel' | 'DetailsBlockModel';
|
|
29
|
+
resourceBinding: 'currentCollection' | 'currentRecord';
|
|
30
|
+
blockSettings: Record<string, any>;
|
|
31
|
+
submitAction?: FlowSurfaceDefaultActionPopupSubmitAction;
|
|
32
|
+
};
|
|
33
|
+
export type FlowSurfaceDefaultActionPopupFieldCandidate = {
|
|
34
|
+
field?: any;
|
|
35
|
+
fieldPath?: string;
|
|
36
|
+
};
|
|
37
|
+
export type FlowSurfaceDefaultActionPopupFieldGroupCandidate = {
|
|
38
|
+
key?: string;
|
|
39
|
+
title: string;
|
|
40
|
+
fields: string[];
|
|
41
|
+
};
|
|
42
|
+
type FlowSurfaceDefaultActionPopupFieldFilterOptions = {
|
|
43
|
+
excludeAuditTimestampFields?: boolean;
|
|
44
|
+
excludeAssociationFields?: boolean;
|
|
45
|
+
};
|
|
46
|
+
type FlowSurfaceDefaultActionPopupFieldsInput = string[] | {
|
|
47
|
+
fieldPaths?: string[];
|
|
48
|
+
fieldGroups?: FlowSurfaceDefaultActionPopupFieldGroupCandidate[];
|
|
49
|
+
};
|
|
50
|
+
export declare const FLOW_SURFACE_DEFAULT_ACTION_POPUP_TYPES: Set<FlowSurfaceDefaultActionPopupType>;
|
|
51
|
+
export declare const FLOW_SURFACE_DEFAULT_ACTION_POPUP_USES: Set<FlowSurfaceDefaultActionPopupUse>;
|
|
52
|
+
export declare function isFlowSurfaceDefaultActionPopupType(type?: string): type is FlowSurfaceDefaultActionPopupType;
|
|
53
|
+
export declare function isFlowSurfaceDefaultActionPopupUse(use?: string): use is FlowSurfaceDefaultActionPopupUse;
|
|
54
|
+
export declare function getFlowSurfaceDefaultActionPopupConfigByUse(use?: string): FlowSurfaceDefaultActionPopupConfig;
|
|
55
|
+
export declare function resolveFlowSurfaceDefaultActionPopupTabTitle(use?: string, currentTitle?: string | null): string;
|
|
56
|
+
export declare function pickFlowSurfaceDefaultActionPopupFieldPaths(candidates: FlowSurfaceDefaultActionPopupFieldCandidate[], options?: FlowSurfaceDefaultActionPopupFieldFilterOptions): string[];
|
|
57
|
+
export declare function pickFlowSurfaceDefaultActionPopupFieldGroups(candidates: FlowSurfaceDefaultActionPopupFieldCandidate[], fieldGroups: FlowSurfaceDefaultActionPopupFieldGroupCandidate[] | undefined, options?: FlowSurfaceDefaultActionPopupFieldFilterOptions): FlowSurfaceDefaultActionPopupFieldGroupCandidate[];
|
|
58
|
+
export declare function buildFlowSurfaceDefaultActionPopupBlocks(use: string | undefined, fieldsInput: FlowSurfaceDefaultActionPopupFieldsInput): _.Dictionary<string | string[] | Record<string, any> | FlowSurfaceDefaultActionPopupFieldGroupCandidate[] | FlowSurfaceDefaultActionPopupSubmitAction[] | {
|
|
59
|
+
binding: "currentCollection" | "currentRecord";
|
|
60
|
+
}>[];
|
|
61
|
+
export declare function hasFlowSurfaceInlinePopupTemplate(popup?: Record<string, any>): boolean;
|
|
62
|
+
export declare function hasFlowSurfaceInlinePopupBlocks(popup?: Record<string, any>): boolean;
|
|
63
|
+
export {};
|