@nocobase/plugin-flow-engine 2.1.0-alpha.13 → 2.1.0-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/ai-employees/nathan/index.js +1 -112
- package/dist/ai/ai-employees/nathan/prompt.md +132 -0
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextApis.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextEnvs.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextVars.js +2 -2
- package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/lintAndTestJS.js +2 -2
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +10 -13
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-surfaces/action-scope.d.ts +37 -0
- package/dist/server/flow-surfaces/action-scope.js +146 -0
- package/dist/server/flow-surfaces/builder.d.ts +209 -0
- package/dist/server/flow-surfaces/builder.js +858 -0
- package/dist/server/flow-surfaces/catalog.d.ts +65 -0
- package/dist/server/flow-surfaces/catalog.js +2766 -0
- package/dist/server/flow-surfaces/chart-config.d.ts +121 -0
- package/dist/server/flow-surfaces/chart-config.js +1394 -0
- package/dist/server/flow-surfaces/compiler.d.ts +22 -0
- package/dist/server/flow-surfaces/compiler.js +1129 -0
- package/dist/server/flow-surfaces/configure-options.d.ts +23 -0
- package/dist/server/flow-surfaces/configure-options.js +671 -0
- package/dist/server/flow-surfaces/constants.d.ts +13 -0
- package/dist/server/flow-surfaces/constants.js +137 -0
- package/dist/server/flow-surfaces/context.d.ts +72 -0
- package/dist/server/flow-surfaces/context.js +556 -0
- package/dist/server/flow-surfaces/contract-guard.d.ts +19 -0
- package/dist/server/flow-surfaces/contract-guard.js +411 -0
- package/dist/server/flow-surfaces/errors.d.ts +47 -0
- package/dist/server/flow-surfaces/errors.js +145 -0
- package/dist/server/flow-surfaces/executor.d.ts +13 -0
- package/dist/server/flow-surfaces/executor.js +97 -0
- package/dist/server/flow-surfaces/field-semantics.d.ts +15 -0
- package/dist/server/flow-surfaces/field-semantics.js +80 -0
- package/dist/server/{flow-schema-registry → flow-surfaces}/index.d.ts +3 -2
- package/dist/server/flow-surfaces/index.js +352 -0
- package/dist/server/flow-surfaces/locator.d.ts +28 -0
- package/dist/server/flow-surfaces/locator.js +238 -0
- package/dist/server/flow-surfaces/placement.d.ts +33 -0
- package/dist/server/flow-surfaces/placement.js +192 -0
- package/dist/server/flow-surfaces/route-sync.d.ts +47 -0
- package/dist/server/flow-surfaces/route-sync.js +392 -0
- package/dist/server/flow-surfaces/service.d.ts +530 -0
- package/dist/server/flow-surfaces/service.js +7736 -0
- package/dist/server/flow-surfaces/support-matrix.d.ts +28 -0
- package/dist/server/flow-surfaces/support-matrix.js +246 -0
- package/dist/server/flow-surfaces/surface-context.d.ts +51 -0
- package/dist/server/flow-surfaces/surface-context.js +356 -0
- package/dist/server/flow-surfaces/types.d.ts +192 -0
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +6 -4
- package/dist/server/plugin.d.ts +0 -3
- package/dist/server/plugin.js +7 -36
- package/dist/server/repository.d.ts +9 -68
- package/dist/server/repository.js +106 -420
- package/dist/server/server.d.ts +0 -7
- package/dist/server/server.js +53 -23
- package/dist/server/variables/resolve.d.ts +21 -0
- package/dist/server/variables/resolve.js +79 -0
- package/dist/swagger/flow-surfaces.d.ts +3186 -0
- package/dist/swagger/flow-surfaces.js +4320 -0
- package/dist/swagger/index.d.ts +2837 -810
- package/dist/swagger/index.js +14 -696
- package/package.json +2 -4
- package/dist/node_modules/ajv/.runkit_example.js +0 -23
- package/dist/node_modules/ajv/LICENSE +0 -22
- package/dist/node_modules/ajv/dist/2019.d.ts +0 -19
- package/dist/node_modules/ajv/dist/2019.js +0 -61
- package/dist/node_modules/ajv/dist/2020.d.ts +0 -19
- package/dist/node_modules/ajv/dist/2020.js +0 -55
- package/dist/node_modules/ajv/dist/ajv.d.ts +0 -18
- package/dist/node_modules/ajv/dist/ajv.js +0 -7
- package/dist/node_modules/ajv/dist/compile/codegen/code.d.ts +0 -40
- package/dist/node_modules/ajv/dist/compile/codegen/code.js +0 -156
- package/dist/node_modules/ajv/dist/compile/codegen/index.d.ts +0 -79
- package/dist/node_modules/ajv/dist/compile/codegen/index.js +0 -697
- package/dist/node_modules/ajv/dist/compile/codegen/scope.d.ts +0 -79
- package/dist/node_modules/ajv/dist/compile/codegen/scope.js +0 -143
- package/dist/node_modules/ajv/dist/compile/errors.d.ts +0 -13
- package/dist/node_modules/ajv/dist/compile/errors.js +0 -123
- package/dist/node_modules/ajv/dist/compile/index.d.ts +0 -80
- package/dist/node_modules/ajv/dist/compile/index.js +0 -242
- package/dist/node_modules/ajv/dist/compile/jtd/parse.d.ts +0 -4
- package/dist/node_modules/ajv/dist/compile/jtd/parse.js +0 -350
- package/dist/node_modules/ajv/dist/compile/jtd/serialize.d.ts +0 -4
- package/dist/node_modules/ajv/dist/compile/jtd/serialize.js +0 -236
- package/dist/node_modules/ajv/dist/compile/jtd/types.d.ts +0 -6
- package/dist/node_modules/ajv/dist/compile/jtd/types.js +0 -14
- package/dist/node_modules/ajv/dist/compile/names.d.ts +0 -20
- package/dist/node_modules/ajv/dist/compile/names.js +0 -28
- package/dist/node_modules/ajv/dist/compile/ref_error.d.ts +0 -6
- package/dist/node_modules/ajv/dist/compile/ref_error.js +0 -12
- package/dist/node_modules/ajv/dist/compile/resolve.d.ts +0 -12
- package/dist/node_modules/ajv/dist/compile/resolve.js +0 -155
- package/dist/node_modules/ajv/dist/compile/rules.d.ts +0 -28
- package/dist/node_modules/ajv/dist/compile/rules.js +0 -26
- package/dist/node_modules/ajv/dist/compile/util.d.ts +0 -40
- package/dist/node_modules/ajv/dist/compile/util.js +0 -178
- package/dist/node_modules/ajv/dist/compile/validate/applicability.d.ts +0 -6
- package/dist/node_modules/ajv/dist/compile/validate/applicability.js +0 -19
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +0 -4
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -50
- package/dist/node_modules/ajv/dist/compile/validate/dataType.d.ts +0 -17
- package/dist/node_modules/ajv/dist/compile/validate/dataType.js +0 -203
- package/dist/node_modules/ajv/dist/compile/validate/defaults.d.ts +0 -2
- package/dist/node_modules/ajv/dist/compile/validate/defaults.js +0 -35
- package/dist/node_modules/ajv/dist/compile/validate/index.d.ts +0 -42
- package/dist/node_modules/ajv/dist/compile/validate/index.js +0 -520
- package/dist/node_modules/ajv/dist/compile/validate/keyword.d.ts +0 -8
- package/dist/node_modules/ajv/dist/compile/validate/keyword.js +0 -124
- package/dist/node_modules/ajv/dist/compile/validate/subschema.d.ts +0 -47
- package/dist/node_modules/ajv/dist/compile/validate/subschema.js +0 -81
- package/dist/node_modules/ajv/dist/core.d.ts +0 -174
- package/dist/node_modules/ajv/dist/core.js +0 -618
- package/dist/node_modules/ajv/dist/jtd.d.ts +0 -47
- package/dist/node_modules/ajv/dist/jtd.js +0 -72
- package/dist/node_modules/ajv/dist/refs/data.json +0 -13
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +0 -2
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +0 -28
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +0 -53
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +0 -17
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +0 -57
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +0 -14
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +0 -37
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +0 -90
- package/dist/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +0 -39
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +0 -2
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +0 -30
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +0 -48
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +0 -17
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +0 -51
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +0 -14
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +0 -37
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +0 -15
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +0 -90
- package/dist/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +0 -55
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-06.json +0 -137
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json +0 -151
- package/dist/node_modules/ajv/dist/refs/json-schema-secure.json +0 -88
- package/dist/node_modules/ajv/dist/refs/jtd-schema.d.ts +0 -3
- package/dist/node_modules/ajv/dist/refs/jtd-schema.js +0 -118
- package/dist/node_modules/ajv/dist/runtime/equal.d.ts +0 -6
- package/dist/node_modules/ajv/dist/runtime/equal.js +0 -7
- package/dist/node_modules/ajv/dist/runtime/parseJson.d.ts +0 -18
- package/dist/node_modules/ajv/dist/runtime/parseJson.js +0 -185
- package/dist/node_modules/ajv/dist/runtime/quote.d.ts +0 -5
- package/dist/node_modules/ajv/dist/runtime/quote.js +0 -30
- package/dist/node_modules/ajv/dist/runtime/re2.d.ts +0 -6
- package/dist/node_modules/ajv/dist/runtime/re2.js +0 -6
- package/dist/node_modules/ajv/dist/runtime/timestamp.d.ts +0 -5
- package/dist/node_modules/ajv/dist/runtime/timestamp.js +0 -42
- package/dist/node_modules/ajv/dist/runtime/ucs2length.d.ts +0 -5
- package/dist/node_modules/ajv/dist/runtime/ucs2length.js +0 -24
- package/dist/node_modules/ajv/dist/runtime/uri.d.ts +0 -6
- package/dist/node_modules/ajv/dist/runtime/uri.js +0 -6
- package/dist/node_modules/ajv/dist/runtime/validation_error.d.ts +0 -7
- package/dist/node_modules/ajv/dist/runtime/validation_error.js +0 -11
- package/dist/node_modules/ajv/dist/standalone/index.d.ts +0 -6
- package/dist/node_modules/ajv/dist/standalone/index.js +0 -90
- package/dist/node_modules/ajv/dist/standalone/instance.d.ts +0 -12
- package/dist/node_modules/ajv/dist/standalone/instance.js +0 -35
- package/dist/node_modules/ajv/dist/types/index.d.ts +0 -183
- package/dist/node_modules/ajv/dist/types/index.js +0 -3
- package/dist/node_modules/ajv/dist/types/json-schema.d.ts +0 -125
- package/dist/node_modules/ajv/dist/types/json-schema.js +0 -3
- package/dist/node_modules/ajv/dist/types/jtd-schema.d.ts +0 -174
- package/dist/node_modules/ajv/dist/types/jtd-schema.js +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +0 -8
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -49
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +0 -6
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -106
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -23
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +0 -4
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -12
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +0 -7
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -95
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +0 -21
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -85
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +0 -11
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +0 -6
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -66
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +0 -13
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -44
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +0 -5
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -52
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +0 -6
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -30
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +0 -4
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -26
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +0 -6
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -60
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -75
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -12
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -54
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +0 -6
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -38
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -13
- package/dist/node_modules/ajv/dist/vocabularies/code.d.ts +0 -17
- package/dist/node_modules/ajv/dist/vocabularies/code.js +0 -131
- package/dist/node_modules/ajv/dist/vocabularies/core/id.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/core/id.js +0 -10
- package/dist/node_modules/ajv/dist/vocabularies/core/index.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/core/index.js +0 -16
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.d.ts +0 -8
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +0 -122
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +0 -5
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -104
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +0 -10
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -9
- package/dist/node_modules/ajv/dist/vocabularies/draft2020.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/draft2020.js +0 -23
- package/dist/node_modules/ajv/dist/vocabularies/draft7.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/draft7.js +0 -17
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +0 -5
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +0 -30
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +0 -5
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +0 -51
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/index.js +0 -9
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +0 -16
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +0 -10
- package/dist/node_modules/ajv/dist/vocabularies/errors.d.ts +0 -9
- package/dist/node_modules/ajv/dist/vocabularies/errors.js +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/format/format.d.ts +0 -8
- package/dist/node_modules/ajv/dist/vocabularies/format/format.js +0 -92
- package/dist/node_modules/ajv/dist/vocabularies/format/index.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/format/index.js +0 -6
- package/dist/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +0 -6
- package/dist/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +0 -71
- package/dist/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +0 -5
- package/dist/node_modules/ajv/dist/vocabularies/jtd/elements.js +0 -24
- package/dist/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +0 -6
- package/dist/node_modules/ajv/dist/vocabularies/jtd/enum.js +0 -43
- package/dist/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +0 -9
- package/dist/node_modules/ajv/dist/vocabularies/jtd/error.js +0 -20
- package/dist/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +0 -10
- package/dist/node_modules/ajv/dist/vocabularies/jtd/index.js +0 -29
- package/dist/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +0 -5
- package/dist/node_modules/ajv/dist/vocabularies/jtd/metadata.js +0 -25
- package/dist/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +0 -4
- package/dist/node_modules/ajv/dist/vocabularies/jtd/nullable.js +0 -22
- package/dist/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +0 -15
- package/dist/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +0 -22
- package/dist/node_modules/ajv/dist/vocabularies/jtd/properties.js +0 -149
- package/dist/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +0 -4
- package/dist/node_modules/ajv/dist/vocabularies/jtd/ref.js +0 -67
- package/dist/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +0 -10
- package/dist/node_modules/ajv/dist/vocabularies/jtd/type.js +0 -69
- package/dist/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/jtd/union.js +0 -12
- package/dist/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +0 -5
- package/dist/node_modules/ajv/dist/vocabularies/jtd/values.js +0 -51
- package/dist/node_modules/ajv/dist/vocabularies/metadata.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/metadata.js +0 -18
- package/dist/node_modules/ajv/dist/vocabularies/next.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/next.js +0 -8
- package/dist/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/unevaluated/index.js +0 -7
- package/dist/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +0 -6
- package/dist/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +0 -40
- package/dist/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +0 -6
- package/dist/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +0 -65
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.d.ts +0 -6
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +0 -25
- package/dist/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +0 -5
- package/dist/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +0 -12
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +0 -8
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -48
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.d.ts +0 -16
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +0 -33
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitContains.js +0 -15
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -24
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -27
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +0 -11
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -27
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +0 -3
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -24
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +0 -8
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -26
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +0 -8
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -33
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.d.ts +0 -8
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +0 -79
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +0 -9
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -64
- package/dist/node_modules/ajv/lib/2019.ts +0 -81
- package/dist/node_modules/ajv/lib/2020.ts +0 -75
- package/dist/node_modules/ajv/lib/ajv.ts +0 -70
- package/dist/node_modules/ajv/lib/compile/codegen/code.ts +0 -169
- package/dist/node_modules/ajv/lib/compile/codegen/index.ts +0 -852
- package/dist/node_modules/ajv/lib/compile/codegen/scope.ts +0 -215
- package/dist/node_modules/ajv/lib/compile/errors.ts +0 -184
- package/dist/node_modules/ajv/lib/compile/index.ts +0 -324
- package/dist/node_modules/ajv/lib/compile/jtd/parse.ts +0 -411
- package/dist/node_modules/ajv/lib/compile/jtd/serialize.ts +0 -277
- package/dist/node_modules/ajv/lib/compile/jtd/types.ts +0 -16
- package/dist/node_modules/ajv/lib/compile/names.ts +0 -27
- package/dist/node_modules/ajv/lib/compile/ref_error.ts +0 -13
- package/dist/node_modules/ajv/lib/compile/resolve.ts +0 -149
- package/dist/node_modules/ajv/lib/compile/rules.ts +0 -50
- package/dist/node_modules/ajv/lib/compile/util.ts +0 -213
- package/dist/node_modules/ajv/lib/compile/validate/applicability.ts +0 -22
- package/dist/node_modules/ajv/lib/compile/validate/boolSchema.ts +0 -47
- package/dist/node_modules/ajv/lib/compile/validate/dataType.ts +0 -230
- package/dist/node_modules/ajv/lib/compile/validate/defaults.ts +0 -32
- package/dist/node_modules/ajv/lib/compile/validate/index.ts +0 -582
- package/dist/node_modules/ajv/lib/compile/validate/keyword.ts +0 -171
- package/dist/node_modules/ajv/lib/compile/validate/subschema.ts +0 -135
- package/dist/node_modules/ajv/lib/core.ts +0 -892
- package/dist/node_modules/ajv/lib/jtd.ts +0 -132
- package/dist/node_modules/ajv/lib/refs/data.json +0 -13
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +0 -28
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +0 -53
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +0 -17
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +0 -57
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +0 -14
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +0 -37
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +0 -90
- package/dist/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +0 -39
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +0 -30
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +0 -48
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +0 -17
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +0 -51
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +0 -14
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +0 -37
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +0 -15
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +0 -90
- package/dist/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +0 -55
- package/dist/node_modules/ajv/lib/refs/json-schema-draft-06.json +0 -137
- package/dist/node_modules/ajv/lib/refs/json-schema-draft-07.json +0 -151
- package/dist/node_modules/ajv/lib/refs/json-schema-secure.json +0 -88
- package/dist/node_modules/ajv/lib/refs/jtd-schema.ts +0 -130
- package/dist/node_modules/ajv/lib/runtime/equal.ts +0 -7
- package/dist/node_modules/ajv/lib/runtime/parseJson.ts +0 -177
- package/dist/node_modules/ajv/lib/runtime/quote.ts +0 -31
- package/dist/node_modules/ajv/lib/runtime/re2.ts +0 -6
- package/dist/node_modules/ajv/lib/runtime/timestamp.ts +0 -46
- package/dist/node_modules/ajv/lib/runtime/ucs2length.ts +0 -20
- package/dist/node_modules/ajv/lib/runtime/uri.ts +0 -6
- package/dist/node_modules/ajv/lib/runtime/validation_error.ts +0 -13
- package/dist/node_modules/ajv/lib/standalone/index.ts +0 -100
- package/dist/node_modules/ajv/lib/standalone/instance.ts +0 -36
- package/dist/node_modules/ajv/lib/types/index.ts +0 -244
- package/dist/node_modules/ajv/lib/types/json-schema.ts +0 -187
- package/dist/node_modules/ajv/lib/types/jtd-schema.ts +0 -273
- package/dist/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +0 -56
- package/dist/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +0 -118
- package/dist/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +0 -22
- package/dist/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +0 -14
- package/dist/node_modules/ajv/lib/vocabularies/applicator/contains.ts +0 -109
- package/dist/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +0 -112
- package/dist/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +0 -11
- package/dist/node_modules/ajv/lib/vocabularies/applicator/if.ts +0 -80
- package/dist/node_modules/ajv/lib/vocabularies/applicator/index.ts +0 -53
- package/dist/node_modules/ajv/lib/vocabularies/applicator/items.ts +0 -59
- package/dist/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +0 -36
- package/dist/node_modules/ajv/lib/vocabularies/applicator/not.ts +0 -38
- package/dist/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +0 -82
- package/dist/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +0 -91
- package/dist/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +0 -12
- package/dist/node_modules/ajv/lib/vocabularies/applicator/properties.ts +0 -57
- package/dist/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +0 -50
- package/dist/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +0 -13
- package/dist/node_modules/ajv/lib/vocabularies/code.ts +0 -168
- package/dist/node_modules/ajv/lib/vocabularies/core/id.ts +0 -10
- package/dist/node_modules/ajv/lib/vocabularies/core/index.ts +0 -16
- package/dist/node_modules/ajv/lib/vocabularies/core/ref.ts +0 -129
- package/dist/node_modules/ajv/lib/vocabularies/discriminator/index.ts +0 -113
- package/dist/node_modules/ajv/lib/vocabularies/discriminator/types.ts +0 -12
- package/dist/node_modules/ajv/lib/vocabularies/draft2020.ts +0 -23
- package/dist/node_modules/ajv/lib/vocabularies/draft7.ts +0 -17
- package/dist/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +0 -31
- package/dist/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +0 -51
- package/dist/node_modules/ajv/lib/vocabularies/dynamic/index.ts +0 -9
- package/dist/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +0 -14
- package/dist/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +0 -10
- package/dist/node_modules/ajv/lib/vocabularies/errors.ts +0 -18
- package/dist/node_modules/ajv/lib/vocabularies/format/format.ts +0 -120
- package/dist/node_modules/ajv/lib/vocabularies/format/index.ts +0 -6
- package/dist/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +0 -89
- package/dist/node_modules/ajv/lib/vocabularies/jtd/elements.ts +0 -32
- package/dist/node_modules/ajv/lib/vocabularies/jtd/enum.ts +0 -45
- package/dist/node_modules/ajv/lib/vocabularies/jtd/error.ts +0 -23
- package/dist/node_modules/ajv/lib/vocabularies/jtd/index.ts +0 -37
- package/dist/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +0 -24
- package/dist/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +0 -21
- package/dist/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +0 -15
- package/dist/node_modules/ajv/lib/vocabularies/jtd/properties.ts +0 -184
- package/dist/node_modules/ajv/lib/vocabularies/jtd/ref.ts +0 -76
- package/dist/node_modules/ajv/lib/vocabularies/jtd/type.ts +0 -75
- package/dist/node_modules/ajv/lib/vocabularies/jtd/union.ts +0 -12
- package/dist/node_modules/ajv/lib/vocabularies/jtd/values.ts +0 -58
- package/dist/node_modules/ajv/lib/vocabularies/metadata.ts +0 -17
- package/dist/node_modules/ajv/lib/vocabularies/next.ts +0 -8
- package/dist/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +0 -7
- package/dist/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +0 -47
- package/dist/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +0 -85
- package/dist/node_modules/ajv/lib/vocabularies/validation/const.ts +0 -28
- package/dist/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +0 -23
- package/dist/node_modules/ajv/lib/vocabularies/validation/enum.ts +0 -54
- package/dist/node_modules/ajv/lib/vocabularies/validation/index.ts +0 -49
- package/dist/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +0 -16
- package/dist/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +0 -26
- package/dist/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +0 -30
- package/dist/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +0 -42
- package/dist/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +0 -26
- package/dist/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +0 -34
- package/dist/node_modules/ajv/lib/vocabularies/validation/pattern.ts +0 -39
- package/dist/node_modules/ajv/lib/vocabularies/validation/required.ts +0 -98
- package/dist/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +0 -79
- package/dist/node_modules/ajv/package.json +0 -1
- package/dist/server/flow-models/action-handlers.d.ts +0 -26
- package/dist/server/flow-models/action-handlers.js +0 -209
- package/dist/server/flow-models/http-error-adapter.d.ts +0 -10
- package/dist/server/flow-models/http-error-adapter.js +0 -58
- package/dist/server/flow-models/mutate-executor.d.ts +0 -17
- package/dist/server/flow-models/mutate-executor.js +0 -309
- package/dist/server/flow-models/repository-internals/duplicate-helpers.d.ts +0 -12
- package/dist/server/flow-models/repository-internals/duplicate-helpers.js +0 -121
- package/dist/server/flow-models/repository-internals/ensure-lock.d.ts +0 -15
- package/dist/server/flow-models/repository-internals/ensure-lock.js +0 -117
- package/dist/server/flow-models/repository-internals/errors.d.ts +0 -21
- package/dist/server/flow-models/repository-internals/errors.js +0 -78
- package/dist/server/flow-models/schema-contribution-collector.d.ts +0 -28
- package/dist/server/flow-models/schema-contribution-collector.js +0 -238
- package/dist/server/flow-models/validation-facade.d.ts +0 -29
- package/dist/server/flow-models/validation-facade.js +0 -181
- package/dist/server/flow-schema-contributions/actions/aclCheck.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/aclCheck.js +0 -46
- package/dist/server/flow-schema-contributions/actions/aclCheckRefresh.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/aclCheckRefresh.js +0 -46
- package/dist/server/flow-schema-contributions/actions/actionLinkageRules.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/actionLinkageRules.js +0 -48
- package/dist/server/flow-schema-contributions/actions/confirm.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/confirm.js +0 -73
- package/dist/server/flow-schema-contributions/actions/customVariable.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/customVariable.js +0 -76
- package/dist/server/flow-schema-contributions/actions/dataScope.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/dataScope.js +0 -79
- package/dist/server/flow-schema-contributions/actions/detailsFieldLinkageRules.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/detailsFieldLinkageRules.js +0 -62
- package/dist/server/flow-schema-contributions/actions/fieldLinkageRules.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/fieldLinkageRules.js +0 -62
- package/dist/server/flow-schema-contributions/actions/filterFormDefaultValues.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/filterFormDefaultValues.js +0 -80
- package/dist/server/flow-schema-contributions/actions/formAssignRules.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/formAssignRules.js +0 -62
- package/dist/server/flow-schema-contributions/actions/index.d.ts +0 -31
- package/dist/server/flow-schema-contributions/actions/index.js +0 -117
- package/dist/server/flow-schema-contributions/actions/layout.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/layout.js +0 -68
- package/dist/server/flow-schema-contributions/actions/linkageRulesRefresh.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/linkageRulesRefresh.js +0 -50
- package/dist/server/flow-schema-contributions/actions/navigateToURL.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/navigateToURL.js +0 -82
- package/dist/server/flow-schema-contributions/actions/openView.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/openView.js +0 -68
- package/dist/server/flow-schema-contributions/actions/refreshTargetBlocks.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/refreshTargetBlocks.js +0 -56
- package/dist/server/flow-schema-contributions/actions/runjs.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/runjs.js +0 -55
- package/dist/server/flow-schema-contributions/actions/setTargetDataScope.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/setTargetDataScope.js +0 -59
- package/dist/server/flow-schema-contributions/actions/showMessage.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/showMessage.js +0 -69
- package/dist/server/flow-schema-contributions/actions/showNotification.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/showNotification.js +0 -76
- package/dist/server/flow-schema-contributions/actions/sortingRule.d.ts +0 -10
- package/dist/server/flow-schema-contributions/actions/sortingRule.js +0 -67
- package/dist/server/flow-schema-contributions/field-models.d.ts +0 -12
- package/dist/server/flow-schema-contributions/field-models.js +0 -693
- package/dist/server/flow-schema-contributions/index.d.ts +0 -13
- package/dist/server/flow-schema-contributions/index.js +0 -64
- package/dist/server/flow-schema-contributions/models/ActionBulkEditModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/ActionBulkEditModel.js +0 -382
- package/dist/server/flow-schema-contributions/models/ActionBulkUpdateModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/ActionBulkUpdateModel.js +0 -169
- package/dist/server/flow-schema-contributions/models/ActionCustomRequestModel.d.ts +0 -11
- package/dist/server/flow-schema-contributions/models/ActionCustomRequestModel.js +0 -115
- package/dist/server/flow-schema-contributions/models/ActionDuplicateModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/ActionDuplicateModel.js +0 -169
- package/dist/server/flow-schema-contributions/models/ActionExportModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/ActionExportModel.js +0 -141
- package/dist/server/flow-schema-contributions/models/ActionImportModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/ActionImportModel.js +0 -122
- package/dist/server/flow-schema-contributions/models/ActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/ActionModel.js +0 -202
- package/dist/server/flow-schema-contributions/models/AddChildActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/AddChildActionModel.js +0 -47
- package/dist/server/flow-schema-contributions/models/AddNewActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/AddNewActionModel.js +0 -93
- package/dist/server/flow-schema-contributions/models/AssignFormGridModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/AssignFormGridModel.js +0 -82
- package/dist/server/flow-schema-contributions/models/AssignFormItemModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/AssignFormItemModel.js +0 -80
- package/dist/server/flow-schema-contributions/models/AssignFormModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/AssignFormModel.js +0 -122
- package/dist/server/flow-schema-contributions/models/BasePageTabModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/BasePageTabModel.js +0 -71
- package/dist/server/flow-schema-contributions/models/BlockGridCardModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/BlockGridCardModel.js +0 -449
- package/dist/server/flow-schema-contributions/models/BlockGridModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/BlockGridModel.js +0 -81
- package/dist/server/flow-schema-contributions/models/BlockIframeModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/BlockIframeModel.js +0 -143
- package/dist/server/flow-schema-contributions/models/BlockListModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/BlockListModel.js +0 -435
- package/dist/server/flow-schema-contributions/models/BlockMarkdownModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/BlockMarkdownModel.js +0 -108
- package/dist/server/flow-schema-contributions/models/BlockWorkbenchModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/BlockWorkbenchModel.js +0 -173
- package/dist/server/flow-schema-contributions/models/BulkDeleteActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/BulkDeleteActionModel.js +0 -47
- package/dist/server/flow-schema-contributions/models/ChildPageModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/ChildPageModel.js +0 -106
- package/dist/server/flow-schema-contributions/models/ChildPageTabModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/ChildPageTabModel.js +0 -114
- package/dist/server/flow-schema-contributions/models/CommentsModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/CommentsModel.js +0 -255
- package/dist/server/flow-schema-contributions/models/CreateFormModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/CreateFormModel.js +0 -54
- package/dist/server/flow-schema-contributions/models/DataVisualizationModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/DataVisualizationModel.js +0 -240
- package/dist/server/flow-schema-contributions/models/DeleteActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/DeleteActionModel.js +0 -47
- package/dist/server/flow-schema-contributions/models/DetailsBlockModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/DetailsBlockModel.js +0 -179
- package/dist/server/flow-schema-contributions/models/DetailsGridModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/DetailsGridModel.js +0 -82
- package/dist/server/flow-schema-contributions/models/DetailsItemModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/DetailsItemModel.js +0 -77
- package/dist/server/flow-schema-contributions/models/EditActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/EditActionModel.js +0 -93
- package/dist/server/flow-schema-contributions/models/EditFormModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/EditFormModel.js +0 -103
- package/dist/server/flow-schema-contributions/models/ExpandCollapseActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/ExpandCollapseActionModel.js +0 -47
- package/dist/server/flow-schema-contributions/models/FieldAttachmentUrlModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FieldAttachmentUrlModel.js +0 -87
- package/dist/server/flow-schema-contributions/models/FieldCodeModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FieldCodeModel.js +0 -99
- package/dist/server/flow-schema-contributions/models/FieldFormulaModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FieldFormulaModel.js +0 -152
- package/dist/server/flow-schema-contributions/models/FieldMarkdownVditorModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FieldMarkdownVditorModel.js +0 -92
- package/dist/server/flow-schema-contributions/models/FieldSequenceModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FieldSequenceModel.js +0 -60
- package/dist/server/flow-schema-contributions/models/FieldSortModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FieldSortModel.js +0 -87
- package/dist/server/flow-schema-contributions/models/FileManagerModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FileManagerModel.js +0 -115
- package/dist/server/flow-schema-contributions/models/FilterActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FilterActionModel.js +0 -57
- package/dist/server/flow-schema-contributions/models/FilterFormBlockModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FilterFormBlockModel.js +0 -155
- package/dist/server/flow-schema-contributions/models/FilterFormCollapseActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FilterFormCollapseActionModel.js +0 -85
- package/dist/server/flow-schema-contributions/models/FilterFormCustomFieldModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FilterFormCustomFieldModel.js +0 -89
- package/dist/server/flow-schema-contributions/models/FilterFormGridModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FilterFormGridModel.js +0 -82
- package/dist/server/flow-schema-contributions/models/FilterFormItemModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FilterFormItemModel.js +0 -77
- package/dist/server/flow-schema-contributions/models/FilterFormJSActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FilterFormJSActionModel.js +0 -108
- package/dist/server/flow-schema-contributions/models/FilterFormResetActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FilterFormResetActionModel.js +0 -87
- package/dist/server/flow-schema-contributions/models/FilterFormSubmitActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FilterFormSubmitActionModel.js +0 -87
- package/dist/server/flow-schema-contributions/models/FormAssociationItemModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FormAssociationItemModel.js +0 -78
- package/dist/server/flow-schema-contributions/models/FormBlockModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FormBlockModel.js +0 -45
- package/dist/server/flow-schema-contributions/models/FormGridModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FormGridModel.js +0 -67
- package/dist/server/flow-schema-contributions/models/FormItemModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FormItemModel.js +0 -77
- package/dist/server/flow-schema-contributions/models/FormSubmitActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/FormSubmitActionModel.js +0 -87
- package/dist/server/flow-schema-contributions/models/JSActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/JSActionModel.js +0 -65
- package/dist/server/flow-schema-contributions/models/JSBlockModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/JSBlockModel.js +0 -90
- package/dist/server/flow-schema-contributions/models/JSCollectionActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/JSCollectionActionModel.js +0 -47
- package/dist/server/flow-schema-contributions/models/JSColumnModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/JSColumnModel.js +0 -100
- package/dist/server/flow-schema-contributions/models/JSFormActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/JSFormActionModel.js +0 -47
- package/dist/server/flow-schema-contributions/models/JSItemModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/JSItemModel.js +0 -87
- package/dist/server/flow-schema-contributions/models/JSRecordActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/JSRecordActionModel.js +0 -47
- package/dist/server/flow-schema-contributions/models/LinkActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/LinkActionModel.js +0 -47
- package/dist/server/flow-schema-contributions/models/MapModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/MapModel.js +0 -427
- package/dist/server/flow-schema-contributions/models/PageModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/PageModel.js +0 -159
- package/dist/server/flow-schema-contributions/models/PageTabModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/PageTabModel.js +0 -69
- package/dist/server/flow-schema-contributions/models/PopupActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/PopupActionModel.js +0 -92
- package/dist/server/flow-schema-contributions/models/PopupCollectionActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/PopupCollectionActionModel.js +0 -119
- package/dist/server/flow-schema-contributions/models/RefreshActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/RefreshActionModel.js +0 -47
- package/dist/server/flow-schema-contributions/models/RootPageModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/RootPageModel.js +0 -124
- package/dist/server/flow-schema-contributions/models/RootPageTabModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/RootPageTabModel.js +0 -69
- package/dist/server/flow-schema-contributions/models/RouteModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/RouteModel.js +0 -121
- package/dist/server/flow-schema-contributions/models/TableActionsColumnModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/TableActionsColumnModel.js +0 -93
- package/dist/server/flow-schema-contributions/models/TableBlockModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/TableBlockModel.js +0 -254
- package/dist/server/flow-schema-contributions/models/TableColumnModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/TableColumnModel.js +0 -77
- package/dist/server/flow-schema-contributions/models/TableCustomColumnModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/TableCustomColumnModel.js +0 -66
- package/dist/server/flow-schema-contributions/models/UiTemplatesModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/UiTemplatesModel.js +0 -130
- package/dist/server/flow-schema-contributions/models/UpdateRecordActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/UpdateRecordActionModel.js +0 -173
- package/dist/server/flow-schema-contributions/models/ViewActionModel.d.ts +0 -10
- package/dist/server/flow-schema-contributions/models/ViewActionModel.js +0 -123
- package/dist/server/flow-schema-contributions/models/index.d.ts +0 -71
- package/dist/server/flow-schema-contributions/models/index.js +0 -371
- package/dist/server/flow-schema-contributions/shared.d.ts +0 -501
- package/dist/server/flow-schema-contributions/shared.js +0 -1649
- package/dist/server/flow-schema-registry/FlowSchemaRegistry.d.ts +0 -154
- package/dist/server/flow-schema-registry/FlowSchemaRegistry.js +0 -1424
- package/dist/server/flow-schema-registry/flow-schema-registry/fieldBinding.d.ts +0 -32
- package/dist/server/flow-schema-registry/flow-schema-registry/fieldBinding.js +0 -159
- package/dist/server/flow-schema-registry/flow-schema-registry/modelPatches.d.ts +0 -16
- package/dist/server/flow-schema-registry/flow-schema-registry/modelPatches.js +0 -226
- package/dist/server/flow-schema-registry/flow-schema-registry/schemaInference.d.ts +0 -17
- package/dist/server/flow-schema-registry/flow-schema-registry/schemaInference.js +0 -204
- package/dist/server/flow-schema-registry/flow-schema-registry/utils.d.ts +0 -25
- package/dist/server/flow-schema-registry/flow-schema-registry/utils.js +0 -278
- package/dist/server/flow-schema-registry/index.js +0 -32
- package/dist/server/flow-schema-registry/types.d.ts +0 -244
- package/dist/server/flow-schema-service.d.ts +0 -87
- package/dist/server/flow-schema-service.js +0 -963
- /package/dist/server/{flow-schema-registry → flow-surfaces}/types.js +0 -0
|
@@ -0,0 +1,1129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var compiler_exports = {};
|
|
38
|
+
__export(compiler_exports, {
|
|
39
|
+
buildAutoLayout: () => buildAutoLayout,
|
|
40
|
+
compileApplySpec: () => compileApplySpec
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(compiler_exports);
|
|
43
|
+
var import_lodash = __toESM(require("lodash"));
|
|
44
|
+
var import_catalog = require("./catalog");
|
|
45
|
+
var import_placement = require("./placement");
|
|
46
|
+
var import_errors = require("./errors");
|
|
47
|
+
function makeOpRef(path) {
|
|
48
|
+
return { ref: path };
|
|
49
|
+
}
|
|
50
|
+
const FORM_GRID_USES = /* @__PURE__ */ new Set(["FormGridModel", "AssignFormGridModel"]);
|
|
51
|
+
const ACTION_USES = new Set(Array.from(import_catalog.ACTION_KEY_BY_USE.keys()));
|
|
52
|
+
const BLOCK_USES = new Set(Array.from(import_catalog.BLOCK_KEY_BY_USE.keys()));
|
|
53
|
+
const FIELD_WRAPPER_USES = import_placement.FLOW_SURFACE_FIELD_WRAPPER_USES;
|
|
54
|
+
const STANDALONE_FIELD_USES = /* @__PURE__ */ new Set(["JSColumnModel", "JSItemModel"]);
|
|
55
|
+
const FORM_BLOCK_USES = import_placement.FLOW_SURFACE_FORM_BLOCK_USES;
|
|
56
|
+
const DETAILS_BLOCK_USES = import_placement.FLOW_SURFACE_DETAILS_BLOCK_USES;
|
|
57
|
+
const FILTER_FORM_BLOCK_USES = import_placement.FLOW_SURFACE_FILTER_FORM_BLOCK_USES;
|
|
58
|
+
const RECORD_ACTION_INTERNAL_CONTAINER_USES = /* @__PURE__ */ new Set([
|
|
59
|
+
"TableActionsColumnModel",
|
|
60
|
+
"ListItemModel",
|
|
61
|
+
"GridCardItemModel"
|
|
62
|
+
]);
|
|
63
|
+
function compileApplySpec(target, currentTree, spec) {
|
|
64
|
+
if (!(currentTree == null ? void 0 : currentTree.uid) || !(currentTree == null ? void 0 : currentTree.use)) {
|
|
65
|
+
throw new import_errors.FlowSurfaceBadRequestError("flowSurfaces apply requires an existing target subtree");
|
|
66
|
+
}
|
|
67
|
+
const ops = [];
|
|
68
|
+
const state = {
|
|
69
|
+
seq: 0,
|
|
70
|
+
clientKeyToUid: {}
|
|
71
|
+
};
|
|
72
|
+
if (currentTree.use === "RootPageModel") {
|
|
73
|
+
syncRoutePageNode(ops, state, target, currentTree, spec);
|
|
74
|
+
return {
|
|
75
|
+
ops,
|
|
76
|
+
clientKeyToUid: state.clientKeyToUid
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
if (currentTree.use === "ChildPageModel") {
|
|
80
|
+
syncExistingNode(
|
|
81
|
+
ops,
|
|
82
|
+
state,
|
|
83
|
+
{
|
|
84
|
+
uidRef: currentTree.uid,
|
|
85
|
+
use: currentTree.use
|
|
86
|
+
},
|
|
87
|
+
currentTree,
|
|
88
|
+
{
|
|
89
|
+
uid: currentTree.uid,
|
|
90
|
+
use: currentTree.use,
|
|
91
|
+
props: spec.props,
|
|
92
|
+
decoratorProps: spec.decoratorProps,
|
|
93
|
+
stepParams: spec.stepParams,
|
|
94
|
+
flowRegistry: spec.flowRegistry,
|
|
95
|
+
subModels: spec.subModels
|
|
96
|
+
},
|
|
97
|
+
{ uid: currentTree.uid }
|
|
98
|
+
);
|
|
99
|
+
return {
|
|
100
|
+
ops,
|
|
101
|
+
clientKeyToUid: state.clientKeyToUid
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
if (currentTree.use === "RootPageTabModel") {
|
|
105
|
+
syncRouteTabNode(ops, state, target, currentTree, spec);
|
|
106
|
+
return {
|
|
107
|
+
ops,
|
|
108
|
+
clientKeyToUid: state.clientKeyToUid
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
if (currentTree.use === "ChildPageTabModel") {
|
|
112
|
+
syncTabNode(ops, state, { uid: currentTree.uid }, currentTree, spec);
|
|
113
|
+
return {
|
|
114
|
+
ops,
|
|
115
|
+
clientKeyToUid: state.clientKeyToUid
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
const rootSpec = {
|
|
119
|
+
uid: currentTree.uid,
|
|
120
|
+
use: currentTree.use,
|
|
121
|
+
props: spec.props,
|
|
122
|
+
decoratorProps: spec.decoratorProps,
|
|
123
|
+
stepParams: spec.stepParams,
|
|
124
|
+
flowRegistry: spec.flowRegistry,
|
|
125
|
+
subModels: spec.subModels
|
|
126
|
+
};
|
|
127
|
+
syncExistingNode(
|
|
128
|
+
ops,
|
|
129
|
+
state,
|
|
130
|
+
{
|
|
131
|
+
uidRef: currentTree.uid,
|
|
132
|
+
use: currentTree.use
|
|
133
|
+
},
|
|
134
|
+
currentTree,
|
|
135
|
+
rootSpec,
|
|
136
|
+
target
|
|
137
|
+
);
|
|
138
|
+
return {
|
|
139
|
+
ops,
|
|
140
|
+
clientKeyToUid: state.clientKeyToUid
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function syncExistingNode(ops, state, nodeRef, currentNode, desiredNode, explicitTarget) {
|
|
144
|
+
emitDomainSettingOps(ops, nodeRef, currentNode, desiredNode, explicitTarget);
|
|
145
|
+
const childSync = syncChildren(ops, state, nodeRef, currentNode, desiredNode);
|
|
146
|
+
emitLayoutOp(ops, explicitTarget || { uid: nodeRef.uidRef }, currentNode, desiredNode, childSync);
|
|
147
|
+
}
|
|
148
|
+
function syncCreatedNode(ops, state, nodeRef, desiredNode) {
|
|
149
|
+
emitDomainSettingOps(ops, nodeRef, null, desiredNode);
|
|
150
|
+
const childSync = syncChildren(ops, state, nodeRef, null, desiredNode);
|
|
151
|
+
emitLayoutOp(ops, { uid: nodeRef.uidRef }, null, desiredNode, childSync);
|
|
152
|
+
}
|
|
153
|
+
function syncRoutePageNode(ops, state, target, currentNode, desiredNode) {
|
|
154
|
+
const pageTarget = { uid: String(target.uid || currentNode.uid || "").trim() };
|
|
155
|
+
syncPageNode(ops, state, pageTarget, currentNode, desiredNode);
|
|
156
|
+
}
|
|
157
|
+
function syncPageNode(ops, state, pageTarget, currentNode, desiredNode) {
|
|
158
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
159
|
+
emitDomainSettingOps(
|
|
160
|
+
ops,
|
|
161
|
+
{
|
|
162
|
+
uidRef: currentNode.uid,
|
|
163
|
+
use: currentNode.use
|
|
164
|
+
},
|
|
165
|
+
currentNode,
|
|
166
|
+
{
|
|
167
|
+
uid: currentNode.uid,
|
|
168
|
+
use: currentNode.use,
|
|
169
|
+
props: desiredNode.props,
|
|
170
|
+
decoratorProps: desiredNode.decoratorProps,
|
|
171
|
+
stepParams: desiredNode.stepParams,
|
|
172
|
+
flowRegistry: desiredNode.flowRegistry
|
|
173
|
+
},
|
|
174
|
+
pageTarget
|
|
175
|
+
);
|
|
176
|
+
if (!hasExplicitSubModelKey(desiredNode, "tabs")) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
const hasTabsSpec = Object.prototype.hasOwnProperty.call(desiredNode.subModels || {}, "tabs");
|
|
180
|
+
if (!hasTabsSpec) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const desiredTabs = normalizeChildren((_a = desiredNode.subModels) == null ? void 0 : _a.tabs);
|
|
184
|
+
const currentTabs = normalizeChildren((_b = currentNode.subModels) == null ? void 0 : _b.tabs);
|
|
185
|
+
const tabMatchPlan = planArrayChildMatches(currentTabs, desiredTabs, currentNode.use, "tabs");
|
|
186
|
+
const desiredRefs = [];
|
|
187
|
+
for (const [desiredIndex, desiredTab] of desiredTabs.entries()) {
|
|
188
|
+
const currentMatch = tabMatchPlan.matchesByDesiredIndex.get(desiredIndex);
|
|
189
|
+
if (currentMatch) {
|
|
190
|
+
bindClientKey(state, desiredTab.clientKey, currentMatch.uid);
|
|
191
|
+
desiredRefs.push({
|
|
192
|
+
uidRef: currentMatch.uid,
|
|
193
|
+
use: currentMatch.use
|
|
194
|
+
});
|
|
195
|
+
syncRouteTabNode(ops, state, { uid: currentMatch.uid }, currentMatch, desiredTab);
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
const opId = nextOpId(state, "addTab");
|
|
199
|
+
ops.push({
|
|
200
|
+
opId,
|
|
201
|
+
type: "addTab",
|
|
202
|
+
values: {
|
|
203
|
+
target: pageTarget,
|
|
204
|
+
...desiredTab.clientKey ? { clientKey: desiredTab.clientKey } : {},
|
|
205
|
+
title: ((_e = (_d = (_c = desiredTab == null ? void 0 : desiredTab.stepParams) == null ? void 0 : _c.pageTabSettings) == null ? void 0 : _d.tab) == null ? void 0 : _e.title) || ((_f = desiredTab == null ? void 0 : desiredTab.props) == null ? void 0 : _f.title) || ((_h = (_g = desiredTab == null ? void 0 : desiredTab.props) == null ? void 0 : _g.route) == null ? void 0 : _h.title) || "Untitled",
|
|
206
|
+
icon: ((_k = (_j = (_i = desiredTab == null ? void 0 : desiredTab.stepParams) == null ? void 0 : _i.pageTabSettings) == null ? void 0 : _j.tab) == null ? void 0 : _k.icon) || ((_l = desiredTab == null ? void 0 : desiredTab.props) == null ? void 0 : _l.icon),
|
|
207
|
+
documentTitle: (_o = (_n = (_m = desiredTab == null ? void 0 : desiredTab.stepParams) == null ? void 0 : _m.pageTabSettings) == null ? void 0 : _n.tab) == null ? void 0 : _o.documentTitle,
|
|
208
|
+
flowRegistry: desiredTab == null ? void 0 : desiredTab.flowRegistry
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
const createdRef = {
|
|
212
|
+
uidRef: makeOpRef(`${opId}.tabSchemaUid`),
|
|
213
|
+
use: "RootPageTabModel",
|
|
214
|
+
sourceOpId: opId
|
|
215
|
+
};
|
|
216
|
+
desiredRefs.push(createdRef);
|
|
217
|
+
syncCreatedNode(ops, state, createdRef, desiredTab);
|
|
218
|
+
}
|
|
219
|
+
for (const currentTab of currentTabs) {
|
|
220
|
+
if (!tabMatchPlan.matchedCurrentUids.has(currentTab.uid)) {
|
|
221
|
+
ops.push({
|
|
222
|
+
type: "removeTab",
|
|
223
|
+
values: {
|
|
224
|
+
uid: currentTab.uid
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
emitMoveTabOps(ops, desiredRefs);
|
|
230
|
+
}
|
|
231
|
+
function syncRouteTabNode(ops, state, target, currentNode, desiredNode) {
|
|
232
|
+
const tabTarget = { uid: String(target.uid || currentNode.uid || "").trim() };
|
|
233
|
+
syncTabNode(ops, state, tabTarget, currentNode, desiredNode);
|
|
234
|
+
}
|
|
235
|
+
function syncTabNode(ops, state, tabTarget, currentNode, desiredNode) {
|
|
236
|
+
var _a, _b;
|
|
237
|
+
emitDomainSettingOps(
|
|
238
|
+
ops,
|
|
239
|
+
{
|
|
240
|
+
uidRef: currentNode.uid,
|
|
241
|
+
use: currentNode.use
|
|
242
|
+
},
|
|
243
|
+
currentNode,
|
|
244
|
+
{
|
|
245
|
+
uid: currentNode.uid,
|
|
246
|
+
use: currentNode.use,
|
|
247
|
+
props: desiredNode.props,
|
|
248
|
+
decoratorProps: desiredNode.decoratorProps,
|
|
249
|
+
stepParams: desiredNode.stepParams,
|
|
250
|
+
flowRegistry: desiredNode.flowRegistry
|
|
251
|
+
},
|
|
252
|
+
tabTarget
|
|
253
|
+
);
|
|
254
|
+
if (!hasExplicitSubModelKey(desiredNode, "grid")) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
const hasGridSpec = Object.prototype.hasOwnProperty.call(desiredNode.subModels || {}, "grid");
|
|
258
|
+
if (!hasGridSpec) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
const desiredGrid = normalizeChildren((_a = desiredNode.subModels) == null ? void 0 : _a.grid)[0];
|
|
262
|
+
const currentGrid = normalizeChildren((_b = currentNode.subModels) == null ? void 0 : _b.grid)[0];
|
|
263
|
+
if (!desiredGrid || !currentGrid) {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
syncExistingNode(
|
|
267
|
+
ops,
|
|
268
|
+
state,
|
|
269
|
+
{
|
|
270
|
+
uidRef: currentGrid.uid,
|
|
271
|
+
use: currentGrid.use
|
|
272
|
+
},
|
|
273
|
+
currentGrid,
|
|
274
|
+
desiredGrid,
|
|
275
|
+
{ uid: currentGrid.uid }
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
function syncChildren(ops, state, parentRef, currentParent, desiredParent) {
|
|
279
|
+
const result = {
|
|
280
|
+
childClientKeyRefs: {},
|
|
281
|
+
finalItemRefs: [],
|
|
282
|
+
itemsChanged: false,
|
|
283
|
+
itemsSpecified: false
|
|
284
|
+
};
|
|
285
|
+
const desiredSubModels = desiredParent.subModels;
|
|
286
|
+
if (!desiredSubModels) {
|
|
287
|
+
return result;
|
|
288
|
+
}
|
|
289
|
+
const currentSubModels = (currentParent == null ? void 0 : currentParent.subModels) || {};
|
|
290
|
+
const subKeys = Object.keys(desiredSubModels);
|
|
291
|
+
for (const subKey of subKeys) {
|
|
292
|
+
const desiredRaw = desiredSubModels[subKey];
|
|
293
|
+
const currentRaw = currentSubModels[subKey];
|
|
294
|
+
const desiredChildren = normalizeChildren(desiredRaw);
|
|
295
|
+
const currentChildren = normalizeChildren(currentRaw);
|
|
296
|
+
const isArraySubModel = Array.isArray(desiredRaw) || Array.isArray(currentRaw);
|
|
297
|
+
if (parentRef.use === "ChildPageModel" && subKey === "tabs") {
|
|
298
|
+
const tabSync = syncPopupTabs(ops, state, parentRef, currentChildren, desiredChildren);
|
|
299
|
+
if (tabSync.itemsSpecified) {
|
|
300
|
+
result.finalItemRefs = tabSync.finalItemRefs;
|
|
301
|
+
result.itemsChanged = tabSync.itemsChanged;
|
|
302
|
+
result.itemsSpecified = true;
|
|
303
|
+
}
|
|
304
|
+
Object.assign(result.childClientKeyRefs, tabSync.childClientKeyRefs);
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
if (!isArraySubModel) {
|
|
308
|
+
const desiredChild = desiredChildren[0];
|
|
309
|
+
const currentChild = currentChildren[0];
|
|
310
|
+
if (!desiredChild && currentChild) {
|
|
311
|
+
ops.push({
|
|
312
|
+
type: "removeNode",
|
|
313
|
+
target: { uid: currentChild.uid }
|
|
314
|
+
});
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
317
|
+
if (!desiredChild) {
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
320
|
+
if (currentChild && matchesObjectChild(currentChild, desiredChild)) {
|
|
321
|
+
bindClientKey(state, desiredChild.clientKey, currentChild.uid);
|
|
322
|
+
if (desiredChild.clientKey) {
|
|
323
|
+
result.childClientKeyRefs[desiredChild.clientKey] = currentChild.uid;
|
|
324
|
+
}
|
|
325
|
+
syncExistingNode(
|
|
326
|
+
ops,
|
|
327
|
+
state,
|
|
328
|
+
{
|
|
329
|
+
uidRef: currentChild.uid,
|
|
330
|
+
use: currentChild.use
|
|
331
|
+
},
|
|
332
|
+
currentChild,
|
|
333
|
+
desiredChild
|
|
334
|
+
);
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
if (currentChild) {
|
|
338
|
+
ops.push({
|
|
339
|
+
type: "removeNode",
|
|
340
|
+
target: { uid: currentChild.uid }
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
const defaultRef = getDefaultChildRef(parentRef, subKey, desiredChild.use);
|
|
344
|
+
if (defaultRef) {
|
|
345
|
+
if (desiredChild.clientKey) {
|
|
346
|
+
result.childClientKeyRefs[desiredChild.clientKey] = defaultRef.uidRef;
|
|
347
|
+
}
|
|
348
|
+
syncCreatedNode(ops, state, defaultRef, desiredChild);
|
|
349
|
+
} else {
|
|
350
|
+
const createdRef = createDesiredChild(ops, state, parentRef, subKey, desiredChild, currentParent);
|
|
351
|
+
if (desiredChild.clientKey) {
|
|
352
|
+
result.childClientKeyRefs[desiredChild.clientKey] = createdRef.uidRef;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
continue;
|
|
356
|
+
}
|
|
357
|
+
const childMatchPlan = planArrayChildMatches(currentChildren, desiredChildren, parentRef.use, subKey);
|
|
358
|
+
const desiredRefs = [];
|
|
359
|
+
for (const [desiredIndex, desiredChild] of desiredChildren.entries()) {
|
|
360
|
+
const currentMatch = childMatchPlan.matchesByDesiredIndex.get(desiredIndex);
|
|
361
|
+
if (currentMatch) {
|
|
362
|
+
const currentRef = {
|
|
363
|
+
uidRef: currentMatch.uid,
|
|
364
|
+
use: currentMatch.use
|
|
365
|
+
};
|
|
366
|
+
bindClientKey(state, desiredChild.clientKey, currentMatch.uid);
|
|
367
|
+
if (desiredChild.clientKey) {
|
|
368
|
+
result.childClientKeyRefs[desiredChild.clientKey] = currentRef.uidRef;
|
|
369
|
+
}
|
|
370
|
+
desiredRefs.push(currentRef);
|
|
371
|
+
syncExistingNode(ops, state, currentRef, currentMatch, desiredChild);
|
|
372
|
+
continue;
|
|
373
|
+
}
|
|
374
|
+
const defaultRef = getDefaultChildRef(parentRef, subKey, desiredChild.use);
|
|
375
|
+
if (defaultRef) {
|
|
376
|
+
if (desiredChild.clientKey) {
|
|
377
|
+
result.childClientKeyRefs[desiredChild.clientKey] = defaultRef.uidRef;
|
|
378
|
+
}
|
|
379
|
+
desiredRefs.push(defaultRef);
|
|
380
|
+
syncCreatedNode(ops, state, defaultRef, desiredChild);
|
|
381
|
+
continue;
|
|
382
|
+
}
|
|
383
|
+
const createdRef = createDesiredChild(ops, state, parentRef, subKey, desiredChild, currentParent);
|
|
384
|
+
if (desiredChild.clientKey) {
|
|
385
|
+
result.childClientKeyRefs[desiredChild.clientKey] = createdRef.uidRef;
|
|
386
|
+
}
|
|
387
|
+
desiredRefs.push(createdRef);
|
|
388
|
+
}
|
|
389
|
+
for (const currentChild of currentChildren) {
|
|
390
|
+
if (!childMatchPlan.matchedCurrentUids.has(currentChild.uid)) {
|
|
391
|
+
ops.push({
|
|
392
|
+
type: "removeNode",
|
|
393
|
+
target: { uid: currentChild.uid }
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
emitMoveOps(ops, desiredRefs);
|
|
398
|
+
if (subKey === "items") {
|
|
399
|
+
result.finalItemRefs = desiredRefs;
|
|
400
|
+
result.itemsChanged = didItemRefsChange(currentChildren, desiredRefs);
|
|
401
|
+
result.itemsSpecified = true;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
return result;
|
|
405
|
+
}
|
|
406
|
+
function createDesiredChild(ops, state, parentRef, subKey, desiredChild, currentParent) {
|
|
407
|
+
if (desiredChild.use === "ChildPageModel" && (0, import_placement.isPopupHostUse)(parentRef.use)) {
|
|
408
|
+
compilePopupPageSpec(ops, state, parentRef, desiredChild);
|
|
409
|
+
return {
|
|
410
|
+
uidRef: parentRef.uidRef,
|
|
411
|
+
use: desiredChild.use,
|
|
412
|
+
sourceOpId: parentRef.sourceOpId
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
if ((isFieldWrapperNode(desiredChild.use) || STANDALONE_FIELD_USES.has(desiredChild.use)) && isFieldContainer(parentRef.use, subKey)) {
|
|
416
|
+
return createFieldNode(ops, state, parentRef, desiredChild);
|
|
417
|
+
}
|
|
418
|
+
if (subKey === "actions" && isActionContainer(parentRef.use)) {
|
|
419
|
+
if (!ACTION_USES.has(desiredChild.use)) {
|
|
420
|
+
throw new import_errors.FlowSurfaceBadRequestError(
|
|
421
|
+
`flowSurfaces apply action '${desiredChild.use}' is not a public capability`
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
return createActionNode(ops, state, parentRef, desiredChild, currentParent);
|
|
425
|
+
}
|
|
426
|
+
if (isBlockContainer(parentRef.use, subKey)) {
|
|
427
|
+
if (!BLOCK_USES.has(desiredChild.use)) {
|
|
428
|
+
throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces apply block '${desiredChild.use}' is not a public capability`);
|
|
429
|
+
}
|
|
430
|
+
return createBlockNode(ops, state, parentRef, desiredChild);
|
|
431
|
+
}
|
|
432
|
+
if (isFieldContainer(parentRef.use, subKey) && !FIELD_WRAPPER_USES.has(desiredChild.use) && !STANDALONE_FIELD_USES.has(desiredChild.use)) {
|
|
433
|
+
throw new import_errors.FlowSurfaceBadRequestError(
|
|
434
|
+
`flowSurfaces apply field wrapper '${desiredChild.use}' is not a public capability`
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
throw new import_errors.FlowSurfaceBadRequestError(
|
|
438
|
+
`flowSurfaces apply cannot create '${desiredChild.use}' under '${parentRef.use}.${subKey}'`
|
|
439
|
+
);
|
|
440
|
+
}
|
|
441
|
+
function createBlockNode(ops, state, parentRef, desiredNode) {
|
|
442
|
+
const blockCatalogItem = (0, import_catalog.resolveSupportedBlockCatalogItem)(
|
|
443
|
+
{
|
|
444
|
+
use: desiredNode.use
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
requireCreateSupported: true
|
|
448
|
+
}
|
|
449
|
+
);
|
|
450
|
+
const opId = nextOpId(state, "addBlock");
|
|
451
|
+
ops.push({
|
|
452
|
+
opId,
|
|
453
|
+
type: "addBlock",
|
|
454
|
+
values: {
|
|
455
|
+
target: {
|
|
456
|
+
uid: parentRef.uidRef
|
|
457
|
+
},
|
|
458
|
+
...desiredNode.clientKey ? { clientKey: desiredNode.clientKey } : {},
|
|
459
|
+
type: blockCatalogItem.key,
|
|
460
|
+
resourceInit: extractResourceInit(desiredNode)
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
const ref = {
|
|
464
|
+
uidRef: makeOpRef(`${opId}.uid`),
|
|
465
|
+
use: desiredNode.use,
|
|
466
|
+
sourceOpId: opId
|
|
467
|
+
};
|
|
468
|
+
syncCreatedNode(ops, state, ref, desiredNode);
|
|
469
|
+
return ref;
|
|
470
|
+
}
|
|
471
|
+
function createActionNode(ops, state, parentRef, desiredNode, currentParent) {
|
|
472
|
+
const actionCatalogItem = (0, import_catalog.resolveSupportedActionCatalogItem)(
|
|
473
|
+
{
|
|
474
|
+
use: desiredNode.use,
|
|
475
|
+
containerUse: parentRef.use
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
requireCreateSupported: true
|
|
479
|
+
}
|
|
480
|
+
);
|
|
481
|
+
const opType = actionCatalogItem.scope === "record" ? "addRecordAction" : "addAction";
|
|
482
|
+
const targetUidRef = actionCatalogItem.scope === "record" ? resolveRecordActionCreateTargetUidRef(parentRef, currentParent) : parentRef.uidRef;
|
|
483
|
+
const opId = nextOpId(state, opType);
|
|
484
|
+
ops.push({
|
|
485
|
+
opId,
|
|
486
|
+
type: opType,
|
|
487
|
+
values: {
|
|
488
|
+
target: {
|
|
489
|
+
uid: targetUidRef
|
|
490
|
+
},
|
|
491
|
+
...desiredNode.clientKey ? { clientKey: desiredNode.clientKey } : {},
|
|
492
|
+
type: actionCatalogItem.key,
|
|
493
|
+
resourceInit: extractResourceInit(desiredNode)
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
const ref = {
|
|
497
|
+
uidRef: makeOpRef(`${opId}.uid`),
|
|
498
|
+
use: desiredNode.use,
|
|
499
|
+
sourceOpId: opId
|
|
500
|
+
};
|
|
501
|
+
syncCreatedNode(ops, state, ref, desiredNode);
|
|
502
|
+
return ref;
|
|
503
|
+
}
|
|
504
|
+
function createFieldNode(ops, state, parentRef, desiredNode) {
|
|
505
|
+
var _a;
|
|
506
|
+
const standaloneType = desiredNode.use === "JSColumnModel" ? "jsColumn" : desiredNode.use === "JSItemModel" ? "jsItem" : void 0;
|
|
507
|
+
if (standaloneType) {
|
|
508
|
+
const opId2 = nextOpId(state, "addField");
|
|
509
|
+
ops.push({
|
|
510
|
+
opId: opId2,
|
|
511
|
+
type: "addField",
|
|
512
|
+
values: {
|
|
513
|
+
target: {
|
|
514
|
+
uid: parentRef.uidRef
|
|
515
|
+
},
|
|
516
|
+
...desiredNode.clientKey ? { clientKey: desiredNode.clientKey } : {},
|
|
517
|
+
type: standaloneType
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
const ref2 = {
|
|
521
|
+
uidRef: makeOpRef(`${opId2}.uid`),
|
|
522
|
+
use: desiredNode.use,
|
|
523
|
+
sourceOpId: opId2
|
|
524
|
+
};
|
|
525
|
+
syncCreatedNode(ops, state, ref2, desiredNode);
|
|
526
|
+
return ref2;
|
|
527
|
+
}
|
|
528
|
+
const innerField = normalizeChildren((_a = desiredNode.subModels) == null ? void 0 : _a.field)[0];
|
|
529
|
+
const requestedRenderer = (innerField == null ? void 0 : innerField.use) === "JSFieldModel" || (innerField == null ? void 0 : innerField.use) === "JSEditableFieldModel" ? "js" : void 0;
|
|
530
|
+
const fieldCapability = (0, import_catalog.resolveSupportedFieldCapability)({
|
|
531
|
+
containerUse: parentRef.use,
|
|
532
|
+
requestedWrapperUse: desiredNode.use,
|
|
533
|
+
requestedFieldUse: innerField == null ? void 0 : innerField.use,
|
|
534
|
+
requestedRenderer,
|
|
535
|
+
allowUnresolvedFieldUse: true
|
|
536
|
+
});
|
|
537
|
+
const fieldInit = import_lodash.default.get(innerField, ["stepParams", "fieldSettings", "init"]) || import_lodash.default.get(desiredNode, ["stepParams", "fieldSettings", "init"]);
|
|
538
|
+
const defaultTargetUid = import_lodash.default.get(desiredNode, ["stepParams", "filterFormItemSettings", "init", "defaultTargetUid"]);
|
|
539
|
+
if (!(fieldInit == null ? void 0 : fieldInit.fieldPath)) {
|
|
540
|
+
throw new import_errors.FlowSurfaceBadRequestError(
|
|
541
|
+
`flowSurfaces apply field '${desiredNode.use}' requires stepParams.fieldSettings.init.fieldPath`
|
|
542
|
+
);
|
|
543
|
+
}
|
|
544
|
+
const opId = nextOpId(state, "addField");
|
|
545
|
+
ops.push({
|
|
546
|
+
opId,
|
|
547
|
+
type: "addField",
|
|
548
|
+
values: {
|
|
549
|
+
target: {
|
|
550
|
+
uid: parentRef.uidRef
|
|
551
|
+
},
|
|
552
|
+
...desiredNode.clientKey ? { clientKey: desiredNode.clientKey } : {},
|
|
553
|
+
fieldPath: fieldInit.fieldPath,
|
|
554
|
+
associationPathName: fieldInit.associationPathName,
|
|
555
|
+
dataSourceKey: fieldInit.dataSourceKey,
|
|
556
|
+
collectionName: fieldInit.collectionName,
|
|
557
|
+
...requestedRenderer ? { renderer: requestedRenderer } : {},
|
|
558
|
+
...fieldCapability.fieldUse ? { fieldUse: fieldCapability.fieldUse } : {},
|
|
559
|
+
...defaultTargetUid ? { defaultTargetUid } : {}
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
const ref = {
|
|
563
|
+
uidRef: makeOpRef(`${opId}.wrapperUid`),
|
|
564
|
+
use: desiredNode.use,
|
|
565
|
+
sourceOpId: opId
|
|
566
|
+
};
|
|
567
|
+
syncCreatedNode(ops, state, ref, desiredNode);
|
|
568
|
+
return ref;
|
|
569
|
+
}
|
|
570
|
+
function compilePopupPageSpec(ops, state, hostRef, pageSpec) {
|
|
571
|
+
var _a, _b, _c;
|
|
572
|
+
const tabSpec = normalizeChildren((_a = pageSpec.subModels) == null ? void 0 : _a.tabs)[0];
|
|
573
|
+
const gridSpec = normalizeChildren((_b = tabSpec == null ? void 0 : tabSpec.subModels) == null ? void 0 : _b.grid)[0];
|
|
574
|
+
const popupItems = normalizeChildren((_c = gridSpec == null ? void 0 : gridSpec.subModels) == null ? void 0 : _c.items);
|
|
575
|
+
if (!tabSpec || !gridSpec) {
|
|
576
|
+
throw new import_errors.FlowSurfaceBadRequestError(
|
|
577
|
+
`flowSurfaces apply popup page creation under '${hostRef.use}' requires popup page -> tab -> grid`
|
|
578
|
+
);
|
|
579
|
+
}
|
|
580
|
+
const { childRefs, childClientKeyRefs, popupGridUidRef, popupPageRef, popupTabRef, placeholderRef } = bootstrapPopupShellCreation(ops, state, hostRef, pageSpec, tabSpec, popupItems);
|
|
581
|
+
if (popupPageRef) {
|
|
582
|
+
emitDomainSettingOps(ops, popupPageRef, null, pageSpec);
|
|
583
|
+
}
|
|
584
|
+
if (popupTabRef) {
|
|
585
|
+
emitDomainSettingOps(ops, popupTabRef, null, tabSpec);
|
|
586
|
+
}
|
|
587
|
+
if (popupGridUidRef) {
|
|
588
|
+
emitDomainSettingOps(
|
|
589
|
+
ops,
|
|
590
|
+
{
|
|
591
|
+
uidRef: popupGridUidRef,
|
|
592
|
+
use: gridSpec.use
|
|
593
|
+
},
|
|
594
|
+
null,
|
|
595
|
+
gridSpec
|
|
596
|
+
);
|
|
597
|
+
if (placeholderRef) {
|
|
598
|
+
ops.push({
|
|
599
|
+
type: "removeNode",
|
|
600
|
+
values: {
|
|
601
|
+
target: {
|
|
602
|
+
uid: placeholderRef.uidRef
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
emitLayoutOp(ops, { uid: popupGridUidRef }, null, gridSpec, {
|
|
608
|
+
childClientKeyRefs,
|
|
609
|
+
finalItemRefs: childRefs,
|
|
610
|
+
itemsChanged: true,
|
|
611
|
+
itemsSpecified: true
|
|
612
|
+
});
|
|
613
|
+
emitMoveOps(ops, childRefs);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
function bootstrapPopupShellCreation(ops, state, hostRef, pageSpec, tabSpec, popupItems) {
|
|
617
|
+
const result = {
|
|
618
|
+
childRefs: [],
|
|
619
|
+
childClientKeyRefs: {},
|
|
620
|
+
popupGridUidRef: null,
|
|
621
|
+
popupPageRef: null,
|
|
622
|
+
popupTabRef: null,
|
|
623
|
+
placeholderRef: null
|
|
624
|
+
};
|
|
625
|
+
const bindPopupShellRefs = (created) => {
|
|
626
|
+
result.popupPageRef = {
|
|
627
|
+
uidRef: makeOpRef(`${created.sourceOpId}.popupPageUid`),
|
|
628
|
+
use: pageSpec.use
|
|
629
|
+
};
|
|
630
|
+
result.popupTabRef = {
|
|
631
|
+
uidRef: makeOpRef(`${created.sourceOpId}.popupTabUid`),
|
|
632
|
+
use: tabSpec.use,
|
|
633
|
+
sourceOpId: created.sourceOpId
|
|
634
|
+
};
|
|
635
|
+
result.popupGridUidRef = makeOpRef(`${created.sourceOpId}.popupGridUid`);
|
|
636
|
+
};
|
|
637
|
+
if (!popupItems.length) {
|
|
638
|
+
result.placeholderRef = createBlockNode(ops, state, hostRef, {
|
|
639
|
+
use: "MarkdownBlockModel"
|
|
640
|
+
});
|
|
641
|
+
bindPopupShellRefs(result.placeholderRef);
|
|
642
|
+
return result;
|
|
643
|
+
}
|
|
644
|
+
popupItems.forEach((itemSpec, index) => {
|
|
645
|
+
if (index === 0) {
|
|
646
|
+
const created2 = createBlockNode(ops, state, hostRef, itemSpec);
|
|
647
|
+
result.childRefs.push(created2);
|
|
648
|
+
if (itemSpec.clientKey) {
|
|
649
|
+
result.childClientKeyRefs[itemSpec.clientKey] = created2.uidRef;
|
|
650
|
+
}
|
|
651
|
+
bindPopupShellRefs(created2);
|
|
652
|
+
return;
|
|
653
|
+
}
|
|
654
|
+
const popupGridRef = {
|
|
655
|
+
uidRef: result.popupGridUidRef,
|
|
656
|
+
use: "BlockGridModel"
|
|
657
|
+
};
|
|
658
|
+
const created = createBlockNode(ops, state, popupGridRef, itemSpec);
|
|
659
|
+
if (itemSpec.clientKey) {
|
|
660
|
+
result.childClientKeyRefs[itemSpec.clientKey] = created.uidRef;
|
|
661
|
+
}
|
|
662
|
+
result.childRefs.push(created);
|
|
663
|
+
});
|
|
664
|
+
return result;
|
|
665
|
+
}
|
|
666
|
+
function emitDomainSettingOps(ops, nodeRef, currentNode, desiredNode, explicitTarget) {
|
|
667
|
+
const props = omitLayoutProps(desiredNode.props);
|
|
668
|
+
const currentProps = omitLayoutProps(currentNode == null ? void 0 : currentNode.props);
|
|
669
|
+
const values = {};
|
|
670
|
+
if (!import_lodash.default.isNil(props) && !import_lodash.default.isEqual(props, currentProps)) {
|
|
671
|
+
values.props = props;
|
|
672
|
+
}
|
|
673
|
+
if (!import_lodash.default.isNil(desiredNode.decoratorProps) && !import_lodash.default.isEqual(desiredNode.decoratorProps, currentNode == null ? void 0 : currentNode.decoratorProps)) {
|
|
674
|
+
values.decoratorProps = desiredNode.decoratorProps;
|
|
675
|
+
}
|
|
676
|
+
if (!import_lodash.default.isNil(desiredNode.stepParams) && !import_lodash.default.isEqual(desiredNode.stepParams, currentNode == null ? void 0 : currentNode.stepParams)) {
|
|
677
|
+
values.stepParams = desiredNode.stepParams;
|
|
678
|
+
}
|
|
679
|
+
if (Object.keys(values).length) {
|
|
680
|
+
ops.push({
|
|
681
|
+
type: "updateSettings",
|
|
682
|
+
target: explicitTarget || { uid: nodeRef.uidRef },
|
|
683
|
+
values
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
if (!import_lodash.default.isNil(desiredNode.flowRegistry) && !import_lodash.default.isEqual(desiredNode.flowRegistry, currentNode == null ? void 0 : currentNode.flowRegistry)) {
|
|
687
|
+
ops.push({
|
|
688
|
+
type: "setEventFlows",
|
|
689
|
+
target: explicitTarget || { uid: nodeRef.uidRef },
|
|
690
|
+
values: {
|
|
691
|
+
flowRegistry: desiredNode.flowRegistry
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
function emitLayoutOp(ops, target, currentNode, desiredNode, childSync) {
|
|
697
|
+
const explicitLayout = resolveLayoutRefs(extractLayout(desiredNode.props), childSync.childClientKeyRefs);
|
|
698
|
+
const desiredLayout = explicitLayout || (isGridNode((currentNode == null ? void 0 : currentNode.use) || desiredNode.use) && childSync.itemsSpecified ? buildAutoLayout(childSync.finalItemRefs.map((item) => item.uidRef)) : null);
|
|
699
|
+
if (!desiredLayout) {
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
702
|
+
if (!hasRefValue(desiredLayout) && import_lodash.default.isEqual(desiredLayout, extractLayout(currentNode == null ? void 0 : currentNode.props))) {
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
ops.push({
|
|
706
|
+
type: "setLayout",
|
|
707
|
+
target,
|
|
708
|
+
values: desiredLayout
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
function emitMoveOps(ops, desiredRefs) {
|
|
712
|
+
for (let index = desiredRefs.length - 2; index >= 0; index -= 1) {
|
|
713
|
+
ops.push({
|
|
714
|
+
type: "moveNode",
|
|
715
|
+
values: {
|
|
716
|
+
sourceUid: desiredRefs[index].uidRef,
|
|
717
|
+
targetUid: desiredRefs[index + 1].uidRef,
|
|
718
|
+
position: "before"
|
|
719
|
+
}
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
function getDefaultChildRef(parentRef, subKey, childUse) {
|
|
724
|
+
if (!parentRef.sourceOpId || !childUse) {
|
|
725
|
+
return null;
|
|
726
|
+
}
|
|
727
|
+
if (FORM_BLOCK_USES.has(parentRef.use) && subKey === "grid" && FORM_GRID_USES.has(childUse)) {
|
|
728
|
+
return {
|
|
729
|
+
uidRef: makeOpRef(`${parentRef.sourceOpId}.gridUid`),
|
|
730
|
+
use: childUse
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
if (DETAILS_BLOCK_USES.has(parentRef.use) && subKey === "grid" && childUse === "DetailsGridModel") {
|
|
734
|
+
return {
|
|
735
|
+
uidRef: makeOpRef(`${parentRef.sourceOpId}.gridUid`),
|
|
736
|
+
use: childUse
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
if (FILTER_FORM_BLOCK_USES.has(parentRef.use) && subKey === "grid" && childUse === "FilterFormGridModel") {
|
|
740
|
+
return {
|
|
741
|
+
uidRef: makeOpRef(`${parentRef.sourceOpId}.gridUid`),
|
|
742
|
+
use: childUse
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
if (parentRef.use === "ChildPageTabModel" && subKey === "grid" && childUse === "BlockGridModel") {
|
|
746
|
+
return {
|
|
747
|
+
uidRef: makeOpRef(`${parentRef.sourceOpId}.popupGridUid`),
|
|
748
|
+
use: childUse
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
if (parentRef.use === "TableBlockModel" && subKey === "columns" && childUse === "TableActionsColumnModel") {
|
|
752
|
+
return {
|
|
753
|
+
uidRef: makeOpRef(`${parentRef.sourceOpId}.actionsColumnUid`),
|
|
754
|
+
use: childUse,
|
|
755
|
+
sourceOpId: parentRef.sourceOpId,
|
|
756
|
+
ownerUidRef: parentRef.uidRef
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
if (parentRef.use === "ListBlockModel" && subKey === "item" && childUse === "ListItemModel") {
|
|
760
|
+
return {
|
|
761
|
+
uidRef: makeOpRef(`${parentRef.sourceOpId}.itemUid`),
|
|
762
|
+
use: childUse,
|
|
763
|
+
sourceOpId: parentRef.sourceOpId,
|
|
764
|
+
ownerUidRef: parentRef.uidRef
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
if (parentRef.use === "GridCardBlockModel" && subKey === "item" && childUse === "GridCardItemModel") {
|
|
768
|
+
return {
|
|
769
|
+
uidRef: makeOpRef(`${parentRef.sourceOpId}.itemUid`),
|
|
770
|
+
use: childUse,
|
|
771
|
+
sourceOpId: parentRef.sourceOpId,
|
|
772
|
+
ownerUidRef: parentRef.uidRef
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
if (parentRef.use === "ListItemModel" && subKey === "grid" && childUse === "DetailsGridModel") {
|
|
776
|
+
return {
|
|
777
|
+
uidRef: makeOpRef(`${parentRef.sourceOpId}.gridUid`),
|
|
778
|
+
use: childUse
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
if (parentRef.use === "GridCardItemModel" && subKey === "grid" && childUse === "DetailsGridModel") {
|
|
782
|
+
return {
|
|
783
|
+
uidRef: makeOpRef(`${parentRef.sourceOpId}.gridUid`),
|
|
784
|
+
use: childUse
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
if (FIELD_WRAPPER_USES.has(parentRef.use) && subKey === "field") {
|
|
788
|
+
return {
|
|
789
|
+
uidRef: makeOpRef(`${parentRef.sourceOpId}.fieldUid`),
|
|
790
|
+
use: childUse
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
if (parentRef.use === "RootPageTabModel" && subKey === "grid" && childUse === "BlockGridModel") {
|
|
794
|
+
return {
|
|
795
|
+
uidRef: makeOpRef(`${parentRef.sourceOpId}.gridUid`),
|
|
796
|
+
use: childUse
|
|
797
|
+
};
|
|
798
|
+
}
|
|
799
|
+
return null;
|
|
800
|
+
}
|
|
801
|
+
function resolveRecordActionCreateTargetUidRef(parentRef, currentParent) {
|
|
802
|
+
if (!RECORD_ACTION_INTERNAL_CONTAINER_USES.has(parentRef.use)) {
|
|
803
|
+
return parentRef.uidRef;
|
|
804
|
+
}
|
|
805
|
+
const ownerUidRef = parentRef.ownerUidRef ?? (currentParent == null ? void 0 : currentParent.parentId);
|
|
806
|
+
if (ownerUidRef) {
|
|
807
|
+
return ownerUidRef;
|
|
808
|
+
}
|
|
809
|
+
throw new import_errors.FlowSurfaceBadRequestError(
|
|
810
|
+
`flowSurfaces apply cannot resolve owning surface for record action container '${parentRef.use}'`
|
|
811
|
+
);
|
|
812
|
+
}
|
|
813
|
+
function normalizeChildren(input) {
|
|
814
|
+
if (!input) {
|
|
815
|
+
return [];
|
|
816
|
+
}
|
|
817
|
+
return import_lodash.default.castArray(input).filter(Boolean);
|
|
818
|
+
}
|
|
819
|
+
function hasExplicitSubModelKey(node, key) {
|
|
820
|
+
return !!(node == null ? void 0 : node.subModels) && Object.prototype.hasOwnProperty.call(node.subModels, key);
|
|
821
|
+
}
|
|
822
|
+
function matchesObjectChild(currentChild, desiredChild) {
|
|
823
|
+
return currentChild.uid === desiredChild.uid || !desiredChild.uid && currentChild.use === desiredChild.use;
|
|
824
|
+
}
|
|
825
|
+
function planArrayChildMatches(currentChildren, desiredChildren, parentUse, subKey) {
|
|
826
|
+
const matchesByDesiredIndex = /* @__PURE__ */ new Map();
|
|
827
|
+
const matchedCurrentUids = /* @__PURE__ */ new Set();
|
|
828
|
+
const remainingDesiredByUse = /* @__PURE__ */ new Map();
|
|
829
|
+
for (const [desiredIndex, desiredChild] of desiredChildren.entries()) {
|
|
830
|
+
const matchedCurrent = findExactArrayChildMatch(currentChildren, desiredChild, matchedCurrentUids);
|
|
831
|
+
if (matchedCurrent) {
|
|
832
|
+
matchesByDesiredIndex.set(desiredIndex, matchedCurrent);
|
|
833
|
+
if (matchedCurrent.uid) {
|
|
834
|
+
matchedCurrentUids.add(matchedCurrent.uid);
|
|
835
|
+
}
|
|
836
|
+
continue;
|
|
837
|
+
}
|
|
838
|
+
if ((desiredChild == null ? void 0 : desiredChild.use) && !desiredChild.uid) {
|
|
839
|
+
const desiredIndexes = remainingDesiredByUse.get(desiredChild.use) || [];
|
|
840
|
+
desiredIndexes.push(desiredIndex);
|
|
841
|
+
remainingDesiredByUse.set(desiredChild.use, desiredIndexes);
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
const remainingCurrentByUse = /* @__PURE__ */ new Map();
|
|
845
|
+
for (const currentChild of currentChildren) {
|
|
846
|
+
if (!(currentChild == null ? void 0 : currentChild.use) || matchedCurrentUids.has(currentChild.uid || "")) {
|
|
847
|
+
continue;
|
|
848
|
+
}
|
|
849
|
+
const currentGroup = remainingCurrentByUse.get(currentChild.use) || [];
|
|
850
|
+
currentGroup.push(currentChild);
|
|
851
|
+
remainingCurrentByUse.set(currentChild.use, currentGroup);
|
|
852
|
+
}
|
|
853
|
+
const uses = /* @__PURE__ */ new Set([...remainingCurrentByUse.keys(), ...remainingDesiredByUse.keys()]);
|
|
854
|
+
for (const use of uses) {
|
|
855
|
+
const currentGroup = remainingCurrentByUse.get(use) || [];
|
|
856
|
+
const desiredIndexes = remainingDesiredByUse.get(use) || [];
|
|
857
|
+
const shouldReuseByOrder = currentGroup.length > 1 || desiredIndexes.length > 1;
|
|
858
|
+
if (currentGroup.length > 0 && desiredIndexes.length > 0 && currentGroup.length !== desiredIndexes.length && shouldReuseByOrder) {
|
|
859
|
+
throw new import_errors.FlowSurfaceBadRequestError(
|
|
860
|
+
`flowSurfaces apply cannot safely match duplicate '${use}' nodes under '${parentUse}.${subKey}' without explicit uid or signature`
|
|
861
|
+
);
|
|
862
|
+
}
|
|
863
|
+
if (!shouldReuseByOrder) {
|
|
864
|
+
continue;
|
|
865
|
+
}
|
|
866
|
+
const reuseCount = Math.min(currentGroup.length, desiredIndexes.length);
|
|
867
|
+
for (let index = 0; index < reuseCount; index += 1) {
|
|
868
|
+
const currentChild = currentGroup[index];
|
|
869
|
+
const desiredIndex = desiredIndexes[index];
|
|
870
|
+
matchesByDesiredIndex.set(desiredIndex, currentChild);
|
|
871
|
+
if (currentChild == null ? void 0 : currentChild.uid) {
|
|
872
|
+
matchedCurrentUids.add(currentChild.uid);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
return {
|
|
877
|
+
matchesByDesiredIndex,
|
|
878
|
+
matchedCurrentUids
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
function findExactArrayChildMatch(currentChildren, desiredChild, matchedCurrent) {
|
|
882
|
+
if (desiredChild.uid) {
|
|
883
|
+
return currentChildren.find((item) => (item == null ? void 0 : item.uid) === desiredChild.uid);
|
|
884
|
+
}
|
|
885
|
+
const desiredStrongSignature = getStrongNodeSignature(desiredChild);
|
|
886
|
+
if (desiredStrongSignature) {
|
|
887
|
+
return currentChildren.find(
|
|
888
|
+
(item) => !matchedCurrent.has(item.uid || "") && getStrongNodeSignature(item) === desiredStrongSignature
|
|
889
|
+
);
|
|
890
|
+
}
|
|
891
|
+
const desiredWeakSignature = getWeakNodeSignature(desiredChild);
|
|
892
|
+
if (desiredWeakSignature) {
|
|
893
|
+
return currentChildren.find(
|
|
894
|
+
(item) => !matchedCurrent.has(item.uid || "") && getWeakNodeSignature(item) === desiredWeakSignature
|
|
895
|
+
);
|
|
896
|
+
}
|
|
897
|
+
return void 0;
|
|
898
|
+
}
|
|
899
|
+
function getStrongNodeSignature(node) {
|
|
900
|
+
if (!(node == null ? void 0 : node.use)) {
|
|
901
|
+
return null;
|
|
902
|
+
}
|
|
903
|
+
const resourceInit = import_lodash.default.get(node, ["stepParams", "resourceSettings", "init"]);
|
|
904
|
+
if ((resourceInit == null ? void 0 : resourceInit.dataSourceKey) || (resourceInit == null ? void 0 : resourceInit.collectionName) || (resourceInit == null ? void 0 : resourceInit.associationName) || (resourceInit == null ? void 0 : resourceInit.associationPathName) || !import_lodash.default.isUndefined(resourceInit == null ? void 0 : resourceInit.sourceId)) {
|
|
905
|
+
return [
|
|
906
|
+
"resource",
|
|
907
|
+
node.use,
|
|
908
|
+
resourceInit.dataSourceKey || "",
|
|
909
|
+
resourceInit.collectionName || "",
|
|
910
|
+
resourceInit.associationName || "",
|
|
911
|
+
resourceInit.associationPathName || "",
|
|
912
|
+
import_lodash.default.isUndefined(resourceInit.sourceId) ? "" : String(resourceInit.sourceId)
|
|
913
|
+
].join(":");
|
|
914
|
+
}
|
|
915
|
+
const fieldInit = import_lodash.default.get(node, ["stepParams", "fieldSettings", "init"]) || import_lodash.default.get(node, ["subModels", "field", "stepParams", "fieldSettings", "init"]);
|
|
916
|
+
if (fieldInit == null ? void 0 : fieldInit.fieldPath) {
|
|
917
|
+
return [
|
|
918
|
+
"field",
|
|
919
|
+
node.use,
|
|
920
|
+
fieldInit.dataSourceKey || "",
|
|
921
|
+
fieldInit.collectionName || "",
|
|
922
|
+
fieldInit.associationPathName || "",
|
|
923
|
+
fieldInit.fieldPath
|
|
924
|
+
].join(":");
|
|
925
|
+
}
|
|
926
|
+
if (node.use === "TableActionsColumnModel") {
|
|
927
|
+
return "slot:table-actions-column";
|
|
928
|
+
}
|
|
929
|
+
return null;
|
|
930
|
+
}
|
|
931
|
+
function getWeakNodeSignature(node) {
|
|
932
|
+
if (!(node == null ? void 0 : node.use)) {
|
|
933
|
+
return null;
|
|
934
|
+
}
|
|
935
|
+
const title = import_lodash.default.get(node, ["stepParams", "pageTabSettings", "tab", "title"]) || import_lodash.default.get(node, ["stepParams", "buttonSettings", "general", "title"]) || import_lodash.default.get(node, ["props", "title"]);
|
|
936
|
+
if (typeof title === "string" && title.trim()) {
|
|
937
|
+
return ["title", node.use, title.trim()].join(":");
|
|
938
|
+
}
|
|
939
|
+
return null;
|
|
940
|
+
}
|
|
941
|
+
function isFieldWrapperNode(use) {
|
|
942
|
+
return (0, import_placement.isFieldWrapperUse)(use);
|
|
943
|
+
}
|
|
944
|
+
function isGridNode(use) {
|
|
945
|
+
return (0, import_placement.isGridUse)(use);
|
|
946
|
+
}
|
|
947
|
+
function isFieldContainer(parentUse, subKey) {
|
|
948
|
+
return (0, import_placement.isFieldContainerUse)(parentUse, subKey);
|
|
949
|
+
}
|
|
950
|
+
function isBlockContainer(parentUse, subKey) {
|
|
951
|
+
return (0, import_placement.isBlockContainerUse)(parentUse, subKey);
|
|
952
|
+
}
|
|
953
|
+
function isActionContainer(parentUse) {
|
|
954
|
+
return (0, import_placement.isActionContainerUse)(parentUse);
|
|
955
|
+
}
|
|
956
|
+
function extractResourceInit(node) {
|
|
957
|
+
return import_lodash.default.get(node, ["stepParams", "resourceSettings", "init"]);
|
|
958
|
+
}
|
|
959
|
+
function extractLayout(props) {
|
|
960
|
+
if (!props || !("rows" in props) && !("sizes" in props) && !("rowOrder" in props)) {
|
|
961
|
+
return null;
|
|
962
|
+
}
|
|
963
|
+
return {
|
|
964
|
+
rows: props.rows || {},
|
|
965
|
+
sizes: props.sizes || {},
|
|
966
|
+
rowOrder: props.rowOrder || Object.keys(props.rows || {})
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
function omitLayoutProps(props) {
|
|
970
|
+
if (!props) {
|
|
971
|
+
return props;
|
|
972
|
+
}
|
|
973
|
+
const next = import_lodash.default.omit(props, ["rows", "sizes", "rowOrder"]);
|
|
974
|
+
return Object.keys(next).length ? next : void 0;
|
|
975
|
+
}
|
|
976
|
+
function resolveLayoutRefs(layout, childClientKeyRefs) {
|
|
977
|
+
if (!layout) {
|
|
978
|
+
return layout;
|
|
979
|
+
}
|
|
980
|
+
return {
|
|
981
|
+
rows: Object.fromEntries(
|
|
982
|
+
Object.entries(layout.rows || {}).map(([rowId, cells]) => [
|
|
983
|
+
rowId,
|
|
984
|
+
import_lodash.default.castArray(cells).map(
|
|
985
|
+
(cell) => import_lodash.default.castArray(cell).map((itemUid) => childClientKeyRefs[itemUid] ?? itemUid)
|
|
986
|
+
)
|
|
987
|
+
])
|
|
988
|
+
),
|
|
989
|
+
sizes: layout.sizes || {},
|
|
990
|
+
rowOrder: layout.rowOrder || []
|
|
991
|
+
};
|
|
992
|
+
}
|
|
993
|
+
function hasRefValue(value) {
|
|
994
|
+
if (Array.isArray(value)) {
|
|
995
|
+
return value.some((item) => hasRefValue(item));
|
|
996
|
+
}
|
|
997
|
+
if (import_lodash.default.isPlainObject(value)) {
|
|
998
|
+
if (typeof value.ref === "string") {
|
|
999
|
+
return true;
|
|
1000
|
+
}
|
|
1001
|
+
return Object.values(value).some((item) => hasRefValue(item));
|
|
1002
|
+
}
|
|
1003
|
+
return false;
|
|
1004
|
+
}
|
|
1005
|
+
function buildAutoLayout(itemRefs) {
|
|
1006
|
+
if (!itemRefs.length) {
|
|
1007
|
+
return {
|
|
1008
|
+
rows: {},
|
|
1009
|
+
sizes: {},
|
|
1010
|
+
rowOrder: []
|
|
1011
|
+
};
|
|
1012
|
+
}
|
|
1013
|
+
return {
|
|
1014
|
+
rows: Object.fromEntries(itemRefs.map((itemRef, index) => [`autoRow${index + 1}`, [[itemRef]]])),
|
|
1015
|
+
sizes: Object.fromEntries(itemRefs.map((_2, index) => [`autoRow${index + 1}`, [24]])),
|
|
1016
|
+
rowOrder: itemRefs.map((_2, index) => `autoRow${index + 1}`)
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
function didItemRefsChange(currentChildren, desiredRefs) {
|
|
1020
|
+
if (currentChildren.length !== desiredRefs.length) {
|
|
1021
|
+
return true;
|
|
1022
|
+
}
|
|
1023
|
+
return desiredRefs.some(
|
|
1024
|
+
(item, index) => {
|
|
1025
|
+
var _a;
|
|
1026
|
+
return typeof item.uidRef !== "string" || ((_a = currentChildren[index]) == null ? void 0 : _a.uid) !== item.uidRef;
|
|
1027
|
+
}
|
|
1028
|
+
);
|
|
1029
|
+
}
|
|
1030
|
+
function nextOpId(state, prefix) {
|
|
1031
|
+
state.seq += 1;
|
|
1032
|
+
return `${prefix}_${state.seq}`;
|
|
1033
|
+
}
|
|
1034
|
+
function emitMoveTabOps(ops, desiredRefs) {
|
|
1035
|
+
emitOrderedTabMoves(ops, desiredRefs, "moveTab");
|
|
1036
|
+
}
|
|
1037
|
+
function emitOrderedTabMoves(ops, desiredRefs, type) {
|
|
1038
|
+
for (let index = desiredRefs.length - 2; index >= 0; index -= 1) {
|
|
1039
|
+
ops.push({
|
|
1040
|
+
type,
|
|
1041
|
+
values: {
|
|
1042
|
+
sourceUid: desiredRefs[index].uidRef,
|
|
1043
|
+
targetUid: desiredRefs[index + 1].uidRef,
|
|
1044
|
+
position: "before"
|
|
1045
|
+
}
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
function bindClientKey(state, clientKey, uid) {
|
|
1050
|
+
if (!clientKey || typeof uid !== "string") {
|
|
1051
|
+
return;
|
|
1052
|
+
}
|
|
1053
|
+
state.clientKeyToUid[clientKey] = uid;
|
|
1054
|
+
}
|
|
1055
|
+
function syncPopupTabs(ops, state, popupPageRef, currentTabs, desiredTabs) {
|
|
1056
|
+
const result = {
|
|
1057
|
+
childClientKeyRefs: {},
|
|
1058
|
+
finalItemRefs: [],
|
|
1059
|
+
itemsChanged: false,
|
|
1060
|
+
itemsSpecified: false
|
|
1061
|
+
};
|
|
1062
|
+
const tabMatchPlan = planArrayChildMatches(currentTabs, desiredTabs, popupPageRef.use, "tabs");
|
|
1063
|
+
const desiredRefs = [];
|
|
1064
|
+
for (const [desiredIndex, desiredTab] of desiredTabs.entries()) {
|
|
1065
|
+
const currentMatch = tabMatchPlan.matchesByDesiredIndex.get(desiredIndex);
|
|
1066
|
+
if (currentMatch) {
|
|
1067
|
+
const currentRef = {
|
|
1068
|
+
uidRef: currentMatch.uid,
|
|
1069
|
+
use: currentMatch.use
|
|
1070
|
+
};
|
|
1071
|
+
bindClientKey(state, desiredTab.clientKey, currentMatch.uid);
|
|
1072
|
+
if (desiredTab.clientKey) {
|
|
1073
|
+
result.childClientKeyRefs[desiredTab.clientKey] = currentRef.uidRef;
|
|
1074
|
+
}
|
|
1075
|
+
desiredRefs.push(currentRef);
|
|
1076
|
+
syncTabNode(ops, state, { uid: currentMatch.uid }, currentMatch, desiredTab);
|
|
1077
|
+
continue;
|
|
1078
|
+
}
|
|
1079
|
+
const createdRef = createPopupTabNode(ops, state, popupPageRef, desiredTab);
|
|
1080
|
+
if (desiredTab.clientKey) {
|
|
1081
|
+
result.childClientKeyRefs[desiredTab.clientKey] = createdRef.uidRef;
|
|
1082
|
+
}
|
|
1083
|
+
desiredRefs.push(createdRef);
|
|
1084
|
+
}
|
|
1085
|
+
for (const currentTab of currentTabs) {
|
|
1086
|
+
if (!tabMatchPlan.matchedCurrentUids.has(currentTab.uid)) {
|
|
1087
|
+
ops.push({
|
|
1088
|
+
type: "removePopupTab",
|
|
1089
|
+
values: {
|
|
1090
|
+
target: {
|
|
1091
|
+
uid: currentTab.uid
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
emitOrderedTabMoves(ops, desiredRefs, "movePopupTab");
|
|
1098
|
+
return result;
|
|
1099
|
+
}
|
|
1100
|
+
function createPopupTabNode(ops, state, popupPageRef, desiredNode) {
|
|
1101
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
1102
|
+
const opId = nextOpId(state, "addPopupTab");
|
|
1103
|
+
ops.push({
|
|
1104
|
+
opId,
|
|
1105
|
+
type: "addPopupTab",
|
|
1106
|
+
values: {
|
|
1107
|
+
target: {
|
|
1108
|
+
uid: popupPageRef.uidRef
|
|
1109
|
+
},
|
|
1110
|
+
...desiredNode.clientKey ? { clientKey: desiredNode.clientKey } : {},
|
|
1111
|
+
title: ((_c = (_b = (_a = desiredNode == null ? void 0 : desiredNode.stepParams) == null ? void 0 : _a.pageTabSettings) == null ? void 0 : _b.tab) == null ? void 0 : _c.title) || ((_d = desiredNode == null ? void 0 : desiredNode.props) == null ? void 0 : _d.title) || ((_f = (_e = desiredNode == null ? void 0 : desiredNode.props) == null ? void 0 : _e.route) == null ? void 0 : _f.title) || "Untitled",
|
|
1112
|
+
icon: ((_i = (_h = (_g = desiredNode == null ? void 0 : desiredNode.stepParams) == null ? void 0 : _g.pageTabSettings) == null ? void 0 : _h.tab) == null ? void 0 : _i.icon) || ((_j = desiredNode == null ? void 0 : desiredNode.props) == null ? void 0 : _j.icon),
|
|
1113
|
+
documentTitle: (_m = (_l = (_k = desiredNode == null ? void 0 : desiredNode.stepParams) == null ? void 0 : _k.pageTabSettings) == null ? void 0 : _l.tab) == null ? void 0 : _m.documentTitle,
|
|
1114
|
+
flowRegistry: desiredNode == null ? void 0 : desiredNode.flowRegistry
|
|
1115
|
+
}
|
|
1116
|
+
});
|
|
1117
|
+
const ref = {
|
|
1118
|
+
uidRef: makeOpRef(`${opId}.popupTabUid`),
|
|
1119
|
+
use: "ChildPageTabModel",
|
|
1120
|
+
sourceOpId: opId
|
|
1121
|
+
};
|
|
1122
|
+
syncCreatedNode(ops, state, ref, desiredNode);
|
|
1123
|
+
return ref;
|
|
1124
|
+
}
|
|
1125
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1126
|
+
0 && (module.exports = {
|
|
1127
|
+
buildAutoLayout,
|
|
1128
|
+
compileApplySpec
|
|
1129
|
+
});
|