@nocobase/plugin-flow-engine 2.1.0-alpha.13 → 2.1.0-alpha.15

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 (661) hide show
  1. package/dist/ai/ai-employees/nathan/index.js +1 -112
  2. package/dist/ai/ai-employees/nathan/prompt.md +132 -0
  3. package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextApis.js +2 -2
  4. package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextEnvs.js +2 -2
  5. package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextVars.js +2 -2
  6. package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/lintAndTestJS.js +2 -2
  7. package/dist/client/index.js +1 -1
  8. package/dist/externalVersion.js +10 -13
  9. package/dist/locale/en-US.json +1 -0
  10. package/dist/locale/index.d.ts +2 -0
  11. package/dist/locale/zh-CN.json +1 -0
  12. package/dist/node_modules/ses/package.json +1 -1
  13. package/dist/node_modules/zod/package.json +1 -1
  14. package/dist/server/flow-surfaces/action-scope.d.ts +37 -0
  15. package/dist/server/flow-surfaces/action-scope.js +146 -0
  16. package/dist/server/flow-surfaces/builder.d.ts +209 -0
  17. package/dist/server/flow-surfaces/builder.js +858 -0
  18. package/dist/server/flow-surfaces/catalog.d.ts +65 -0
  19. package/dist/server/flow-surfaces/catalog.js +2766 -0
  20. package/dist/server/flow-surfaces/chart-config.d.ts +121 -0
  21. package/dist/server/flow-surfaces/chart-config.js +1394 -0
  22. package/dist/server/flow-surfaces/compiler.d.ts +22 -0
  23. package/dist/server/flow-surfaces/compiler.js +1129 -0
  24. package/dist/server/flow-surfaces/configure-options.d.ts +23 -0
  25. package/dist/server/flow-surfaces/configure-options.js +671 -0
  26. package/dist/server/flow-surfaces/constants.d.ts +13 -0
  27. package/dist/server/flow-surfaces/constants.js +137 -0
  28. package/dist/server/flow-surfaces/context.d.ts +72 -0
  29. package/dist/server/flow-surfaces/context.js +556 -0
  30. package/dist/server/flow-surfaces/contract-guard.d.ts +19 -0
  31. package/dist/server/flow-surfaces/contract-guard.js +411 -0
  32. package/dist/server/flow-surfaces/errors.d.ts +47 -0
  33. package/dist/server/flow-surfaces/errors.js +145 -0
  34. package/dist/server/flow-surfaces/executor.d.ts +13 -0
  35. package/dist/server/flow-surfaces/executor.js +97 -0
  36. package/dist/server/flow-surfaces/field-semantics.d.ts +15 -0
  37. package/dist/server/flow-surfaces/field-semantics.js +80 -0
  38. package/dist/server/{flow-schema-registry → flow-surfaces}/index.d.ts +3 -2
  39. package/dist/server/flow-surfaces/index.js +352 -0
  40. package/dist/server/flow-surfaces/locator.d.ts +28 -0
  41. package/dist/server/flow-surfaces/locator.js +238 -0
  42. package/dist/server/flow-surfaces/placement.d.ts +33 -0
  43. package/dist/server/flow-surfaces/placement.js +192 -0
  44. package/dist/server/flow-surfaces/route-sync.d.ts +47 -0
  45. package/dist/server/flow-surfaces/route-sync.js +392 -0
  46. package/dist/server/flow-surfaces/service.d.ts +530 -0
  47. package/dist/server/flow-surfaces/service.js +7736 -0
  48. package/dist/server/flow-surfaces/support-matrix.d.ts +28 -0
  49. package/dist/server/flow-surfaces/support-matrix.js +246 -0
  50. package/dist/server/flow-surfaces/surface-context.d.ts +51 -0
  51. package/dist/server/flow-surfaces/surface-context.js +356 -0
  52. package/dist/server/flow-surfaces/types.d.ts +192 -0
  53. package/dist/server/index.d.ts +1 -1
  54. package/dist/server/index.js +6 -4
  55. package/dist/server/plugin.d.ts +0 -3
  56. package/dist/server/plugin.js +7 -36
  57. package/dist/server/repository.d.ts +9 -68
  58. package/dist/server/repository.js +106 -420
  59. package/dist/server/server.d.ts +0 -7
  60. package/dist/server/server.js +53 -23
  61. package/dist/server/variables/resolve.d.ts +21 -0
  62. package/dist/server/variables/resolve.js +79 -0
  63. package/dist/swagger/flow-surfaces.d.ts +3186 -0
  64. package/dist/swagger/flow-surfaces.js +4320 -0
  65. package/dist/swagger/index.d.ts +2837 -810
  66. package/dist/swagger/index.js +14 -696
  67. package/package.json +2 -4
  68. package/dist/node_modules/ajv/.runkit_example.js +0 -23
  69. package/dist/node_modules/ajv/LICENSE +0 -22
  70. package/dist/node_modules/ajv/dist/2019.d.ts +0 -19
  71. package/dist/node_modules/ajv/dist/2019.js +0 -61
  72. package/dist/node_modules/ajv/dist/2020.d.ts +0 -19
  73. package/dist/node_modules/ajv/dist/2020.js +0 -55
  74. package/dist/node_modules/ajv/dist/ajv.d.ts +0 -18
  75. package/dist/node_modules/ajv/dist/ajv.js +0 -7
  76. package/dist/node_modules/ajv/dist/compile/codegen/code.d.ts +0 -40
  77. package/dist/node_modules/ajv/dist/compile/codegen/code.js +0 -156
  78. package/dist/node_modules/ajv/dist/compile/codegen/index.d.ts +0 -79
  79. package/dist/node_modules/ajv/dist/compile/codegen/index.js +0 -697
  80. package/dist/node_modules/ajv/dist/compile/codegen/scope.d.ts +0 -79
  81. package/dist/node_modules/ajv/dist/compile/codegen/scope.js +0 -143
  82. package/dist/node_modules/ajv/dist/compile/errors.d.ts +0 -13
  83. package/dist/node_modules/ajv/dist/compile/errors.js +0 -123
  84. package/dist/node_modules/ajv/dist/compile/index.d.ts +0 -80
  85. package/dist/node_modules/ajv/dist/compile/index.js +0 -242
  86. package/dist/node_modules/ajv/dist/compile/jtd/parse.d.ts +0 -4
  87. package/dist/node_modules/ajv/dist/compile/jtd/parse.js +0 -350
  88. package/dist/node_modules/ajv/dist/compile/jtd/serialize.d.ts +0 -4
  89. package/dist/node_modules/ajv/dist/compile/jtd/serialize.js +0 -236
  90. package/dist/node_modules/ajv/dist/compile/jtd/types.d.ts +0 -6
  91. package/dist/node_modules/ajv/dist/compile/jtd/types.js +0 -14
  92. package/dist/node_modules/ajv/dist/compile/names.d.ts +0 -20
  93. package/dist/node_modules/ajv/dist/compile/names.js +0 -28
  94. package/dist/node_modules/ajv/dist/compile/ref_error.d.ts +0 -6
  95. package/dist/node_modules/ajv/dist/compile/ref_error.js +0 -12
  96. package/dist/node_modules/ajv/dist/compile/resolve.d.ts +0 -12
  97. package/dist/node_modules/ajv/dist/compile/resolve.js +0 -155
  98. package/dist/node_modules/ajv/dist/compile/rules.d.ts +0 -28
  99. package/dist/node_modules/ajv/dist/compile/rules.js +0 -26
  100. package/dist/node_modules/ajv/dist/compile/util.d.ts +0 -40
  101. package/dist/node_modules/ajv/dist/compile/util.js +0 -178
  102. package/dist/node_modules/ajv/dist/compile/validate/applicability.d.ts +0 -6
  103. package/dist/node_modules/ajv/dist/compile/validate/applicability.js +0 -19
  104. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +0 -4
  105. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -50
  106. package/dist/node_modules/ajv/dist/compile/validate/dataType.d.ts +0 -17
  107. package/dist/node_modules/ajv/dist/compile/validate/dataType.js +0 -203
  108. package/dist/node_modules/ajv/dist/compile/validate/defaults.d.ts +0 -2
  109. package/dist/node_modules/ajv/dist/compile/validate/defaults.js +0 -35
  110. package/dist/node_modules/ajv/dist/compile/validate/index.d.ts +0 -42
  111. package/dist/node_modules/ajv/dist/compile/validate/index.js +0 -520
  112. package/dist/node_modules/ajv/dist/compile/validate/keyword.d.ts +0 -8
  113. package/dist/node_modules/ajv/dist/compile/validate/keyword.js +0 -124
  114. package/dist/node_modules/ajv/dist/compile/validate/subschema.d.ts +0 -47
  115. package/dist/node_modules/ajv/dist/compile/validate/subschema.js +0 -81
  116. package/dist/node_modules/ajv/dist/core.d.ts +0 -174
  117. package/dist/node_modules/ajv/dist/core.js +0 -618
  118. package/dist/node_modules/ajv/dist/jtd.d.ts +0 -47
  119. package/dist/node_modules/ajv/dist/jtd.js +0 -72
  120. package/dist/node_modules/ajv/dist/refs/data.json +0 -13
  121. package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +0 -2
  122. package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +0 -28
  123. package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +0 -53
  124. package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +0 -17
  125. package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +0 -57
  126. package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +0 -14
  127. package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +0 -37
  128. package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +0 -90
  129. package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +0 -39
  130. package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +0 -2
  131. package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +0 -30
  132. package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +0 -48
  133. package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +0 -17
  134. package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +0 -51
  135. package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +0 -14
  136. package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +0 -37
  137. package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +0 -15
  138. package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +0 -90
  139. package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +0 -55
  140. package/dist/node_modules/ajv/dist/refs/json-schema-draft-06.json +0 -137
  141. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json +0 -151
  142. package/dist/node_modules/ajv/dist/refs/json-schema-secure.json +0 -88
  143. package/dist/node_modules/ajv/dist/refs/jtd-schema.d.ts +0 -3
  144. package/dist/node_modules/ajv/dist/refs/jtd-schema.js +0 -118
  145. package/dist/node_modules/ajv/dist/runtime/equal.d.ts +0 -6
  146. package/dist/node_modules/ajv/dist/runtime/equal.js +0 -7
  147. package/dist/node_modules/ajv/dist/runtime/parseJson.d.ts +0 -18
  148. package/dist/node_modules/ajv/dist/runtime/parseJson.js +0 -185
  149. package/dist/node_modules/ajv/dist/runtime/quote.d.ts +0 -5
  150. package/dist/node_modules/ajv/dist/runtime/quote.js +0 -30
  151. package/dist/node_modules/ajv/dist/runtime/re2.d.ts +0 -6
  152. package/dist/node_modules/ajv/dist/runtime/re2.js +0 -6
  153. package/dist/node_modules/ajv/dist/runtime/timestamp.d.ts +0 -5
  154. package/dist/node_modules/ajv/dist/runtime/timestamp.js +0 -42
  155. package/dist/node_modules/ajv/dist/runtime/ucs2length.d.ts +0 -5
  156. package/dist/node_modules/ajv/dist/runtime/ucs2length.js +0 -24
  157. package/dist/node_modules/ajv/dist/runtime/uri.d.ts +0 -6
  158. package/dist/node_modules/ajv/dist/runtime/uri.js +0 -6
  159. package/dist/node_modules/ajv/dist/runtime/validation_error.d.ts +0 -7
  160. package/dist/node_modules/ajv/dist/runtime/validation_error.js +0 -11
  161. package/dist/node_modules/ajv/dist/standalone/index.d.ts +0 -6
  162. package/dist/node_modules/ajv/dist/standalone/index.js +0 -90
  163. package/dist/node_modules/ajv/dist/standalone/instance.d.ts +0 -12
  164. package/dist/node_modules/ajv/dist/standalone/instance.js +0 -35
  165. package/dist/node_modules/ajv/dist/types/index.d.ts +0 -183
  166. package/dist/node_modules/ajv/dist/types/index.js +0 -3
  167. package/dist/node_modules/ajv/dist/types/json-schema.d.ts +0 -125
  168. package/dist/node_modules/ajv/dist/types/json-schema.js +0 -3
  169. package/dist/node_modules/ajv/dist/types/jtd-schema.d.ts +0 -174
  170. package/dist/node_modules/ajv/dist/types/jtd-schema.js +0 -3
  171. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +0 -8
  172. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -49
  173. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +0 -6
  174. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -106
  175. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +0 -3
  176. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -23
  177. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +0 -4
  178. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -12
  179. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +0 -7
  180. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -95
  181. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +0 -21
  182. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -85
  183. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +0 -3
  184. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +0 -11
  185. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +0 -6
  186. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -66
  187. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +0 -13
  188. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -44
  189. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +0 -5
  190. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -52
  191. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +0 -6
  192. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -30
  193. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +0 -4
  194. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -26
  195. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +0 -6
  196. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -60
  197. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +0 -3
  198. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -75
  199. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +0 -3
  200. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -12
  201. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +0 -3
  202. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -54
  203. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +0 -6
  204. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -38
  205. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +0 -3
  206. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -13
  207. package/dist/node_modules/ajv/dist/vocabularies/code.d.ts +0 -17
  208. package/dist/node_modules/ajv/dist/vocabularies/code.js +0 -131
  209. package/dist/node_modules/ajv/dist/vocabularies/core/id.d.ts +0 -3
  210. package/dist/node_modules/ajv/dist/vocabularies/core/id.js +0 -10
  211. package/dist/node_modules/ajv/dist/vocabularies/core/index.d.ts +0 -3
  212. package/dist/node_modules/ajv/dist/vocabularies/core/index.js +0 -16
  213. package/dist/node_modules/ajv/dist/vocabularies/core/ref.d.ts +0 -8
  214. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +0 -122
  215. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +0 -5
  216. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -104
  217. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +0 -10
  218. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -9
  219. package/dist/node_modules/ajv/dist/vocabularies/draft2020.d.ts +0 -3
  220. package/dist/node_modules/ajv/dist/vocabularies/draft2020.js +0 -23
  221. package/dist/node_modules/ajv/dist/vocabularies/draft7.d.ts +0 -3
  222. package/dist/node_modules/ajv/dist/vocabularies/draft7.js +0 -17
  223. package/dist/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +0 -5
  224. package/dist/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +0 -30
  225. package/dist/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +0 -5
  226. package/dist/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +0 -51
  227. package/dist/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +0 -3
  228. package/dist/node_modules/ajv/dist/vocabularies/dynamic/index.js +0 -9
  229. package/dist/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +0 -3
  230. package/dist/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +0 -16
  231. package/dist/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +0 -3
  232. package/dist/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +0 -10
  233. package/dist/node_modules/ajv/dist/vocabularies/errors.d.ts +0 -9
  234. package/dist/node_modules/ajv/dist/vocabularies/errors.js +0 -3
  235. package/dist/node_modules/ajv/dist/vocabularies/format/format.d.ts +0 -8
  236. package/dist/node_modules/ajv/dist/vocabularies/format/format.js +0 -92
  237. package/dist/node_modules/ajv/dist/vocabularies/format/index.d.ts +0 -3
  238. package/dist/node_modules/ajv/dist/vocabularies/format/index.js +0 -6
  239. package/dist/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +0 -6
  240. package/dist/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +0 -71
  241. package/dist/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +0 -5
  242. package/dist/node_modules/ajv/dist/vocabularies/jtd/elements.js +0 -24
  243. package/dist/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +0 -6
  244. package/dist/node_modules/ajv/dist/vocabularies/jtd/enum.js +0 -43
  245. package/dist/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +0 -9
  246. package/dist/node_modules/ajv/dist/vocabularies/jtd/error.js +0 -20
  247. package/dist/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +0 -10
  248. package/dist/node_modules/ajv/dist/vocabularies/jtd/index.js +0 -29
  249. package/dist/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +0 -5
  250. package/dist/node_modules/ajv/dist/vocabularies/jtd/metadata.js +0 -25
  251. package/dist/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +0 -4
  252. package/dist/node_modules/ajv/dist/vocabularies/jtd/nullable.js +0 -22
  253. package/dist/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +0 -3
  254. package/dist/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +0 -15
  255. package/dist/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +0 -22
  256. package/dist/node_modules/ajv/dist/vocabularies/jtd/properties.js +0 -149
  257. package/dist/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +0 -4
  258. package/dist/node_modules/ajv/dist/vocabularies/jtd/ref.js +0 -67
  259. package/dist/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +0 -10
  260. package/dist/node_modules/ajv/dist/vocabularies/jtd/type.js +0 -69
  261. package/dist/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +0 -3
  262. package/dist/node_modules/ajv/dist/vocabularies/jtd/union.js +0 -12
  263. package/dist/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +0 -5
  264. package/dist/node_modules/ajv/dist/vocabularies/jtd/values.js +0 -51
  265. package/dist/node_modules/ajv/dist/vocabularies/metadata.d.ts +0 -3
  266. package/dist/node_modules/ajv/dist/vocabularies/metadata.js +0 -18
  267. package/dist/node_modules/ajv/dist/vocabularies/next.d.ts +0 -3
  268. package/dist/node_modules/ajv/dist/vocabularies/next.js +0 -8
  269. package/dist/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +0 -3
  270. package/dist/node_modules/ajv/dist/vocabularies/unevaluated/index.js +0 -7
  271. package/dist/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +0 -6
  272. package/dist/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +0 -40
  273. package/dist/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +0 -6
  274. package/dist/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +0 -65
  275. package/dist/node_modules/ajv/dist/vocabularies/validation/const.d.ts +0 -6
  276. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +0 -25
  277. package/dist/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +0 -5
  278. package/dist/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +0 -12
  279. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +0 -8
  280. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -48
  281. package/dist/node_modules/ajv/dist/vocabularies/validation/index.d.ts +0 -16
  282. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +0 -33
  283. package/dist/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +0 -3
  284. package/dist/node_modules/ajv/dist/vocabularies/validation/limitContains.js +0 -15
  285. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +0 -3
  286. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -24
  287. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +0 -3
  288. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -27
  289. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +0 -11
  290. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -27
  291. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +0 -3
  292. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -24
  293. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +0 -8
  294. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -26
  295. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +0 -8
  296. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -33
  297. package/dist/node_modules/ajv/dist/vocabularies/validation/required.d.ts +0 -8
  298. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +0 -79
  299. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +0 -9
  300. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -64
  301. package/dist/node_modules/ajv/lib/2019.ts +0 -81
  302. package/dist/node_modules/ajv/lib/2020.ts +0 -75
  303. package/dist/node_modules/ajv/lib/ajv.ts +0 -70
  304. package/dist/node_modules/ajv/lib/compile/codegen/code.ts +0 -169
  305. package/dist/node_modules/ajv/lib/compile/codegen/index.ts +0 -852
  306. package/dist/node_modules/ajv/lib/compile/codegen/scope.ts +0 -215
  307. package/dist/node_modules/ajv/lib/compile/errors.ts +0 -184
  308. package/dist/node_modules/ajv/lib/compile/index.ts +0 -324
  309. package/dist/node_modules/ajv/lib/compile/jtd/parse.ts +0 -411
  310. package/dist/node_modules/ajv/lib/compile/jtd/serialize.ts +0 -277
  311. package/dist/node_modules/ajv/lib/compile/jtd/types.ts +0 -16
  312. package/dist/node_modules/ajv/lib/compile/names.ts +0 -27
  313. package/dist/node_modules/ajv/lib/compile/ref_error.ts +0 -13
  314. package/dist/node_modules/ajv/lib/compile/resolve.ts +0 -149
  315. package/dist/node_modules/ajv/lib/compile/rules.ts +0 -50
  316. package/dist/node_modules/ajv/lib/compile/util.ts +0 -213
  317. package/dist/node_modules/ajv/lib/compile/validate/applicability.ts +0 -22
  318. package/dist/node_modules/ajv/lib/compile/validate/boolSchema.ts +0 -47
  319. package/dist/node_modules/ajv/lib/compile/validate/dataType.ts +0 -230
  320. package/dist/node_modules/ajv/lib/compile/validate/defaults.ts +0 -32
  321. package/dist/node_modules/ajv/lib/compile/validate/index.ts +0 -582
  322. package/dist/node_modules/ajv/lib/compile/validate/keyword.ts +0 -171
  323. package/dist/node_modules/ajv/lib/compile/validate/subschema.ts +0 -135
  324. package/dist/node_modules/ajv/lib/core.ts +0 -892
  325. package/dist/node_modules/ajv/lib/jtd.ts +0 -132
  326. package/dist/node_modules/ajv/lib/refs/data.json +0 -13
  327. package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +0 -28
  328. package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +0 -53
  329. package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +0 -17
  330. package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +0 -57
  331. package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +0 -14
  332. package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +0 -37
  333. package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +0 -90
  334. package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +0 -39
  335. package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +0 -30
  336. package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +0 -48
  337. package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +0 -17
  338. package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +0 -51
  339. package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +0 -14
  340. package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +0 -37
  341. package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +0 -15
  342. package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +0 -90
  343. package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +0 -55
  344. package/dist/node_modules/ajv/lib/refs/json-schema-draft-06.json +0 -137
  345. package/dist/node_modules/ajv/lib/refs/json-schema-draft-07.json +0 -151
  346. package/dist/node_modules/ajv/lib/refs/json-schema-secure.json +0 -88
  347. package/dist/node_modules/ajv/lib/refs/jtd-schema.ts +0 -130
  348. package/dist/node_modules/ajv/lib/runtime/equal.ts +0 -7
  349. package/dist/node_modules/ajv/lib/runtime/parseJson.ts +0 -177
  350. package/dist/node_modules/ajv/lib/runtime/quote.ts +0 -31
  351. package/dist/node_modules/ajv/lib/runtime/re2.ts +0 -6
  352. package/dist/node_modules/ajv/lib/runtime/timestamp.ts +0 -46
  353. package/dist/node_modules/ajv/lib/runtime/ucs2length.ts +0 -20
  354. package/dist/node_modules/ajv/lib/runtime/uri.ts +0 -6
  355. package/dist/node_modules/ajv/lib/runtime/validation_error.ts +0 -13
  356. package/dist/node_modules/ajv/lib/standalone/index.ts +0 -100
  357. package/dist/node_modules/ajv/lib/standalone/instance.ts +0 -36
  358. package/dist/node_modules/ajv/lib/types/index.ts +0 -244
  359. package/dist/node_modules/ajv/lib/types/json-schema.ts +0 -187
  360. package/dist/node_modules/ajv/lib/types/jtd-schema.ts +0 -273
  361. package/dist/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +0 -56
  362. package/dist/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +0 -118
  363. package/dist/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +0 -22
  364. package/dist/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +0 -14
  365. package/dist/node_modules/ajv/lib/vocabularies/applicator/contains.ts +0 -109
  366. package/dist/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +0 -112
  367. package/dist/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +0 -11
  368. package/dist/node_modules/ajv/lib/vocabularies/applicator/if.ts +0 -80
  369. package/dist/node_modules/ajv/lib/vocabularies/applicator/index.ts +0 -53
  370. package/dist/node_modules/ajv/lib/vocabularies/applicator/items.ts +0 -59
  371. package/dist/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +0 -36
  372. package/dist/node_modules/ajv/lib/vocabularies/applicator/not.ts +0 -38
  373. package/dist/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +0 -82
  374. package/dist/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +0 -91
  375. package/dist/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +0 -12
  376. package/dist/node_modules/ajv/lib/vocabularies/applicator/properties.ts +0 -57
  377. package/dist/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +0 -50
  378. package/dist/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +0 -13
  379. package/dist/node_modules/ajv/lib/vocabularies/code.ts +0 -168
  380. package/dist/node_modules/ajv/lib/vocabularies/core/id.ts +0 -10
  381. package/dist/node_modules/ajv/lib/vocabularies/core/index.ts +0 -16
  382. package/dist/node_modules/ajv/lib/vocabularies/core/ref.ts +0 -129
  383. package/dist/node_modules/ajv/lib/vocabularies/discriminator/index.ts +0 -113
  384. package/dist/node_modules/ajv/lib/vocabularies/discriminator/types.ts +0 -12
  385. package/dist/node_modules/ajv/lib/vocabularies/draft2020.ts +0 -23
  386. package/dist/node_modules/ajv/lib/vocabularies/draft7.ts +0 -17
  387. package/dist/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +0 -31
  388. package/dist/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +0 -51
  389. package/dist/node_modules/ajv/lib/vocabularies/dynamic/index.ts +0 -9
  390. package/dist/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +0 -14
  391. package/dist/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +0 -10
  392. package/dist/node_modules/ajv/lib/vocabularies/errors.ts +0 -18
  393. package/dist/node_modules/ajv/lib/vocabularies/format/format.ts +0 -120
  394. package/dist/node_modules/ajv/lib/vocabularies/format/index.ts +0 -6
  395. package/dist/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +0 -89
  396. package/dist/node_modules/ajv/lib/vocabularies/jtd/elements.ts +0 -32
  397. package/dist/node_modules/ajv/lib/vocabularies/jtd/enum.ts +0 -45
  398. package/dist/node_modules/ajv/lib/vocabularies/jtd/error.ts +0 -23
  399. package/dist/node_modules/ajv/lib/vocabularies/jtd/index.ts +0 -37
  400. package/dist/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +0 -24
  401. package/dist/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +0 -21
  402. package/dist/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +0 -15
  403. package/dist/node_modules/ajv/lib/vocabularies/jtd/properties.ts +0 -184
  404. package/dist/node_modules/ajv/lib/vocabularies/jtd/ref.ts +0 -76
  405. package/dist/node_modules/ajv/lib/vocabularies/jtd/type.ts +0 -75
  406. package/dist/node_modules/ajv/lib/vocabularies/jtd/union.ts +0 -12
  407. package/dist/node_modules/ajv/lib/vocabularies/jtd/values.ts +0 -58
  408. package/dist/node_modules/ajv/lib/vocabularies/metadata.ts +0 -17
  409. package/dist/node_modules/ajv/lib/vocabularies/next.ts +0 -8
  410. package/dist/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +0 -7
  411. package/dist/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +0 -47
  412. package/dist/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +0 -85
  413. package/dist/node_modules/ajv/lib/vocabularies/validation/const.ts +0 -28
  414. package/dist/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +0 -23
  415. package/dist/node_modules/ajv/lib/vocabularies/validation/enum.ts +0 -54
  416. package/dist/node_modules/ajv/lib/vocabularies/validation/index.ts +0 -49
  417. package/dist/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +0 -16
  418. package/dist/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +0 -26
  419. package/dist/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +0 -30
  420. package/dist/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +0 -42
  421. package/dist/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +0 -26
  422. package/dist/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +0 -34
  423. package/dist/node_modules/ajv/lib/vocabularies/validation/pattern.ts +0 -39
  424. package/dist/node_modules/ajv/lib/vocabularies/validation/required.ts +0 -98
  425. package/dist/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +0 -79
  426. package/dist/node_modules/ajv/package.json +0 -1
  427. package/dist/server/flow-models/action-handlers.d.ts +0 -26
  428. package/dist/server/flow-models/action-handlers.js +0 -209
  429. package/dist/server/flow-models/http-error-adapter.d.ts +0 -10
  430. package/dist/server/flow-models/http-error-adapter.js +0 -58
  431. package/dist/server/flow-models/mutate-executor.d.ts +0 -17
  432. package/dist/server/flow-models/mutate-executor.js +0 -309
  433. package/dist/server/flow-models/repository-internals/duplicate-helpers.d.ts +0 -12
  434. package/dist/server/flow-models/repository-internals/duplicate-helpers.js +0 -121
  435. package/dist/server/flow-models/repository-internals/ensure-lock.d.ts +0 -15
  436. package/dist/server/flow-models/repository-internals/ensure-lock.js +0 -117
  437. package/dist/server/flow-models/repository-internals/errors.d.ts +0 -21
  438. package/dist/server/flow-models/repository-internals/errors.js +0 -78
  439. package/dist/server/flow-models/schema-contribution-collector.d.ts +0 -28
  440. package/dist/server/flow-models/schema-contribution-collector.js +0 -238
  441. package/dist/server/flow-models/validation-facade.d.ts +0 -29
  442. package/dist/server/flow-models/validation-facade.js +0 -181
  443. package/dist/server/flow-schema-contributions/actions/aclCheck.d.ts +0 -10
  444. package/dist/server/flow-schema-contributions/actions/aclCheck.js +0 -46
  445. package/dist/server/flow-schema-contributions/actions/aclCheckRefresh.d.ts +0 -10
  446. package/dist/server/flow-schema-contributions/actions/aclCheckRefresh.js +0 -46
  447. package/dist/server/flow-schema-contributions/actions/actionLinkageRules.d.ts +0 -10
  448. package/dist/server/flow-schema-contributions/actions/actionLinkageRules.js +0 -48
  449. package/dist/server/flow-schema-contributions/actions/confirm.d.ts +0 -10
  450. package/dist/server/flow-schema-contributions/actions/confirm.js +0 -73
  451. package/dist/server/flow-schema-contributions/actions/customVariable.d.ts +0 -10
  452. package/dist/server/flow-schema-contributions/actions/customVariable.js +0 -76
  453. package/dist/server/flow-schema-contributions/actions/dataScope.d.ts +0 -10
  454. package/dist/server/flow-schema-contributions/actions/dataScope.js +0 -79
  455. package/dist/server/flow-schema-contributions/actions/detailsFieldLinkageRules.d.ts +0 -10
  456. package/dist/server/flow-schema-contributions/actions/detailsFieldLinkageRules.js +0 -62
  457. package/dist/server/flow-schema-contributions/actions/fieldLinkageRules.d.ts +0 -10
  458. package/dist/server/flow-schema-contributions/actions/fieldLinkageRules.js +0 -62
  459. package/dist/server/flow-schema-contributions/actions/filterFormDefaultValues.d.ts +0 -10
  460. package/dist/server/flow-schema-contributions/actions/filterFormDefaultValues.js +0 -80
  461. package/dist/server/flow-schema-contributions/actions/formAssignRules.d.ts +0 -10
  462. package/dist/server/flow-schema-contributions/actions/formAssignRules.js +0 -62
  463. package/dist/server/flow-schema-contributions/actions/index.d.ts +0 -31
  464. package/dist/server/flow-schema-contributions/actions/index.js +0 -117
  465. package/dist/server/flow-schema-contributions/actions/layout.d.ts +0 -10
  466. package/dist/server/flow-schema-contributions/actions/layout.js +0 -68
  467. package/dist/server/flow-schema-contributions/actions/linkageRulesRefresh.d.ts +0 -10
  468. package/dist/server/flow-schema-contributions/actions/linkageRulesRefresh.js +0 -50
  469. package/dist/server/flow-schema-contributions/actions/navigateToURL.d.ts +0 -10
  470. package/dist/server/flow-schema-contributions/actions/navigateToURL.js +0 -82
  471. package/dist/server/flow-schema-contributions/actions/openView.d.ts +0 -10
  472. package/dist/server/flow-schema-contributions/actions/openView.js +0 -68
  473. package/dist/server/flow-schema-contributions/actions/refreshTargetBlocks.d.ts +0 -10
  474. package/dist/server/flow-schema-contributions/actions/refreshTargetBlocks.js +0 -56
  475. package/dist/server/flow-schema-contributions/actions/runjs.d.ts +0 -10
  476. package/dist/server/flow-schema-contributions/actions/runjs.js +0 -55
  477. package/dist/server/flow-schema-contributions/actions/setTargetDataScope.d.ts +0 -10
  478. package/dist/server/flow-schema-contributions/actions/setTargetDataScope.js +0 -59
  479. package/dist/server/flow-schema-contributions/actions/showMessage.d.ts +0 -10
  480. package/dist/server/flow-schema-contributions/actions/showMessage.js +0 -69
  481. package/dist/server/flow-schema-contributions/actions/showNotification.d.ts +0 -10
  482. package/dist/server/flow-schema-contributions/actions/showNotification.js +0 -76
  483. package/dist/server/flow-schema-contributions/actions/sortingRule.d.ts +0 -10
  484. package/dist/server/flow-schema-contributions/actions/sortingRule.js +0 -67
  485. package/dist/server/flow-schema-contributions/field-models.d.ts +0 -12
  486. package/dist/server/flow-schema-contributions/field-models.js +0 -693
  487. package/dist/server/flow-schema-contributions/index.d.ts +0 -13
  488. package/dist/server/flow-schema-contributions/index.js +0 -64
  489. package/dist/server/flow-schema-contributions/models/ActionBulkEditModel.d.ts +0 -10
  490. package/dist/server/flow-schema-contributions/models/ActionBulkEditModel.js +0 -382
  491. package/dist/server/flow-schema-contributions/models/ActionBulkUpdateModel.d.ts +0 -10
  492. package/dist/server/flow-schema-contributions/models/ActionBulkUpdateModel.js +0 -169
  493. package/dist/server/flow-schema-contributions/models/ActionCustomRequestModel.d.ts +0 -11
  494. package/dist/server/flow-schema-contributions/models/ActionCustomRequestModel.js +0 -115
  495. package/dist/server/flow-schema-contributions/models/ActionDuplicateModel.d.ts +0 -10
  496. package/dist/server/flow-schema-contributions/models/ActionDuplicateModel.js +0 -169
  497. package/dist/server/flow-schema-contributions/models/ActionExportModel.d.ts +0 -10
  498. package/dist/server/flow-schema-contributions/models/ActionExportModel.js +0 -141
  499. package/dist/server/flow-schema-contributions/models/ActionImportModel.d.ts +0 -10
  500. package/dist/server/flow-schema-contributions/models/ActionImportModel.js +0 -122
  501. package/dist/server/flow-schema-contributions/models/ActionModel.d.ts +0 -10
  502. package/dist/server/flow-schema-contributions/models/ActionModel.js +0 -202
  503. package/dist/server/flow-schema-contributions/models/AddChildActionModel.d.ts +0 -10
  504. package/dist/server/flow-schema-contributions/models/AddChildActionModel.js +0 -47
  505. package/dist/server/flow-schema-contributions/models/AddNewActionModel.d.ts +0 -10
  506. package/dist/server/flow-schema-contributions/models/AddNewActionModel.js +0 -93
  507. package/dist/server/flow-schema-contributions/models/AssignFormGridModel.d.ts +0 -10
  508. package/dist/server/flow-schema-contributions/models/AssignFormGridModel.js +0 -82
  509. package/dist/server/flow-schema-contributions/models/AssignFormItemModel.d.ts +0 -10
  510. package/dist/server/flow-schema-contributions/models/AssignFormItemModel.js +0 -80
  511. package/dist/server/flow-schema-contributions/models/AssignFormModel.d.ts +0 -10
  512. package/dist/server/flow-schema-contributions/models/AssignFormModel.js +0 -122
  513. package/dist/server/flow-schema-contributions/models/BasePageTabModel.d.ts +0 -10
  514. package/dist/server/flow-schema-contributions/models/BasePageTabModel.js +0 -71
  515. package/dist/server/flow-schema-contributions/models/BlockGridCardModel.d.ts +0 -10
  516. package/dist/server/flow-schema-contributions/models/BlockGridCardModel.js +0 -449
  517. package/dist/server/flow-schema-contributions/models/BlockGridModel.d.ts +0 -10
  518. package/dist/server/flow-schema-contributions/models/BlockGridModel.js +0 -81
  519. package/dist/server/flow-schema-contributions/models/BlockIframeModel.d.ts +0 -10
  520. package/dist/server/flow-schema-contributions/models/BlockIframeModel.js +0 -143
  521. package/dist/server/flow-schema-contributions/models/BlockListModel.d.ts +0 -10
  522. package/dist/server/flow-schema-contributions/models/BlockListModel.js +0 -435
  523. package/dist/server/flow-schema-contributions/models/BlockMarkdownModel.d.ts +0 -10
  524. package/dist/server/flow-schema-contributions/models/BlockMarkdownModel.js +0 -108
  525. package/dist/server/flow-schema-contributions/models/BlockWorkbenchModel.d.ts +0 -10
  526. package/dist/server/flow-schema-contributions/models/BlockWorkbenchModel.js +0 -173
  527. package/dist/server/flow-schema-contributions/models/BulkDeleteActionModel.d.ts +0 -10
  528. package/dist/server/flow-schema-contributions/models/BulkDeleteActionModel.js +0 -47
  529. package/dist/server/flow-schema-contributions/models/ChildPageModel.d.ts +0 -10
  530. package/dist/server/flow-schema-contributions/models/ChildPageModel.js +0 -106
  531. package/dist/server/flow-schema-contributions/models/ChildPageTabModel.d.ts +0 -10
  532. package/dist/server/flow-schema-contributions/models/ChildPageTabModel.js +0 -114
  533. package/dist/server/flow-schema-contributions/models/CommentsModel.d.ts +0 -10
  534. package/dist/server/flow-schema-contributions/models/CommentsModel.js +0 -255
  535. package/dist/server/flow-schema-contributions/models/CreateFormModel.d.ts +0 -10
  536. package/dist/server/flow-schema-contributions/models/CreateFormModel.js +0 -54
  537. package/dist/server/flow-schema-contributions/models/DataVisualizationModel.d.ts +0 -10
  538. package/dist/server/flow-schema-contributions/models/DataVisualizationModel.js +0 -240
  539. package/dist/server/flow-schema-contributions/models/DeleteActionModel.d.ts +0 -10
  540. package/dist/server/flow-schema-contributions/models/DeleteActionModel.js +0 -47
  541. package/dist/server/flow-schema-contributions/models/DetailsBlockModel.d.ts +0 -10
  542. package/dist/server/flow-schema-contributions/models/DetailsBlockModel.js +0 -179
  543. package/dist/server/flow-schema-contributions/models/DetailsGridModel.d.ts +0 -10
  544. package/dist/server/flow-schema-contributions/models/DetailsGridModel.js +0 -82
  545. package/dist/server/flow-schema-contributions/models/DetailsItemModel.d.ts +0 -10
  546. package/dist/server/flow-schema-contributions/models/DetailsItemModel.js +0 -77
  547. package/dist/server/flow-schema-contributions/models/EditActionModel.d.ts +0 -10
  548. package/dist/server/flow-schema-contributions/models/EditActionModel.js +0 -93
  549. package/dist/server/flow-schema-contributions/models/EditFormModel.d.ts +0 -10
  550. package/dist/server/flow-schema-contributions/models/EditFormModel.js +0 -103
  551. package/dist/server/flow-schema-contributions/models/ExpandCollapseActionModel.d.ts +0 -10
  552. package/dist/server/flow-schema-contributions/models/ExpandCollapseActionModel.js +0 -47
  553. package/dist/server/flow-schema-contributions/models/FieldAttachmentUrlModel.d.ts +0 -10
  554. package/dist/server/flow-schema-contributions/models/FieldAttachmentUrlModel.js +0 -87
  555. package/dist/server/flow-schema-contributions/models/FieldCodeModel.d.ts +0 -10
  556. package/dist/server/flow-schema-contributions/models/FieldCodeModel.js +0 -99
  557. package/dist/server/flow-schema-contributions/models/FieldFormulaModel.d.ts +0 -10
  558. package/dist/server/flow-schema-contributions/models/FieldFormulaModel.js +0 -152
  559. package/dist/server/flow-schema-contributions/models/FieldMarkdownVditorModel.d.ts +0 -10
  560. package/dist/server/flow-schema-contributions/models/FieldMarkdownVditorModel.js +0 -92
  561. package/dist/server/flow-schema-contributions/models/FieldSequenceModel.d.ts +0 -10
  562. package/dist/server/flow-schema-contributions/models/FieldSequenceModel.js +0 -60
  563. package/dist/server/flow-schema-contributions/models/FieldSortModel.d.ts +0 -10
  564. package/dist/server/flow-schema-contributions/models/FieldSortModel.js +0 -87
  565. package/dist/server/flow-schema-contributions/models/FileManagerModel.d.ts +0 -10
  566. package/dist/server/flow-schema-contributions/models/FileManagerModel.js +0 -115
  567. package/dist/server/flow-schema-contributions/models/FilterActionModel.d.ts +0 -10
  568. package/dist/server/flow-schema-contributions/models/FilterActionModel.js +0 -57
  569. package/dist/server/flow-schema-contributions/models/FilterFormBlockModel.d.ts +0 -10
  570. package/dist/server/flow-schema-contributions/models/FilterFormBlockModel.js +0 -155
  571. package/dist/server/flow-schema-contributions/models/FilterFormCollapseActionModel.d.ts +0 -10
  572. package/dist/server/flow-schema-contributions/models/FilterFormCollapseActionModel.js +0 -85
  573. package/dist/server/flow-schema-contributions/models/FilterFormCustomFieldModel.d.ts +0 -10
  574. package/dist/server/flow-schema-contributions/models/FilterFormCustomFieldModel.js +0 -89
  575. package/dist/server/flow-schema-contributions/models/FilterFormGridModel.d.ts +0 -10
  576. package/dist/server/flow-schema-contributions/models/FilterFormGridModel.js +0 -82
  577. package/dist/server/flow-schema-contributions/models/FilterFormItemModel.d.ts +0 -10
  578. package/dist/server/flow-schema-contributions/models/FilterFormItemModel.js +0 -77
  579. package/dist/server/flow-schema-contributions/models/FilterFormJSActionModel.d.ts +0 -10
  580. package/dist/server/flow-schema-contributions/models/FilterFormJSActionModel.js +0 -108
  581. package/dist/server/flow-schema-contributions/models/FilterFormResetActionModel.d.ts +0 -10
  582. package/dist/server/flow-schema-contributions/models/FilterFormResetActionModel.js +0 -87
  583. package/dist/server/flow-schema-contributions/models/FilterFormSubmitActionModel.d.ts +0 -10
  584. package/dist/server/flow-schema-contributions/models/FilterFormSubmitActionModel.js +0 -87
  585. package/dist/server/flow-schema-contributions/models/FormAssociationItemModel.d.ts +0 -10
  586. package/dist/server/flow-schema-contributions/models/FormAssociationItemModel.js +0 -78
  587. package/dist/server/flow-schema-contributions/models/FormBlockModel.d.ts +0 -10
  588. package/dist/server/flow-schema-contributions/models/FormBlockModel.js +0 -45
  589. package/dist/server/flow-schema-contributions/models/FormGridModel.d.ts +0 -10
  590. package/dist/server/flow-schema-contributions/models/FormGridModel.js +0 -67
  591. package/dist/server/flow-schema-contributions/models/FormItemModel.d.ts +0 -10
  592. package/dist/server/flow-schema-contributions/models/FormItemModel.js +0 -77
  593. package/dist/server/flow-schema-contributions/models/FormSubmitActionModel.d.ts +0 -10
  594. package/dist/server/flow-schema-contributions/models/FormSubmitActionModel.js +0 -87
  595. package/dist/server/flow-schema-contributions/models/JSActionModel.d.ts +0 -10
  596. package/dist/server/flow-schema-contributions/models/JSActionModel.js +0 -65
  597. package/dist/server/flow-schema-contributions/models/JSBlockModel.d.ts +0 -10
  598. package/dist/server/flow-schema-contributions/models/JSBlockModel.js +0 -90
  599. package/dist/server/flow-schema-contributions/models/JSCollectionActionModel.d.ts +0 -10
  600. package/dist/server/flow-schema-contributions/models/JSCollectionActionModel.js +0 -47
  601. package/dist/server/flow-schema-contributions/models/JSColumnModel.d.ts +0 -10
  602. package/dist/server/flow-schema-contributions/models/JSColumnModel.js +0 -100
  603. package/dist/server/flow-schema-contributions/models/JSFormActionModel.d.ts +0 -10
  604. package/dist/server/flow-schema-contributions/models/JSFormActionModel.js +0 -47
  605. package/dist/server/flow-schema-contributions/models/JSItemModel.d.ts +0 -10
  606. package/dist/server/flow-schema-contributions/models/JSItemModel.js +0 -87
  607. package/dist/server/flow-schema-contributions/models/JSRecordActionModel.d.ts +0 -10
  608. package/dist/server/flow-schema-contributions/models/JSRecordActionModel.js +0 -47
  609. package/dist/server/flow-schema-contributions/models/LinkActionModel.d.ts +0 -10
  610. package/dist/server/flow-schema-contributions/models/LinkActionModel.js +0 -47
  611. package/dist/server/flow-schema-contributions/models/MapModel.d.ts +0 -10
  612. package/dist/server/flow-schema-contributions/models/MapModel.js +0 -427
  613. package/dist/server/flow-schema-contributions/models/PageModel.d.ts +0 -10
  614. package/dist/server/flow-schema-contributions/models/PageModel.js +0 -159
  615. package/dist/server/flow-schema-contributions/models/PageTabModel.d.ts +0 -10
  616. package/dist/server/flow-schema-contributions/models/PageTabModel.js +0 -69
  617. package/dist/server/flow-schema-contributions/models/PopupActionModel.d.ts +0 -10
  618. package/dist/server/flow-schema-contributions/models/PopupActionModel.js +0 -92
  619. package/dist/server/flow-schema-contributions/models/PopupCollectionActionModel.d.ts +0 -10
  620. package/dist/server/flow-schema-contributions/models/PopupCollectionActionModel.js +0 -119
  621. package/dist/server/flow-schema-contributions/models/RefreshActionModel.d.ts +0 -10
  622. package/dist/server/flow-schema-contributions/models/RefreshActionModel.js +0 -47
  623. package/dist/server/flow-schema-contributions/models/RootPageModel.d.ts +0 -10
  624. package/dist/server/flow-schema-contributions/models/RootPageModel.js +0 -124
  625. package/dist/server/flow-schema-contributions/models/RootPageTabModel.d.ts +0 -10
  626. package/dist/server/flow-schema-contributions/models/RootPageTabModel.js +0 -69
  627. package/dist/server/flow-schema-contributions/models/RouteModel.d.ts +0 -10
  628. package/dist/server/flow-schema-contributions/models/RouteModel.js +0 -121
  629. package/dist/server/flow-schema-contributions/models/TableActionsColumnModel.d.ts +0 -10
  630. package/dist/server/flow-schema-contributions/models/TableActionsColumnModel.js +0 -93
  631. package/dist/server/flow-schema-contributions/models/TableBlockModel.d.ts +0 -10
  632. package/dist/server/flow-schema-contributions/models/TableBlockModel.js +0 -254
  633. package/dist/server/flow-schema-contributions/models/TableColumnModel.d.ts +0 -10
  634. package/dist/server/flow-schema-contributions/models/TableColumnModel.js +0 -77
  635. package/dist/server/flow-schema-contributions/models/TableCustomColumnModel.d.ts +0 -10
  636. package/dist/server/flow-schema-contributions/models/TableCustomColumnModel.js +0 -66
  637. package/dist/server/flow-schema-contributions/models/UiTemplatesModel.d.ts +0 -10
  638. package/dist/server/flow-schema-contributions/models/UiTemplatesModel.js +0 -130
  639. package/dist/server/flow-schema-contributions/models/UpdateRecordActionModel.d.ts +0 -10
  640. package/dist/server/flow-schema-contributions/models/UpdateRecordActionModel.js +0 -173
  641. package/dist/server/flow-schema-contributions/models/ViewActionModel.d.ts +0 -10
  642. package/dist/server/flow-schema-contributions/models/ViewActionModel.js +0 -123
  643. package/dist/server/flow-schema-contributions/models/index.d.ts +0 -71
  644. package/dist/server/flow-schema-contributions/models/index.js +0 -371
  645. package/dist/server/flow-schema-contributions/shared.d.ts +0 -501
  646. package/dist/server/flow-schema-contributions/shared.js +0 -1649
  647. package/dist/server/flow-schema-registry/FlowSchemaRegistry.d.ts +0 -154
  648. package/dist/server/flow-schema-registry/FlowSchemaRegistry.js +0 -1424
  649. package/dist/server/flow-schema-registry/flow-schema-registry/fieldBinding.d.ts +0 -32
  650. package/dist/server/flow-schema-registry/flow-schema-registry/fieldBinding.js +0 -159
  651. package/dist/server/flow-schema-registry/flow-schema-registry/modelPatches.d.ts +0 -16
  652. package/dist/server/flow-schema-registry/flow-schema-registry/modelPatches.js +0 -226
  653. package/dist/server/flow-schema-registry/flow-schema-registry/schemaInference.d.ts +0 -17
  654. package/dist/server/flow-schema-registry/flow-schema-registry/schemaInference.js +0 -204
  655. package/dist/server/flow-schema-registry/flow-schema-registry/utils.d.ts +0 -25
  656. package/dist/server/flow-schema-registry/flow-schema-registry/utils.js +0 -278
  657. package/dist/server/flow-schema-registry/index.js +0 -32
  658. package/dist/server/flow-schema-registry/types.d.ts +0 -244
  659. package/dist/server/flow-schema-service.d.ts +0 -87
  660. package/dist/server/flow-schema-service.js +0 -963
  661. /package/dist/server/{flow-schema-registry → flow-surfaces}/types.js +0 -0
@@ -0,0 +1,2766 @@
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 catalog_exports = {};
28
+ __export(catalog_exports, {
29
+ ACTION_CATALOG_BY_KEY: () => ACTION_CATALOG_BY_KEY,
30
+ ACTION_CATALOG_BY_USE: () => ACTION_CATALOG_BY_USE,
31
+ ACTION_KEY_BY_USE: () => ACTION_KEY_BY_USE,
32
+ ACTION_PUBLIC_KEYS: () => ACTION_PUBLIC_KEYS,
33
+ BLOCK_CATALOG_BY_KEY: () => BLOCK_CATALOG_BY_KEY,
34
+ BLOCK_CATALOG_BY_USE: () => BLOCK_CATALOG_BY_USE,
35
+ BLOCK_KEY_BY_USE: () => BLOCK_KEY_BY_USE,
36
+ READONLY_NODE_CONTRACT: () => READONLY_NODE_CONTRACT,
37
+ SERVICE_SUPPORTED_FLOW_SURFACE_BLOCK_KEYS: () => SERVICE_SUPPORTED_FLOW_SURFACE_BLOCK_KEYS,
38
+ actionCatalog: () => actionCatalog,
39
+ blockCatalog: () => blockCatalog,
40
+ filterAvailableCatalogItems: () => filterAvailableCatalogItems,
41
+ getAvailableActionCatalogItems: () => getAvailableActionCatalogItems,
42
+ getEditableDomainsForUse: () => getEditableDomainsForUse,
43
+ getLayoutCapabilitiesForUse: () => getLayoutCapabilitiesForUse,
44
+ getNodeContract: () => getNodeContract,
45
+ getSettingsSchemaForUse: () => getSettingsSchemaForUse,
46
+ isCatalogItemAvailable: () => isCatalogItemAvailable,
47
+ resolveSupportedActionCatalogItem: () => resolveSupportedActionCatalogItem,
48
+ resolveSupportedBlockCatalogItem: () => resolveSupportedBlockCatalogItem,
49
+ resolveSupportedFieldCapability: () => resolveSupportedFieldCapability
50
+ });
51
+ module.exports = __toCommonJS(catalog_exports);
52
+ var import_action_scope = require("./action-scope");
53
+ var import_errors = require("./errors");
54
+ var import_field_semantics = require("./field-semantics");
55
+ var import_support_matrix = require("./support-matrix");
56
+ const ANY_VALUE_SCHEMA = {};
57
+ const STRING_SCHEMA = { type: "string" };
58
+ const NULLABLE_STRING_SCHEMA = { type: "string", nullable: true };
59
+ const BOOLEAN_SCHEMA = { type: "boolean" };
60
+ const OPEN_VIEW_MODE_SCHEMA = { type: "string", enum: ["drawer", "dialog", "embed"] };
61
+ const OPEN_VIEW_SCENE_SCHEMA = {
62
+ type: "string",
63
+ enum: ["new", "one", "many", "select", "subForm", "bulkEditForm", "generic"]
64
+ };
65
+ const OBJECT_SCHEMA = { type: "object" };
66
+ const NUMBER_SCHEMA = { type: "number" };
67
+ const ARRAY_SCHEMA = { type: "array" };
68
+ const FILTER_CONDITION_SCHEMA = {
69
+ type: "object",
70
+ properties: {
71
+ path: STRING_SCHEMA,
72
+ operator: STRING_SCHEMA,
73
+ value: ANY_VALUE_SCHEMA
74
+ },
75
+ required: ["path", "operator"],
76
+ additionalProperties: true
77
+ };
78
+ const FILTER_GROUP_SCHEMA = {
79
+ type: "object",
80
+ properties: {
81
+ logic: {
82
+ type: "string",
83
+ enum: ["$and", "$or"]
84
+ },
85
+ items: {
86
+ type: "array",
87
+ items: {
88
+ oneOf: [FILTER_CONDITION_SCHEMA, ANY_VALUE_SCHEMA]
89
+ }
90
+ }
91
+ },
92
+ required: ["logic", "items"],
93
+ additionalProperties: false,
94
+ "x-flowSurfaceFormat": "filter-group"
95
+ };
96
+ const DEFAULT_DIRECT_EVENTS = ["beforeRender"];
97
+ const ACTION_DIRECT_EVENTS = ["click", "beforeRender"];
98
+ const ACTION_OBJECT_EVENTS = ["click"];
99
+ const GRID_LAYOUT_CAPABILITIES = { supported: true };
100
+ const RUN_JS_ALLOWED_PATHS = ["runJs.code", "runJs.version"];
101
+ const OPEN_VIEW_ALLOWED_PATHS = [
102
+ "openView.mode",
103
+ "openView.size",
104
+ "openView.pageModelClass",
105
+ "openView.scene",
106
+ "openView.dataSourceKey",
107
+ "openView.collectionName",
108
+ "openView.associationName",
109
+ "openView.sourceId",
110
+ "openView.filterByTk",
111
+ "openView.title",
112
+ "openView.uid",
113
+ "openView.subModelKey",
114
+ "openView.navigation"
115
+ ];
116
+ const OPEN_VIEW_PATH_SCHEMAS = {
117
+ "openView.mode": OPEN_VIEW_MODE_SCHEMA,
118
+ "openView.size": STRING_SCHEMA,
119
+ "openView.pageModelClass": STRING_SCHEMA,
120
+ "openView.scene": OPEN_VIEW_SCENE_SCHEMA,
121
+ "openView.dataSourceKey": STRING_SCHEMA,
122
+ "openView.collectionName": STRING_SCHEMA,
123
+ "openView.associationName": NULLABLE_STRING_SCHEMA,
124
+ "openView.sourceId": STRING_SCHEMA,
125
+ "openView.filterByTk": STRING_SCHEMA,
126
+ "openView.title": STRING_SCHEMA,
127
+ "openView.uid": STRING_SCHEMA,
128
+ "openView.subModelKey": STRING_SCHEMA,
129
+ "openView.navigation": BOOLEAN_SCHEMA
130
+ };
131
+ const CONFIRM_ALLOWED_PATHS = ["confirm.enable", "confirm.title", "confirm.content"];
132
+ const TABLE_COLUMN_ALLOWED_PATHS = ["title.title"];
133
+ const FILTER_FORM_ITEM_ALLOWED_PATHS = [
134
+ "init.defaultTargetUid",
135
+ "init.filterField.name",
136
+ "init.filterField.title",
137
+ "init.filterField.interface",
138
+ "init.filterField.type",
139
+ "initialValue.defaultValue"
140
+ ];
141
+ const ACTION_PROP_KEYS = ["title", "tooltip", "icon", "type", "htmlType", "position", "danger", "color"];
142
+ const ACTION_BUTTON_SETTINGS_GROUP = {
143
+ allowedPaths: [
144
+ "general.title",
145
+ "general.tooltip",
146
+ "general.icon",
147
+ "general.type",
148
+ "general.danger",
149
+ "general.color",
150
+ "linkageRules"
151
+ ],
152
+ mergeStrategy: "deep",
153
+ eventBindingSteps: ["general", "linkageRules"],
154
+ pathSchemas: {
155
+ "general.title": STRING_SCHEMA,
156
+ "general.tooltip": STRING_SCHEMA,
157
+ "general.icon": NULLABLE_STRING_SCHEMA,
158
+ "general.type": STRING_SCHEMA,
159
+ "general.danger": BOOLEAN_SCHEMA,
160
+ "general.color": STRING_SCHEMA,
161
+ linkageRules: ARRAY_SCHEMA
162
+ }
163
+ };
164
+ const RUN_JS_SETTINGS_GROUP = {
165
+ allowedPaths: RUN_JS_ALLOWED_PATHS,
166
+ mergeStrategy: "deep",
167
+ eventBindingSteps: ["runJs"],
168
+ pathSchemas: {
169
+ "runJs.code": STRING_SCHEMA,
170
+ "runJs.version": STRING_SCHEMA
171
+ }
172
+ };
173
+ const FIELD_SETTINGS_INIT_GROUP = {
174
+ allowedPaths: [
175
+ "init.dataSourceKey",
176
+ "init.collectionName",
177
+ "init.associationName",
178
+ "init.associationPathName",
179
+ "init.sourceId",
180
+ "init.filterByTk",
181
+ "init.fieldPath"
182
+ ],
183
+ mergeStrategy: "deep",
184
+ pathSchemas: {
185
+ "init.dataSourceKey": STRING_SCHEMA,
186
+ "init.collectionName": STRING_SCHEMA,
187
+ "init.associationName": STRING_SCHEMA,
188
+ "init.associationPathName": STRING_SCHEMA,
189
+ "init.fieldPath": STRING_SCHEMA
190
+ }
191
+ };
192
+ const RESOURCE_SETTINGS_GROUP = {
193
+ allowedPaths: [
194
+ "init.dataSourceKey",
195
+ "init.collectionName",
196
+ "init.associationName",
197
+ "init.associationPathName",
198
+ "init.sourceId",
199
+ "init.filterByTk"
200
+ ],
201
+ eventBindingSteps: [],
202
+ pathSchemas: {
203
+ "init.dataSourceKey": STRING_SCHEMA,
204
+ "init.collectionName": STRING_SCHEMA,
205
+ "init.associationName": STRING_SCHEMA,
206
+ "init.associationPathName": STRING_SCHEMA
207
+ }
208
+ };
209
+ const FORM_LAYOUT_ALLOWED_PATHS = [
210
+ "layout.layout",
211
+ "layout.labelAlign",
212
+ "layout.labelWidth",
213
+ "layout.labelWrap",
214
+ "layout.colon"
215
+ ];
216
+ const FORM_LAYOUT_PATH_SCHEMAS = {
217
+ "layout.layout": STRING_SCHEMA,
218
+ "layout.labelAlign": STRING_SCHEMA,
219
+ "layout.labelWidth": NUMBER_SCHEMA,
220
+ "layout.labelWrap": BOOLEAN_SCHEMA,
221
+ "layout.colon": BOOLEAN_SCHEMA
222
+ };
223
+ const FORM_MODEL_SETTINGS_GROUP = {
224
+ allowedPaths: [...FORM_LAYOUT_ALLOWED_PATHS, "assignRules.value"],
225
+ eventBindingSteps: ["layout", "assignRules"],
226
+ pathSchemas: {
227
+ ...FORM_LAYOUT_PATH_SCHEMAS,
228
+ "assignRules.value": ARRAY_SCHEMA
229
+ }
230
+ };
231
+ const EVENT_SETTINGS_GROUP = {
232
+ allowedPaths: ["linkageRules.value"],
233
+ eventBindingSteps: ["linkageRules"],
234
+ pathSchemas: {
235
+ "linkageRules.value": ARRAY_SCHEMA
236
+ }
237
+ };
238
+ const CREATE_FORM_SETTINGS_EVENT_ONLY_GROUP = {
239
+ allowedPaths: [],
240
+ eventBindingSteps: ["init", "refresh"]
241
+ };
242
+ const EDIT_FORM_SETTINGS_GROUP = {
243
+ allowedPaths: ["dataScope.filter"],
244
+ eventBindingSteps: ["init", "dataScope", "refresh"],
245
+ pathSchemas: {
246
+ "dataScope.filter": FILTER_GROUP_SCHEMA
247
+ }
248
+ };
249
+ const DETAILS_SETTINGS_GROUP = {
250
+ allowedPaths: [...FORM_LAYOUT_ALLOWED_PATHS, "dataScope.filter", "defaultSorting.sort", "linkageRules.value"],
251
+ eventBindingSteps: ["layout", "dataScope", "defaultSorting", "linkageRules"],
252
+ pathSchemas: {
253
+ ...FORM_LAYOUT_PATH_SCHEMAS,
254
+ "dataScope.filter": FILTER_GROUP_SCHEMA,
255
+ "defaultSorting.sort": ARRAY_SCHEMA,
256
+ "linkageRules.value": ARRAY_SCHEMA
257
+ }
258
+ };
259
+ const FILTER_FORM_BLOCK_SETTINGS_GROUP = {
260
+ allowedPaths: [...FORM_LAYOUT_ALLOWED_PATHS, "defaultValues.value"],
261
+ eventBindingSteps: ["layout", "defaultValues"],
262
+ pathSchemas: {
263
+ ...FORM_LAYOUT_PATH_SCHEMAS,
264
+ "defaultValues.value": ARRAY_SCHEMA
265
+ }
266
+ };
267
+ const TABLE_SETTINGS_GROUP = {
268
+ allowedPaths: [
269
+ "quickEdit.editable",
270
+ "showRowNumbers.showIndex",
271
+ "pageSize.pageSize",
272
+ "dataScope.filter",
273
+ "defaultSorting.sort",
274
+ "treeTable.treeTable",
275
+ "defaultExpandAllRows.defaultExpandAllRows",
276
+ "tableDensity.size",
277
+ "dragSort.dragSort",
278
+ "dragSortBy.dragSortBy"
279
+ ],
280
+ eventBindingSteps: [
281
+ "quickEdit",
282
+ "showRowNumbers",
283
+ "pageSize",
284
+ "dataScope",
285
+ "defaultSorting",
286
+ "treeTable",
287
+ "defaultExpandAllRows",
288
+ "tableDensity",
289
+ "dragSort",
290
+ "dragSortBy"
291
+ ],
292
+ pathSchemas: {
293
+ "quickEdit.editable": BOOLEAN_SCHEMA,
294
+ "showRowNumbers.showIndex": BOOLEAN_SCHEMA,
295
+ "pageSize.pageSize": NUMBER_SCHEMA,
296
+ "dataScope.filter": FILTER_GROUP_SCHEMA,
297
+ "defaultSorting.sort": ARRAY_SCHEMA,
298
+ "treeTable.treeTable": BOOLEAN_SCHEMA,
299
+ "defaultExpandAllRows.defaultExpandAllRows": BOOLEAN_SCHEMA,
300
+ "tableDensity.size": STRING_SCHEMA,
301
+ "dragSort.dragSort": BOOLEAN_SCHEMA,
302
+ "dragSortBy.dragSortBy": STRING_SCHEMA
303
+ }
304
+ };
305
+ const CORE_FLOW_SURFACE_OWNER_PLUGIN = "@nocobase/core/client";
306
+ const FLOW_SURFACE_BLOCK_OWNER_PLUGIN_BY_USE = new Map(
307
+ import_support_matrix.FLOW_SURFACE_BLOCK_SUPPORT_MATRIX.map((entry) => [entry.modelUse, entry.ownerPlugin])
308
+ );
309
+ const JS_EDITABLE_FIELD_USE_SET = /* @__PURE__ */ new Set(["JSEditableFieldModel"]);
310
+ const JS_DISPLAY_FIELD_USE_SET = /* @__PURE__ */ new Set(["JSFieldModel"]);
311
+ const EDITABLE_FIELD_USE_SET = /* @__PURE__ */ new Set([
312
+ ...JS_EDITABLE_FIELD_USE_SET,
313
+ "RecordSelectFieldModel",
314
+ "JsonFieldModel",
315
+ "TextareaFieldModel",
316
+ "IconFieldModel",
317
+ "SelectFieldModel",
318
+ "ColorFieldModel",
319
+ "CheckboxFieldModel",
320
+ "PasswordFieldModel",
321
+ "NumberFieldModel",
322
+ "PercentFieldModel",
323
+ "DateTimeNoTzFieldModel",
324
+ "DateOnlyFieldModel",
325
+ "DateTimeTzFieldModel",
326
+ "TimeFieldModel",
327
+ "CollectionSelectorFieldModel",
328
+ "RichTextFieldModel",
329
+ "InputFieldModel"
330
+ ]);
331
+ const DISPLAY_FIELD_USE_SET = /* @__PURE__ */ new Set([
332
+ ...JS_DISPLAY_FIELD_USE_SET,
333
+ "DisplaySubItemFieldModel",
334
+ "DisplaySubTableFieldModel",
335
+ "DisplayHtmlFieldModel",
336
+ "DisplayNumberFieldModel",
337
+ "DisplayJSONFieldModel",
338
+ "DisplayEnumFieldModel",
339
+ "DisplayIconFieldModel",
340
+ "DisplayCheckboxFieldModel",
341
+ "DisplayPasswordFieldModel",
342
+ "DisplayPercentFieldModel",
343
+ "DisplayDateTimeFieldModel",
344
+ "DisplayTextFieldModel",
345
+ "DisplayURLFieldModel",
346
+ "DisplayColorFieldModel",
347
+ "DisplayTimeFieldModel"
348
+ ]);
349
+ const FILTER_FIELD_USE_SET = /* @__PURE__ */ new Set([
350
+ "FilterFormRecordSelectFieldModel",
351
+ "DateOnlyFilterFieldModel",
352
+ "DateTimeNoTzFilterFieldModel",
353
+ "DateTimeTzFilterFieldModel",
354
+ "SelectFieldModel",
355
+ "NumberFieldModel",
356
+ "TimeFieldModel",
357
+ "PercentFieldModel",
358
+ "InputFieldModel"
359
+ ]);
360
+ const KNOWN_FIELD_NODE_USES = /* @__PURE__ */ new Set([
361
+ ...EDITABLE_FIELD_USE_SET,
362
+ ...DISPLAY_FIELD_USE_SET,
363
+ ...FILTER_FIELD_USE_SET
364
+ ]);
365
+ function keyedDomain(allowedKeys, mergeStrategy = "deep") {
366
+ return {
367
+ allowedKeys,
368
+ mergeStrategy,
369
+ schema: {
370
+ type: "object",
371
+ properties: Object.fromEntries(allowedKeys.map((key) => [key, ANY_VALUE_SCHEMA])),
372
+ additionalProperties: false
373
+ }
374
+ };
375
+ }
376
+ function wildcardDomain(mergeStrategy = "deep") {
377
+ return {
378
+ allowedKeys: ["*"],
379
+ wildcard: true,
380
+ mergeStrategy,
381
+ schema: {
382
+ type: "object",
383
+ additionalProperties: true
384
+ }
385
+ };
386
+ }
387
+ function pathListToSchema(paths, pathSchemas) {
388
+ const root = {
389
+ type: "object",
390
+ properties: {},
391
+ additionalProperties: false
392
+ };
393
+ for (const path of paths) {
394
+ if (path === "*") {
395
+ root.additionalProperties = true;
396
+ continue;
397
+ }
398
+ const segments = path.split(".").filter(Boolean);
399
+ let cursor = root;
400
+ for (let index = 0; index < segments.length; index += 1) {
401
+ const segment = segments[index];
402
+ if (segment === "*") {
403
+ cursor.additionalProperties = true;
404
+ break;
405
+ }
406
+ cursor.properties ||= {};
407
+ if (index === segments.length - 1) {
408
+ const fullPath = segments.slice(0, index + 1).join(".");
409
+ cursor.properties[segment] = (pathSchemas == null ? void 0 : pathSchemas[fullPath]) || ANY_VALUE_SCHEMA;
410
+ continue;
411
+ }
412
+ cursor.properties[segment] ||= {
413
+ type: "object",
414
+ properties: {},
415
+ additionalProperties: false
416
+ };
417
+ cursor = cursor.properties[segment];
418
+ }
419
+ }
420
+ return root;
421
+ }
422
+ function groupedDomain(groups, mergeStrategy = "deep") {
423
+ const normalizedGroups = Object.fromEntries(
424
+ Object.entries(groups).map(([key, definition]) => [
425
+ key,
426
+ {
427
+ allowedPaths: definition.allowedPaths,
428
+ clearable: definition.clearable,
429
+ mergeStrategy: definition.mergeStrategy || mergeStrategy,
430
+ schema: definition.schema || pathListToSchema(definition.allowedPaths, definition.pathSchemas),
431
+ eventBindingSteps: definition.eventBindingSteps,
432
+ pathSchemas: definition.pathSchemas
433
+ }
434
+ ])
435
+ );
436
+ return {
437
+ allowedKeys: Object.keys(normalizedGroups),
438
+ mergeStrategy,
439
+ groups: normalizedGroups,
440
+ schema: {
441
+ type: "object",
442
+ properties: Object.fromEntries(
443
+ Object.entries(normalizedGroups).map(([key, definition]) => [key, definition.schema])
444
+ ),
445
+ additionalProperties: false
446
+ }
447
+ };
448
+ }
449
+ function buildSettingsSchema(contract) {
450
+ return Object.fromEntries(
451
+ Object.entries(contract.domains).map(([domain, definition]) => [
452
+ domain,
453
+ {
454
+ ...definition == null ? void 0 : definition.schema,
455
+ "x-allowedKeys": (definition == null ? void 0 : definition.allowedKeys) || [],
456
+ "x-wildcard": !!(definition == null ? void 0 : definition.wildcard),
457
+ "x-mergeStrategy": (definition == null ? void 0 : definition.mergeStrategy) || "deep",
458
+ "x-groups": (definition == null ? void 0 : definition.groups) ? Object.fromEntries(
459
+ Object.entries(definition.groups).map(([groupKey, group]) => [
460
+ groupKey,
461
+ {
462
+ allowedPaths: group.allowedPaths,
463
+ clearable: !!group.clearable,
464
+ mergeStrategy: group.mergeStrategy,
465
+ eventBindingSteps: group.eventBindingSteps,
466
+ pathSchemas: group.pathSchemas
467
+ }
468
+ ])
469
+ ) : void 0
470
+ }
471
+ ])
472
+ );
473
+ }
474
+ function createContract(options) {
475
+ const editableDomains = options.editableDomains || [];
476
+ const domains = {};
477
+ if (editableDomains.includes("props")) {
478
+ domains.props = keyedDomain(options.props || []);
479
+ }
480
+ if (editableDomains.includes("decoratorProps")) {
481
+ domains.decoratorProps = keyedDomain(options.decoratorProps || []);
482
+ }
483
+ if (editableDomains.includes("stepParams")) {
484
+ domains.stepParams = keyedDomain(options.stepParams || []);
485
+ }
486
+ if (editableDomains.includes("flowRegistry")) {
487
+ domains.flowRegistry = wildcardDomain();
488
+ }
489
+ return {
490
+ editableDomains,
491
+ domains,
492
+ eventCapabilities: options.eventCapabilities,
493
+ layoutCapabilities: options.layoutCapabilities,
494
+ eventBindings: options.eventBindings
495
+ };
496
+ }
497
+ const READONLY_NODE_CONTRACT = {
498
+ editableDomains: [],
499
+ domains: {}
500
+ };
501
+ const GRID_NODE_CONTRACT = createContract({
502
+ editableDomains: ["props", "flowRegistry"],
503
+ props: ["rows", "sizes", "rowOrder"],
504
+ flowRegistry: true,
505
+ layoutCapabilities: GRID_LAYOUT_CAPABILITIES,
506
+ eventCapabilities: {
507
+ direct: DEFAULT_DIRECT_EVENTS
508
+ }
509
+ });
510
+ GRID_NODE_CONTRACT.domains.props = keyedDomain(["rows", "sizes", "rowOrder"], "replace");
511
+ const PAGE_NODE_CONTRACT = createContract({
512
+ editableDomains: ["props", "stepParams", "flowRegistry"],
513
+ props: ["title", "displayTitle", "enableTabs", "icon", "enableHeader"],
514
+ stepParams: ["pageSettings"],
515
+ flowRegistry: true,
516
+ eventCapabilities: {
517
+ direct: DEFAULT_DIRECT_EVENTS
518
+ },
519
+ eventBindings: {
520
+ pageSettings: {
521
+ stepKeys: ["general"]
522
+ }
523
+ }
524
+ });
525
+ PAGE_NODE_CONTRACT.domains.stepParams = groupedDomain({
526
+ pageSettings: {
527
+ allowedPaths: [
528
+ "general.title",
529
+ "general.documentTitle",
530
+ "general.displayTitle",
531
+ "general.enableTabs",
532
+ "general.icon",
533
+ "general.enableHeader"
534
+ ],
535
+ mergeStrategy: "deep",
536
+ eventBindingSteps: ["general"],
537
+ pathSchemas: {
538
+ "general.title": STRING_SCHEMA,
539
+ "general.documentTitle": STRING_SCHEMA,
540
+ "general.displayTitle": BOOLEAN_SCHEMA,
541
+ "general.enableTabs": BOOLEAN_SCHEMA,
542
+ "general.icon": STRING_SCHEMA,
543
+ "general.enableHeader": BOOLEAN_SCHEMA
544
+ }
545
+ }
546
+ });
547
+ const TAB_NODE_CONTRACT = createContract({
548
+ editableDomains: ["props", "stepParams", "flowRegistry"],
549
+ props: ["title", "icon"],
550
+ stepParams: ["pageTabSettings"],
551
+ flowRegistry: true,
552
+ eventCapabilities: {
553
+ direct: DEFAULT_DIRECT_EVENTS
554
+ },
555
+ eventBindings: {
556
+ pageTabSettings: {
557
+ stepKeys: ["tab"]
558
+ }
559
+ }
560
+ });
561
+ TAB_NODE_CONTRACT.domains.stepParams = groupedDomain({
562
+ pageTabSettings: {
563
+ allowedPaths: ["tab.title", "tab.icon", "tab.documentTitle"],
564
+ mergeStrategy: "deep",
565
+ eventBindingSteps: ["tab"],
566
+ pathSchemas: {
567
+ "tab.title": STRING_SCHEMA,
568
+ "tab.icon": STRING_SCHEMA,
569
+ "tab.documentTitle": STRING_SCHEMA
570
+ }
571
+ }
572
+ });
573
+ const TABLE_BLOCK_CONTRACT = createContract({
574
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
575
+ props: ["title", "displayTitle", "height", "heightMode"],
576
+ decoratorProps: ["height", "heightMode"],
577
+ stepParams: ["resourceSettings", "tableSettings"],
578
+ flowRegistry: true,
579
+ eventCapabilities: {
580
+ direct: ["beforeRender", "paginationChange"],
581
+ object: ["click"]
582
+ }
583
+ });
584
+ TABLE_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
585
+ resourceSettings: RESOURCE_SETTINGS_GROUP,
586
+ tableSettings: TABLE_SETTINGS_GROUP
587
+ });
588
+ const FORM_BLOCK_CONTRACT = createContract({
589
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
590
+ props: ["title", "displayTitle", "labelWidth", "labelWrap"],
591
+ decoratorProps: ["labelWidth", "labelWrap"],
592
+ stepParams: ["resourceSettings", "formModelSettings", "eventSettings"],
593
+ flowRegistry: true,
594
+ eventCapabilities: {
595
+ direct: DEFAULT_DIRECT_EVENTS,
596
+ object: ["submit"]
597
+ }
598
+ });
599
+ FORM_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
600
+ resourceSettings: RESOURCE_SETTINGS_GROUP,
601
+ formModelSettings: FORM_MODEL_SETTINGS_GROUP,
602
+ eventSettings: EVENT_SETTINGS_GROUP
603
+ });
604
+ const CREATE_FORM_BLOCK_CONTRACT = createContract({
605
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
606
+ props: ["title", "displayTitle", "labelWidth", "labelWrap"],
607
+ decoratorProps: ["labelWidth", "labelWrap"],
608
+ stepParams: ["resourceSettings", "formModelSettings", "eventSettings", "formSettings"],
609
+ flowRegistry: true,
610
+ eventCapabilities: {
611
+ direct: DEFAULT_DIRECT_EVENTS,
612
+ object: ["submit"]
613
+ }
614
+ });
615
+ CREATE_FORM_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
616
+ resourceSettings: RESOURCE_SETTINGS_GROUP,
617
+ formModelSettings: FORM_MODEL_SETTINGS_GROUP,
618
+ eventSettings: EVENT_SETTINGS_GROUP,
619
+ formSettings: CREATE_FORM_SETTINGS_EVENT_ONLY_GROUP
620
+ });
621
+ const EDIT_FORM_BLOCK_CONTRACT = createContract({
622
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
623
+ props: ["title", "displayTitle", "labelWidth", "labelWrap"],
624
+ decoratorProps: ["labelWidth", "labelWrap"],
625
+ stepParams: ["resourceSettings", "formModelSettings", "eventSettings", "formSettings"],
626
+ flowRegistry: true,
627
+ eventCapabilities: {
628
+ direct: DEFAULT_DIRECT_EVENTS,
629
+ object: ["submit"]
630
+ }
631
+ });
632
+ EDIT_FORM_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
633
+ resourceSettings: RESOURCE_SETTINGS_GROUP,
634
+ formModelSettings: FORM_MODEL_SETTINGS_GROUP,
635
+ eventSettings: EVENT_SETTINGS_GROUP,
636
+ formSettings: EDIT_FORM_SETTINGS_GROUP
637
+ });
638
+ const DETAILS_BLOCK_CONTRACT = createContract({
639
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
640
+ props: ["title", "displayTitle", "labelWidth", "labelWrap"],
641
+ decoratorProps: ["labelWidth", "labelWrap"],
642
+ stepParams: ["resourceSettings", "detailsSettings"],
643
+ flowRegistry: true,
644
+ eventCapabilities: {
645
+ direct: DEFAULT_DIRECT_EVENTS,
646
+ object: ["click"]
647
+ }
648
+ });
649
+ DETAILS_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
650
+ resourceSettings: RESOURCE_SETTINGS_GROUP,
651
+ detailsSettings: DETAILS_SETTINGS_GROUP
652
+ });
653
+ const FILTER_FORM_BLOCK_CONTRACT = createContract({
654
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
655
+ props: ["title", "displayTitle", "labelWidth", "labelWrap"],
656
+ decoratorProps: ["labelWidth", "labelWrap"],
657
+ stepParams: ["resourceSettings", "formFilterBlockModelSettings"],
658
+ flowRegistry: true,
659
+ eventCapabilities: {
660
+ direct: DEFAULT_DIRECT_EVENTS,
661
+ object: ["submit"]
662
+ }
663
+ });
664
+ FILTER_FORM_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
665
+ resourceSettings: RESOURCE_SETTINGS_GROUP,
666
+ formFilterBlockModelSettings: FILTER_FORM_BLOCK_SETTINGS_GROUP
667
+ });
668
+ const LIST_BLOCK_CONTRACT = createContract({
669
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
670
+ props: ["title", "displayTitle"],
671
+ decoratorProps: ["height", "heightMode"],
672
+ stepParams: ["resourceSettings", "listSettings"],
673
+ flowRegistry: true,
674
+ eventCapabilities: {
675
+ direct: DEFAULT_DIRECT_EVENTS,
676
+ object: ["click"]
677
+ }
678
+ });
679
+ LIST_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
680
+ resourceSettings: {
681
+ allowedPaths: [
682
+ "init.dataSourceKey",
683
+ "init.collectionName",
684
+ "init.associationName",
685
+ "init.associationPathName",
686
+ "init.sourceId",
687
+ "init.filterByTk"
688
+ ],
689
+ eventBindingSteps: [],
690
+ pathSchemas: {
691
+ "init.dataSourceKey": STRING_SCHEMA,
692
+ "init.collectionName": STRING_SCHEMA,
693
+ "init.associationName": STRING_SCHEMA,
694
+ "init.associationPathName": STRING_SCHEMA
695
+ }
696
+ },
697
+ listSettings: {
698
+ allowedPaths: ["pageSize.pageSize", "dataScope.filter", "defaultSorting.*", "layout.*", "refreshData.*"],
699
+ eventBindingSteps: [],
700
+ pathSchemas: {
701
+ "pageSize.pageSize": NUMBER_SCHEMA,
702
+ "dataScope.filter": FILTER_GROUP_SCHEMA,
703
+ "layout.layout": STRING_SCHEMA
704
+ }
705
+ }
706
+ });
707
+ const GRID_CARD_BLOCK_CONTRACT = createContract({
708
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
709
+ props: ["title", "displayTitle"],
710
+ decoratorProps: ["height", "heightMode"],
711
+ stepParams: ["resourceSettings", "GridCardSettings"],
712
+ flowRegistry: true,
713
+ eventCapabilities: {
714
+ direct: DEFAULT_DIRECT_EVENTS,
715
+ object: ["click"]
716
+ }
717
+ });
718
+ GRID_CARD_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
719
+ resourceSettings: {
720
+ allowedPaths: [
721
+ "init.dataSourceKey",
722
+ "init.collectionName",
723
+ "init.associationName",
724
+ "init.associationPathName",
725
+ "init.sourceId",
726
+ "init.filterByTk"
727
+ ],
728
+ eventBindingSteps: [],
729
+ pathSchemas: {
730
+ "init.dataSourceKey": STRING_SCHEMA,
731
+ "init.collectionName": STRING_SCHEMA,
732
+ "init.associationName": STRING_SCHEMA,
733
+ "init.associationPathName": STRING_SCHEMA
734
+ }
735
+ },
736
+ GridCardSettings: {
737
+ allowedPaths: [
738
+ "columnCount.columnCount.xs",
739
+ "columnCount.columnCount.sm",
740
+ "columnCount.columnCount.md",
741
+ "columnCount.columnCount.lg",
742
+ "columnCount.columnCount.xl",
743
+ "columnCount.columnCount.xxl",
744
+ "rowCount.rowCount",
745
+ "dataScope.filter",
746
+ "defaultSorting.*",
747
+ "layout.*"
748
+ ],
749
+ eventBindingSteps: [],
750
+ pathSchemas: {
751
+ "columnCount.columnCount.xs": NUMBER_SCHEMA,
752
+ "columnCount.columnCount.sm": NUMBER_SCHEMA,
753
+ "columnCount.columnCount.md": NUMBER_SCHEMA,
754
+ "columnCount.columnCount.lg": NUMBER_SCHEMA,
755
+ "columnCount.columnCount.xl": NUMBER_SCHEMA,
756
+ "columnCount.columnCount.xxl": NUMBER_SCHEMA,
757
+ "rowCount.rowCount": NUMBER_SCHEMA,
758
+ "dataScope.filter": FILTER_GROUP_SCHEMA,
759
+ "layout.layout": STRING_SCHEMA
760
+ }
761
+ }
762
+ });
763
+ const MARKDOWN_BLOCK_CONTRACT = createContract({
764
+ editableDomains: ["props", "stepParams", "flowRegistry"],
765
+ props: ["title", "displayTitle", "content", "value"],
766
+ stepParams: ["markdownBlockSettings"],
767
+ flowRegistry: true,
768
+ eventCapabilities: {
769
+ direct: DEFAULT_DIRECT_EVENTS
770
+ }
771
+ });
772
+ MARKDOWN_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
773
+ markdownBlockSettings: {
774
+ allowedPaths: ["editMarkdown.content"],
775
+ clearable: true,
776
+ eventBindingSteps: [],
777
+ pathSchemas: {
778
+ "editMarkdown.content": STRING_SCHEMA
779
+ }
780
+ }
781
+ });
782
+ const IFRAME_BLOCK_CONTRACT = createContract({
783
+ editableDomains: ["props", "stepParams", "flowRegistry"],
784
+ props: ["title", "displayTitle", "url", "height", "heightMode", "mode", "html", "params", "allow", "htmlId"],
785
+ stepParams: ["iframeBlockSettings"],
786
+ flowRegistry: true,
787
+ eventCapabilities: {
788
+ direct: DEFAULT_DIRECT_EVENTS
789
+ }
790
+ });
791
+ IFRAME_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
792
+ iframeBlockSettings: {
793
+ allowedPaths: [
794
+ "editIframe.mode",
795
+ "editIframe.url",
796
+ "editIframe.html",
797
+ "editIframe.params",
798
+ "editIframe.allow",
799
+ "editIframe.htmlId",
800
+ "editIframe.height"
801
+ ],
802
+ clearable: true,
803
+ eventBindingSteps: [],
804
+ pathSchemas: {
805
+ "editIframe.mode": STRING_SCHEMA,
806
+ "editIframe.url": STRING_SCHEMA,
807
+ "editIframe.html": STRING_SCHEMA,
808
+ "editIframe.params": ARRAY_SCHEMA,
809
+ "editIframe.allow": STRING_SCHEMA,
810
+ "editIframe.htmlId": STRING_SCHEMA,
811
+ "editIframe.height": NUMBER_SCHEMA
812
+ }
813
+ }
814
+ });
815
+ const CHART_CARD_SETTINGS_GROUP = {
816
+ allowedPaths: ["titleDescription.title", "blockHeight.heightMode", "blockHeight.height"],
817
+ clearable: true,
818
+ mergeStrategy: "deep",
819
+ eventBindingSteps: ["titleDescription", "blockHeight"],
820
+ pathSchemas: {
821
+ "titleDescription.title": STRING_SCHEMA,
822
+ "blockHeight.heightMode": STRING_SCHEMA,
823
+ "blockHeight.height": NUMBER_SCHEMA
824
+ }
825
+ };
826
+ const CHART_BLOCK_CONTRACT = createContract({
827
+ editableDomains: ["stepParams", "flowRegistry"],
828
+ stepParams: ["cardSettings", "chartSettings"],
829
+ flowRegistry: true,
830
+ eventCapabilities: {
831
+ direct: DEFAULT_DIRECT_EVENTS
832
+ }
833
+ });
834
+ CHART_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
835
+ cardSettings: CHART_CARD_SETTINGS_GROUP,
836
+ chartSettings: {
837
+ allowedPaths: ["configure", "configure.*"],
838
+ clearable: true,
839
+ mergeStrategy: "replace",
840
+ eventBindingSteps: [],
841
+ pathSchemas: {
842
+ configure: OBJECT_SCHEMA
843
+ }
844
+ }
845
+ });
846
+ const ACTION_PANEL_BLOCK_CONTRACT = createContract({
847
+ editableDomains: ["props", "stepParams", "flowRegistry"],
848
+ props: ["title", "displayTitle", "layout", "ellipsis"],
849
+ stepParams: ["actionPanelBlockSetting"],
850
+ flowRegistry: true,
851
+ eventCapabilities: {
852
+ direct: DEFAULT_DIRECT_EVENTS
853
+ }
854
+ });
855
+ ACTION_PANEL_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
856
+ actionPanelBlockSetting: {
857
+ allowedPaths: ["layout.layout", "ellipsis.ellipsis"],
858
+ eventBindingSteps: [],
859
+ pathSchemas: {
860
+ "layout.layout": STRING_SCHEMA,
861
+ "ellipsis.ellipsis": BOOLEAN_SCHEMA
862
+ }
863
+ }
864
+ });
865
+ const JS_BLOCK_CONTRACT = createContract({
866
+ editableDomains: ["decoratorProps", "stepParams", "flowRegistry"],
867
+ decoratorProps: ["title", "description", "className"],
868
+ stepParams: ["jsSettings"],
869
+ flowRegistry: true,
870
+ eventCapabilities: {
871
+ direct: DEFAULT_DIRECT_EVENTS
872
+ },
873
+ eventBindings: {
874
+ jsSettings: {
875
+ stepKeys: ["runJs"]
876
+ }
877
+ }
878
+ });
879
+ JS_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
880
+ jsSettings: RUN_JS_SETTINGS_GROUP
881
+ });
882
+ const MAP_BLOCK_CONTRACT = createContract({
883
+ editableDomains: ["props", "stepParams", "flowRegistry"],
884
+ props: ["title", "displayTitle", "height", "heightMode", "mapField", "marker", "lineSort", "zoom"],
885
+ stepParams: ["resourceSettings", "createMapBlock"],
886
+ flowRegistry: true,
887
+ eventCapabilities: {
888
+ direct: DEFAULT_DIRECT_EVENTS,
889
+ object: ["click"]
890
+ }
891
+ });
892
+ MAP_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
893
+ resourceSettings: {
894
+ allowedPaths: [
895
+ "init.dataSourceKey",
896
+ "init.collectionName",
897
+ "init.associationName",
898
+ "init.associationPathName",
899
+ "init.sourceId",
900
+ "init.filterByTk"
901
+ ],
902
+ eventBindingSteps: [],
903
+ pathSchemas: {
904
+ "init.dataSourceKey": STRING_SCHEMA,
905
+ "init.collectionName": STRING_SCHEMA,
906
+ "init.associationName": STRING_SCHEMA,
907
+ "init.associationPathName": STRING_SCHEMA
908
+ }
909
+ },
910
+ createMapBlock: {
911
+ allowedPaths: ["init.mapField", "init.marker", "addAppends.*", "dataScope.filter", "lineSort.sort", "mapZoom.zoom"],
912
+ eventBindingSteps: [],
913
+ pathSchemas: {
914
+ "init.mapField": ARRAY_SCHEMA,
915
+ "init.marker": STRING_SCHEMA,
916
+ "dataScope.filter": FILTER_GROUP_SCHEMA,
917
+ "lineSort.sort": ARRAY_SCHEMA,
918
+ "mapZoom.zoom": NUMBER_SCHEMA
919
+ }
920
+ }
921
+ });
922
+ const COMMENTS_BLOCK_CONTRACT = createContract({
923
+ editableDomains: ["props", "stepParams", "flowRegistry"],
924
+ props: ["title", "displayTitle"],
925
+ stepParams: ["resourceSettings", "commentsSettings"],
926
+ flowRegistry: true,
927
+ eventCapabilities: {
928
+ direct: DEFAULT_DIRECT_EVENTS,
929
+ object: ["click"]
930
+ }
931
+ });
932
+ COMMENTS_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
933
+ resourceSettings: {
934
+ allowedPaths: [
935
+ "init.dataSourceKey",
936
+ "init.collectionName",
937
+ "init.associationName",
938
+ "init.associationPathName",
939
+ "init.sourceId",
940
+ "init.filterByTk"
941
+ ],
942
+ eventBindingSteps: [],
943
+ pathSchemas: {
944
+ "init.dataSourceKey": STRING_SCHEMA,
945
+ "init.collectionName": STRING_SCHEMA,
946
+ "init.associationName": STRING_SCHEMA,
947
+ "init.associationPathName": STRING_SCHEMA
948
+ }
949
+ },
950
+ commentsSettings: {
951
+ allowedPaths: ["pageSize.pageSize", "dataScope.filter"],
952
+ clearable: true,
953
+ eventBindingSteps: [],
954
+ pathSchemas: {
955
+ "pageSize.pageSize": NUMBER_SCHEMA,
956
+ "dataScope.filter": FILTER_GROUP_SCHEMA
957
+ }
958
+ }
959
+ });
960
+ const ACTION_COLUMN_CONTRACT = createContract({
961
+ editableDomains: ["props", "stepParams", "flowRegistry"],
962
+ props: ["title", "tooltip", "width", "fixed"],
963
+ stepParams: ["tableColumnSettings"],
964
+ flowRegistry: true,
965
+ eventCapabilities: {
966
+ direct: DEFAULT_DIRECT_EVENTS
967
+ }
968
+ });
969
+ ACTION_COLUMN_CONTRACT.domains.stepParams = groupedDomain({
970
+ tableColumnSettings: {
971
+ allowedPaths: TABLE_COLUMN_ALLOWED_PATHS,
972
+ mergeStrategy: "deep",
973
+ pathSchemas: {
974
+ "title.title": STRING_SCHEMA
975
+ }
976
+ }
977
+ });
978
+ const FORM_ITEM_CONTRACT = createContract({
979
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
980
+ props: [
981
+ "label",
982
+ "showLabel",
983
+ "tooltip",
984
+ "extra",
985
+ "initialValue",
986
+ "titleField",
987
+ "name",
988
+ "rules",
989
+ "aclDisabled",
990
+ "aclCreateDisabled",
991
+ "disabled",
992
+ "required",
993
+ "pattern",
994
+ "multiple",
995
+ "allowMultiple",
996
+ "maxCount"
997
+ ],
998
+ decoratorProps: ["labelWidth", "labelWrap"],
999
+ stepParams: ["fieldSettings", "editItemSettings"],
1000
+ flowRegistry: true,
1001
+ eventCapabilities: {
1002
+ direct: DEFAULT_DIRECT_EVENTS
1003
+ }
1004
+ });
1005
+ FORM_ITEM_CONTRACT.domains.stepParams = groupedDomain({
1006
+ fieldSettings: FIELD_SETTINGS_INIT_GROUP,
1007
+ editItemSettings: {
1008
+ allowedPaths: ["model.use"],
1009
+ mergeStrategy: "deep",
1010
+ eventBindingSteps: ["model"],
1011
+ pathSchemas: {
1012
+ "model.use": STRING_SCHEMA
1013
+ }
1014
+ }
1015
+ });
1016
+ const DETAILS_ITEM_CONTRACT = createContract({
1017
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1018
+ props: ["label", "showLabel", "tooltip", "extra", "titleField", "pattern", "disabled"],
1019
+ decoratorProps: ["labelWidth", "labelWrap"],
1020
+ stepParams: ["fieldSettings", "detailItemSettings"],
1021
+ flowRegistry: true,
1022
+ eventCapabilities: {
1023
+ direct: DEFAULT_DIRECT_EVENTS
1024
+ }
1025
+ });
1026
+ DETAILS_ITEM_CONTRACT.domains.stepParams = groupedDomain({
1027
+ fieldSettings: FIELD_SETTINGS_INIT_GROUP,
1028
+ detailItemSettings: {
1029
+ allowedPaths: ["model.use"],
1030
+ mergeStrategy: "deep",
1031
+ eventBindingSteps: ["model"],
1032
+ pathSchemas: {
1033
+ "model.use": STRING_SCHEMA
1034
+ }
1035
+ }
1036
+ });
1037
+ const FILTER_FORM_ITEM_CONTRACT = createContract({
1038
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1039
+ props: ["label", "showLabel", "tooltip", "extra", "initialValue", "name", "multiple", "allowMultiple", "maxCount"],
1040
+ decoratorProps: ["labelWidth", "labelWrap"],
1041
+ stepParams: ["fieldSettings", "filterFormItemSettings"],
1042
+ flowRegistry: true,
1043
+ eventCapabilities: {
1044
+ direct: DEFAULT_DIRECT_EVENTS
1045
+ }
1046
+ });
1047
+ FILTER_FORM_ITEM_CONTRACT.domains.stepParams = groupedDomain({
1048
+ fieldSettings: FIELD_SETTINGS_INIT_GROUP,
1049
+ filterFormItemSettings: {
1050
+ allowedPaths: [...FILTER_FORM_ITEM_ALLOWED_PATHS, "model.use"],
1051
+ mergeStrategy: "deep",
1052
+ pathSchemas: {
1053
+ "init.defaultTargetUid": STRING_SCHEMA,
1054
+ "init.filterField.name": STRING_SCHEMA,
1055
+ "init.filterField.title": STRING_SCHEMA,
1056
+ "init.filterField.interface": STRING_SCHEMA,
1057
+ "init.filterField.type": STRING_SCHEMA,
1058
+ "model.use": STRING_SCHEMA
1059
+ }
1060
+ }
1061
+ });
1062
+ const TABLE_COLUMN_CONTRACT = createContract({
1063
+ editableDomains: ["props", "stepParams", "flowRegistry"],
1064
+ props: ["title", "tooltip", "width", "fixed", "editable", "sorter", "dataIndex", "titleField"],
1065
+ stepParams: ["fieldSettings", "tableColumnSettings"],
1066
+ flowRegistry: true,
1067
+ eventCapabilities: {
1068
+ direct: DEFAULT_DIRECT_EVENTS
1069
+ }
1070
+ });
1071
+ TABLE_COLUMN_CONTRACT.domains.stepParams = groupedDomain({
1072
+ fieldSettings: FIELD_SETTINGS_INIT_GROUP,
1073
+ tableColumnSettings: {
1074
+ allowedPaths: [...TABLE_COLUMN_ALLOWED_PATHS, "model.use"],
1075
+ mergeStrategy: "deep",
1076
+ pathSchemas: {
1077
+ "title.title": STRING_SCHEMA,
1078
+ "model.use": STRING_SCHEMA
1079
+ }
1080
+ }
1081
+ });
1082
+ const JS_COLUMN_CONTRACT = createContract({
1083
+ editableDomains: ["props", "stepParams", "flowRegistry"],
1084
+ props: ["title", "tooltip", "width", "fixed"],
1085
+ stepParams: ["tableColumnSettings", "jsSettings"],
1086
+ flowRegistry: true,
1087
+ eventCapabilities: {
1088
+ direct: DEFAULT_DIRECT_EVENTS
1089
+ },
1090
+ eventBindings: {
1091
+ jsSettings: {
1092
+ stepKeys: ["runJs"]
1093
+ }
1094
+ }
1095
+ });
1096
+ JS_COLUMN_CONTRACT.domains.stepParams = groupedDomain({
1097
+ tableColumnSettings: {
1098
+ allowedPaths: TABLE_COLUMN_ALLOWED_PATHS,
1099
+ mergeStrategy: "deep",
1100
+ pathSchemas: {
1101
+ "title.title": STRING_SCHEMA
1102
+ }
1103
+ },
1104
+ jsSettings: RUN_JS_SETTINGS_GROUP
1105
+ });
1106
+ const FIELD_NODE_CONTRACT = createContract({
1107
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1108
+ props: [
1109
+ "title",
1110
+ "icon",
1111
+ "titleField",
1112
+ "clickToOpen",
1113
+ "autoSize",
1114
+ "allowMultiple",
1115
+ "multiple",
1116
+ "quickCreate",
1117
+ "allowClear",
1118
+ "displayStyle",
1119
+ "options"
1120
+ ],
1121
+ decoratorProps: ["labelWidth", "labelWrap"],
1122
+ stepParams: ["fieldSettings", "displayFieldSettings", "popupSettings"],
1123
+ flowRegistry: true,
1124
+ eventCapabilities: {
1125
+ direct: ACTION_DIRECT_EVENTS,
1126
+ object: ACTION_OBJECT_EVENTS
1127
+ },
1128
+ eventBindings: {
1129
+ displayFieldSettings: {
1130
+ stepKeys: ["displayStyle", "clickToOpen"]
1131
+ },
1132
+ popupSettings: {
1133
+ stepKeys: ["openView"]
1134
+ }
1135
+ }
1136
+ });
1137
+ const JS_FIELD_NODE_CONTRACT = createContract({
1138
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1139
+ props: [
1140
+ "title",
1141
+ "icon",
1142
+ "titleField",
1143
+ "clickToOpen",
1144
+ "autoSize",
1145
+ "allowMultiple",
1146
+ "multiple",
1147
+ "quickCreate",
1148
+ "allowClear",
1149
+ "displayStyle",
1150
+ "options"
1151
+ ],
1152
+ decoratorProps: ["labelWidth", "labelWrap"],
1153
+ stepParams: ["fieldSettings", "displayFieldSettings", "popupSettings", "jsSettings"],
1154
+ flowRegistry: true,
1155
+ eventCapabilities: {
1156
+ direct: ACTION_DIRECT_EVENTS,
1157
+ object: ACTION_OBJECT_EVENTS
1158
+ },
1159
+ eventBindings: {
1160
+ displayFieldSettings: {
1161
+ stepKeys: ["displayStyle", "clickToOpen"]
1162
+ },
1163
+ popupSettings: {
1164
+ stepKeys: ["openView"]
1165
+ },
1166
+ jsSettings: {
1167
+ stepKeys: ["runJs"]
1168
+ }
1169
+ }
1170
+ });
1171
+ JS_FIELD_NODE_CONTRACT.domains.stepParams = groupedDomain({
1172
+ fieldSettings: FIELD_SETTINGS_INIT_GROUP,
1173
+ displayFieldSettings: {
1174
+ allowedPaths: ["displayStyle.displayStyle", "clickToOpen.clickToOpen"],
1175
+ clearable: true,
1176
+ mergeStrategy: "deep",
1177
+ eventBindingSteps: ["displayStyle", "clickToOpen"],
1178
+ pathSchemas: {
1179
+ "displayStyle.displayStyle": STRING_SCHEMA,
1180
+ "clickToOpen.clickToOpen": BOOLEAN_SCHEMA
1181
+ }
1182
+ },
1183
+ popupSettings: {
1184
+ allowedPaths: OPEN_VIEW_ALLOWED_PATHS,
1185
+ clearable: true,
1186
+ mergeStrategy: "deep",
1187
+ eventBindingSteps: ["openView"],
1188
+ pathSchemas: OPEN_VIEW_PATH_SCHEMAS
1189
+ },
1190
+ jsSettings: RUN_JS_SETTINGS_GROUP
1191
+ });
1192
+ const JS_ITEM_CONTRACT = createContract({
1193
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1194
+ props: ["label", "showLabel", "tooltip", "extra"],
1195
+ decoratorProps: ["labelWidth", "labelWrap"],
1196
+ stepParams: ["jsSettings"],
1197
+ flowRegistry: true,
1198
+ eventCapabilities: {
1199
+ direct: DEFAULT_DIRECT_EVENTS
1200
+ },
1201
+ eventBindings: {
1202
+ jsSettings: {
1203
+ stepKeys: ["runJs"]
1204
+ }
1205
+ }
1206
+ });
1207
+ JS_ITEM_CONTRACT.domains.stepParams = groupedDomain({
1208
+ jsSettings: RUN_JS_SETTINGS_GROUP
1209
+ });
1210
+ FIELD_NODE_CONTRACT.domains.stepParams = groupedDomain({
1211
+ fieldSettings: FIELD_SETTINGS_INIT_GROUP,
1212
+ displayFieldSettings: {
1213
+ allowedPaths: ["displayStyle.displayStyle", "clickToOpen.clickToOpen"],
1214
+ clearable: true,
1215
+ mergeStrategy: "deep",
1216
+ eventBindingSteps: ["displayStyle", "clickToOpen"],
1217
+ pathSchemas: {
1218
+ "displayStyle.displayStyle": STRING_SCHEMA,
1219
+ "clickToOpen.clickToOpen": BOOLEAN_SCHEMA
1220
+ }
1221
+ },
1222
+ popupSettings: {
1223
+ allowedPaths: OPEN_VIEW_ALLOWED_PATHS,
1224
+ clearable: true,
1225
+ mergeStrategy: "deep",
1226
+ eventBindingSteps: ["openView"],
1227
+ pathSchemas: OPEN_VIEW_PATH_SCHEMAS
1228
+ }
1229
+ });
1230
+ const POPUP_ACTION_CONTRACT = createContract({
1231
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1232
+ props: ACTION_PROP_KEYS,
1233
+ decoratorProps: ["labelWidth", "labelWrap"],
1234
+ stepParams: ["buttonSettings", "popupSettings"],
1235
+ flowRegistry: true,
1236
+ eventCapabilities: {
1237
+ direct: ACTION_DIRECT_EVENTS,
1238
+ object: ACTION_OBJECT_EVENTS
1239
+ },
1240
+ eventBindings: {
1241
+ buttonSettings: {
1242
+ stepKeys: ["general", "linkageRules"]
1243
+ },
1244
+ popupSettings: {
1245
+ stepKeys: ["openView"]
1246
+ }
1247
+ }
1248
+ });
1249
+ POPUP_ACTION_CONTRACT.domains.stepParams = groupedDomain({
1250
+ buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
1251
+ popupSettings: {
1252
+ allowedPaths: OPEN_VIEW_ALLOWED_PATHS,
1253
+ clearable: true,
1254
+ mergeStrategy: "deep",
1255
+ eventBindingSteps: ["openView"],
1256
+ pathSchemas: OPEN_VIEW_PATH_SCHEMAS
1257
+ }
1258
+ });
1259
+ const DELETE_ACTION_CONTRACT = createContract({
1260
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1261
+ props: ACTION_PROP_KEYS,
1262
+ decoratorProps: ["labelWidth", "labelWrap"],
1263
+ stepParams: ["buttonSettings", "deleteSettings"],
1264
+ flowRegistry: true,
1265
+ eventCapabilities: {
1266
+ direct: ACTION_DIRECT_EVENTS,
1267
+ object: ACTION_OBJECT_EVENTS
1268
+ },
1269
+ eventBindings: {
1270
+ buttonSettings: {
1271
+ stepKeys: ["general", "linkageRules"]
1272
+ },
1273
+ deleteSettings: {
1274
+ stepKeys: ["confirm"]
1275
+ }
1276
+ }
1277
+ });
1278
+ DELETE_ACTION_CONTRACT.domains.stepParams = groupedDomain({
1279
+ buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
1280
+ deleteSettings: {
1281
+ allowedPaths: CONFIRM_ALLOWED_PATHS,
1282
+ clearable: true,
1283
+ mergeStrategy: "deep",
1284
+ eventBindingSteps: ["confirm"],
1285
+ pathSchemas: {
1286
+ "confirm.enable": BOOLEAN_SCHEMA,
1287
+ "confirm.title": STRING_SCHEMA,
1288
+ "confirm.content": STRING_SCHEMA
1289
+ }
1290
+ }
1291
+ });
1292
+ const UPDATE_RECORD_ACTION_CONTRACT = createContract({
1293
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1294
+ props: ACTION_PROP_KEYS,
1295
+ decoratorProps: ["labelWidth", "labelWrap"],
1296
+ stepParams: ["buttonSettings", "assignSettings", "apply"],
1297
+ flowRegistry: true,
1298
+ eventCapabilities: {
1299
+ direct: ACTION_DIRECT_EVENTS,
1300
+ object: ACTION_OBJECT_EVENTS
1301
+ },
1302
+ eventBindings: {
1303
+ buttonSettings: {
1304
+ stepKeys: ["general", "linkageRules"]
1305
+ },
1306
+ assignSettings: {
1307
+ stepKeys: ["confirm", "assignFieldValues"]
1308
+ },
1309
+ apply: {
1310
+ stepKeys: ["apply"]
1311
+ }
1312
+ }
1313
+ });
1314
+ UPDATE_RECORD_ACTION_CONTRACT.domains.stepParams = groupedDomain({
1315
+ buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
1316
+ assignSettings: {
1317
+ allowedPaths: [
1318
+ "confirm.enable",
1319
+ "confirm.title",
1320
+ "confirm.content",
1321
+ "assignFieldValues.assignedValues",
1322
+ "assignFieldValues.assignedValues.*"
1323
+ ],
1324
+ clearable: true,
1325
+ mergeStrategy: "deep",
1326
+ eventBindingSteps: ["confirm", "assignFieldValues"],
1327
+ pathSchemas: {
1328
+ "confirm.enable": BOOLEAN_SCHEMA,
1329
+ "confirm.title": STRING_SCHEMA,
1330
+ "confirm.content": STRING_SCHEMA,
1331
+ "assignFieldValues.assignedValues": OBJECT_SCHEMA
1332
+ }
1333
+ },
1334
+ apply: {
1335
+ allowedPaths: ["apply.assignedValues", "apply.assignedValues.*"],
1336
+ clearable: true,
1337
+ mergeStrategy: "deep",
1338
+ eventBindingSteps: ["apply"],
1339
+ pathSchemas: {
1340
+ "apply.assignedValues": OBJECT_SCHEMA
1341
+ }
1342
+ }
1343
+ });
1344
+ const SUBMIT_ACTION_CONTRACT = createContract({
1345
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1346
+ props: ACTION_PROP_KEYS,
1347
+ decoratorProps: ["labelWidth", "labelWrap"],
1348
+ stepParams: ["buttonSettings", "submitSettings"],
1349
+ flowRegistry: true,
1350
+ eventCapabilities: {
1351
+ direct: ACTION_DIRECT_EVENTS,
1352
+ object: ACTION_OBJECT_EVENTS
1353
+ },
1354
+ eventBindings: {
1355
+ buttonSettings: {
1356
+ stepKeys: ["general", "linkageRules"]
1357
+ },
1358
+ submitSettings: {
1359
+ stepKeys: ["confirm"]
1360
+ }
1361
+ }
1362
+ });
1363
+ const FILTER_FORM_SUBMIT_ACTION_CONTRACT = createContract({
1364
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1365
+ props: ACTION_PROP_KEYS,
1366
+ decoratorProps: ["labelWidth", "labelWrap"],
1367
+ stepParams: ["buttonSettings", "submitSettings"],
1368
+ flowRegistry: true,
1369
+ eventCapabilities: {
1370
+ direct: ACTION_DIRECT_EVENTS,
1371
+ object: ACTION_OBJECT_EVENTS
1372
+ },
1373
+ eventBindings: {
1374
+ buttonSettings: {
1375
+ stepKeys: ["general", "linkageRules"]
1376
+ },
1377
+ submitSettings: {
1378
+ stepKeys: ["doFilter"]
1379
+ }
1380
+ }
1381
+ });
1382
+ FILTER_FORM_SUBMIT_ACTION_CONTRACT.domains.stepParams = groupedDomain({
1383
+ buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
1384
+ submitSettings: {
1385
+ allowedPaths: [],
1386
+ clearable: true,
1387
+ mergeStrategy: "deep",
1388
+ eventBindingSteps: ["doFilter"]
1389
+ }
1390
+ });
1391
+ SUBMIT_ACTION_CONTRACT.domains.stepParams = groupedDomain({
1392
+ buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
1393
+ submitSettings: {
1394
+ allowedPaths: CONFIRM_ALLOWED_PATHS,
1395
+ clearable: true,
1396
+ mergeStrategy: "deep",
1397
+ eventBindingSteps: ["confirm"],
1398
+ pathSchemas: {
1399
+ "confirm.enable": BOOLEAN_SCHEMA,
1400
+ "confirm.title": STRING_SCHEMA,
1401
+ "confirm.content": STRING_SCHEMA
1402
+ }
1403
+ }
1404
+ });
1405
+ const BULK_EDIT_ACTION_CONTRACT = createContract({
1406
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1407
+ props: ACTION_PROP_KEYS,
1408
+ decoratorProps: ["labelWidth", "labelWrap"],
1409
+ stepParams: ["buttonSettings", "bulkEditSettings"],
1410
+ flowRegistry: true,
1411
+ eventCapabilities: {
1412
+ direct: ACTION_DIRECT_EVENTS,
1413
+ object: ACTION_OBJECT_EVENTS
1414
+ },
1415
+ eventBindings: {
1416
+ buttonSettings: {
1417
+ stepKeys: ["general", "linkageRules"]
1418
+ },
1419
+ bulkEditSettings: {
1420
+ stepKeys: ["editMode"]
1421
+ }
1422
+ }
1423
+ });
1424
+ BULK_EDIT_ACTION_CONTRACT.domains.stepParams = groupedDomain({
1425
+ buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
1426
+ bulkEditSettings: {
1427
+ allowedPaths: ["editMode.value"],
1428
+ clearable: true,
1429
+ mergeStrategy: "deep",
1430
+ eventBindingSteps: ["editMode"],
1431
+ pathSchemas: {
1432
+ "editMode.value": STRING_SCHEMA
1433
+ }
1434
+ }
1435
+ });
1436
+ const BULK_UPDATE_ACTION_CONTRACT = createContract({
1437
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1438
+ props: ACTION_PROP_KEYS,
1439
+ decoratorProps: ["labelWidth", "labelWrap"],
1440
+ stepParams: ["buttonSettings", "assignSettings", "apply"],
1441
+ flowRegistry: true,
1442
+ eventCapabilities: {
1443
+ direct: ACTION_DIRECT_EVENTS,
1444
+ object: ACTION_OBJECT_EVENTS
1445
+ },
1446
+ eventBindings: {
1447
+ buttonSettings: {
1448
+ stepKeys: ["general", "linkageRules"]
1449
+ },
1450
+ assignSettings: {
1451
+ stepKeys: ["confirm", "updateMode", "assignFieldValues"]
1452
+ },
1453
+ apply: {
1454
+ stepKeys: ["apply"]
1455
+ }
1456
+ }
1457
+ });
1458
+ BULK_UPDATE_ACTION_CONTRACT.domains.stepParams = groupedDomain({
1459
+ buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
1460
+ assignSettings: {
1461
+ allowedPaths: [
1462
+ "confirm.enable",
1463
+ "confirm.title",
1464
+ "confirm.content",
1465
+ "updateMode.value",
1466
+ "assignFieldValues.assignedValues",
1467
+ "assignFieldValues.assignedValues.*"
1468
+ ],
1469
+ clearable: true,
1470
+ mergeStrategy: "deep",
1471
+ eventBindingSteps: ["confirm", "updateMode", "assignFieldValues"],
1472
+ pathSchemas: {
1473
+ "confirm.enable": BOOLEAN_SCHEMA,
1474
+ "confirm.title": STRING_SCHEMA,
1475
+ "confirm.content": STRING_SCHEMA,
1476
+ "updateMode.value": STRING_SCHEMA,
1477
+ "assignFieldValues.assignedValues": OBJECT_SCHEMA
1478
+ }
1479
+ },
1480
+ apply: {
1481
+ allowedPaths: ["apply.assignedValues", "apply.assignedValues.*"],
1482
+ clearable: true,
1483
+ mergeStrategy: "deep",
1484
+ eventBindingSteps: ["apply"],
1485
+ pathSchemas: {
1486
+ "apply.assignedValues": OBJECT_SCHEMA
1487
+ }
1488
+ }
1489
+ });
1490
+ const SIMPLE_ACTION_CONTRACT = createContract({
1491
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1492
+ props: ACTION_PROP_KEYS,
1493
+ decoratorProps: ["labelWidth", "labelWrap"],
1494
+ stepParams: ["buttonSettings"],
1495
+ flowRegistry: true,
1496
+ eventCapabilities: {
1497
+ direct: ACTION_DIRECT_EVENTS,
1498
+ object: ACTION_OBJECT_EVENTS
1499
+ },
1500
+ eventBindings: {
1501
+ buttonSettings: {
1502
+ stepKeys: ["general", "linkageRules"]
1503
+ }
1504
+ }
1505
+ });
1506
+ SIMPLE_ACTION_CONTRACT.domains.stepParams = groupedDomain({
1507
+ buttonSettings: ACTION_BUTTON_SETTINGS_GROUP
1508
+ });
1509
+ const FILTER_FORM_COLLAPSE_ACTION_CONTRACT = createContract({
1510
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1511
+ props: ACTION_PROP_KEYS,
1512
+ decoratorProps: ["labelWidth", "labelWrap"],
1513
+ stepParams: ["buttonSettings", "collapseSettings"],
1514
+ flowRegistry: true,
1515
+ eventCapabilities: {
1516
+ direct: ["collapseToggle"]
1517
+ },
1518
+ eventBindings: {
1519
+ buttonSettings: {
1520
+ stepKeys: ["general", "linkageRules"]
1521
+ },
1522
+ collapseSettings: {
1523
+ stepKeys: ["toggle", "defaultCollapsed"]
1524
+ }
1525
+ }
1526
+ });
1527
+ FILTER_FORM_COLLAPSE_ACTION_CONTRACT.domains.stepParams = groupedDomain({
1528
+ buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
1529
+ collapseSettings: {
1530
+ allowedPaths: ["toggle.collapsedRows", "defaultCollapsed.value"],
1531
+ clearable: true,
1532
+ mergeStrategy: "deep",
1533
+ eventBindingSteps: ["toggle", "defaultCollapsed"],
1534
+ pathSchemas: {
1535
+ "toggle.collapsedRows": NUMBER_SCHEMA,
1536
+ "defaultCollapsed.value": BOOLEAN_SCHEMA
1537
+ }
1538
+ }
1539
+ });
1540
+ const DUPLICATE_ACTION_CONTRACT = createContract({
1541
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1542
+ props: ACTION_PROP_KEYS,
1543
+ decoratorProps: ["labelWidth", "labelWrap"],
1544
+ stepParams: ["buttonSettings", "duplicateModeSettings", "duplicateSettings", "popupSettings"],
1545
+ flowRegistry: true,
1546
+ eventCapabilities: {
1547
+ direct: ACTION_DIRECT_EVENTS,
1548
+ object: ACTION_OBJECT_EVENTS
1549
+ },
1550
+ eventBindings: {
1551
+ buttonSettings: {
1552
+ stepKeys: ["general", "linkageRules"]
1553
+ },
1554
+ duplicateModeSettings: {
1555
+ stepKeys: ["duplicateMode"]
1556
+ },
1557
+ duplicateSettings: {
1558
+ stepKeys: ["confirm"]
1559
+ },
1560
+ popupSettings: {
1561
+ stepKeys: ["confirm", "openView"]
1562
+ }
1563
+ }
1564
+ });
1565
+ DUPLICATE_ACTION_CONTRACT.domains.stepParams = groupedDomain({
1566
+ buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
1567
+ duplicateModeSettings: {
1568
+ allowedPaths: ["duplicateMode.duplicateMode", "duplicateMode.collection"],
1569
+ clearable: true,
1570
+ mergeStrategy: "deep",
1571
+ eventBindingSteps: ["duplicateMode"],
1572
+ pathSchemas: {
1573
+ "duplicateMode.duplicateMode": STRING_SCHEMA,
1574
+ "duplicateMode.collection": STRING_SCHEMA
1575
+ }
1576
+ },
1577
+ duplicateSettings: {
1578
+ allowedPaths: CONFIRM_ALLOWED_PATHS,
1579
+ clearable: true,
1580
+ mergeStrategy: "deep",
1581
+ eventBindingSteps: ["confirm"],
1582
+ pathSchemas: {
1583
+ "confirm.enable": BOOLEAN_SCHEMA,
1584
+ "confirm.title": STRING_SCHEMA,
1585
+ "confirm.content": STRING_SCHEMA
1586
+ }
1587
+ },
1588
+ popupSettings: {
1589
+ allowedPaths: [...CONFIRM_ALLOWED_PATHS, ...OPEN_VIEW_ALLOWED_PATHS],
1590
+ clearable: true,
1591
+ mergeStrategy: "deep",
1592
+ eventBindingSteps: ["confirm", "openView"],
1593
+ pathSchemas: {
1594
+ "confirm.enable": BOOLEAN_SCHEMA,
1595
+ "confirm.title": STRING_SCHEMA,
1596
+ "confirm.content": STRING_SCHEMA,
1597
+ ...OPEN_VIEW_PATH_SCHEMAS
1598
+ }
1599
+ }
1600
+ });
1601
+ const UPLOAD_ACTION_CONTRACT = createContract({
1602
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1603
+ props: ACTION_PROP_KEYS,
1604
+ decoratorProps: ["labelWidth", "labelWrap"],
1605
+ stepParams: ["buttonSettings", "selectExitRecordSettings"],
1606
+ flowRegistry: true,
1607
+ eventCapabilities: {
1608
+ direct: ACTION_DIRECT_EVENTS,
1609
+ object: ACTION_OBJECT_EVENTS
1610
+ },
1611
+ eventBindings: {
1612
+ buttonSettings: {
1613
+ stepKeys: ["general", "linkageRules"]
1614
+ },
1615
+ selectExitRecordSettings: {
1616
+ stepKeys: ["openView"]
1617
+ }
1618
+ }
1619
+ });
1620
+ UPLOAD_ACTION_CONTRACT.domains.stepParams = groupedDomain({
1621
+ buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
1622
+ selectExitRecordSettings: {
1623
+ allowedPaths: ["openView.mode", "openView.size"],
1624
+ clearable: true,
1625
+ mergeStrategy: "deep",
1626
+ eventBindingSteps: ["openView"],
1627
+ pathSchemas: {
1628
+ "openView.mode": OPEN_VIEW_MODE_SCHEMA,
1629
+ "openView.size": STRING_SCHEMA
1630
+ }
1631
+ }
1632
+ });
1633
+ const MAIL_SEND_ACTION_CONTRACT = createContract({
1634
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1635
+ props: ACTION_PROP_KEYS,
1636
+ decoratorProps: ["labelWidth", "labelWrap"],
1637
+ stepParams: ["buttonSettings", "popupSettings", "sendEmailSettings"],
1638
+ flowRegistry: true,
1639
+ eventCapabilities: {
1640
+ direct: ACTION_DIRECT_EVENTS,
1641
+ object: ACTION_OBJECT_EVENTS
1642
+ },
1643
+ eventBindings: {
1644
+ buttonSettings: {
1645
+ stepKeys: ["general", "linkageRules"]
1646
+ },
1647
+ popupSettings: {
1648
+ stepKeys: ["openView"]
1649
+ },
1650
+ sendEmailSettings: {
1651
+ stepKeys: ["emailFieldNames", "defaultSelectAllRecords"]
1652
+ }
1653
+ }
1654
+ });
1655
+ MAIL_SEND_ACTION_CONTRACT.domains.stepParams = groupedDomain({
1656
+ buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
1657
+ popupSettings: {
1658
+ allowedPaths: OPEN_VIEW_ALLOWED_PATHS,
1659
+ clearable: true,
1660
+ mergeStrategy: "deep",
1661
+ eventBindingSteps: ["openView"],
1662
+ pathSchemas: OPEN_VIEW_PATH_SCHEMAS
1663
+ },
1664
+ sendEmailSettings: {
1665
+ allowedPaths: ["emailFieldNames.value", "defaultSelectAllRecords.value"],
1666
+ clearable: true,
1667
+ mergeStrategy: "deep",
1668
+ eventBindingSteps: ["emailFieldNames", "defaultSelectAllRecords"],
1669
+ pathSchemas: {
1670
+ "emailFieldNames.value": ARRAY_SCHEMA,
1671
+ "defaultSelectAllRecords.value": STRING_SCHEMA
1672
+ }
1673
+ }
1674
+ });
1675
+ const JS_ACTION_CONTRACT = createContract({
1676
+ editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
1677
+ props: ACTION_PROP_KEYS,
1678
+ decoratorProps: ["labelWidth", "labelWrap"],
1679
+ stepParams: ["buttonSettings", "clickSettings"],
1680
+ flowRegistry: true,
1681
+ eventCapabilities: {
1682
+ direct: ACTION_DIRECT_EVENTS,
1683
+ object: ACTION_OBJECT_EVENTS
1684
+ },
1685
+ eventBindings: {
1686
+ buttonSettings: {
1687
+ stepKeys: ["general", "linkageRules"]
1688
+ },
1689
+ clickSettings: {
1690
+ stepKeys: ["runJs"]
1691
+ }
1692
+ }
1693
+ });
1694
+ JS_ACTION_CONTRACT.domains.stepParams = groupedDomain({
1695
+ buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
1696
+ clickSettings: RUN_JS_SETTINGS_GROUP
1697
+ });
1698
+ const nodeContracts = /* @__PURE__ */ new Map();
1699
+ function registerNodeContract(use, contract) {
1700
+ nodeContracts.set(use, contract);
1701
+ }
1702
+ const NODE_CONTRACT_ENTRIES = [
1703
+ ["RootPageModel", PAGE_NODE_CONTRACT],
1704
+ ["ChildPageModel", PAGE_NODE_CONTRACT],
1705
+ ["RootPageTabModel", TAB_NODE_CONTRACT],
1706
+ ["ChildPageTabModel", TAB_NODE_CONTRACT],
1707
+ ["BlockGridModel", GRID_NODE_CONTRACT],
1708
+ ["FormGridModel", GRID_NODE_CONTRACT],
1709
+ ["DetailsGridModel", GRID_NODE_CONTRACT],
1710
+ ["FilterFormGridModel", GRID_NODE_CONTRACT],
1711
+ ["AssignFormGridModel", GRID_NODE_CONTRACT],
1712
+ ["TableBlockModel", TABLE_BLOCK_CONTRACT],
1713
+ ["CreateFormModel", CREATE_FORM_BLOCK_CONTRACT],
1714
+ ["EditFormModel", EDIT_FORM_BLOCK_CONTRACT],
1715
+ ["FormBlockModel", FORM_BLOCK_CONTRACT],
1716
+ ["AssignFormModel", FORM_BLOCK_CONTRACT],
1717
+ ["DetailsBlockModel", DETAILS_BLOCK_CONTRACT],
1718
+ ["FilterFormBlockModel", FILTER_FORM_BLOCK_CONTRACT],
1719
+ ["ListBlockModel", LIST_BLOCK_CONTRACT],
1720
+ ["GridCardBlockModel", GRID_CARD_BLOCK_CONTRACT],
1721
+ ["JSBlockModel", JS_BLOCK_CONTRACT],
1722
+ ["MarkdownBlockModel", MARKDOWN_BLOCK_CONTRACT],
1723
+ ["IframeBlockModel", IFRAME_BLOCK_CONTRACT],
1724
+ ["ChartBlockModel", CHART_BLOCK_CONTRACT],
1725
+ ["ActionPanelBlockModel", ACTION_PANEL_BLOCK_CONTRACT],
1726
+ ["MapBlockModel", MAP_BLOCK_CONTRACT],
1727
+ ["CommentsBlockModel", COMMENTS_BLOCK_CONTRACT],
1728
+ ["TableActionsColumnModel", ACTION_COLUMN_CONTRACT],
1729
+ ["FormItemModel", FORM_ITEM_CONTRACT],
1730
+ ["FormAssociationItemModel", DETAILS_ITEM_CONTRACT],
1731
+ ["DetailsItemModel", DETAILS_ITEM_CONTRACT],
1732
+ ["FilterFormItemModel", FILTER_FORM_ITEM_CONTRACT],
1733
+ ["TableColumnModel", TABLE_COLUMN_CONTRACT],
1734
+ ["JSColumnModel", JS_COLUMN_CONTRACT],
1735
+ ["JSItemModel", JS_ITEM_CONTRACT],
1736
+ ["FormJSFieldItemModel", JS_ITEM_CONTRACT],
1737
+ ["AddNewActionModel", POPUP_ACTION_CONTRACT],
1738
+ ["ViewActionModel", POPUP_ACTION_CONTRACT],
1739
+ ["EditActionModel", POPUP_ACTION_CONTRACT],
1740
+ ["PopupCollectionActionModel", POPUP_ACTION_CONTRACT],
1741
+ ["AddChildActionModel", POPUP_ACTION_CONTRACT],
1742
+ ["DeleteActionModel", DELETE_ACTION_CONTRACT],
1743
+ ["BulkDeleteActionModel", DELETE_ACTION_CONTRACT],
1744
+ ["UpdateRecordActionModel", UPDATE_RECORD_ACTION_CONTRACT],
1745
+ ["BulkEditActionModel", BULK_EDIT_ACTION_CONTRACT],
1746
+ ["BulkUpdateActionModel", BULK_UPDATE_ACTION_CONTRACT],
1747
+ ["DuplicateActionModel", DUPLICATE_ACTION_CONTRACT],
1748
+ ["FormSubmitActionModel", SUBMIT_ACTION_CONTRACT],
1749
+ ["FilterFormSubmitActionModel", FILTER_FORM_SUBMIT_ACTION_CONTRACT],
1750
+ ["FilterFormResetActionModel", SIMPLE_ACTION_CONTRACT],
1751
+ ["FilterFormCollapseActionModel", FILTER_FORM_COLLAPSE_ACTION_CONTRACT],
1752
+ ["FilterActionModel", SIMPLE_ACTION_CONTRACT],
1753
+ ["RefreshActionModel", SIMPLE_ACTION_CONTRACT],
1754
+ ["LinkActionModel", SIMPLE_ACTION_CONTRACT],
1755
+ ["ExpandCollapseActionModel", SIMPLE_ACTION_CONTRACT],
1756
+ ["ExportActionModel", SIMPLE_ACTION_CONTRACT],
1757
+ ["ExportAttachmentActionModel", SIMPLE_ACTION_CONTRACT],
1758
+ ["ImportActionModel", SIMPLE_ACTION_CONTRACT],
1759
+ ["TemplatePrintCollectionActionModel", SIMPLE_ACTION_CONTRACT],
1760
+ ["TemplatePrintRecordActionModel", SIMPLE_ACTION_CONTRACT],
1761
+ ["CollectionTriggerWorkflowActionModel", SIMPLE_ACTION_CONTRACT],
1762
+ ["RecordTriggerWorkflowActionModel", SIMPLE_ACTION_CONTRACT],
1763
+ ["FormTriggerWorkflowActionModel", SIMPLE_ACTION_CONTRACT],
1764
+ ["WorkbenchTriggerWorkflowActionModel", SIMPLE_ACTION_CONTRACT],
1765
+ ["UploadActionModel", UPLOAD_ACTION_CONTRACT],
1766
+ ["MailSendActionModel", MAIL_SEND_ACTION_CONTRACT],
1767
+ ["JSCollectionActionModel", JS_ACTION_CONTRACT],
1768
+ ["JSRecordActionModel", JS_ACTION_CONTRACT],
1769
+ ["JSFormActionModel", JS_ACTION_CONTRACT],
1770
+ ["FilterFormJSActionModel", JS_ACTION_CONTRACT],
1771
+ ["JSItemActionModel", JS_ACTION_CONTRACT],
1772
+ ["JSActionModel", JS_ACTION_CONTRACT]
1773
+ ];
1774
+ NODE_CONTRACT_ENTRIES.forEach(([use, contract]) => registerNodeContract(use, contract));
1775
+ KNOWN_FIELD_NODE_USES.forEach(
1776
+ (use) => registerNodeContract(
1777
+ use,
1778
+ JS_DISPLAY_FIELD_USE_SET.has(use) || JS_EDITABLE_FIELD_USE_SET.has(use) ? JS_FIELD_NODE_CONTRACT : FIELD_NODE_CONTRACT
1779
+ )
1780
+ );
1781
+ function makeCatalogItem(item) {
1782
+ const contract = getNodeContract(item.use);
1783
+ return {
1784
+ ...item,
1785
+ editableDomains: [...contract.editableDomains],
1786
+ settingsSchema: buildSettingsSchema(contract),
1787
+ settingsContract: contract.domains,
1788
+ eventCapabilities: contract.eventCapabilities,
1789
+ layoutCapabilities: contract.layoutCapabilities
1790
+ };
1791
+ }
1792
+ function normalizeFieldContainerUse(containerUse) {
1793
+ return (0, import_field_semantics.normalizeFieldContainerKind)(containerUse);
1794
+ }
1795
+ function getFieldWrapperUseForContainer(containerUse) {
1796
+ switch (normalizeFieldContainerUse(containerUse)) {
1797
+ case "form":
1798
+ return "FormItemModel";
1799
+ case "details":
1800
+ return "DetailsItemModel";
1801
+ case "filter-form":
1802
+ return "FilterFormItemModel";
1803
+ case "table":
1804
+ return "TableColumnModel";
1805
+ default:
1806
+ return null;
1807
+ }
1808
+ }
1809
+ function inferEditableFieldUse(fieldInterface) {
1810
+ if (["m2m", "m2o", "o2o", "o2m", "oho", "obo", "updatedBy", "createdBy", "mbm"].includes(fieldInterface)) {
1811
+ return "RecordSelectFieldModel";
1812
+ }
1813
+ const map = {
1814
+ json: "JsonFieldModel",
1815
+ textarea: "TextareaFieldModel",
1816
+ icon: "IconFieldModel",
1817
+ radioGroup: "SelectFieldModel",
1818
+ color: "ColorFieldModel",
1819
+ select: "SelectFieldModel",
1820
+ multipleSelect: "SelectFieldModel",
1821
+ checkboxGroup: "SelectFieldModel",
1822
+ checkbox: "CheckboxFieldModel",
1823
+ password: "PasswordFieldModel",
1824
+ number: "NumberFieldModel",
1825
+ integer: "NumberFieldModel",
1826
+ id: "NumberFieldModel",
1827
+ snowflakeId: "NumberFieldModel",
1828
+ percent: "PercentFieldModel",
1829
+ datetimeNoTz: "DateTimeNoTzFieldModel",
1830
+ date: "DateOnlyFieldModel",
1831
+ datetime: "DateTimeTzFieldModel",
1832
+ createdAt: "DateTimeTzFieldModel",
1833
+ updatedAt: "DateTimeTzFieldModel",
1834
+ unixTimestamp: "DateTimeTzFieldModel",
1835
+ time: "TimeFieldModel",
1836
+ collection: "CollectionSelectorFieldModel",
1837
+ tableoid: "CollectionSelectorFieldModel",
1838
+ richText: "RichTextFieldModel",
1839
+ input: "InputFieldModel",
1840
+ email: "InputFieldModel",
1841
+ phone: "InputFieldModel",
1842
+ uuid: "InputFieldModel",
1843
+ url: "InputFieldModel",
1844
+ nanoid: "InputFieldModel"
1845
+ };
1846
+ return map[fieldInterface] || "InputFieldModel";
1847
+ }
1848
+ function inferDisplayFieldUse(fieldInterface) {
1849
+ if (["m2m", "o2m", "mbm"].includes(fieldInterface)) {
1850
+ return "DisplaySubTableFieldModel";
1851
+ }
1852
+ const map = {
1853
+ richText: "DisplayHtmlFieldModel",
1854
+ number: "DisplayNumberFieldModel",
1855
+ integer: "DisplayNumberFieldModel",
1856
+ id: "DisplayNumberFieldModel",
1857
+ snowflakeId: "DisplayNumberFieldModel",
1858
+ json: "DisplayJSONFieldModel",
1859
+ // Real frontend saved fixtures still read back these enum-like displays as text fields.
1860
+ select: "DisplayTextFieldModel",
1861
+ multipleSelect: "DisplayTextFieldModel",
1862
+ radioGroup: "DisplayTextFieldModel",
1863
+ checkboxGroup: "DisplayTextFieldModel",
1864
+ collection: "DisplayTextFieldModel",
1865
+ tableoid: "DisplayTextFieldModel",
1866
+ icon: "DisplayIconFieldModel",
1867
+ checkbox: "DisplayCheckboxFieldModel",
1868
+ password: "DisplayPasswordFieldModel",
1869
+ percent: "DisplayPercentFieldModel",
1870
+ date: "DisplayDateTimeFieldModel",
1871
+ datetimeNoTz: "DisplayDateTimeFieldModel",
1872
+ createdAt: "DisplayDateTimeFieldModel",
1873
+ datetime: "DisplayDateTimeFieldModel",
1874
+ updatedAt: "DisplayDateTimeFieldModel",
1875
+ unixTimestamp: "DisplayDateTimeFieldModel",
1876
+ formula: "DisplayDateTimeFieldModel",
1877
+ input: "DisplayTextFieldModel",
1878
+ email: "DisplayTextFieldModel",
1879
+ phone: "DisplayTextFieldModel",
1880
+ uuid: "DisplayTextFieldModel",
1881
+ textarea: "DisplayTextFieldModel",
1882
+ nanoid: "DisplayTextFieldModel",
1883
+ url: "DisplayURLFieldModel",
1884
+ color: "DisplayColorFieldModel",
1885
+ time: "DisplayTimeFieldModel"
1886
+ };
1887
+ return map[fieldInterface] || "DisplayTextFieldModel";
1888
+ }
1889
+ function inferFilterFieldUse(fieldInterface) {
1890
+ if (["m2m", "m2o", "o2o", "o2m", "oho", "obo", "updatedBy", "createdBy", "mbm"].includes(fieldInterface)) {
1891
+ return "FilterFormRecordSelectFieldModel";
1892
+ }
1893
+ const map = {
1894
+ date: "DateOnlyFilterFieldModel",
1895
+ datetimeNoTz: "DateTimeNoTzFilterFieldModel",
1896
+ createdAt: "DateTimeTzFilterFieldModel",
1897
+ datetime: "DateTimeTzFilterFieldModel",
1898
+ updatedAt: "DateTimeTzFilterFieldModel",
1899
+ unixTimestamp: "DateTimeTzFilterFieldModel",
1900
+ select: "SelectFieldModel",
1901
+ multipleSelect: "SelectFieldModel",
1902
+ radioGroup: "SelectFieldModel",
1903
+ checkboxGroup: "SelectFieldModel",
1904
+ checkbox: "SelectFieldModel",
1905
+ number: "NumberFieldModel",
1906
+ integer: "NumberFieldModel",
1907
+ id: "NumberFieldModel",
1908
+ snowflakeId: "NumberFieldModel",
1909
+ time: "TimeFieldModel",
1910
+ percent: "PercentFieldModel",
1911
+ input: "InputFieldModel",
1912
+ email: "InputFieldModel",
1913
+ phone: "InputFieldModel",
1914
+ uuid: "InputFieldModel",
1915
+ url: "InputFieldModel",
1916
+ nanoid: "InputFieldModel"
1917
+ };
1918
+ return map[fieldInterface] || "InputFieldModel";
1919
+ }
1920
+ function getAllowedFieldUseSet(containerUse) {
1921
+ switch (normalizeFieldContainerUse(containerUse)) {
1922
+ case "form":
1923
+ return EDITABLE_FIELD_USE_SET;
1924
+ case "details":
1925
+ case "table":
1926
+ return DISPLAY_FIELD_USE_SET;
1927
+ case "filter-form":
1928
+ return FILTER_FIELD_USE_SET;
1929
+ default:
1930
+ return null;
1931
+ }
1932
+ }
1933
+ function inferFieldUseByContainer(containerUse, field) {
1934
+ var _a;
1935
+ const fieldInterface = (field == null ? void 0 : field.interface) || ((_a = field == null ? void 0 : field.options) == null ? void 0 : _a.interface);
1936
+ if ((0, import_field_semantics.shouldUseAssociationTitleTextDisplay)({
1937
+ containerUse,
1938
+ fieldInterface
1939
+ })) {
1940
+ return "DisplayTextFieldModel";
1941
+ }
1942
+ switch (normalizeFieldContainerUse(containerUse)) {
1943
+ case "filter-form":
1944
+ return inferFilterFieldUse(fieldInterface);
1945
+ case "form":
1946
+ return inferEditableFieldUse(fieldInterface);
1947
+ case "details":
1948
+ return inferDisplayFieldUse(fieldInterface);
1949
+ case "table":
1950
+ return inferDisplayFieldUse(fieldInterface);
1951
+ default:
1952
+ throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces field container '${containerUse}' is not supported`);
1953
+ }
1954
+ }
1955
+ function inferJsFieldUseByContainer(containerUse) {
1956
+ switch (normalizeFieldContainerUse(containerUse)) {
1957
+ case "form":
1958
+ return "JSEditableFieldModel";
1959
+ case "details":
1960
+ case "table":
1961
+ return "JSFieldModel";
1962
+ case "filter-form":
1963
+ throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces field renderer 'js' is not allowed under '${containerUse}'`);
1964
+ default:
1965
+ throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces field container '${containerUse}' is not supported`);
1966
+ }
1967
+ }
1968
+ function resolveStandaloneFieldUse(input) {
1969
+ const requestedType = String(input.requestedType || "").trim();
1970
+ if (!requestedType) {
1971
+ return void 0;
1972
+ }
1973
+ if (requestedType === "jsColumn") {
1974
+ if (normalizeFieldContainerUse(input.containerUse) !== "table") {
1975
+ throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces field type 'jsColumn' is only allowed under table containers`);
1976
+ }
1977
+ return "JSColumnModel";
1978
+ }
1979
+ if (requestedType === "jsItem") {
1980
+ if (normalizeFieldContainerUse(input.containerUse) !== "form") {
1981
+ throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces field type 'jsItem' is only allowed under form containers`);
1982
+ }
1983
+ return "JSItemModel";
1984
+ }
1985
+ throw new import_errors.FlowSurfaceBadRequestError(
1986
+ `flowSurfaces field type '${requestedType}' is not a supported public capability`
1987
+ );
1988
+ }
1989
+ function resolveSupportedFieldCapability(input) {
1990
+ const requestedRenderer = typeof input.requestedRenderer === "undefined" ? void 0 : String(input.requestedRenderer || "").trim();
1991
+ if (typeof requestedRenderer !== "undefined" && requestedRenderer !== "js") {
1992
+ throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces field renderer '${requestedRenderer}' is not supported`);
1993
+ }
1994
+ const standaloneUse = resolveStandaloneFieldUse({
1995
+ requestedType: input.requestedType,
1996
+ containerUse: input.containerUse
1997
+ });
1998
+ if (standaloneUse) {
1999
+ if (input.requestedWrapperUse && input.requestedWrapperUse !== standaloneUse) {
2000
+ throw new import_errors.FlowSurfaceBadRequestError(
2001
+ `flowSurfaces field wrapper '${input.requestedWrapperUse}' is not allowed for field type '${input.requestedType}', expected '${standaloneUse}'`
2002
+ );
2003
+ }
2004
+ if (input.requestedFieldUse && input.requestedFieldUse !== standaloneUse) {
2005
+ throw new import_errors.FlowSurfaceBadRequestError(
2006
+ `flowSurfaces fieldUse '${input.requestedFieldUse}' does not match field type '${input.requestedType}', expected '${standaloneUse}'`
2007
+ );
2008
+ }
2009
+ return {
2010
+ wrapperUse: void 0,
2011
+ fieldUse: void 0,
2012
+ inferredFieldUse: void 0,
2013
+ standaloneUse,
2014
+ renderer: void 0
2015
+ };
2016
+ }
2017
+ const wrapperUse = getFieldWrapperUseForContainer(input.containerUse);
2018
+ if (!wrapperUse) {
2019
+ throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces field container '${input.containerUse}' is not supported`);
2020
+ }
2021
+ if (input.requestedWrapperUse && input.requestedWrapperUse !== wrapperUse) {
2022
+ throw new import_errors.FlowSurfaceBadRequestError(
2023
+ `flowSurfaces field wrapper '${input.requestedWrapperUse}' is not allowed under '${input.containerUse}', expected '${wrapperUse}'`
2024
+ );
2025
+ }
2026
+ const inferredFieldUse = requestedRenderer === "js" ? inferJsFieldUseByContainer(input.containerUse) : input.field ? inferFieldUseByContainer(input.containerUse, input.field) : void 0;
2027
+ const fieldUse = input.requestedFieldUse || inferredFieldUse;
2028
+ if (!fieldUse) {
2029
+ if (input.allowUnresolvedFieldUse) {
2030
+ return {
2031
+ wrapperUse,
2032
+ fieldUse: void 0,
2033
+ inferredFieldUse,
2034
+ standaloneUse: void 0,
2035
+ renderer: requestedRenderer
2036
+ };
2037
+ }
2038
+ throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces field '${input.containerUse}' requires a supported fieldUse`);
2039
+ }
2040
+ if (input.requestedFieldUse && inferredFieldUse && input.requestedFieldUse !== inferredFieldUse && KNOWN_FIELD_NODE_USES.has(input.requestedFieldUse)) {
2041
+ throw new import_errors.FlowSurfaceBadRequestError(
2042
+ `flowSurfaces fieldUse '${input.requestedFieldUse}' does not match inferred fieldUse '${inferredFieldUse}' under '${input.containerUse}'`
2043
+ );
2044
+ }
2045
+ const allowedFieldUses = getAllowedFieldUseSet(input.containerUse);
2046
+ if (!(allowedFieldUses == null ? void 0 : allowedFieldUses.has(fieldUse))) {
2047
+ throw new import_errors.FlowSurfaceBadRequestError(
2048
+ `flowSurfaces fieldUse '${fieldUse}' is not allowed under '${input.containerUse}'`
2049
+ );
2050
+ }
2051
+ return {
2052
+ wrapperUse,
2053
+ fieldUse,
2054
+ inferredFieldUse,
2055
+ standaloneUse: void 0,
2056
+ renderer: requestedRenderer
2057
+ };
2058
+ }
2059
+ function isActionAllowedInContainer(item, containerUse) {
2060
+ if (!containerUse) {
2061
+ return true;
2062
+ }
2063
+ return Array.isArray(item.allowedContainerUses) && item.allowedContainerUses.includes(containerUse);
2064
+ }
2065
+ function getContainerScopedActionCatalogItems(items, containerUse, options = {
2066
+ context: "resolveAction"
2067
+ }) {
2068
+ if (!containerUse) {
2069
+ return items;
2070
+ }
2071
+ const containerScope = (0, import_action_scope.getActionContainerScope)(containerUse);
2072
+ if (!containerScope) {
2073
+ if (options.allowUnknownContainer) {
2074
+ return [];
2075
+ }
2076
+ (0, import_action_scope.assertKnownActionContainerUse)({
2077
+ containerUse,
2078
+ context: options.context
2079
+ });
2080
+ return [];
2081
+ }
2082
+ return items.filter((item) => item.scope === containerScope && isActionAllowedInContainer(item, containerUse));
2083
+ }
2084
+ function toPublicActionCatalogItem(item) {
2085
+ return item;
2086
+ }
2087
+ function dedupeActionCatalogItems(items, dedupeBy) {
2088
+ const seen = /* @__PURE__ */ new Set();
2089
+ return items.filter((item) => {
2090
+ const key = dedupeBy(item);
2091
+ if (seen.has(key)) {
2092
+ return false;
2093
+ }
2094
+ seen.add(key);
2095
+ return true;
2096
+ });
2097
+ }
2098
+ function getAvailableActionCatalogItems(containerUse, scope, enabledPackages) {
2099
+ const visible = getContainerScopedActionCatalogItems(actionCatalog, containerUse, {
2100
+ allowUnknownContainer: true,
2101
+ context: "catalog"
2102
+ });
2103
+ const scoped = scope ? visible.filter((item) => item.scope === scope) : visible;
2104
+ const normalized = scoped.map((item) => toPublicActionCatalogItem(item));
2105
+ return dedupeActionCatalogItems(
2106
+ filterAvailableCatalogItems(normalized, enabledPackages),
2107
+ containerUse ? (item) => `${item.key}:${item.use}` : (item) => `${item.key}:${item.scope || ""}:${item.use}`
2108
+ );
2109
+ }
2110
+ const COLLECTION_RESOURCE_REQUIRED = /* @__PURE__ */ new Set([
2111
+ "TableBlockModel",
2112
+ "CreateFormModel",
2113
+ "EditFormModel",
2114
+ "FormBlockModel",
2115
+ "DetailsBlockModel",
2116
+ "ListBlockModel",
2117
+ "GridCardBlockModel",
2118
+ "MapBlockModel",
2119
+ "CommentsBlockModel"
2120
+ ]);
2121
+ const PUBLIC_BLOCK_SUPPORT_MATRIX = import_support_matrix.FLOW_SURFACE_BLOCK_SUPPORT_MATRIX.filter((entry) => entry.topLevelAddable);
2122
+ const blockCatalog = PUBLIC_BLOCK_SUPPORT_MATRIX.map(
2123
+ (entry) => makeCatalogItem({
2124
+ key: entry.key,
2125
+ label: entry.label,
2126
+ kind: "block",
2127
+ use: entry.modelUse,
2128
+ requiredInitParams: COLLECTION_RESOURCE_REQUIRED.has(entry.modelUse) ? ["dataSourceKey", "collectionName"] : void 0,
2129
+ createSupported: entry.createSupported
2130
+ })
2131
+ );
2132
+ const actionRegistry = [
2133
+ {
2134
+ publicKey: "filter",
2135
+ label: "Filter",
2136
+ scope: "block",
2137
+ scene: "collection",
2138
+ use: "FilterActionModel",
2139
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2140
+ allowedContainerUses: import_action_scope.COLLECTION_BLOCK_ACTION_CONTAINER_USES,
2141
+ createSupported: true
2142
+ },
2143
+ {
2144
+ publicKey: "addNew",
2145
+ label: "Add new",
2146
+ scope: "block",
2147
+ scene: "collection",
2148
+ use: "AddNewActionModel",
2149
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2150
+ allowedContainerUses: import_action_scope.COLLECTION_BLOCK_ACTION_CONTAINER_USES,
2151
+ createSupported: true
2152
+ },
2153
+ {
2154
+ publicKey: "popup",
2155
+ label: "Popup",
2156
+ scope: "block",
2157
+ scene: "collection",
2158
+ use: "PopupCollectionActionModel",
2159
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2160
+ allowedContainerUses: import_action_scope.COLLECTION_BLOCK_ACTION_CONTAINER_USES,
2161
+ createSupported: true
2162
+ },
2163
+ {
2164
+ publicKey: "refresh",
2165
+ label: "Refresh",
2166
+ scope: "block",
2167
+ scene: "collection",
2168
+ use: "RefreshActionModel",
2169
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2170
+ allowedContainerUses: import_action_scope.COLLECTION_BLOCK_ACTION_CONTAINER_USES,
2171
+ createSupported: true
2172
+ },
2173
+ {
2174
+ publicKey: "expandCollapse",
2175
+ label: "Expand/Collapse",
2176
+ scope: "block",
2177
+ scene: "collection",
2178
+ use: "ExpandCollapseActionModel",
2179
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2180
+ allowedContainerUses: import_action_scope.TABLE_BLOCK_ACTION_CONTAINER_USES,
2181
+ createSupported: true
2182
+ },
2183
+ {
2184
+ publicKey: "bulkDelete",
2185
+ label: "Bulk delete",
2186
+ scope: "block",
2187
+ scene: "collection",
2188
+ use: "BulkDeleteActionModel",
2189
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2190
+ allowedContainerUses: import_action_scope.TABLE_BLOCK_ACTION_CONTAINER_USES,
2191
+ createSupported: true
2192
+ },
2193
+ {
2194
+ publicKey: "bulkEdit",
2195
+ label: "Bulk edit",
2196
+ scope: "block",
2197
+ scene: "collection",
2198
+ use: "BulkEditActionModel",
2199
+ ownerPlugin: "@nocobase/plugin-action-bulk-edit",
2200
+ allowedContainerUses: import_action_scope.TABLE_BLOCK_ACTION_CONTAINER_USES,
2201
+ createSupported: true
2202
+ },
2203
+ {
2204
+ publicKey: "bulkUpdate",
2205
+ label: "Bulk update",
2206
+ scope: "block",
2207
+ scene: "collection",
2208
+ use: "BulkUpdateActionModel",
2209
+ ownerPlugin: "@nocobase/plugin-action-bulk-update",
2210
+ allowedContainerUses: import_action_scope.TABLE_BLOCK_ACTION_CONTAINER_USES,
2211
+ createSupported: true
2212
+ },
2213
+ {
2214
+ publicKey: "export",
2215
+ label: "Export",
2216
+ scope: "block",
2217
+ scene: "collection",
2218
+ use: "ExportActionModel",
2219
+ ownerPlugin: "@nocobase/plugin-action-export",
2220
+ allowedContainerUses: import_action_scope.TABLE_BLOCK_ACTION_CONTAINER_USES,
2221
+ createSupported: true
2222
+ },
2223
+ {
2224
+ publicKey: "exportAttachments",
2225
+ label: "Export attachments",
2226
+ scope: "block",
2227
+ scene: "collection",
2228
+ use: "ExportAttachmentActionModel",
2229
+ ownerPlugin: "@nocobase/plugin-action-export",
2230
+ allowedContainerUses: import_action_scope.TABLE_BLOCK_ACTION_CONTAINER_USES,
2231
+ createSupported: true
2232
+ },
2233
+ {
2234
+ publicKey: "import",
2235
+ label: "Import",
2236
+ scope: "block",
2237
+ scene: "collection",
2238
+ use: "ImportActionModel",
2239
+ ownerPlugin: "@nocobase/plugin-action-import",
2240
+ allowedContainerUses: import_action_scope.TABLE_BLOCK_ACTION_CONTAINER_USES,
2241
+ createSupported: true
2242
+ },
2243
+ {
2244
+ publicKey: "link",
2245
+ label: "Link",
2246
+ scope: "block",
2247
+ scene: "collection",
2248
+ use: "LinkActionModel",
2249
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2250
+ allowedContainerUses: import_action_scope.TABLE_BLOCK_ACTION_CONTAINER_USES,
2251
+ createSupported: true
2252
+ },
2253
+ {
2254
+ publicKey: "upload",
2255
+ label: "Upload",
2256
+ scope: "block",
2257
+ scene: "collection",
2258
+ use: "UploadActionModel",
2259
+ ownerPlugin: "@nocobase/plugin-file-manager",
2260
+ allowedContainerUses: import_action_scope.TABLE_BLOCK_ACTION_CONTAINER_USES,
2261
+ createSupported: true
2262
+ },
2263
+ {
2264
+ publicKey: "js",
2265
+ label: "JS action",
2266
+ scope: "block",
2267
+ scene: "collection",
2268
+ use: "JSCollectionActionModel",
2269
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2270
+ allowedContainerUses: import_action_scope.COLLECTION_BLOCK_ACTION_CONTAINER_USES,
2271
+ createSupported: true
2272
+ },
2273
+ {
2274
+ publicKey: "composeEmail",
2275
+ label: "Compose email",
2276
+ scope: "block",
2277
+ scene: "collection",
2278
+ use: "MailSendActionModel",
2279
+ ownerPlugin: "@nocobase/plugin-email-manager",
2280
+ allowedContainerUses: import_action_scope.TABLE_BLOCK_ACTION_CONTAINER_USES,
2281
+ createSupported: true
2282
+ },
2283
+ {
2284
+ publicKey: "templatePrint",
2285
+ label: "Template print",
2286
+ scope: "block",
2287
+ scene: "collection",
2288
+ use: "TemplatePrintCollectionActionModel",
2289
+ ownerPlugin: "@nocobase/plugin-action-template-print",
2290
+ allowedContainerUses: import_action_scope.TABLE_BLOCK_ACTION_CONTAINER_USES,
2291
+ createSupported: true
2292
+ },
2293
+ {
2294
+ publicKey: "triggerWorkflow",
2295
+ label: "Trigger workflow",
2296
+ scope: "block",
2297
+ scene: "collection",
2298
+ use: "CollectionTriggerWorkflowActionModel",
2299
+ ownerPlugin: "@nocobase/plugin-workflow-custom-action-trigger",
2300
+ allowedContainerUses: import_action_scope.COLLECTION_BLOCK_ACTION_CONTAINER_USES,
2301
+ createSupported: true
2302
+ },
2303
+ {
2304
+ publicKey: "duplicate",
2305
+ label: "Duplicate",
2306
+ scope: "record",
2307
+ scene: "record",
2308
+ use: "DuplicateActionModel",
2309
+ ownerPlugin: "@nocobase/plugin-action-duplicate",
2310
+ allowedContainerUses: import_action_scope.TABLE_ROW_ACTION_CONTAINER_USES,
2311
+ createSupported: true
2312
+ },
2313
+ {
2314
+ publicKey: "addChild",
2315
+ label: "Add child",
2316
+ scope: "record",
2317
+ scene: "record",
2318
+ use: "AddChildActionModel",
2319
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2320
+ allowedContainerUses: import_action_scope.TABLE_ROW_ACTION_CONTAINER_USES,
2321
+ createSupported: true
2322
+ },
2323
+ {
2324
+ publicKey: "view",
2325
+ label: "View",
2326
+ scope: "record",
2327
+ scene: "record",
2328
+ use: "ViewActionModel",
2329
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2330
+ allowedContainerUses: import_action_scope.RECORD_ACTION_CONTAINER_USES,
2331
+ createSupported: true
2332
+ },
2333
+ {
2334
+ publicKey: "edit",
2335
+ label: "Edit",
2336
+ scope: "record",
2337
+ scene: "record",
2338
+ use: "EditActionModel",
2339
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2340
+ allowedContainerUses: import_action_scope.RECORD_ACTION_CONTAINER_USES,
2341
+ createSupported: true
2342
+ },
2343
+ {
2344
+ publicKey: "popup",
2345
+ label: "Popup",
2346
+ scope: "record",
2347
+ scene: "record",
2348
+ use: "PopupCollectionActionModel",
2349
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2350
+ allowedContainerUses: import_action_scope.RECORD_ACTION_CONTAINER_USES,
2351
+ createSupported: true
2352
+ },
2353
+ {
2354
+ publicKey: "composeEmail",
2355
+ label: "Compose email",
2356
+ scope: "record",
2357
+ scene: "record",
2358
+ use: "MailSendActionModel",
2359
+ ownerPlugin: "@nocobase/plugin-email-manager",
2360
+ allowedContainerUses: [...import_action_scope.TABLE_ROW_ACTION_CONTAINER_USES, ...import_action_scope.DETAILS_ACTION_CONTAINER_USES],
2361
+ createSupported: true
2362
+ },
2363
+ {
2364
+ publicKey: "delete",
2365
+ label: "Delete",
2366
+ scope: "record",
2367
+ scene: "record",
2368
+ use: "DeleteActionModel",
2369
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2370
+ allowedContainerUses: import_action_scope.RECORD_ACTION_CONTAINER_USES,
2371
+ createSupported: true
2372
+ },
2373
+ {
2374
+ publicKey: "updateRecord",
2375
+ label: "Update record",
2376
+ scope: "record",
2377
+ scene: "record",
2378
+ use: "UpdateRecordActionModel",
2379
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2380
+ allowedContainerUses: import_action_scope.RECORD_ACTION_CONTAINER_USES,
2381
+ createSupported: true
2382
+ },
2383
+ {
2384
+ publicKey: "js",
2385
+ label: "JS action",
2386
+ scope: "record",
2387
+ scene: "record",
2388
+ use: "JSRecordActionModel",
2389
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2390
+ allowedContainerUses: import_action_scope.RECORD_ACTION_CONTAINER_USES,
2391
+ createSupported: true
2392
+ },
2393
+ {
2394
+ publicKey: "templatePrint",
2395
+ label: "Template print",
2396
+ scope: "record",
2397
+ scene: "record",
2398
+ use: "TemplatePrintRecordActionModel",
2399
+ ownerPlugin: "@nocobase/plugin-action-template-print",
2400
+ allowedContainerUses: import_action_scope.RECORD_ACTION_CONTAINER_USES,
2401
+ createSupported: true
2402
+ },
2403
+ {
2404
+ publicKey: "triggerWorkflow",
2405
+ label: "Trigger workflow",
2406
+ scope: "record",
2407
+ scene: "record",
2408
+ use: "RecordTriggerWorkflowActionModel",
2409
+ ownerPlugin: "@nocobase/plugin-workflow-custom-action-trigger",
2410
+ allowedContainerUses: import_action_scope.RECORD_ACTION_CONTAINER_USES,
2411
+ createSupported: true
2412
+ },
2413
+ {
2414
+ publicKey: "submit",
2415
+ label: "Submit",
2416
+ scope: "form",
2417
+ scene: "form",
2418
+ use: "FormSubmitActionModel",
2419
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2420
+ allowedContainerUses: import_action_scope.FORM_ACTION_CONTAINER_USES,
2421
+ createSupported: true
2422
+ },
2423
+ {
2424
+ publicKey: "js",
2425
+ label: "JS action",
2426
+ scope: "form",
2427
+ scene: "form",
2428
+ use: "JSFormActionModel",
2429
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2430
+ allowedContainerUses: import_action_scope.FORM_ACTION_CONTAINER_USES,
2431
+ createSupported: true
2432
+ },
2433
+ {
2434
+ publicKey: "jsItem",
2435
+ label: "JS item",
2436
+ scope: "form",
2437
+ scene: "form",
2438
+ use: "JSItemActionModel",
2439
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2440
+ allowedContainerUses: import_action_scope.FORM_ACTION_CONTAINER_USES,
2441
+ createSupported: true
2442
+ },
2443
+ {
2444
+ publicKey: "triggerWorkflow",
2445
+ label: "Trigger workflow",
2446
+ scope: "form",
2447
+ scene: "form",
2448
+ use: "FormTriggerWorkflowActionModel",
2449
+ ownerPlugin: "@nocobase/plugin-workflow-custom-action-trigger",
2450
+ allowedContainerUses: import_action_scope.FORM_ACTION_CONTAINER_USES,
2451
+ createSupported: true
2452
+ },
2453
+ {
2454
+ publicKey: "submit",
2455
+ label: "Submit",
2456
+ scope: "filterForm",
2457
+ scene: "form",
2458
+ use: "FilterFormSubmitActionModel",
2459
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2460
+ allowedContainerUses: import_action_scope.FILTER_FORM_ACTION_CONTAINER_USES,
2461
+ createSupported: true
2462
+ },
2463
+ {
2464
+ publicKey: "reset",
2465
+ label: "Reset",
2466
+ scope: "filterForm",
2467
+ scene: "form",
2468
+ use: "FilterFormResetActionModel",
2469
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2470
+ allowedContainerUses: import_action_scope.FILTER_FORM_ACTION_CONTAINER_USES,
2471
+ createSupported: true
2472
+ },
2473
+ {
2474
+ publicKey: "collapse",
2475
+ label: "Collapse",
2476
+ scope: "filterForm",
2477
+ scene: "form",
2478
+ use: "FilterFormCollapseActionModel",
2479
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2480
+ allowedContainerUses: import_action_scope.FILTER_FORM_ACTION_CONTAINER_USES,
2481
+ createSupported: true
2482
+ },
2483
+ {
2484
+ publicKey: "js",
2485
+ label: "JS action",
2486
+ scope: "filterForm",
2487
+ scene: "form",
2488
+ use: "FilterFormJSActionModel",
2489
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2490
+ allowedContainerUses: import_action_scope.FILTER_FORM_ACTION_CONTAINER_USES,
2491
+ createSupported: true
2492
+ },
2493
+ {
2494
+ publicKey: "js",
2495
+ label: "JS action",
2496
+ scope: "actionPanel",
2497
+ scene: "all",
2498
+ use: "JSActionModel",
2499
+ ownerPlugin: CORE_FLOW_SURFACE_OWNER_PLUGIN,
2500
+ allowedContainerUses: import_action_scope.ACTION_PANEL_ACTION_CONTAINER_USES,
2501
+ createSupported: true
2502
+ },
2503
+ {
2504
+ publicKey: "triggerWorkflow",
2505
+ label: "Trigger workflow",
2506
+ scope: "actionPanel",
2507
+ scene: "all",
2508
+ use: "WorkbenchTriggerWorkflowActionModel",
2509
+ ownerPlugin: "@nocobase/plugin-workflow-custom-action-trigger",
2510
+ allowedContainerUses: import_action_scope.ACTION_PANEL_ACTION_CONTAINER_USES,
2511
+ createSupported: true
2512
+ }
2513
+ ];
2514
+ const FLOW_SURFACE_ACTION_OWNER_PLUGIN_BY_USE = actionRegistry.reduce((map, item) => {
2515
+ if (!map.has(item.use)) {
2516
+ map.set(item.use, item.ownerPlugin);
2517
+ }
2518
+ return map;
2519
+ }, /* @__PURE__ */ new Map());
2520
+ function throwCatalogInvariant(message) {
2521
+ throw new import_errors.FlowSurfaceInternalError(message, "FLOW_SURFACE_INTERNAL_INVARIANT");
2522
+ }
2523
+ function validateActionRegistryItem(item) {
2524
+ if (!item.ownerPlugin.trim()) {
2525
+ throwCatalogInvariant(`flowSurfaces action registry '${item.publicKey}' must declare ownerPlugin`);
2526
+ }
2527
+ if (!item.allowedContainerUses.length) {
2528
+ throwCatalogInvariant(`flowSurfaces action registry '${item.publicKey}' must declare allowedContainerUses`);
2529
+ }
2530
+ if (!nodeContracts.has(item.use)) {
2531
+ throwCatalogInvariant(`flowSurfaces action registry '${item.publicKey}' references unsupported use '${item.use}'`);
2532
+ }
2533
+ item.allowedContainerUses.forEach(
2534
+ (containerUse) => (0, import_action_scope.assertActionScopeMatchesContainer)({
2535
+ actionScope: item.scope,
2536
+ containerUse,
2537
+ context: `action registry '${item.publicKey}'`
2538
+ })
2539
+ );
2540
+ }
2541
+ actionRegistry.forEach((item) => validateActionRegistryItem(item));
2542
+ function makeActionCatalogItem(item) {
2543
+ return makeCatalogItem({
2544
+ key: item.publicKey,
2545
+ label: item.label,
2546
+ kind: "action",
2547
+ scope: item.scope,
2548
+ scene: item.scene,
2549
+ use: item.use,
2550
+ allowedContainerUses: item.allowedContainerUses,
2551
+ createSupported: item.createSupported
2552
+ });
2553
+ }
2554
+ const actionCatalog = actionRegistry.map((item) => makeActionCatalogItem(item));
2555
+ const ACTION_PUBLIC_KEYS = dedupeActionCatalogItems(actionCatalog, (item) => item.key).map((item) => item.key);
2556
+ const SERVICE_SUPPORTED_FLOW_SURFACE_BLOCK_KEYS = PUBLIC_BLOCK_SUPPORT_MATRIX.filter(
2557
+ (entry) => entry.createSupported
2558
+ ).map((entry) => entry.key);
2559
+ const BLOCK_CATALOG_BY_KEY = new Map(blockCatalog.map((item) => [item.key, item]));
2560
+ const BLOCK_CATALOG_BY_USE = new Map(blockCatalog.map((item) => [item.use, item]));
2561
+ const ACTION_CATALOG_BY_KEY = actionCatalog.reduce((map, item) => {
2562
+ const entries = map.get(item.key) || [];
2563
+ entries.push(item);
2564
+ map.set(item.key, entries);
2565
+ return map;
2566
+ }, /* @__PURE__ */ new Map());
2567
+ const ACTION_CATALOG_BY_USE = actionCatalog.reduce((map, item) => {
2568
+ const entries = map.get(item.use) || [];
2569
+ entries.push(item);
2570
+ map.set(item.use, entries);
2571
+ return map;
2572
+ }, /* @__PURE__ */ new Map());
2573
+ const BLOCK_KEY_BY_USE = new Map(import_support_matrix.FLOW_SURFACE_BLOCK_SUPPORT_MATRIX.map((item) => [item.modelUse, item.key]));
2574
+ const ACTION_KEY_BY_USE = new Map(actionCatalog.map((item) => [item.use, toPublicActionCatalogItem(item).key]));
2575
+ function getCatalogItemOwnerPlugin(item) {
2576
+ if (item.kind === "block") {
2577
+ return FLOW_SURFACE_BLOCK_OWNER_PLUGIN_BY_USE.get(item.use);
2578
+ }
2579
+ if (item.kind === "action") {
2580
+ return FLOW_SURFACE_ACTION_OWNER_PLUGIN_BY_USE.get(item.use);
2581
+ }
2582
+ return void 0;
2583
+ }
2584
+ function isAlwaysAvailableCatalogOwnerPlugin(ownerPlugin) {
2585
+ return !ownerPlugin || ownerPlugin === CORE_FLOW_SURFACE_OWNER_PLUGIN;
2586
+ }
2587
+ function throwUnavailableCatalogItem(item, options) {
2588
+ const requested = String(options.requestedType || "").trim() || String(options.requestedUse || "").trim() || String(item.key || "").trim() || String(item.use || "").trim();
2589
+ const ownerPlugin = getCatalogItemOwnerPlugin(item);
2590
+ const reason = ownerPlugin && !isAlwaysAvailableCatalogOwnerPlugin(ownerPlugin) ? ` because plugin '${ownerPlugin}' is not enabled` : "";
2591
+ throw new import_errors.FlowSurfaceBadRequestError(
2592
+ `flowSurfaces ${options.context} ${item.kind} '${requested}' is not available in the current app instance${reason}`
2593
+ );
2594
+ }
2595
+ function isCatalogItemAvailable(item, enabledPackages) {
2596
+ if (!enabledPackages) {
2597
+ return true;
2598
+ }
2599
+ const ownerPlugin = getCatalogItemOwnerPlugin(item);
2600
+ return isAlwaysAvailableCatalogOwnerPlugin(ownerPlugin) || (ownerPlugin ? enabledPackages.has(ownerPlugin) : false);
2601
+ }
2602
+ function filterAvailableCatalogItems(items, enabledPackages) {
2603
+ if (!enabledPackages) {
2604
+ return [...items];
2605
+ }
2606
+ return items.filter((item) => isCatalogItemAvailable(item, enabledPackages));
2607
+ }
2608
+ function normalizeActionCatalogKey(type) {
2609
+ return String(type || "").trim();
2610
+ }
2611
+ function resolveSupportedBlockCatalogItem(input, options = {}) {
2612
+ const item = (input.type ? BLOCK_CATALOG_BY_KEY.get(String(input.type).trim()) : void 0) || (input.use ? BLOCK_CATALOG_BY_USE.get(String(input.use).trim()) : void 0);
2613
+ if (!item) {
2614
+ throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces addBlock only supports registered block types/uses`);
2615
+ }
2616
+ if (!isCatalogItemAvailable(item, options.enabledPackages)) {
2617
+ throwUnavailableCatalogItem(item, {
2618
+ context: options.context || "addBlock",
2619
+ requestedType: input.type,
2620
+ requestedUse: input.use
2621
+ });
2622
+ }
2623
+ if (options.requireCreateSupported && item.createSupported === false) {
2624
+ throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces addBlock does not support creating '${item.key}' yet`);
2625
+ }
2626
+ return item;
2627
+ }
2628
+ function resolveSupportedActionCatalogItem(input, options = {}) {
2629
+ const requestedType = String(input.type || "").trim();
2630
+ const normalizedUse = String(input.use || "").trim();
2631
+ let item;
2632
+ if (input.containerUse) {
2633
+ (0, import_action_scope.assertKnownActionContainerUse)({
2634
+ containerUse: input.containerUse,
2635
+ context: "resolveAction"
2636
+ });
2637
+ }
2638
+ if (normalizedUse) {
2639
+ const useCandidates = ACTION_CATALOG_BY_USE.get(normalizedUse) || [];
2640
+ const availableUseCandidates = filterAvailableCatalogItems(useCandidates, options.enabledPackages);
2641
+ const matchedAll = getContainerScopedActionCatalogItems(useCandidates, input.containerUse);
2642
+ const matched = getContainerScopedActionCatalogItems(availableUseCandidates, input.containerUse);
2643
+ if (useCandidates.length && input.containerUse && !matchedAll.length) {
2644
+ throw new import_errors.FlowSurfaceBadRequestError(
2645
+ `flowSurfaces addAction '${normalizedUse}' is not allowed under '${input.containerUse}'`
2646
+ );
2647
+ }
2648
+ if ((matchedAll.length || useCandidates.length) && !matched.length && !availableUseCandidates.length) {
2649
+ throwUnavailableCatalogItem(useCandidates[0], {
2650
+ context: options.context || "addAction",
2651
+ requestedUse: normalizedUse
2652
+ });
2653
+ }
2654
+ if (matchedAll.length && !matched.length) {
2655
+ throwUnavailableCatalogItem(matchedAll[0], {
2656
+ context: options.context || "addAction",
2657
+ requestedUse: normalizedUse
2658
+ });
2659
+ }
2660
+ if (matched.length > 1 && !input.containerUse) {
2661
+ throw new import_errors.FlowSurfaceBadRequestError(
2662
+ `flowSurfaces addAction use '${normalizedUse}' requires containerUse to resolve a public action capability`
2663
+ );
2664
+ }
2665
+ item = matched[0];
2666
+ }
2667
+ if (!item && requestedType) {
2668
+ const normalizedType = normalizeActionCatalogKey(input.type);
2669
+ const candidates = (normalizedType ? ACTION_CATALOG_BY_KEY.get(normalizedType) : void 0) || [];
2670
+ const availableCandidates = filterAvailableCatalogItems(candidates, options.enabledPackages);
2671
+ const matchedAll = getContainerScopedActionCatalogItems(candidates, input.containerUse);
2672
+ const matched = getContainerScopedActionCatalogItems(availableCandidates, input.containerUse);
2673
+ if (candidates.length && input.containerUse && !matchedAll.length) {
2674
+ throw new import_errors.FlowSurfaceBadRequestError(
2675
+ `flowSurfaces addAction '${requestedType}' is not allowed under '${input.containerUse}'`
2676
+ );
2677
+ }
2678
+ if ((matchedAll.length || candidates.length) && !matched.length && !availableCandidates.length) {
2679
+ throwUnavailableCatalogItem(candidates[0], {
2680
+ context: options.context || "addAction",
2681
+ requestedType
2682
+ });
2683
+ }
2684
+ if (matchedAll.length && !matched.length) {
2685
+ throwUnavailableCatalogItem(matchedAll[0], {
2686
+ context: options.context || "addAction",
2687
+ requestedType
2688
+ });
2689
+ }
2690
+ if (matched.length > 1 && !input.containerUse) {
2691
+ throw new import_errors.FlowSurfaceBadRequestError(
2692
+ `flowSurfaces addAction type '${requestedType}' requires containerUse to resolve a public action capability`
2693
+ );
2694
+ }
2695
+ item = matched[0];
2696
+ }
2697
+ if (!item) {
2698
+ throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces addAction only supports registered action types/uses`);
2699
+ }
2700
+ if (!isCatalogItemAvailable(item, options.enabledPackages)) {
2701
+ throwUnavailableCatalogItem(item, {
2702
+ context: options.context || "addAction",
2703
+ requestedType: input.type,
2704
+ requestedUse: input.use
2705
+ });
2706
+ }
2707
+ if (requestedType) {
2708
+ const publicKey = toPublicActionCatalogItem(item).key;
2709
+ if (requestedType !== publicKey) {
2710
+ throw new import_errors.FlowSurfaceBadRequestError(
2711
+ `flowSurfaces addAction only supports public action type '${publicKey}' under '${input.containerUse || "unknown"}'`
2712
+ );
2713
+ }
2714
+ }
2715
+ if (input.containerUse && !isActionAllowedInContainer(item, input.containerUse)) {
2716
+ throw new import_errors.FlowSurfaceBadRequestError(
2717
+ `flowSurfaces addAction '${toPublicActionCatalogItem(item).key}' is not allowed under '${input.containerUse}'`
2718
+ );
2719
+ }
2720
+ if (options.requireCreateSupported && item.createSupported === false) {
2721
+ throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces addAction does not support creating '${item.key}' yet`);
2722
+ }
2723
+ return item;
2724
+ }
2725
+ function getNodeContract(use) {
2726
+ if (use) {
2727
+ const contract = nodeContracts.get(use);
2728
+ if (contract) {
2729
+ return contract;
2730
+ }
2731
+ }
2732
+ return READONLY_NODE_CONTRACT;
2733
+ }
2734
+ function getEditableDomainsForUse(use) {
2735
+ return [...getNodeContract(use).editableDomains];
2736
+ }
2737
+ function getSettingsSchemaForUse(use) {
2738
+ return buildSettingsSchema(getNodeContract(use));
2739
+ }
2740
+ function getLayoutCapabilitiesForUse(use) {
2741
+ return getNodeContract(use).layoutCapabilities;
2742
+ }
2743
+ // Annotate the CommonJS export names for ESM import in node:
2744
+ 0 && (module.exports = {
2745
+ ACTION_CATALOG_BY_KEY,
2746
+ ACTION_CATALOG_BY_USE,
2747
+ ACTION_KEY_BY_USE,
2748
+ ACTION_PUBLIC_KEYS,
2749
+ BLOCK_CATALOG_BY_KEY,
2750
+ BLOCK_CATALOG_BY_USE,
2751
+ BLOCK_KEY_BY_USE,
2752
+ READONLY_NODE_CONTRACT,
2753
+ SERVICE_SUPPORTED_FLOW_SURFACE_BLOCK_KEYS,
2754
+ actionCatalog,
2755
+ blockCatalog,
2756
+ filterAvailableCatalogItems,
2757
+ getAvailableActionCatalogItems,
2758
+ getEditableDomainsForUse,
2759
+ getLayoutCapabilitiesForUse,
2760
+ getNodeContract,
2761
+ getSettingsSchemaForUse,
2762
+ isCatalogItemAvailable,
2763
+ resolveSupportedActionCatalogItem,
2764
+ resolveSupportedBlockCatalogItem,
2765
+ resolveSupportedFieldCapability
2766
+ });