@nocobase/plugin-flow-engine 2.1.0-beta.15 → 2.1.0-beta.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/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,827 @@
|
|
|
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 __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var configure_options_exports = {};
|
|
28
|
+
__export(configure_options_exports, {
|
|
29
|
+
getConfigureOptionKeysForResolvedNode: () => getConfigureOptionKeysForResolvedNode,
|
|
30
|
+
getConfigureOptionKeysForUse: () => getConfigureOptionKeysForUse,
|
|
31
|
+
getConfigureOptionsForCatalogItem: () => getConfigureOptionsForCatalogItem,
|
|
32
|
+
getConfigureOptionsForResolvedNode: () => getConfigureOptionsForResolvedNode,
|
|
33
|
+
getConfigureOptionsForUse: () => getConfigureOptionsForUse
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(configure_options_exports);
|
|
36
|
+
var import_approval = require("./approval");
|
|
37
|
+
const stringOption = (description, extra = {}) => ({
|
|
38
|
+
type: "string",
|
|
39
|
+
...description ? { description } : {},
|
|
40
|
+
...extra
|
|
41
|
+
});
|
|
42
|
+
const numberOption = (description, extra = {}) => ({
|
|
43
|
+
type: "number",
|
|
44
|
+
...description ? { description } : {},
|
|
45
|
+
...extra
|
|
46
|
+
});
|
|
47
|
+
const booleanOption = (description, extra = {}) => ({
|
|
48
|
+
type: "boolean",
|
|
49
|
+
...description ? { description } : {},
|
|
50
|
+
...extra
|
|
51
|
+
});
|
|
52
|
+
const objectOption = (description, extra = {}) => ({
|
|
53
|
+
type: "object",
|
|
54
|
+
...description ? { description } : {},
|
|
55
|
+
...extra
|
|
56
|
+
});
|
|
57
|
+
const arrayOption = (description, extra = {}) => ({
|
|
58
|
+
type: "array",
|
|
59
|
+
...description ? { description } : {},
|
|
60
|
+
...extra
|
|
61
|
+
});
|
|
62
|
+
const COMMON_RESOURCE = objectOption("Resource binding", {
|
|
63
|
+
example: {
|
|
64
|
+
dataSourceKey: "main",
|
|
65
|
+
collectionName: "users"
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
const FILTER_GROUP = objectOption("FilterGroup shape. Use null or {} for an empty filter.", {
|
|
69
|
+
example: {
|
|
70
|
+
logic: "$and",
|
|
71
|
+
items: []
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
const SORTING = arrayOption("Sorting rule array", {
|
|
75
|
+
example: [
|
|
76
|
+
{
|
|
77
|
+
field: "createdAt",
|
|
78
|
+
direction: "desc"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
});
|
|
82
|
+
const OPEN_VIEW = objectOption("Popup or drawer open configuration", {
|
|
83
|
+
example: {
|
|
84
|
+
dataSourceKey: "main",
|
|
85
|
+
collectionName: "roles",
|
|
86
|
+
mode: "drawer"
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
const DISPLAY_STYLE = stringOption("Display style", {
|
|
90
|
+
enum: ["text", "tag"],
|
|
91
|
+
example: "tag"
|
|
92
|
+
});
|
|
93
|
+
const FIELD_COMPONENT = stringOption("Field component model use", {
|
|
94
|
+
example: "DisplayTextFieldModel"
|
|
95
|
+
});
|
|
96
|
+
const CONFIRM = objectOption("Confirmation dialog configuration. You can also pass a boolean directly.", {
|
|
97
|
+
example: {
|
|
98
|
+
enable: true,
|
|
99
|
+
title: "Confirm action",
|
|
100
|
+
content: "Do you want to continue?"
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
const JS_CODE = stringOption("JS code", {
|
|
104
|
+
example: "return value?.toUpperCase?.() || value;"
|
|
105
|
+
});
|
|
106
|
+
const JS_VERSION = stringOption("JS code version", {
|
|
107
|
+
example: "v2"
|
|
108
|
+
});
|
|
109
|
+
const COMMON_BLOCK_HEADER_OPTIONS = {
|
|
110
|
+
title: stringOption("Title", { example: "User Table" }),
|
|
111
|
+
description: stringOption("Description", { example: "Team directory and summary" })
|
|
112
|
+
};
|
|
113
|
+
const FILTER_FORM_HEADER_OPTIONS = {
|
|
114
|
+
title: stringOption("Title", { example: "User filters" }),
|
|
115
|
+
displayTitle: booleanOption("Whether to display the title", { example: true })
|
|
116
|
+
};
|
|
117
|
+
const COMMON_HEIGHT_OPTIONS = {
|
|
118
|
+
height: numberOption("Height", { example: 520 }),
|
|
119
|
+
heightMode: stringOption("Height mode", {
|
|
120
|
+
enum: ["defaultHeight", "specifyValue", "fullHeight"],
|
|
121
|
+
example: "specifyValue"
|
|
122
|
+
})
|
|
123
|
+
};
|
|
124
|
+
const PAGE_OPTIONS = {
|
|
125
|
+
title: stringOption("Page title", { example: "User Workspace" }),
|
|
126
|
+
documentTitle: stringOption("Browser document title", { example: "User Workspace" }),
|
|
127
|
+
displayTitle: booleanOption("Whether to display the page title", { example: true }),
|
|
128
|
+
enableTabs: booleanOption("Whether to enable top-level tabs", { example: true }),
|
|
129
|
+
icon: stringOption("Icon", { example: "UserOutlined" }),
|
|
130
|
+
enableHeader: booleanOption("Whether to display the page header", { example: true })
|
|
131
|
+
};
|
|
132
|
+
const TAB_OPTIONS = {
|
|
133
|
+
title: stringOption("Tab title", { example: "Overview" }),
|
|
134
|
+
icon: stringOption("Icon", { example: "TableOutlined" }),
|
|
135
|
+
documentTitle: stringOption("Browser document title", { example: "User Overview" })
|
|
136
|
+
};
|
|
137
|
+
const TABLE_OPTIONS = {
|
|
138
|
+
...COMMON_BLOCK_HEADER_OPTIONS,
|
|
139
|
+
...COMMON_HEIGHT_OPTIONS,
|
|
140
|
+
resource: COMMON_RESOURCE,
|
|
141
|
+
pageSize: numberOption("Page size", { example: 20 }),
|
|
142
|
+
density: stringOption("Table density", { enum: ["large", "middle", "small"], example: "middle" }),
|
|
143
|
+
showRowNumbers: booleanOption("Whether to display row numbers", { example: true }),
|
|
144
|
+
sorting: SORTING,
|
|
145
|
+
dataScope: FILTER_GROUP,
|
|
146
|
+
quickEdit: booleanOption("Whether to enable quick edit", { example: true }),
|
|
147
|
+
treeTable: booleanOption("Whether this is a tree table", { example: false }),
|
|
148
|
+
defaultExpandAllRows: booleanOption("Whether to expand all tree nodes by default", { example: false }),
|
|
149
|
+
dragSort: booleanOption("Whether to enable drag sorting", { example: false }),
|
|
150
|
+
dragSortBy: stringOption("Drag-sort field", { example: "sort" })
|
|
151
|
+
};
|
|
152
|
+
const FORM_COMMON_OPTIONS = {
|
|
153
|
+
...COMMON_BLOCK_HEADER_OPTIONS,
|
|
154
|
+
resource: COMMON_RESOURCE,
|
|
155
|
+
layout: stringOption("Layout key", { example: "vertical" }),
|
|
156
|
+
labelAlign: stringOption("Label alignment", { example: "left" }),
|
|
157
|
+
labelWidth: stringOption("Label width", { example: "120px" }),
|
|
158
|
+
labelWrap: booleanOption("Whether labels should wrap", { example: false }),
|
|
159
|
+
assignRules: objectOption(
|
|
160
|
+
"Raw assignment-rules payload. For AI/CLI authoring, prefer `getReactionMeta` + `setFieldValueRules` or blueprint `reaction.items[]` instead of guessing this configure key directly.",
|
|
161
|
+
{ example: {} }
|
|
162
|
+
),
|
|
163
|
+
colon: booleanOption("Whether to display a colon after the label", { example: true })
|
|
164
|
+
};
|
|
165
|
+
const EDIT_FORM_OPTIONS = {
|
|
166
|
+
...FORM_COMMON_OPTIONS,
|
|
167
|
+
dataScope: FILTER_GROUP
|
|
168
|
+
};
|
|
169
|
+
const DETAILS_OPTIONS = {
|
|
170
|
+
...COMMON_BLOCK_HEADER_OPTIONS,
|
|
171
|
+
resource: COMMON_RESOURCE,
|
|
172
|
+
layout: stringOption("Layout key", { example: "vertical" }),
|
|
173
|
+
labelAlign: stringOption("Label alignment", { example: "left" }),
|
|
174
|
+
labelWidth: stringOption("Label width", { example: "120px" }),
|
|
175
|
+
labelWrap: booleanOption("Whether labels should wrap", { example: false }),
|
|
176
|
+
colon: booleanOption("Whether to display a colon after the label", { example: true }),
|
|
177
|
+
sorting: SORTING,
|
|
178
|
+
dataScope: FILTER_GROUP,
|
|
179
|
+
linkageRules: arrayOption(
|
|
180
|
+
"Raw linkage-rules payload. For AI/CLI authoring, prefer `getReactionMeta` + `setFieldLinkageRules` instead of guessing this configure key directly.",
|
|
181
|
+
{ example: [] }
|
|
182
|
+
)
|
|
183
|
+
};
|
|
184
|
+
const FILTER_FORM_OPTIONS = {
|
|
185
|
+
...FILTER_FORM_HEADER_OPTIONS,
|
|
186
|
+
resource: COMMON_RESOURCE,
|
|
187
|
+
layout: stringOption("Layout key", { example: "vertical" }),
|
|
188
|
+
labelAlign: stringOption("Label alignment", { example: "left" }),
|
|
189
|
+
labelWidth: stringOption("Label width", { example: "120px" }),
|
|
190
|
+
labelWrap: booleanOption("Whether labels should wrap", { example: false }),
|
|
191
|
+
defaultValues: objectOption("Default filter values", { example: { status: "draft" } })
|
|
192
|
+
};
|
|
193
|
+
const LIST_OPTIONS = {
|
|
194
|
+
...COMMON_BLOCK_HEADER_OPTIONS,
|
|
195
|
+
...COMMON_HEIGHT_OPTIONS,
|
|
196
|
+
resource: COMMON_RESOURCE,
|
|
197
|
+
pageSize: numberOption("Page size", { example: 20 }),
|
|
198
|
+
dataScope: FILTER_GROUP,
|
|
199
|
+
sorting: SORTING,
|
|
200
|
+
layout: stringOption("List layout", { example: "vertical" })
|
|
201
|
+
};
|
|
202
|
+
const CALENDAR_OPTIONS = {
|
|
203
|
+
...COMMON_BLOCK_HEADER_OPTIONS,
|
|
204
|
+
...COMMON_HEIGHT_OPTIONS,
|
|
205
|
+
resource: COMMON_RESOURCE,
|
|
206
|
+
titleField: stringOption("Calendar event title field", { example: "title" }),
|
|
207
|
+
colorField: stringOption("Calendar event color field", { example: "status" }),
|
|
208
|
+
startField: stringOption("Calendar event start field", { example: "startAt" }),
|
|
209
|
+
endField: stringOption("Calendar event end field", { example: "endAt" }),
|
|
210
|
+
defaultView: stringOption("Default calendar view", { enum: ["month", "week", "day"], example: "month" }),
|
|
211
|
+
quickCreateEvent: booleanOption("Whether slot quick-create is enabled", { example: true }),
|
|
212
|
+
showLunar: booleanOption("Whether lunar labels are displayed", { example: false }),
|
|
213
|
+
weekStart: numberOption("Week start day. Use 1 for Monday or 0 for Sunday.", { example: 1 }),
|
|
214
|
+
dataScope: FILTER_GROUP,
|
|
215
|
+
linkageRules: arrayOption(
|
|
216
|
+
"Raw linkage-rules payload. For AI/CLI authoring, prefer `getReactionMeta` + `setBlockLinkageRules` instead of guessing this configure key directly.",
|
|
217
|
+
{ example: [] }
|
|
218
|
+
),
|
|
219
|
+
quickCreatePopup: OPEN_VIEW,
|
|
220
|
+
eventPopup: OPEN_VIEW
|
|
221
|
+
};
|
|
222
|
+
const GRID_CARD_OPTIONS = {
|
|
223
|
+
...COMMON_BLOCK_HEADER_OPTIONS,
|
|
224
|
+
...COMMON_HEIGHT_OPTIONS,
|
|
225
|
+
resource: COMMON_RESOURCE,
|
|
226
|
+
columns: objectOption("Column count. Pass a number or a full responsive object that includes xs/sm/md/lg/xl/xxl.", {
|
|
227
|
+
example: {
|
|
228
|
+
xs: 1,
|
|
229
|
+
sm: 1,
|
|
230
|
+
md: 2,
|
|
231
|
+
lg: 3,
|
|
232
|
+
xl: 3,
|
|
233
|
+
xxl: 4
|
|
234
|
+
}
|
|
235
|
+
}),
|
|
236
|
+
rowCount: numberOption("Items per row", { example: 3 }),
|
|
237
|
+
dataScope: FILTER_GROUP,
|
|
238
|
+
sorting: SORTING,
|
|
239
|
+
layout: stringOption("Card layout", { example: "vertical" })
|
|
240
|
+
};
|
|
241
|
+
const MARKDOWN_OPTIONS = {
|
|
242
|
+
...COMMON_BLOCK_HEADER_OPTIONS,
|
|
243
|
+
content: stringOption("Markdown content", { example: "# Team handbook" })
|
|
244
|
+
};
|
|
245
|
+
const IFRAME_OPTIONS = {
|
|
246
|
+
...COMMON_BLOCK_HEADER_OPTIONS,
|
|
247
|
+
...COMMON_HEIGHT_OPTIONS,
|
|
248
|
+
mode: stringOption("iframe mode", { example: "url" }),
|
|
249
|
+
url: stringOption("URL", { example: "https://example.com/embed" }),
|
|
250
|
+
html: stringOption("HTML content"),
|
|
251
|
+
params: objectOption("URL parameters", { example: { id: "1" } }),
|
|
252
|
+
allow: stringOption("allow attribute"),
|
|
253
|
+
htmlId: stringOption("Embedded HTML node ID")
|
|
254
|
+
};
|
|
255
|
+
const CHART_OPTIONS = {
|
|
256
|
+
...COMMON_BLOCK_HEADER_OPTIONS,
|
|
257
|
+
...COMMON_HEIGHT_OPTIONS,
|
|
258
|
+
query: objectOption("Chart query DSL. Builder mode is recommended by default.", {
|
|
259
|
+
example: {
|
|
260
|
+
mode: "builder",
|
|
261
|
+
resource: {
|
|
262
|
+
dataSourceKey: "main",
|
|
263
|
+
collectionName: "employees"
|
|
264
|
+
},
|
|
265
|
+
measures: [
|
|
266
|
+
{
|
|
267
|
+
field: "id",
|
|
268
|
+
aggregation: "count",
|
|
269
|
+
alias: "employeeCount"
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
dimensions: [{ field: "department.title" }]
|
|
273
|
+
}
|
|
274
|
+
}),
|
|
275
|
+
visual: objectOption("Chart visual DSL. Basic mode is recommended by default.", {
|
|
276
|
+
example: {
|
|
277
|
+
mode: "basic",
|
|
278
|
+
type: "bar",
|
|
279
|
+
mappings: {
|
|
280
|
+
x: "department.title",
|
|
281
|
+
y: "employeeCount"
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}),
|
|
285
|
+
events: objectOption("Chart event DSL. Only raw JS code is exposed.", {
|
|
286
|
+
example: {
|
|
287
|
+
raw: 'chart.on("click", () => console.log("clicked"));'
|
|
288
|
+
}
|
|
289
|
+
}),
|
|
290
|
+
configure: objectOption(
|
|
291
|
+
"Chart configuration object. It is normalized by the same chart contract. Do not mix it with query/visual/events.",
|
|
292
|
+
{
|
|
293
|
+
example: {
|
|
294
|
+
query: {
|
|
295
|
+
mode: "sql",
|
|
296
|
+
sql: "select department, count(*) as employeeCount from employees group by department",
|
|
297
|
+
sqlDatasource: "main"
|
|
298
|
+
},
|
|
299
|
+
chart: {
|
|
300
|
+
option: {
|
|
301
|
+
mode: "basic",
|
|
302
|
+
builder: {
|
|
303
|
+
type: "bar",
|
|
304
|
+
xField: "department",
|
|
305
|
+
yField: "employeeCount"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
)
|
|
312
|
+
};
|
|
313
|
+
const ACTION_PANEL_OPTIONS = {
|
|
314
|
+
...COMMON_BLOCK_HEADER_OPTIONS,
|
|
315
|
+
layout: stringOption("Layout key", { example: "list" }),
|
|
316
|
+
ellipsis: booleanOption("Whether to collapse overly long buttons", { example: false })
|
|
317
|
+
};
|
|
318
|
+
const MAP_OPTIONS = {
|
|
319
|
+
...COMMON_BLOCK_HEADER_OPTIONS,
|
|
320
|
+
...COMMON_HEIGHT_OPTIONS,
|
|
321
|
+
resource: COMMON_RESOURCE,
|
|
322
|
+
mapField: arrayOption("Map field path", { example: ["location"] }),
|
|
323
|
+
marker: stringOption("Marker field", { example: "name" }),
|
|
324
|
+
dataScope: FILTER_GROUP,
|
|
325
|
+
sorting: SORTING,
|
|
326
|
+
zoom: numberOption("Default zoom level", { example: 13 })
|
|
327
|
+
};
|
|
328
|
+
const COMMENTS_OPTIONS = {
|
|
329
|
+
...COMMON_BLOCK_HEADER_OPTIONS,
|
|
330
|
+
resource: COMMON_RESOURCE,
|
|
331
|
+
pageSize: numberOption("Page size", { example: 20 }),
|
|
332
|
+
dataScope: FILTER_GROUP
|
|
333
|
+
};
|
|
334
|
+
const JS_BLOCK_OPTIONS = {
|
|
335
|
+
title: stringOption("Title", { example: "Runtime Banner" }),
|
|
336
|
+
description: stringOption("Description", { example: "Custom JS block" }),
|
|
337
|
+
className: stringOption("className", { example: "users-banner" }),
|
|
338
|
+
code: JS_CODE,
|
|
339
|
+
version: JS_VERSION
|
|
340
|
+
};
|
|
341
|
+
const ACTION_COLUMN_OPTIONS = {
|
|
342
|
+
title: stringOption("Column title", { example: "Actions" }),
|
|
343
|
+
tooltip: stringOption("Column tooltip"),
|
|
344
|
+
width: numberOption("Column width", { example: 220 }),
|
|
345
|
+
fixed: stringOption("Fixed position", { example: "right" })
|
|
346
|
+
};
|
|
347
|
+
const TABLE_FIELD_WRAPPER_OPTIONS = {
|
|
348
|
+
label: stringOption("Column title alias. It maps to title under table.", { example: "Nickname" }),
|
|
349
|
+
title: stringOption("Column title", { example: "Nickname" }),
|
|
350
|
+
tooltip: stringOption("Tooltip"),
|
|
351
|
+
width: numberOption("Column width", { example: 240 }),
|
|
352
|
+
fixed: stringOption("Fixed position", { example: "left" }),
|
|
353
|
+
sorter: booleanOption("Whether sortable", { example: true }),
|
|
354
|
+
fieldPath: stringOption("Field path", { example: "nickname" }),
|
|
355
|
+
associationPathName: stringOption("Association path", { example: "roles" }),
|
|
356
|
+
editable: booleanOption("Whether editable", { example: false }),
|
|
357
|
+
dataIndex: stringOption("Data index"),
|
|
358
|
+
titleField: stringOption("Association display title field", { example: "title" }),
|
|
359
|
+
fieldComponent: FIELD_COMPONENT,
|
|
360
|
+
clickToOpen: booleanOption("Whether clicking can open details", { example: true }),
|
|
361
|
+
openView: OPEN_VIEW,
|
|
362
|
+
code: JS_CODE,
|
|
363
|
+
version: JS_VERSION
|
|
364
|
+
};
|
|
365
|
+
const DETAILS_FIELD_WRAPPER_OPTIONS = {
|
|
366
|
+
label: stringOption("Label", { example: "Nickname" }),
|
|
367
|
+
tooltip: stringOption("Tooltip"),
|
|
368
|
+
extra: stringOption("Extra text"),
|
|
369
|
+
showLabel: booleanOption("Whether to show the label", { example: true }),
|
|
370
|
+
fieldPath: stringOption("Field path", { example: "nickname" }),
|
|
371
|
+
associationPathName: stringOption("Association path", { example: "roles" }),
|
|
372
|
+
disabled: booleanOption("Whether disabled", { example: false }),
|
|
373
|
+
pattern: stringOption("Display mode"),
|
|
374
|
+
titleField: stringOption("Association display title field", { example: "title" }),
|
|
375
|
+
fieldComponent: FIELD_COMPONENT,
|
|
376
|
+
labelWidth: stringOption("Label width", { example: "120px" }),
|
|
377
|
+
labelWrap: booleanOption("Whether labels should wrap", { example: false }),
|
|
378
|
+
clickToOpen: booleanOption("Whether clicking can open details", { example: true }),
|
|
379
|
+
openView: OPEN_VIEW,
|
|
380
|
+
code: JS_CODE,
|
|
381
|
+
version: JS_VERSION
|
|
382
|
+
};
|
|
383
|
+
const FILTER_FIELD_WRAPPER_OPTIONS = {
|
|
384
|
+
label: stringOption("Label", { example: "Nickname" }),
|
|
385
|
+
tooltip: stringOption("Tooltip"),
|
|
386
|
+
extra: stringOption("Extra text"),
|
|
387
|
+
showLabel: booleanOption("Whether to show the label", { example: true }),
|
|
388
|
+
fieldPath: stringOption("Field path", { example: "nickname" }),
|
|
389
|
+
associationPathName: stringOption("Association path", { example: "department" }),
|
|
390
|
+
initialValue: objectOption("Initial value"),
|
|
391
|
+
multiple: booleanOption("Whether multiple selection is enabled", { example: false }),
|
|
392
|
+
allowMultiple: booleanOption("Whether multiple selection is allowed", { example: false }),
|
|
393
|
+
maxCount: numberOption("Maximum count", { example: 5 }),
|
|
394
|
+
name: stringOption("Field name override"),
|
|
395
|
+
fieldComponent: FIELD_COMPONENT,
|
|
396
|
+
labelWidth: stringOption("Label width", { example: "120px" }),
|
|
397
|
+
labelWrap: booleanOption("Whether labels should wrap", { example: false }),
|
|
398
|
+
clickToOpen: booleanOption("Whether clicking can open details", { example: false }),
|
|
399
|
+
openView: OPEN_VIEW,
|
|
400
|
+
code: JS_CODE,
|
|
401
|
+
version: JS_VERSION
|
|
402
|
+
};
|
|
403
|
+
const FORM_FIELD_WRAPPER_OPTIONS = {
|
|
404
|
+
label: stringOption("Label", { example: "Nickname" }),
|
|
405
|
+
tooltip: stringOption("Tooltip"),
|
|
406
|
+
extra: stringOption("Extra text"),
|
|
407
|
+
showLabel: booleanOption("Whether to show the label", { example: true }),
|
|
408
|
+
fieldPath: stringOption("Field path", { example: "nickname" }),
|
|
409
|
+
associationPathName: stringOption("Association path", { example: "department" }),
|
|
410
|
+
initialValue: objectOption("Initial value"),
|
|
411
|
+
required: booleanOption("Whether required", { example: false }),
|
|
412
|
+
disabled: booleanOption("Whether disabled", { example: false }),
|
|
413
|
+
multiple: booleanOption("Whether multiple selection is enabled", { example: false }),
|
|
414
|
+
allowMultiple: booleanOption("Whether multiple selection is allowed", { example: false }),
|
|
415
|
+
maxCount: numberOption("Maximum count", { example: 5 }),
|
|
416
|
+
pattern: stringOption("Input mode"),
|
|
417
|
+
titleField: stringOption("Association display title field", { example: "title" }),
|
|
418
|
+
name: stringOption("Field name override"),
|
|
419
|
+
fieldComponent: FIELD_COMPONENT,
|
|
420
|
+
labelWidth: stringOption("Label width", { example: "120px" }),
|
|
421
|
+
labelWrap: booleanOption("Whether labels should wrap", { example: false }),
|
|
422
|
+
clickToOpen: booleanOption("Whether clicking can open details", { example: false }),
|
|
423
|
+
openView: OPEN_VIEW,
|
|
424
|
+
code: JS_CODE,
|
|
425
|
+
version: JS_VERSION
|
|
426
|
+
};
|
|
427
|
+
const FIELD_NODE_OPTIONS = {
|
|
428
|
+
fieldPath: stringOption("Field path", { example: "nickname" }),
|
|
429
|
+
associationPathName: stringOption("Association path", { example: "roles" }),
|
|
430
|
+
titleField: stringOption("Association display title field", { example: "title" }),
|
|
431
|
+
clickToOpen: booleanOption("Whether clicking can open details", { example: true }),
|
|
432
|
+
openView: OPEN_VIEW,
|
|
433
|
+
title: stringOption("Title"),
|
|
434
|
+
icon: stringOption("Icon"),
|
|
435
|
+
autoSize: booleanOption("Whether to size automatically", { example: true }),
|
|
436
|
+
allowClear: booleanOption("Whether clearing is allowed", { example: true }),
|
|
437
|
+
multiple: booleanOption("Whether multiple selection is enabled", { example: false }),
|
|
438
|
+
allowMultiple: booleanOption("Whether multiple selection is allowed", { example: false }),
|
|
439
|
+
quickCreate: booleanOption("Whether quick create is allowed", { example: false }),
|
|
440
|
+
displayStyle: DISPLAY_STYLE,
|
|
441
|
+
options: objectOption("Component options")
|
|
442
|
+
};
|
|
443
|
+
const JS_FIELD_NODE_OPTIONS = {
|
|
444
|
+
...FIELD_NODE_OPTIONS,
|
|
445
|
+
code: JS_CODE,
|
|
446
|
+
version: JS_VERSION
|
|
447
|
+
};
|
|
448
|
+
const JS_COLUMN_OPTIONS = {
|
|
449
|
+
title: stringOption("Column title", { example: "Runtime Column" }),
|
|
450
|
+
tooltip: stringOption("Tooltip"),
|
|
451
|
+
width: numberOption("Column width", { example: 240 }),
|
|
452
|
+
fixed: stringOption("Fixed position", { example: "right" }),
|
|
453
|
+
code: JS_CODE,
|
|
454
|
+
version: JS_VERSION
|
|
455
|
+
};
|
|
456
|
+
const JS_ITEM_OPTIONS = {
|
|
457
|
+
label: stringOption("Label", { example: "Runtime Item" }),
|
|
458
|
+
tooltip: stringOption("Tooltip"),
|
|
459
|
+
extra: stringOption("Extra text"),
|
|
460
|
+
showLabel: booleanOption("Whether to show the label", { example: true }),
|
|
461
|
+
labelWidth: stringOption("Label width", { example: "120px" }),
|
|
462
|
+
labelWrap: booleanOption("Whether labels should wrap", { example: false }),
|
|
463
|
+
code: JS_CODE,
|
|
464
|
+
version: JS_VERSION
|
|
465
|
+
};
|
|
466
|
+
const DIVIDER_ITEM_OPTIONS = {
|
|
467
|
+
label: stringOption("Divider label", { example: "Basic information" }),
|
|
468
|
+
orientation: stringOption("Label position", { example: "left" }),
|
|
469
|
+
dashed: booleanOption("Whether the divider is dashed", { example: false }),
|
|
470
|
+
color: stringOption("Label color"),
|
|
471
|
+
borderColor: stringOption("Divider line color")
|
|
472
|
+
};
|
|
473
|
+
const ACTION_COMMON_OPTIONS = {
|
|
474
|
+
title: stringOption("Button title", { example: "Run" }),
|
|
475
|
+
tooltip: stringOption("Tooltip"),
|
|
476
|
+
icon: stringOption("Icon", { example: "PlusOutlined" }),
|
|
477
|
+
type: stringOption("Button type", { example: "primary" }),
|
|
478
|
+
color: stringOption("Color"),
|
|
479
|
+
htmlType: stringOption("HTML button type", { example: "submit" }),
|
|
480
|
+
position: stringOption("Position"),
|
|
481
|
+
danger: booleanOption("Whether this is a danger button", { example: false })
|
|
482
|
+
};
|
|
483
|
+
const ACTION_OPEN_VIEW_OPTIONS = {
|
|
484
|
+
openView: OPEN_VIEW
|
|
485
|
+
};
|
|
486
|
+
const ACTION_CONFIRM_OPTIONS = {
|
|
487
|
+
confirm: CONFIRM
|
|
488
|
+
};
|
|
489
|
+
const ACTION_ASSIGN_OPTIONS = {
|
|
490
|
+
assignValues: objectOption("Bulk or single-record assigned values", { example: { status: "published" } }),
|
|
491
|
+
updateMode: stringOption("Update mode", { example: "overwrite" })
|
|
492
|
+
};
|
|
493
|
+
const APPROVAL_ASSIGN_ACTION_OPTIONS = {
|
|
494
|
+
assignValues: objectOption("Assigned values persisted with the approval action payload", {
|
|
495
|
+
example: { department: "finance" }
|
|
496
|
+
})
|
|
497
|
+
};
|
|
498
|
+
const ACTION_LINKAGE_OPTIONS = {
|
|
499
|
+
linkageRules: arrayOption(
|
|
500
|
+
"Raw linkage-rules payload. For AI/CLI authoring, prefer `getReactionMeta` + `setActionLinkageRules` instead of guessing this configure key directly.",
|
|
501
|
+
{ example: [] }
|
|
502
|
+
)
|
|
503
|
+
};
|
|
504
|
+
const FILTER_ACTION_OPTIONS = {
|
|
505
|
+
filterableFieldNames: arrayOption("Allowed filter field name list", {
|
|
506
|
+
example: ["username", "email", "roles"]
|
|
507
|
+
}),
|
|
508
|
+
defaultFilter: FILTER_GROUP
|
|
509
|
+
};
|
|
510
|
+
const ACTION_JS_OPTIONS = {
|
|
511
|
+
code: JS_CODE,
|
|
512
|
+
version: JS_VERSION
|
|
513
|
+
};
|
|
514
|
+
const APPROVAL_RETURN_ACTION_OPTIONS = {
|
|
515
|
+
approvalReturn: objectOption("Approval return-node settings", {
|
|
516
|
+
example: {
|
|
517
|
+
type: "specific",
|
|
518
|
+
target: "approval-node-key"
|
|
519
|
+
}
|
|
520
|
+
})
|
|
521
|
+
};
|
|
522
|
+
const APPROVAL_COMMENT_ACTION_OPTIONS = {
|
|
523
|
+
commentFormUid: stringOption("Comment form model uid", {
|
|
524
|
+
example: "comment-form-uid"
|
|
525
|
+
})
|
|
526
|
+
};
|
|
527
|
+
const APPROVAL_REASSIGN_ACTION_OPTIONS = {
|
|
528
|
+
assigneesScope: objectOption("Approval reassignee scope", {
|
|
529
|
+
example: {
|
|
530
|
+
assignees: [1, "{{$context.user.id}}"],
|
|
531
|
+
extraFieldKey: "departmentId"
|
|
532
|
+
}
|
|
533
|
+
})
|
|
534
|
+
};
|
|
535
|
+
const ACTION_EDIT_MODE_OPTIONS = {
|
|
536
|
+
editMode: stringOption("Bulk edit mode", { example: "drawer" })
|
|
537
|
+
};
|
|
538
|
+
const ACTION_DUPLICATE_MODE_OPTIONS = {
|
|
539
|
+
duplicateMode: stringOption("Duplicate mode", { example: "popup" })
|
|
540
|
+
};
|
|
541
|
+
const ACTION_COLLAPSE_OPTIONS = {
|
|
542
|
+
collapsedRows: numberOption("Default collapsed row count", { example: 2 }),
|
|
543
|
+
defaultCollapsed: booleanOption("Whether collapsed by default", { example: true })
|
|
544
|
+
};
|
|
545
|
+
const ACTION_EMAIL_OPTIONS = {
|
|
546
|
+
emailFieldNames: arrayOption("Email field name list", { example: ["email"] }),
|
|
547
|
+
defaultSelectAllRecords: booleanOption("Whether all records are selected by default", { example: false })
|
|
548
|
+
};
|
|
549
|
+
const CALENDAR_ACTION_POSITION_OPTIONS = {
|
|
550
|
+
position: stringOption("Position", { enum: ["left", "right"], example: "left" })
|
|
551
|
+
};
|
|
552
|
+
const GLOBAL_FLOW_CONTEXT_OPTION_KEYS = /* @__PURE__ */ new Set([
|
|
553
|
+
"assignRules",
|
|
554
|
+
"confirm",
|
|
555
|
+
"dataScope",
|
|
556
|
+
"defaultFilter",
|
|
557
|
+
"defaultValues",
|
|
558
|
+
"initialValue",
|
|
559
|
+
"linkageRules",
|
|
560
|
+
"assignValues",
|
|
561
|
+
"assigneesScope"
|
|
562
|
+
]);
|
|
563
|
+
const FLOW_CONTEXT_OPTION_KEYS_BY_USE = {
|
|
564
|
+
RootPageModel: ["documentTitle"],
|
|
565
|
+
RootPageTabModel: ["documentTitle"],
|
|
566
|
+
TriggerChildPageModel: ["documentTitle"],
|
|
567
|
+
ApprovalChildPageModel: ["documentTitle"],
|
|
568
|
+
TriggerChildPageTabModel: ["documentTitle"],
|
|
569
|
+
ApprovalChildPageTabModel: ["documentTitle"]
|
|
570
|
+
};
|
|
571
|
+
function cloneOptions(options) {
|
|
572
|
+
return Object.fromEntries(Object.entries(options).map(([key, value]) => [key, { ...value }]));
|
|
573
|
+
}
|
|
574
|
+
function mergeOptions(...groups) {
|
|
575
|
+
return Object.assign({}, ...groups.map((group) => cloneOptions(group)));
|
|
576
|
+
}
|
|
577
|
+
function annotateFlowContextSupport(use, options) {
|
|
578
|
+
const keys = /* @__PURE__ */ new Set([
|
|
579
|
+
...GLOBAL_FLOW_CONTEXT_OPTION_KEYS,
|
|
580
|
+
...FLOW_CONTEXT_OPTION_KEYS_BY_USE[String(use || "").trim()] || []
|
|
581
|
+
]);
|
|
582
|
+
for (const key of keys) {
|
|
583
|
+
if (options[key]) {
|
|
584
|
+
options[key] = {
|
|
585
|
+
...options[key],
|
|
586
|
+
supportsFlowContext: true
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
return options;
|
|
591
|
+
}
|
|
592
|
+
function isGenericFieldNodeUse(use) {
|
|
593
|
+
const normalized = String(use || "").trim();
|
|
594
|
+
return !!normalized && normalized.endsWith("FieldModel");
|
|
595
|
+
}
|
|
596
|
+
function getActionConfigureOptionsByUse(use) {
|
|
597
|
+
const normalized = String(use || "").trim();
|
|
598
|
+
if (!normalized) {
|
|
599
|
+
return {};
|
|
600
|
+
}
|
|
601
|
+
const base = [ACTION_COMMON_OPTIONS];
|
|
602
|
+
const merged = (...extra) => mergeOptions(...base, ...extra);
|
|
603
|
+
switch (normalized) {
|
|
604
|
+
case "CalendarTodayActionModel":
|
|
605
|
+
return merged(CALENDAR_ACTION_POSITION_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
606
|
+
case "CalendarNavActionModel":
|
|
607
|
+
case "CalendarTitleActionModel":
|
|
608
|
+
case "CalendarViewSelectActionModel":
|
|
609
|
+
return mergeOptions(CALENDAR_ACTION_POSITION_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
610
|
+
case "AddNewActionModel":
|
|
611
|
+
case "ViewActionModel":
|
|
612
|
+
case "EditActionModel":
|
|
613
|
+
case "PopupCollectionActionModel":
|
|
614
|
+
case "UploadActionModel":
|
|
615
|
+
return merged(ACTION_OPEN_VIEW_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
616
|
+
case "DeleteActionModel":
|
|
617
|
+
case "BulkDeleteActionModel":
|
|
618
|
+
return merged(ACTION_CONFIRM_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
619
|
+
case "FormSubmitActionModel":
|
|
620
|
+
return merged(ACTION_CONFIRM_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
621
|
+
case "UpdateRecordActionModel":
|
|
622
|
+
case "BulkUpdateActionModel":
|
|
623
|
+
return merged(ACTION_CONFIRM_OPTIONS, ACTION_ASSIGN_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
624
|
+
case "BulkEditActionModel":
|
|
625
|
+
return merged(ACTION_EDIT_MODE_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
626
|
+
case "DuplicateActionModel":
|
|
627
|
+
return merged(ACTION_OPEN_VIEW_OPTIONS, ACTION_DUPLICATE_MODE_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
628
|
+
case "AddChildActionModel":
|
|
629
|
+
return merged(ACTION_OPEN_VIEW_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
630
|
+
case "FilterFormCollapseActionModel":
|
|
631
|
+
return merged(ACTION_COLLAPSE_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
632
|
+
case "MailSendActionModel":
|
|
633
|
+
return merged(ACTION_OPEN_VIEW_OPTIONS, ACTION_EMAIL_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
634
|
+
case "JSCollectionActionModel":
|
|
635
|
+
case "JSRecordActionModel":
|
|
636
|
+
case "JSFormActionModel":
|
|
637
|
+
case "JSItemActionModel":
|
|
638
|
+
case "FilterFormJSActionModel":
|
|
639
|
+
case "JSActionModel":
|
|
640
|
+
return merged(ACTION_JS_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
641
|
+
case "LinkActionModel":
|
|
642
|
+
case "ExportActionModel":
|
|
643
|
+
case "ExportAttachmentActionModel":
|
|
644
|
+
case "ImportActionModel":
|
|
645
|
+
case "TemplatePrintCollectionActionModel":
|
|
646
|
+
case "TemplatePrintRecordActionModel":
|
|
647
|
+
case "CollectionTriggerWorkflowActionModel":
|
|
648
|
+
case "RecordTriggerWorkflowActionModel":
|
|
649
|
+
case "FormTriggerWorkflowActionModel":
|
|
650
|
+
case "WorkbenchTriggerWorkflowActionModel":
|
|
651
|
+
case "RefreshActionModel":
|
|
652
|
+
case "ExpandCollapseActionModel":
|
|
653
|
+
case "FilterFormSubmitActionModel":
|
|
654
|
+
case "FilterFormResetActionModel":
|
|
655
|
+
return merged(ACTION_LINKAGE_OPTIONS);
|
|
656
|
+
case "FilterActionModel":
|
|
657
|
+
return merged(FILTER_ACTION_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
658
|
+
case "ApplyFormSubmitModel":
|
|
659
|
+
case "ApplyFormSaveDraftModel":
|
|
660
|
+
return merged(ACTION_CONFIRM_OPTIONS, APPROVAL_ASSIGN_ACTION_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
661
|
+
case "ApplyFormWithdrawModel":
|
|
662
|
+
return merged(ACTION_CONFIRM_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
663
|
+
case "ProcessFormApproveModel":
|
|
664
|
+
case "ProcessFormRejectModel":
|
|
665
|
+
return merged(APPROVAL_COMMENT_ACTION_OPTIONS, ACTION_LINKAGE_OPTIONS);
|
|
666
|
+
case "ProcessFormReturnModel":
|
|
667
|
+
return merged(APPROVAL_COMMENT_ACTION_OPTIONS, ACTION_LINKAGE_OPTIONS, APPROVAL_RETURN_ACTION_OPTIONS);
|
|
668
|
+
case "ProcessFormDelegateModel":
|
|
669
|
+
case "ProcessFormAddAssigneeModel":
|
|
670
|
+
return merged(ACTION_LINKAGE_OPTIONS, APPROVAL_REASSIGN_ACTION_OPTIONS);
|
|
671
|
+
default:
|
|
672
|
+
return {};
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
function getConfigureOptionsForUse(use) {
|
|
676
|
+
const normalized = String(use || "").trim();
|
|
677
|
+
const semanticUse = (0, import_approval.normalizeApprovalSemanticUse)(normalized);
|
|
678
|
+
let options;
|
|
679
|
+
switch (normalized) {
|
|
680
|
+
case "TriggerChildPageModel":
|
|
681
|
+
case "ApprovalChildPageModel":
|
|
682
|
+
options = cloneOptions(PAGE_OPTIONS);
|
|
683
|
+
break;
|
|
684
|
+
case "TriggerChildPageTabModel":
|
|
685
|
+
case "ApprovalChildPageTabModel":
|
|
686
|
+
options = cloneOptions(TAB_OPTIONS);
|
|
687
|
+
break;
|
|
688
|
+
case "ApplyFormModel":
|
|
689
|
+
case "ProcessFormModel":
|
|
690
|
+
options = cloneOptions(FORM_COMMON_OPTIONS);
|
|
691
|
+
break;
|
|
692
|
+
case "ApprovalDetailsModel":
|
|
693
|
+
case "ApplyTaskCardDetailsModel":
|
|
694
|
+
case "ApprovalTaskCardDetailsModel":
|
|
695
|
+
options = cloneOptions(DETAILS_OPTIONS);
|
|
696
|
+
break;
|
|
697
|
+
case "PatternFormItemModel":
|
|
698
|
+
options = cloneOptions(FORM_FIELD_WRAPPER_OPTIONS);
|
|
699
|
+
break;
|
|
700
|
+
case "ApprovalDetailsItemModel":
|
|
701
|
+
case "ApplyTaskCardDetailsItemModel":
|
|
702
|
+
case "ApprovalTaskCardDetailsItemModel":
|
|
703
|
+
options = cloneOptions(DETAILS_FIELD_WRAPPER_OPTIONS);
|
|
704
|
+
break;
|
|
705
|
+
case "RootPageModel":
|
|
706
|
+
options = cloneOptions(PAGE_OPTIONS);
|
|
707
|
+
break;
|
|
708
|
+
case "RootPageTabModel":
|
|
709
|
+
options = cloneOptions(TAB_OPTIONS);
|
|
710
|
+
break;
|
|
711
|
+
case "TableBlockModel":
|
|
712
|
+
options = cloneOptions(TABLE_OPTIONS);
|
|
713
|
+
break;
|
|
714
|
+
case "CalendarBlockModel":
|
|
715
|
+
options = cloneOptions(CALENDAR_OPTIONS);
|
|
716
|
+
break;
|
|
717
|
+
case "FormBlockModel":
|
|
718
|
+
case "CreateFormModel":
|
|
719
|
+
options = cloneOptions(FORM_COMMON_OPTIONS);
|
|
720
|
+
break;
|
|
721
|
+
case "EditFormModel":
|
|
722
|
+
options = cloneOptions(EDIT_FORM_OPTIONS);
|
|
723
|
+
break;
|
|
724
|
+
case "DetailsBlockModel":
|
|
725
|
+
options = cloneOptions(DETAILS_OPTIONS);
|
|
726
|
+
break;
|
|
727
|
+
case "FilterFormBlockModel":
|
|
728
|
+
options = cloneOptions(FILTER_FORM_OPTIONS);
|
|
729
|
+
break;
|
|
730
|
+
case "ListBlockModel":
|
|
731
|
+
options = cloneOptions(LIST_OPTIONS);
|
|
732
|
+
break;
|
|
733
|
+
case "GridCardBlockModel":
|
|
734
|
+
options = cloneOptions(GRID_CARD_OPTIONS);
|
|
735
|
+
break;
|
|
736
|
+
case "MarkdownBlockModel":
|
|
737
|
+
options = cloneOptions(MARKDOWN_OPTIONS);
|
|
738
|
+
break;
|
|
739
|
+
case "IframeBlockModel":
|
|
740
|
+
options = cloneOptions(IFRAME_OPTIONS);
|
|
741
|
+
break;
|
|
742
|
+
case "ChartBlockModel":
|
|
743
|
+
options = cloneOptions(CHART_OPTIONS);
|
|
744
|
+
break;
|
|
745
|
+
case "ActionPanelBlockModel":
|
|
746
|
+
options = cloneOptions(ACTION_PANEL_OPTIONS);
|
|
747
|
+
break;
|
|
748
|
+
case "MapBlockModel":
|
|
749
|
+
options = cloneOptions(MAP_OPTIONS);
|
|
750
|
+
break;
|
|
751
|
+
case "CommentsBlockModel":
|
|
752
|
+
options = cloneOptions(COMMENTS_OPTIONS);
|
|
753
|
+
break;
|
|
754
|
+
case "JSBlockModel":
|
|
755
|
+
options = cloneOptions(JS_BLOCK_OPTIONS);
|
|
756
|
+
break;
|
|
757
|
+
case "TableActionsColumnModel":
|
|
758
|
+
options = cloneOptions(ACTION_COLUMN_OPTIONS);
|
|
759
|
+
break;
|
|
760
|
+
case "TableColumnModel":
|
|
761
|
+
options = cloneOptions(TABLE_FIELD_WRAPPER_OPTIONS);
|
|
762
|
+
break;
|
|
763
|
+
case "DetailsItemModel":
|
|
764
|
+
options = cloneOptions(DETAILS_FIELD_WRAPPER_OPTIONS);
|
|
765
|
+
break;
|
|
766
|
+
case "FormAssociationItemModel":
|
|
767
|
+
options = cloneOptions(DETAILS_FIELD_WRAPPER_OPTIONS);
|
|
768
|
+
break;
|
|
769
|
+
case "FilterFormItemModel":
|
|
770
|
+
options = cloneOptions(FILTER_FIELD_WRAPPER_OPTIONS);
|
|
771
|
+
break;
|
|
772
|
+
case "FormItemModel":
|
|
773
|
+
options = cloneOptions(FORM_FIELD_WRAPPER_OPTIONS);
|
|
774
|
+
break;
|
|
775
|
+
case "JSFieldModel":
|
|
776
|
+
case "JSEditableFieldModel":
|
|
777
|
+
options = cloneOptions(JS_FIELD_NODE_OPTIONS);
|
|
778
|
+
break;
|
|
779
|
+
case "JSColumnModel":
|
|
780
|
+
options = cloneOptions(JS_COLUMN_OPTIONS);
|
|
781
|
+
break;
|
|
782
|
+
case "JSItemModel":
|
|
783
|
+
case "FormJSFieldItemModel":
|
|
784
|
+
options = cloneOptions(JS_ITEM_OPTIONS);
|
|
785
|
+
break;
|
|
786
|
+
case "DividerItemModel":
|
|
787
|
+
options = cloneOptions(DIVIDER_ITEM_OPTIONS);
|
|
788
|
+
break;
|
|
789
|
+
default:
|
|
790
|
+
if (isGenericFieldNodeUse(normalized) || isGenericFieldNodeUse(semanticUse)) {
|
|
791
|
+
options = cloneOptions(FIELD_NODE_OPTIONS);
|
|
792
|
+
break;
|
|
793
|
+
}
|
|
794
|
+
options = getActionConfigureOptionsByUse(normalized);
|
|
795
|
+
break;
|
|
796
|
+
}
|
|
797
|
+
return annotateFlowContextSupport(normalized, options);
|
|
798
|
+
}
|
|
799
|
+
function getConfigureOptionsForResolvedNode(input) {
|
|
800
|
+
if (input.kind === "page") {
|
|
801
|
+
return annotateFlowContextSupport("RootPageModel", cloneOptions(PAGE_OPTIONS));
|
|
802
|
+
}
|
|
803
|
+
if (input.kind === "tab") {
|
|
804
|
+
return annotateFlowContextSupport("RootPageTabModel", cloneOptions(TAB_OPTIONS));
|
|
805
|
+
}
|
|
806
|
+
return getConfigureOptionsForUse(input.use);
|
|
807
|
+
}
|
|
808
|
+
function getConfigureOptionsForCatalogItem(item) {
|
|
809
|
+
if (!item) {
|
|
810
|
+
return {};
|
|
811
|
+
}
|
|
812
|
+
return getConfigureOptionsForUse(item.use);
|
|
813
|
+
}
|
|
814
|
+
function getConfigureOptionKeysForUse(use) {
|
|
815
|
+
return Object.keys(getConfigureOptionsForUse(use));
|
|
816
|
+
}
|
|
817
|
+
function getConfigureOptionKeysForResolvedNode(input) {
|
|
818
|
+
return Object.keys(getConfigureOptionsForResolvedNode(input));
|
|
819
|
+
}
|
|
820
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
821
|
+
0 && (module.exports = {
|
|
822
|
+
getConfigureOptionKeysForResolvedNode,
|
|
823
|
+
getConfigureOptionKeysForUse,
|
|
824
|
+
getConfigureOptionsForCatalogItem,
|
|
825
|
+
getConfigureOptionsForResolvedNode,
|
|
826
|
+
getConfigureOptionsForUse
|
|
827
|
+
});
|