@nocobase/plugin-flow-engine 2.1.0-beta.2 → 2.1.0-beta.20

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