@siliconst/metaui 1.4.17 → 1.4.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig-dbg.js +47 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig.d.ts +28 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig.ts +39 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator-dbg.js +83 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator.d.ts +30 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator.ts +74 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy-dbg.js +61 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy.d.ts +13 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy.ts +59 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy-dbg.js +50 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy.d.ts +12 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy.ts +44 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +79 -13
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts +12 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts +77 -15
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +31 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts +15 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.ts +26 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js +35 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts +8 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.ts +37 -0
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js +11 -32
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts +9 -13
- package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +6 -2
- package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts +2 -0
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/Engine.ts +12 -7
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +3 -0
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts +3 -0
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry-dbg.js +3 -3
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.ts +3 -3
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +4 -4
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +10 -10
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts +19 -3
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts +22 -3
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.d.ts +3 -2
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.ts +3 -2
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js +18 -2
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.ts +19 -2
- package/src/nz/co/siliconst/ui5/metaui/library-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js +62 -43
- package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library.d.ts +4 -0
- package/src/nz/co/siliconst/ui5/metaui/library.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/library.ts +6 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder-dbg.js +93 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder.d.ts +52 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder.ts +88 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory-dbg.js +47 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.d.ts +25 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.ts +43 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver-dbg.js +68 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.d.ts +21 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.ts +61 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiTypeMapper-dbg.js +45 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiTypeMapper-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiTypeMapper.d.ts +25 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiTypeMapper.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/{swagger/SwaggerTypeMapper.js → openapi/OpenApiTypeMapper.js} +2 -2
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiTypeMapper.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiTypeMapper.ts +36 -0
- package/src/nz/co/siliconst/ui5/metaui/{swagger/SwaggerUIMapper-dbg.js → openapi/OpenApiUIMapper-dbg.js} +23 -14
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.d.ts +34 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/{swagger/SwaggerUIMapper.ts → openapi/OpenApiUIMapper.ts} +22 -13
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine-dbg.js +50 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.d.ts +25 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.ts +43 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin-dbg.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin.d.ts +23 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin.ts +21 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic-dbg.js +117 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.d.ts +47 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.ts +113 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin-dbg.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin.d.ts +26 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin.ts +25 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser-dbg.js +106 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.d.ts +27 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.ts +104 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser-dbg.js +107 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.d.ts +27 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.ts +105 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper-dbg.js +347 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.d.ts +110 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.ts +377 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js +11 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts +13 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js +31 -7
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts +17 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +33 -8
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +3 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +3 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +4 -8
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +4 -8
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +4 -8
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +4 -8
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin-dbg.js +217 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.d.ts +26 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.ts +249 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +3 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +3 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +3 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +3 -3
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +3 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +4 -5
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.ts +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js +115 -49
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts +17 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts +114 -54
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +3 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +3 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +3 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +3 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin-dbg.js +194 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.d.ts +25 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.ts +192 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +3 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +3 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +4 -8
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +4 -8
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +3 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +3 -4
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js +2 -2
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.ts +2 -2
- package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor-dbg.js +146 -0
- package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.d.ts +27 -0
- package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.ts +160 -0
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder-dbg.js +0 -226
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder-dbg.js.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.d.ts +0 -63
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.d.ts.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.js +0 -2
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.js.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.ts +0 -233
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver-dbg.js +0 -43
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver-dbg.js.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.d.ts +0 -15
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.d.ts.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.js +0 -2
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.js.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.ts +0 -37
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper-dbg.js +0 -37
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper-dbg.js.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.d.ts +0 -18
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.d.ts.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.js.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.ts +0 -28
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper-dbg.js.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.d.ts +0 -27
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.d.ts.map +0 -1
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.js +0 -2
- package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
sap.ui.define(["./SchemaNormalizer", "../
|
|
1
|
+
sap.ui.define(["./SchemaNormalizer", "../openapi/OpenApiBuilder", "../utils/Logger"], function (___SchemaNormalizer, ___openapi_OpenApiBuilder, ___utils_Logger) {
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -7,10 +7,10 @@ sap.ui.define(["./SchemaNormalizer", "../swagger/SwaggerBuilder", "../utils/Logg
|
|
|
7
7
|
* Routes unknown JSON payloads to the appropriate parser plugin.
|
|
8
8
|
*/
|
|
9
9
|
const SchemaNormalizer = ___SchemaNormalizer["SchemaNormalizer"];
|
|
10
|
-
const
|
|
10
|
+
const OpenApiBuilder = ___openapi_OpenApiBuilder["OpenApiBuilder"];
|
|
11
11
|
const Logger = ___utils_Logger["Logger"];
|
|
12
12
|
class SchemaBuilderRegistry {
|
|
13
|
-
static _plugins = [new
|
|
13
|
+
static _plugins = [new OpenApiBuilder(), new SchemaNormalizer()];
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Registers a new schema builder plugin into the engine.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaBuilderRegistry-dbg.js","names":["SchemaNormalizer","___SchemaNormalizer","
|
|
1
|
+
{"version":3,"file":"SchemaBuilderRegistry-dbg.js","names":["SchemaNormalizer","___SchemaNormalizer","OpenApiBuilder","___openapi_OpenApiBuilder","Logger","___utils_Logger","SchemaBuilderRegistry","_plugins","register","plugin","push","getBuilderFor","rawSchema","canHandle","warn","__exports","__esModule"],"sources":["SchemaBuilderRegistry.ts"],"sourcesContent":["/**\n * @file SchemaBuilderRegistry.ts\n * @description Singleton registry for Schema Builder plugins.\n * Routes unknown JSON payloads to the appropriate parser plugin.\n */\n\nimport { ISchemaBuilderPlugin } from \"../interfaces/ISchemaBuilderPlugin\";\nimport { SchemaNormalizer } from \"./SchemaNormalizer\";\nimport { OpenApiBuilder } from \"../openapi/OpenApiBuilder\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class SchemaBuilderRegistry {\n private static _plugins: ISchemaBuilderPlugin[] = [\n new OpenApiBuilder(),\n new SchemaNormalizer()\n ];\n\n /**\n * Registers a new schema builder plugin into the engine.\n * @param plugin An instance of ISchemaBuilderPlugin\n */\n public static register(plugin: ISchemaBuilderPlugin): void {\n this._plugins.push(plugin);\n }\n\n /**\n * Finds the first registered plugin that claims it can handle the payload.\n * @param rawSchema The raw JSON schema object to inspect.\n * @returns The matching plugin instance, or null if none match.\n */\n public static getBuilderFor(rawSchema: unknown): ISchemaBuilderPlugin | null {\n if (!rawSchema || typeof rawSchema !== \"object\") {\n return null;\n }\n\n for (const plugin of this._plugins) {\n if (plugin.canHandle(rawSchema)) {\n return plugin;\n }\n }\n \n Logger.warn(\"[SchemaBuilderRegistry]\", \"No suitable Schema Builder plugin found for the provided payload.\");\n return null;\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;AACA;EAJA,MAOSA,gBAAgB,GAAAC,mBAAA;EAAA,MAChBC,cAAc,GAAAC,yBAAA;EAAA,MACdC,MAAM,GAAAC,eAAA;EAER,MAAMC,qBAAqB,CAAC;IAC/B,OAAeC,QAAQ,GAA2B,CAC9C,IAAIL,cAAc,CAAC,CAAC,EACpB,IAAIF,gBAAgB,CAAC,CAAC,CACzB;;IAED;AACJ;AACA;AACA;IACI,OAAcQ,QAAQA,CAACC,MAA4B,EAAQ;MACvD,IAAI,CAACF,QAAQ,CAACG,IAAI,CAACD,MAAM,CAAC;IAC9B;;IAEA;AACJ;AACA;AACA;AACA;IACI,OAAcE,aAAaA,CAACC,SAAkB,EAA+B;MACzE,IAAI,CAACA,SAAS,IAAI,OAAOA,SAAS,KAAK,QAAQ,EAAE;QAC7C,OAAO,IAAI;MACf;MAEA,KAAK,MAAMH,MAAM,IAAI,IAAI,CAACF,QAAQ,EAAE;QAChC,IAAIE,MAAM,CAACI,SAAS,CAACD,SAAS,CAAC,EAAE;UAC7B,OAAOH,MAAM;QACjB;MACJ;MAEAL,MAAM,CAACU,IAAI,CAAC,yBAAyB,EAAE,mEAAmE,CAAC;MAC3G,OAAO,IAAI;IACf;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAT,qBAAA,GAAAA,qBAAA;EAAA,OAAAS,SAAA;AAAA","ignoreList":[]}
|
|
@@ -17,7 +17,7 @@ declare module "nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry" {
|
|
|
17
17
|
* @param rawSchema The raw JSON schema object to inspect.
|
|
18
18
|
* @returns The matching plugin instance, or null if none match.
|
|
19
19
|
*/
|
|
20
|
-
static getBuilderFor(rawSchema:
|
|
20
|
+
static getBuilderFor(rawSchema: unknown): ISchemaBuilderPlugin | null;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=SchemaBuilderRegistry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaBuilderRegistry.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,uDAAuD,CAAC;IACvE;;;;OAIG;IAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;IAKlG,MAAa,qBAAqB;QAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAGrB;QAEF;;;WAGG;eACW,QAAQ,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI;QAI1D;;;;WAIG;eACW,aAAa,CAAC,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"SchemaBuilderRegistry.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,uDAAuD,CAAC;IACvE;;;;OAIG;IAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;IAKlG,MAAa,qBAAqB;QAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAGrB;QAEF;;;WAGG;eACW,QAAQ,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI;QAI1D;;;;WAIG;eACW,aAAa,CAAC,SAAS,EAAE,OAAO,GAAG,oBAAoB,GAAG,IAAI;KAc/E;CAEA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
sap.ui.define(["./SchemaNormalizer","../
|
|
1
|
+
sap.ui.define(["./SchemaNormalizer","../openapi/OpenApiBuilder","../utils/Logger"],function(e,i,r){"use strict";const t=e["SchemaNormalizer"];const n=i["OpenApiBuilder"];const u=r["Logger"];class s{static _plugins=[new n,new t];static register(e){this._plugins.push(e)}static getBuilderFor(e){if(!e||typeof e!=="object"){return null}for(const i of this._plugins){if(i.canHandle(e)){return i}}u.warn("[SchemaBuilderRegistry]","No suitable Schema Builder plugin found for the provided payload.");return null}}var l={__esModule:true};l.SchemaBuilderRegistry=s;return l});
|
|
2
2
|
//# sourceMappingURL=SchemaBuilderRegistry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaBuilderRegistry.js","names":["SchemaNormalizer","___SchemaNormalizer","
|
|
1
|
+
{"version":3,"file":"SchemaBuilderRegistry.js","names":["SchemaNormalizer","___SchemaNormalizer","OpenApiBuilder","___openapi_OpenApiBuilder","Logger","___utils_Logger","SchemaBuilderRegistry","static","register","plugin","this","_plugins","push","getBuilderFor","rawSchema","canHandle","warn","__exports","__esModule"],"sources":["SchemaBuilderRegistry.ts"],"sourcesContent":["/**\n * @file SchemaBuilderRegistry.ts\n * @description Singleton registry for Schema Builder plugins.\n * Routes unknown JSON payloads to the appropriate parser plugin.\n */\n\nimport { ISchemaBuilderPlugin } from \"../interfaces/ISchemaBuilderPlugin\";\nimport { SchemaNormalizer } from \"./SchemaNormalizer\";\nimport { OpenApiBuilder } from \"../openapi/OpenApiBuilder\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class SchemaBuilderRegistry {\n private static _plugins: ISchemaBuilderPlugin[] = [\n new OpenApiBuilder(),\n new SchemaNormalizer()\n ];\n\n /**\n * Registers a new schema builder plugin into the engine.\n * @param plugin An instance of ISchemaBuilderPlugin\n */\n public static register(plugin: ISchemaBuilderPlugin): void {\n this._plugins.push(plugin);\n }\n\n /**\n * Finds the first registered plugin that claims it can handle the payload.\n * @param rawSchema The raw JSON schema object to inspect.\n * @returns The matching plugin instance, or null if none match.\n */\n public static getBuilderFor(rawSchema: unknown): ISchemaBuilderPlugin | null {\n if (!rawSchema || typeof rawSchema !== \"object\") {\n return null;\n }\n\n for (const plugin of this._plugins) {\n if (plugin.canHandle(rawSchema)) {\n return plugin;\n }\n }\n \n Logger.warn(\"[SchemaBuilderRegistry]\", \"No suitable Schema Builder plugin found for the provided payload.\");\n return null;\n }\n}\n"],"mappings":"gHAAA,MAOSA,EAAgBC,EAAA,0BAChBC,EAAcC,EAAA,wBACdC,EAAMC,EAAA,UAER,MAAMC,EACTC,gBAAkD,CAC9C,IAAIL,EACJ,IAAIF,GAOR,eAAcQ,CAASC,GACnBC,KAAKC,SAASC,KAAKH,EACvB,CAOA,oBAAcI,CAAcC,GACxB,IAAKA,UAAoBA,IAAc,SAAU,CAC7C,OAAO,IACX,CAEA,IAAK,MAAML,KAAUC,KAAKC,SAAU,CAChC,GAAIF,EAAOM,UAAUD,GAAY,CAC7B,OAAOL,CACX,CACJ,CAEAL,EAAOY,KAAK,0BAA2B,qEACvC,OAAO,IACX,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAAX,wBAAA,OAAAW,CAAA","ignoreList":[]}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
import { ISchemaBuilderPlugin } from "../interfaces/ISchemaBuilderPlugin";
|
|
8
8
|
import { SchemaNormalizer } from "./SchemaNormalizer";
|
|
9
|
-
import {
|
|
9
|
+
import { OpenApiBuilder } from "../openapi/OpenApiBuilder";
|
|
10
10
|
import { Logger } from "../utils/Logger";
|
|
11
11
|
|
|
12
12
|
export class SchemaBuilderRegistry {
|
|
13
13
|
private static _plugins: ISchemaBuilderPlugin[] = [
|
|
14
|
-
new
|
|
14
|
+
new OpenApiBuilder(),
|
|
15
15
|
new SchemaNormalizer()
|
|
16
16
|
];
|
|
17
17
|
|
|
@@ -28,7 +28,7 @@ export class SchemaBuilderRegistry {
|
|
|
28
28
|
* @param rawSchema The raw JSON schema object to inspect.
|
|
29
29
|
* @returns The matching plugin instance, or null if none match.
|
|
30
30
|
*/
|
|
31
|
-
public static getBuilderFor(rawSchema:
|
|
31
|
+
public static getBuilderFor(rawSchema: unknown): ISchemaBuilderPlugin | null {
|
|
32
32
|
if (!rawSchema || typeof rawSchema !== "object") {
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
@@ -11,16 +11,15 @@ sap.ui.define(["../utils/Logger"], function (___utils_Logger) {
|
|
|
11
11
|
* ISchemaBuilderPlugin Contract
|
|
12
12
|
*/
|
|
13
13
|
canHandle(rawSchema) {
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
if (rawSchema.openapi || rawSchema.swagger) return false;
|
|
14
|
+
// Fallback for native ISchemas or data inference.
|
|
15
|
+
// It always returns true because it is the final fallback builder in the registry.
|
|
17
16
|
return true;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
20
|
* ISchemaBuilderPlugin Contract
|
|
22
21
|
*/
|
|
23
|
-
build(rawSchema) {
|
|
22
|
+
build(rawSchema, targetDefinition) {
|
|
24
23
|
return SchemaNormalizer.normalize(rawSchema);
|
|
25
24
|
}
|
|
26
25
|
|
|
@@ -128,6 +127,7 @@ sap.ui.define(["../utils/Logger"], function (___utils_Logger) {
|
|
|
128
127
|
static normalizePropertyMetadata(prop, keyName, isRequired = false) {
|
|
129
128
|
const normalized = {
|
|
130
129
|
type: prop.type || "string",
|
|
130
|
+
$ref: prop.$ref,
|
|
131
131
|
ui: {
|
|
132
132
|
label: prop.ui?.label || this.generateLabel(keyName),
|
|
133
133
|
isKey: !!prop.ui?.isKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaNormalizer-dbg.js","names":["Logger","___utils_Logger","SchemaNormalizer","canHandle","rawSchema","openapi","swagger","build","normalize","data","schemaObj","trim","JSON","parse","e","msg","message","error","Error","Array","isArray","inferSchemaFromData","normalized","title","type","items","layoutStrategy","uiLayout","additionalProperties","targetProperties","properties","inferred","deepMergeProperties","requiredKeys","required","normalizeProperties","normalizePropertyMetadata","base","override","merged","key","Object","keys","overrideVal","baseVal","normalizedProps","isRequired","includes","prop","keyName","ui","label","generateLabel","isKey","readOnly","widget","valueHelp","enum","undefined","visibleOn","enabledOn","format","validators","formatter","args","rows","fullWidth","dialogButtonText","maxLength","minLength","minimum","maximum","pattern","precision","scale","multipleOf","name","spaced","replace","split","filter","w","length","map","word","charAt","toUpperCase","slice","toLowerCase","join","schema","inferPropertiesFromObject","obj","val","nestedProps","resolveScope","scope","startsWith","meta","bindingPath","propKey","pathSegments","current","debug","stringify","i","segment","__exports","__esModule"],"sources":["SchemaNormalizer.ts"],"sourcesContent":["/**\n * @file SchemaNormalizer.ts\n * @description Transforms and validates incoming JSON payloads into the strict v2 ISchema dictionary matrix.\n */\n\nimport { ISchema, IPropertyMetadata, FieldType } from \"../interfaces/ISchema\";\nimport { ISchemaBuilderPlugin } from \"../interfaces/ISchemaBuilderPlugin\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class SchemaNormalizer implements ISchemaBuilderPlugin {\n\n /**\n * ISchemaBuilderPlugin Contract\n */\n public canHandle(rawSchema: any): boolean {\n // MetaUI native schemas almost always have properties, items, or a layoutStrategy\n // This acts as a fallback for native schemas.\n if (rawSchema.openapi || rawSchema.swagger) return false; \n return true;\n }\n\n /**\n * ISchemaBuilderPlugin Contract\n */\n public build(rawSchema: any): ISchema {\n return SchemaNormalizer.normalize(rawSchema);\n }\n\n /**\n * Validates that the provided raw payload conforms to the required ISchema structures.\n */\n public static normalize(rawSchema?: unknown, data?: unknown): ISchema {\n let schemaObj = rawSchema;\n\n if (typeof schemaObj === \"string\") {\n if (!schemaObj.trim()) {\n schemaObj = null;\n } else {\n try {\n schemaObj = JSON.parse(schemaObj);\n } catch (e) {\n const msg = \"Failed to parse schema string: \" + (e as Error).message;\n Logger.error(\"[MetaUI SchemaNormalizer]\", msg);\n throw new Error(msg);\n }\n }\n }\n\n if (!schemaObj || typeof schemaObj !== 'object' || Array.isArray(schemaObj)) {\n return this.inferSchemaFromData(data);\n }\n\n try {\n // It is an object. Ensure it conforms to v2 structure.\n const normalized: ISchema = {\n title: schemaObj.title,\n type: schemaObj.type || (schemaObj.items ? \"array\" : \"object\"),\n layoutStrategy: schemaObj.layoutStrategy,\n uiLayout: schemaObj.uiLayout,\n additionalProperties: schemaObj.additionalProperties\n };\n\n let targetProperties = schemaObj.properties || {};\n\n if (schemaObj.additionalProperties === true && data) {\n const inferred = this.inferSchemaFromData(data);\n if (inferred.type === \"object\" && inferred.properties) {\n targetProperties = this.deepMergeProperties(inferred.properties, targetProperties);\n } else if (inferred.type === \"array\" && inferred.items && inferred.items.properties) {\n // Array schema merging could be added here if we want full support.\n }\n }\n\n if (normalized.type === \"object\") {\n const requiredKeys = Array.isArray(schemaObj.required) ? schemaObj.required : [];\n normalized.properties = this.normalizeProperties(targetProperties, requiredKeys);\n } else if (normalized.type === \"array\") {\n // Future expansion: array deep merge\n normalized.items = this.normalizePropertyMetadata(schemaObj.items || { type: \"object\", properties: {} }, \"items\", false);\n }\n\n return normalized;\n } catch (error) {\n const msg = \"Critical error normalizing schema object: \" + (error as Error).message;\n Logger.error(\"[MetaUI SchemaNormalizer]\", msg);\n throw new Error(msg);\n }\n }\n\n /**\n * Recursively deep merges an inferred schema over a base schema.\n * @param base The base property dictionary.\n * @param override The overriding inferred dictionary.\n * @returns A new deeply merged property dictionary.\n */\n private static deepMergeProperties(base: Record<string, unknown>, override: Record<string, unknown>): Record<string, unknown> {\n const merged = { ...base };\n for (const key of Object.keys(override)) {\n const overrideVal = override[key];\n const baseVal = merged[key];\n\n if (baseVal && typeof baseVal === \"object\" && !Array.isArray(baseVal) &&\n overrideVal && typeof overrideVal === \"object\" && !Array.isArray(overrideVal)) {\n merged[key] = this.deepMergeProperties(baseVal, overrideVal);\n } else {\n merged[key] = overrideVal;\n }\n }\n return merged;\n }\n\n /**\n * Normalizes a collection of properties.\n * @param properties The raw properties map.\n * @param requiredKeys An optional array of keys that are required by the parent object.\n * @returns A map of strict IPropertyMetadata objects.\n */\n private static normalizeProperties(properties: Record<string, unknown>, requiredKeys: string[] = []): Record<string, IPropertyMetadata> {\n const normalizedProps: Record<string, IPropertyMetadata> = {};\n for (const key of Object.keys(properties)) {\n const isRequired = requiredKeys.includes(key);\n normalizedProps[key] = this.normalizePropertyMetadata(properties[key], key, isRequired);\n }\n return normalizedProps;\n }\n\n /**\n * Normalizes a single property against the ISchema specification.\n * @param prop The raw property definition.\n * @param keyName The string key name for generating default labels.\n * @param isRequired Indicates if the parent object mandated this property as required.\n * @returns A strict IPropertyMetadata instance.\n */\n private static normalizePropertyMetadata(prop: Record<string, unknown>, keyName: string, isRequired: boolean = false): IPropertyMetadata {\n const normalized: IPropertyMetadata = {\n type: prop.type || \"string\",\n ui: {\n label: prop.ui?.label || this.generateLabel(keyName),\n isKey: !!prop.ui?.isKey,\n readOnly: !!prop.ui?.readOnly,\n widget: prop.ui?.widget || (prop.valueHelp || prop.enum ? \"select\" : undefined),\n visibleOn: prop.ui?.visibleOn,\n enabledOn: prop.ui?.enabledOn,\n format: prop.ui?.format,\n validators: prop.ui?.validators,\n formatter: prop.ui?.formatter,\n args: prop.ui?.args,\n rows: prop.ui?.rows,\n fullWidth: prop.ui?.fullWidth,\n dialogButtonText: prop.ui?.dialogButtonText\n },\n required: isRequired || !!prop.required,\n maxLength: prop.maxLength as number,\n minLength: prop.minLength as number,\n minimum: prop.minimum,\n maximum: prop.maximum,\n pattern: prop.pattern,\n precision: prop.precision,\n scale: prop.scale,\n multipleOf: prop.multipleOf as number,\n valueHelp: prop.valueHelp,\n enum: prop.enum\n };\n\n if (normalized.type === \"object\" && prop.properties) {\n const requiredKeys = Array.isArray(prop.required) ? prop.required : [];\n normalized.properties = this.normalizeProperties(prop.properties as Record<string, unknown>, requiredKeys);\n normalized.uiLayout = prop.uiLayout;\n } else if (normalized.type === \"array\" && prop.items) {\n normalized.items = this.normalizePropertyMetadata(prop.items as Record<string, unknown>, \"items\", false);\n normalized.uiLayout = prop.uiLayout;\n }\n\n return normalized;\n }\n\n /**\n * Generates a Title Case label from camelCase or snake_case technical names.\n */\n private static generateLabel(name: string): string {\n if (!name) return \"\";\n let spaced = name.replace(/([A-Z])/g, \" $1\").replace(/_/g, \" \");\n return spaced.split(' ')\n .filter(w => w.length > 0)\n .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ')\n .trim();\n }\n\n /**\n * Infers a v2 ISchema structure dynamically from a plain data payload.\n */\n public static inferSchemaFromData(data: unknown): ISchema {\n const schema: ISchema = { type: \"object\", properties: {}, layoutStrategy: \"compact\", title: \"\" };\n\n if (!data || typeof data !== \"object\") {\n return schema;\n }\n\n if (Array.isArray(data)) {\n schema.type = \"array\";\n if (data.length > 0 && typeof data[0] !== \"object\") {\n schema.layoutStrategy = \"compact\";\n schema.items = { type: typeof data[0] as FieldType };\n } else {\n schema.layoutStrategy = \"table\";\n schema.items = {\n type: \"object\",\n layoutStrategy: \"compact\",\n properties: data.length > 0 ? this.inferPropertiesFromObject(data[0] as Record<string, unknown>) : {}\n };\n }\n } else {\n schema.type = \"object\";\n schema.properties = this.inferPropertiesFromObject(data);\n }\n\n return schema;\n }\n\n /**\n * Infers field metadata recursively from a raw data object.\n * @param obj The raw JavaScript object.\n * @returns A dictionary of inferred IPropertyMetadata.\n */\n private static inferPropertiesFromObject(obj: Record<string, unknown>): Record<string, IPropertyMetadata> {\n const properties: Record<string, IPropertyMetadata> = {};\n if (!obj || typeof obj !== \"object\") return properties;\n\n for (const key of Object.keys(obj)) {\n const val = obj[key];\n if (val === null || val === undefined) continue;\n\n let type: FieldType = \"string\";\n let items: IPropertyMetadata | undefined;\n let nestedProps: Record<string, IPropertyMetadata> | undefined;\n\n if (typeof val === \"number\") type = \"number\";\n else if (typeof val === \"boolean\") type = \"boolean\";\n else if (Array.isArray(val)) {\n type = \"array\";\n if (val.length > 0 && typeof val[0] !== \"object\") {\n items = {\n type: typeof val[0] as FieldType\n };\n } else {\n items = {\n type: \"object\",\n properties: val.length > 0 ? this.inferPropertiesFromObject(val[0] as Record<string, unknown>) : {}\n };\n }\n } else if (typeof val === \"object\") {\n type = \"object\";\n nestedProps = this.inferPropertiesFromObject(val);\n }\n\n properties[key] = {\n type,\n items,\n properties: nestedProps,\n ui: {\n label: this.generateLabel(key),\n isKey: false,\n readOnly: false,\n widget: type === \"array\" && items?.type !== \"object\" ? \"multiInput\" : undefined\n }\n };\n }\n\n return properties;\n }\n\n /**\n * Resolves a JSON Schema scope (e.g. '#/properties/header/properties/id')\n * against the ISchema, returning the PropertyMetadata and the UI5 binding path.\n */\n public static resolveScope(schema: ISchema, scope: string): { meta: IPropertyMetadata | undefined, bindingPath: string, propKey: string } {\n if (!scope || !scope.startsWith(\"#/properties/\")) {\n return { meta: undefined, bindingPath: scope || \"\", propKey: scope || \"\" };\n }\n \n const pathSegments = scope.replace(\"#/properties/\", \"\").split(\"/properties/\");\n let current: Record<string, IPropertyMetadata> | undefined = schema.properties;\n let meta: IPropertyMetadata | undefined;\n \n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Resolving scope '${scope}' with segments: ${JSON.stringify(pathSegments)}`, \"SchemaNormalizer\");\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Root schema keys: ${Object.keys(schema.properties || {})}`, \"SchemaNormalizer\");\n\n for (let i = 0; i < pathSegments.length; i++) {\n const segment = pathSegments[i];\n if (!current) {\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `current is undefined at segment '${segment}'`, \"SchemaNormalizer\");\n meta = undefined;\n break;\n }\n meta = current[segment];\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Segment '${segment}' resolved to meta: ${!!meta}. Available keys in current: ${Object.keys(current)}`, \"SchemaNormalizer\");\n if (i < pathSegments.length - 1) {\n current = meta?.properties;\n }\n }\n \n const bindingPath = pathSegments.join(\"/\");\n const propKey = scope.replace(\"#/properties/\", \"\"); // The original raw string for logging\n \n return {\n meta,\n bindingPath,\n propKey\n };\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAOSA,MAAM,GAAAC,eAAA;EAER,MAAMC,gBAAgB,CAAiC;IAE1D;AACJ;AACA;IACWC,SAASA,CAACC,SAAc,EAAW;MACtC;MACA;MACA,IAAIA,SAAS,CAACC,OAAO,IAAID,SAAS,CAACE,OAAO,EAAE,OAAO,KAAK;MACxD,OAAO,IAAI;IACf;;IAEA;AACJ;AACA;IACWC,KAAKA,CAACH,SAAc,EAAW;MAClC,OAAOF,gBAAgB,CAACM,SAAS,CAACJ,SAAS,CAAC;IAChD;;IAEA;AACJ;AACA;IACI,OAAcI,SAASA,CAACJ,SAAmB,EAAEK,IAAc,EAAW;MAClE,IAAIC,SAAS,GAAGN,SAAS;MAEzB,IAAI,OAAOM,SAAS,KAAK,QAAQ,EAAE;QAC/B,IAAI,CAACA,SAAS,CAACC,IAAI,CAAC,CAAC,EAAE;UACnBD,SAAS,GAAG,IAAI;QACpB,CAAC,MAAM;UACH,IAAI;YACAA,SAAS,GAAGE,IAAI,CAACC,KAAK,CAACH,SAAS,CAAC;UACrC,CAAC,CAAC,OAAOI,CAAC,EAAE;YACR,MAAMC,GAAG,GAAG,iCAAiC,GAAID,CAAC,CAAWE,OAAO;YACpEhB,MAAM,CAACiB,KAAK,CAAC,2BAA2B,EAAEF,GAAG,CAAC;YAC9C,MAAM,IAAIG,KAAK,CAACH,GAAG,CAAC;UACxB;QACJ;MACJ;MAEA,IAAI,CAACL,SAAS,IAAI,OAAOA,SAAS,KAAK,QAAQ,IAAIS,KAAK,CAACC,OAAO,CAACV,SAAS,CAAC,EAAE;QACzE,OAAO,IAAI,CAACW,mBAAmB,CAACZ,IAAI,CAAC;MACzC;MAEA,IAAI;QACA;QACA,MAAMa,UAAmB,GAAG;UACxBC,KAAK,EAAEb,SAAS,CAACa,KAAK;UACtBC,IAAI,EAAEd,SAAS,CAACc,IAAI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Definition","normalize","data","schemaObj","trim","JSON","parse","e","msg","message","error","Error","Array","isArray","inferSchemaFromData","normalized","title","type","items","layoutStrategy","uiLayout","additionalProperties","targetProperties","properties","inferred","deepMergeProperties","requiredKeys","required","normalizeProperties","normalizePropertyMetadata","base","override","merged","key","Object","keys","overrideVal","baseVal","normalizedProps","isRequired","includes","prop","keyName","$ref","ui","label","generateLabel","isKey","readOnly","widget","valueHelp","enum","undefined","visibleOn","enabledOn","format","validators","formatter","args","rows","fullWidth","dialogButtonText","maxLength","minLength","minimum","maximum","pattern","precision","scale","multipleOf","name","spaced","replace","split","filter","w","length","map","word","charAt","toUpperCase","slice","toLowerCase","join","schema","inferPropertiesFromObject","obj","val","nestedProps","resolveScope","scope","startsWith","meta","bindingPath","propKey","pathSegments","current","debug","stringify","i","segment","__exports","__esModule"],"sources":["SchemaNormalizer.ts"],"sourcesContent":["/**\n * @file SchemaNormalizer.ts\n * @description Transforms and validates incoming JSON payloads into the strict v2 ISchema dictionary matrix.\n */\n\nimport { ISchema, IPropertyMetadata, FieldType } from \"../interfaces/ISchema\";\nimport { ISchemaBuilderPlugin } from \"../interfaces/ISchemaBuilderPlugin\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class SchemaNormalizer implements ISchemaBuilderPlugin {\n\n /**\n * ISchemaBuilderPlugin Contract\n */\n public canHandle(rawSchema: unknown): boolean {\n // Fallback for native ISchemas or data inference.\n // It always returns true because it is the final fallback builder in the registry.\n return true;\n }\n\n /**\n * ISchemaBuilderPlugin Contract\n */\n public build(rawSchema: unknown, targetDefinition?: string): ISchema {\n return SchemaNormalizer.normalize(rawSchema);\n }\n\n /**\n * Validates that the provided raw payload conforms to the required ISchema structures.\n */\n public static normalize(rawSchema?: unknown, data?: unknown): ISchema {\n let schemaObj = rawSchema;\n\n if (typeof schemaObj === \"string\") {\n if (!schemaObj.trim()) {\n schemaObj = null;\n } else {\n try {\n schemaObj = JSON.parse(schemaObj);\n } catch (e) {\n const msg = \"Failed to parse schema string: \" + (e as Error).message;\n Logger.error(\"[MetaUI SchemaNormalizer]\", msg);\n throw new Error(msg);\n }\n }\n }\n\n if (!schemaObj || typeof schemaObj !== 'object' || Array.isArray(schemaObj)) {\n return this.inferSchemaFromData(data);\n }\n\n try {\n // It is an object. Ensure it conforms to v2 structure.\n const normalized: ISchema = {\n title: schemaObj.title,\n type: schemaObj.type || (schemaObj.items ? \"array\" : \"object\"),\n layoutStrategy: schemaObj.layoutStrategy,\n uiLayout: schemaObj.uiLayout,\n additionalProperties: schemaObj.additionalProperties\n };\n\n let targetProperties = schemaObj.properties || {};\n\n if (schemaObj.additionalProperties === true && data) {\n const inferred = this.inferSchemaFromData(data);\n if (inferred.type === \"object\" && inferred.properties) {\n targetProperties = this.deepMergeProperties(inferred.properties, targetProperties);\n } else if (inferred.type === \"array\" && inferred.items && inferred.items.properties) {\n // Array schema merging could be added here if we want full support.\n }\n }\n\n if (normalized.type === \"object\") {\n const requiredKeys = Array.isArray(schemaObj.required) ? schemaObj.required : [];\n normalized.properties = this.normalizeProperties(targetProperties, requiredKeys);\n } else if (normalized.type === \"array\") {\n // Future expansion: array deep merge\n normalized.items = this.normalizePropertyMetadata(schemaObj.items || { type: \"object\", properties: {} }, \"items\", false);\n }\n\n return normalized;\n } catch (error) {\n const msg = \"Critical error normalizing schema object: \" + (error as Error).message;\n Logger.error(\"[MetaUI SchemaNormalizer]\", msg);\n throw new Error(msg);\n }\n }\n\n /**\n * Recursively deep merges an inferred schema over a base schema.\n * @param base The base property dictionary.\n * @param override The overriding inferred dictionary.\n * @returns A new deeply merged property dictionary.\n */\n private static deepMergeProperties(base: Record<string, unknown>, override: Record<string, unknown>): Record<string, unknown> {\n const merged = { ...base };\n for (const key of Object.keys(override)) {\n const overrideVal = override[key];\n const baseVal = merged[key];\n\n if (baseVal && typeof baseVal === \"object\" && !Array.isArray(baseVal) &&\n overrideVal && typeof overrideVal === \"object\" && !Array.isArray(overrideVal)) {\n merged[key] = this.deepMergeProperties(baseVal, overrideVal);\n } else {\n merged[key] = overrideVal;\n }\n }\n return merged;\n }\n\n /**\n * Normalizes a collection of properties.\n * @param properties The raw properties map.\n * @param requiredKeys An optional array of keys that are required by the parent object.\n * @returns A map of strict IPropertyMetadata objects.\n */\n private static normalizeProperties(properties: Record<string, unknown>, requiredKeys: string[] = []): Record<string, IPropertyMetadata> {\n const normalizedProps: Record<string, IPropertyMetadata> = {};\n for (const key of Object.keys(properties)) {\n const isRequired = requiredKeys.includes(key);\n normalizedProps[key] = this.normalizePropertyMetadata(properties[key], key, isRequired);\n }\n return normalizedProps;\n }\n\n /**\n * Normalizes a single property against the ISchema specification.\n * @param prop The raw property definition.\n * @param keyName The string key name for generating default labels.\n * @param isRequired Indicates if the parent object mandated this property as required.\n * @returns A strict IPropertyMetadata instance.\n */\n private static normalizePropertyMetadata(prop: Record<string, unknown>, keyName: string, isRequired: boolean = false): IPropertyMetadata {\n const normalized: IPropertyMetadata = {\n type: (prop.type as FieldType) || \"string\",\n $ref: prop.$ref as string | undefined,\n ui: {\n label: (prop.ui as any)?.label || this.generateLabel(keyName),\n isKey: !!(prop.ui as any)?.isKey,\n readOnly: !!(prop.ui as any)?.readOnly,\n widget: (prop.ui as any)?.widget || (prop.valueHelp || prop.enum ? \"select\" : undefined),\n visibleOn: prop.ui?.visibleOn,\n enabledOn: prop.ui?.enabledOn,\n format: prop.ui?.format,\n validators: prop.ui?.validators,\n formatter: prop.ui?.formatter,\n args: prop.ui?.args,\n rows: prop.ui?.rows,\n fullWidth: prop.ui?.fullWidth,\n dialogButtonText: prop.ui?.dialogButtonText\n },\n required: isRequired || !!prop.required,\n maxLength: prop.maxLength as number,\n minLength: prop.minLength as number,\n minimum: prop.minimum,\n maximum: prop.maximum,\n pattern: prop.pattern,\n precision: prop.precision,\n scale: prop.scale,\n multipleOf: prop.multipleOf as number,\n valueHelp: prop.valueHelp,\n enum: prop.enum\n };\n\n if (normalized.type === \"object\" && prop.properties) {\n const requiredKeys = Array.isArray(prop.required) ? prop.required : [];\n normalized.properties = this.normalizeProperties(prop.properties as Record<string, unknown>, requiredKeys);\n normalized.uiLayout = prop.uiLayout;\n } else if (normalized.type === \"array\" && prop.items) {\n normalized.items = this.normalizePropertyMetadata(prop.items as Record<string, unknown>, \"items\", false);\n normalized.uiLayout = prop.uiLayout;\n }\n\n return normalized;\n }\n\n /**\n * Generates a Title Case label from camelCase or snake_case technical names.\n */\n private static generateLabel(name: string): string {\n if (!name) return \"\";\n let spaced = name.replace(/([A-Z])/g, \" $1\").replace(/_/g, \" \");\n return spaced.split(' ')\n .filter(w => w.length > 0)\n .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ')\n .trim();\n }\n\n /**\n * Infers a v2 ISchema structure dynamically from a plain data payload.\n */\n public static inferSchemaFromData(data: unknown): ISchema {\n const schema: ISchema = { type: \"object\", properties: {}, layoutStrategy: \"compact\", title: \"\" };\n\n if (!data || typeof data !== \"object\") {\n return schema;\n }\n\n if (Array.isArray(data)) {\n schema.type = \"array\";\n if (data.length > 0 && typeof data[0] !== \"object\") {\n schema.layoutStrategy = \"compact\";\n schema.items = { type: typeof data[0] as FieldType };\n } else {\n schema.layoutStrategy = \"table\";\n schema.items = {\n type: \"object\",\n layoutStrategy: \"compact\",\n properties: data.length > 0 ? this.inferPropertiesFromObject(data[0] as Record<string, unknown>) : {}\n };\n }\n } else {\n schema.type = \"object\";\n schema.properties = this.inferPropertiesFromObject(data);\n }\n\n return schema;\n }\n\n /**\n * Infers field metadata recursively from a raw data object.\n * @param obj The raw JavaScript object.\n * @returns A dictionary of inferred IPropertyMetadata.\n */\n private static inferPropertiesFromObject(obj: Record<string, unknown>): Record<string, IPropertyMetadata> {\n const properties: Record<string, IPropertyMetadata> = {};\n if (!obj || typeof obj !== \"object\") return properties;\n\n for (const key of Object.keys(obj)) {\n const val = obj[key];\n if (val === null || val === undefined) continue;\n\n let type: FieldType = \"string\";\n let items: IPropertyMetadata | undefined;\n let nestedProps: Record<string, IPropertyMetadata> | undefined;\n\n if (typeof val === \"number\") type = \"number\";\n else if (typeof val === \"boolean\") type = \"boolean\";\n else if (Array.isArray(val)) {\n type = \"array\";\n if (val.length > 0 && typeof val[0] !== \"object\") {\n items = {\n type: typeof val[0] as FieldType\n };\n } else {\n items = {\n type: \"object\",\n properties: val.length > 0 ? this.inferPropertiesFromObject(val[0] as Record<string, unknown>) : {}\n };\n }\n } else if (typeof val === \"object\") {\n type = \"object\";\n nestedProps = this.inferPropertiesFromObject(val);\n }\n\n properties[key] = {\n type,\n items,\n properties: nestedProps,\n ui: {\n label: this.generateLabel(key),\n isKey: false,\n readOnly: false,\n widget: type === \"array\" && items?.type !== \"object\" ? \"multiInput\" : undefined\n }\n };\n }\n\n return properties;\n }\n\n /**\n * Resolves a JSON Schema scope (e.g. '#/properties/header/properties/id')\n * against the ISchema, returning the PropertyMetadata and the UI5 binding path.\n */\n public static resolveScope(schema: ISchema, scope: string): { meta: IPropertyMetadata | undefined, bindingPath: string, propKey: string } {\n if (!scope || !scope.startsWith(\"#/properties/\")) {\n return { meta: undefined, bindingPath: scope || \"\", propKey: scope || \"\" };\n }\n \n const pathSegments = scope.replace(\"#/properties/\", \"\").split(\"/properties/\");\n let current: Record<string, IPropertyMetadata> | undefined = schema.properties;\n let meta: IPropertyMetadata | undefined;\n \n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Resolving scope '${scope}' with segments: ${JSON.stringify(pathSegments)}`, \"SchemaNormalizer\");\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Root schema keys: ${Object.keys(schema.properties || {})}`, \"SchemaNormalizer\");\n\n for (let i = 0; i < pathSegments.length; i++) {\n const segment = pathSegments[i];\n if (!current) {\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `current is undefined at segment '${segment}'`, \"SchemaNormalizer\");\n meta = undefined;\n break;\n }\n meta = current[segment];\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Segment '${segment}' resolved to meta: ${!!meta}. Available keys in current: ${Object.keys(current)}`, \"SchemaNormalizer\");\n if (i < pathSegments.length - 1) {\n current = meta?.properties;\n }\n }\n \n const bindingPath = pathSegments.join(\"/\");\n const propKey = scope.replace(\"#/properties/\", \"\"); // The original raw string for logging\n \n return {\n meta,\n bindingPath,\n propKey\n };\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAOSA,MAAM,GAAAC,eAAA;EAER,MAAMC,gBAAgB,CAAiC;IAE1D;AACJ;AACA;IACWC,SAASA,CAACC,SAAkB,EAAW;MAC1C;MACA;MACA,OAAO,IAAI;IACf;;IAEA;AACJ;AACA;IACWC,KAAKA,CAACD,SAAkB,EAAEE,gBAAyB,EAAW;MACjE,OAAOJ,gBAAgB,CAACK,SAAS,CAACH,SAAS,CAAC;IAChD;;IAEA;AACJ;AACA;IACI,OAAcG,SAASA,CAACH,SAAmB,EAAEI,IAAc,EAAW;MAClE,IAAIC,SAAS,GAAGL,SAAS;MAEzB,IAAI,OAAOK,SAAS,KAAK,QAAQ,EAAE;QAC/B,IAAI,CAACA,SAAS,CAACC,IAAI,CAAC,CAAC,EAAE;UACnBD,SAAS,GAAG,IAAI;QACpB,CAAC,MAAM;UACH,IAAI;YACAA,SAAS,GAAGE,IAAI,CAACC,KAAK,CAACH,SAAS,CAAC;UACrC,CAAC,CAAC,OAAOI,CAAC,EAAE;YACR,MAAMC,GAAG,GAAG,iCAAiC,GAAID,CAAC,CAAWE,OAAO;YACpEf,MAAM,CAACgB,KAAK,CAAC,2BAA2B,EAAEF,GAAG,CAAC;YAC9C,MAAM,IAAIG,KAAK,CAACH,GAAG,CAAC;UACxB;QACJ;MACJ;MAEA,IAAI,CAACL,SAAS,IAAI,OAAOA,SAAS,KAAK,QAAQ,IAAIS,KAAK,CAACC,OAAO,CAACV,SAAS,CAAC,EAAE;QACzE,OAAO,IAAI,CAACW,mBAAmB,CAACZ,IAAI,CAAC;MACzC;MAEA,IAAI;QACA;QACA,MAAMa,UAAmB,GAAG;UACxBC,KAAK,EAAEb,SA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ignoreList":[]}
|
|
@@ -9,11 +9,11 @@ declare module "nz/co/siliconst/ui5/metaui/core/SchemaNormalizer" {
|
|
|
9
9
|
/**
|
|
10
10
|
* ISchemaBuilderPlugin Contract
|
|
11
11
|
*/
|
|
12
|
-
canHandle(rawSchema:
|
|
12
|
+
canHandle(rawSchema: unknown): boolean;
|
|
13
13
|
/**
|
|
14
14
|
* ISchemaBuilderPlugin Contract
|
|
15
15
|
*/
|
|
16
|
-
build(rawSchema:
|
|
16
|
+
build(rawSchema: unknown, targetDefinition?: string): ISchema;
|
|
17
17
|
/**
|
|
18
18
|
* Validates that the provided raw payload conforms to the required ISchema structures.
|
|
19
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaNormalizer.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,kDAAkD,CAAC;IAClE;;;OAGG;IAEH,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAa,MAAM,+CAA+C,CAAC;IACtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;IAGlG,MAAa,gBAAiB,YAAW,oBAAoB;QAEzD;;WAEG;QACI,SAAS,CAAC,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"SchemaNormalizer.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,kDAAkD,CAAC;IAClE;;;OAGG;IAEH,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAa,MAAM,+CAA+C,CAAC;IACtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;IAGlG,MAAa,gBAAiB,YAAW,oBAAoB;QAEzD;;WAEG;QACI,SAAS,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO;QAM7C;;WAEG;QACI,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO;QAIpE;;WAEG;eACW,SAAS,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO;QA0DrE;;;;;WAKG;QACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;QAgBlC;;;;;WAKG;QACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;QASlC;;;;;;WAMG;QACH,OAAO,CAAC,MAAM,CAAC,yBAAyB;QA4CxC;;WAEG;QACH,OAAO,CAAC,MAAM,CAAC,aAAa;QAU5B;;WAEG;eACW,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO;QA4BzD;;;;WAIG;QACH,OAAO,CAAC,MAAM,CAAC,yBAAyB;QA+CxC;;;WAGG;eACW,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG;YAAE,IAAI,EAAE,iBAAiB,GAAG,SAAS,CAAC;YAAC,WAAW,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE;KAmC5I;CAEA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
sap.ui.define(["../utils/Logger"],function(e){"use strict";const t=e["Logger"];class r{canHandle(e){
|
|
1
|
+
sap.ui.define(["../utils/Logger"],function(e){"use strict";const t=e["Logger"];class r{canHandle(e){return true}build(e,t){return r.normalize(e)}static normalize(e,r){let i=e;if(typeof i==="string"){if(!i.trim()){i=null}else{try{i=JSON.parse(i)}catch(e){const r="Failed to parse schema string: "+e.message;t.error("[MetaUI SchemaNormalizer]",r);throw new Error(r)}}}if(!i||typeof i!=="object"||Array.isArray(i)){return this.inferSchemaFromData(r)}try{const e={title:i.title,type:i.type||(i.items?"array":"object"),layoutStrategy:i.layoutStrategy,uiLayout:i.uiLayout,additionalProperties:i.additionalProperties};let t=i.properties||{};if(i.additionalProperties===true&&r){const e=this.inferSchemaFromData(r);if(e.type==="object"&&e.properties){t=this.deepMergeProperties(e.properties,t)}else if(e.type==="array"&&e.items&&e.items.properties){}}if(e.type==="object"){const r=Array.isArray(i.required)?i.required:[];e.properties=this.normalizeProperties(t,r)}else if(e.type==="array"){e.items=this.normalizePropertyMetadata(i.items||{type:"object",properties:{}},"items",false)}return e}catch(e){const r="Critical error normalizing schema object: "+e.message;t.error("[MetaUI SchemaNormalizer]",r);throw new Error(r)}}static deepMergeProperties(e,t){const r={...e};for(const e of Object.keys(t)){const i=t[e];const a=r[e];if(a&&typeof a==="object"&&!Array.isArray(a)&&i&&typeof i==="object"&&!Array.isArray(i)){r[e]=this.deepMergeProperties(a,i)}else{r[e]=i}}return r}static normalizeProperties(e,t=[]){const r={};for(const i of Object.keys(e)){const a=t.includes(i);r[i]=this.normalizePropertyMetadata(e[i],i,a)}return r}static normalizePropertyMetadata(e,t,r=false){const i={type:e.type||"string",$ref:e.$ref,ui:{label:e.ui?.label||this.generateLabel(t),isKey:!!e.ui?.isKey,readOnly:!!e.ui?.readOnly,widget:e.ui?.widget||(e.valueHelp||e.enum?"select":undefined),visibleOn:e.ui?.visibleOn,enabledOn:e.ui?.enabledOn,format:e.ui?.format,validators:e.ui?.validators,formatter:e.ui?.formatter,args:e.ui?.args,rows:e.ui?.rows,fullWidth:e.ui?.fullWidth,dialogButtonText:e.ui?.dialogButtonText},required:r||!!e.required,maxLength:e.maxLength,minLength:e.minLength,minimum:e.minimum,maximum:e.maximum,pattern:e.pattern,precision:e.precision,scale:e.scale,multipleOf:e.multipleOf,valueHelp:e.valueHelp,enum:e.enum};if(i.type==="object"&&e.properties){const t=Array.isArray(e.required)?e.required:[];i.properties=this.normalizeProperties(e.properties,t);i.uiLayout=e.uiLayout}else if(i.type==="array"&&e.items){i.items=this.normalizePropertyMetadata(e.items,"items",false);i.uiLayout=e.uiLayout}return i}static generateLabel(e){if(!e)return"";let t=e.replace(/([A-Z])/g," $1").replace(/_/g," ");return t.split(" ").filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ").trim()}static inferSchemaFromData(e){const t={type:"object",properties:{},layoutStrategy:"compact",title:""};if(!e||typeof e!=="object"){return t}if(Array.isArray(e)){t.type="array";if(e.length>0&&typeof e[0]!=="object"){t.layoutStrategy="compact";t.items={type:typeof e[0]}}else{t.layoutStrategy="table";t.items={type:"object",layoutStrategy:"compact",properties:e.length>0?this.inferPropertiesFromObject(e[0]):{}}}}else{t.type="object";t.properties=this.inferPropertiesFromObject(e)}return t}static inferPropertiesFromObject(e){const t={};if(!e||typeof e!=="object")return t;for(const r of Object.keys(e)){const i=e[r];if(i===null||i===undefined)continue;let a="string";let o;let s;if(typeof i==="number")a="number";else if(typeof i==="boolean")a="boolean";else if(Array.isArray(i)){a="array";if(i.length>0&&typeof i[0]!=="object"){o={type:typeof i[0]}}else{o={type:"object",properties:i.length>0?this.inferPropertiesFromObject(i[0]):{}}}}else if(typeof i==="object"){a="object";s=this.inferPropertiesFromObject(i)}t[r]={type:a,items:o,properties:s,ui:{label:this.generateLabel(r),isKey:false,readOnly:false,widget:a==="array"&&o?.type!=="object"?"multiInput":undefined}}}return t}static resolveScope(e,r){if(!r||!r.startsWith("#/properties/")){return{meta:undefined,bindingPath:r||"",propKey:r||""}}const i=r.replace("#/properties/","").split("/properties/");let a=e.properties;let o;t.debug("[MetaUI SchemaNormalizer]",`Resolving scope '${r}' with segments: ${JSON.stringify(i)}`,"SchemaNormalizer");t.debug("[MetaUI SchemaNormalizer]",`Root schema keys: ${Object.keys(e.properties||{})}`,"SchemaNormalizer");for(let e=0;e<i.length;e++){const r=i[e];if(!a){t.debug("[MetaUI SchemaNormalizer]",`current is undefined at segment '${r}'`,"SchemaNormalizer");o=undefined;break}o=a[r];t.debug("[MetaUI SchemaNormalizer]",`Segment '${r}' resolved to meta: ${!!o}. Available keys in current: ${Object.keys(a)}`,"SchemaNormalizer");if(e<i.length-1){a=o?.properties}}const s=i.join("/");const n=r.replace("#/properties/","");return{meta:o,bindingPath:s,propKey:n}}}var i={__esModule:true};i.SchemaNormalizer=r;return i});
|
|
2
2
|
//# sourceMappingURL=SchemaNormalizer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaNormalizer.js","names":["Logger","___utils_Logger","SchemaNormalizer","canHandle","rawSchema","openapi","swagger","build","normalize","data","schemaObj","trim","JSON","parse","e","msg","message","error","Error","Array","isArray","this","inferSchemaFromData","normalized","title","type","items","layoutStrategy","uiLayout","additionalProperties","targetProperties","properties","inferred","deepMergeProperties","requiredKeys","required","normalizeProperties","normalizePropertyMetadata","base","override","merged","key","Object","keys","overrideVal","baseVal","normalizedProps","isRequired","includes","prop","keyName","ui","label","generateLabel","isKey","readOnly","widget","valueHelp","enum","undefined","visibleOn","enabledOn","format","validators","formatter","args","rows","fullWidth","dialogButtonText","maxLength","minLength","minimum","maximum","pattern","precision","scale","multipleOf","name","spaced","replace","split","filter","w","length","map","word","charAt","toUpperCase","slice","toLowerCase","join","schema","inferPropertiesFromObject","obj","val","nestedProps","resolveScope","scope","startsWith","meta","bindingPath","propKey","pathSegments","current","debug","stringify","i","segment","__exports","__esModule"],"sources":["SchemaNormalizer.ts"],"sourcesContent":["/**\n * @file SchemaNormalizer.ts\n * @description Transforms and validates incoming JSON payloads into the strict v2 ISchema dictionary matrix.\n */\n\nimport { ISchema, IPropertyMetadata, FieldType } from \"../interfaces/ISchema\";\nimport { ISchemaBuilderPlugin } from \"../interfaces/ISchemaBuilderPlugin\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class SchemaNormalizer implements ISchemaBuilderPlugin {\n\n /**\n * ISchemaBuilderPlugin Contract\n */\n public canHandle(rawSchema: any): boolean {\n // MetaUI native schemas almost always have properties, items, or a layoutStrategy\n // This acts as a fallback for native schemas.\n if (rawSchema.openapi || rawSchema.swagger) return false; \n return true;\n }\n\n /**\n * ISchemaBuilderPlugin Contract\n */\n public build(rawSchema: any): ISchema {\n return SchemaNormalizer.normalize(rawSchema);\n }\n\n /**\n * Validates that the provided raw payload conforms to the required ISchema structures.\n */\n public static normalize(rawSchema?: unknown, data?: unknown): ISchema {\n let schemaObj = rawSchema;\n\n if (typeof schemaObj === \"string\") {\n if (!schemaObj.trim()) {\n schemaObj = null;\n } else {\n try {\n schemaObj = JSON.parse(schemaObj);\n } catch (e) {\n const msg = \"Failed to parse schema string: \" + (e as Error).message;\n Logger.error(\"[MetaUI SchemaNormalizer]\", msg);\n throw new Error(msg);\n }\n }\n }\n\n if (!schemaObj || typeof schemaObj !== 'object' || Array.isArray(schemaObj)) {\n return this.inferSchemaFromData(data);\n }\n\n try {\n // It is an object. Ensure it conforms to v2 structure.\n const normalized: ISchema = {\n title: schemaObj.title,\n type: schemaObj.type || (schemaObj.items ? \"array\" : \"object\"),\n layoutStrategy: schemaObj.layoutStrategy,\n uiLayout: schemaObj.uiLayout,\n additionalProperties: schemaObj.additionalProperties\n };\n\n let targetProperties = schemaObj.properties || {};\n\n if (schemaObj.additionalProperties === true && data) {\n const inferred = this.inferSchemaFromData(data);\n if (inferred.type === \"object\" && inferred.properties) {\n targetProperties = this.deepMergeProperties(inferred.properties, targetProperties);\n } else if (inferred.type === \"array\" && inferred.items && inferred.items.properties) {\n // Array schema merging could be added here if we want full support.\n }\n }\n\n if (normalized.type === \"object\") {\n const requiredKeys = Array.isArray(schemaObj.required) ? schemaObj.required : [];\n normalized.properties = this.normalizeProperties(targetProperties, requiredKeys);\n } else if (normalized.type === \"array\") {\n // Future expansion: array deep merge\n normalized.items = this.normalizePropertyMetadata(schemaObj.items || { type: \"object\", properties: {} }, \"items\", false);\n }\n\n return normalized;\n } catch (error) {\n const msg = \"Critical error normalizing schema object: \" + (error as Error).message;\n Logger.error(\"[MetaUI SchemaNormalizer]\", msg);\n throw new Error(msg);\n }\n }\n\n /**\n * Recursively deep merges an inferred schema over a base schema.\n * @param base The base property dictionary.\n * @param override The overriding inferred dictionary.\n * @returns A new deeply merged property dictionary.\n */\n private static deepMergeProperties(base: Record<string, unknown>, override: Record<string, unknown>): Record<string, unknown> {\n const merged = { ...base };\n for (const key of Object.keys(override)) {\n const overrideVal = override[key];\n const baseVal = merged[key];\n\n if (baseVal && typeof baseVal === \"object\" && !Array.isArray(baseVal) &&\n overrideVal && typeof overrideVal === \"object\" && !Array.isArray(overrideVal)) {\n merged[key] = this.deepMergeProperties(baseVal, overrideVal);\n } else {\n merged[key] = overrideVal;\n }\n }\n return merged;\n }\n\n /**\n * Normalizes a collection of properties.\n * @param properties The raw properties map.\n * @param requiredKeys An optional array of keys that are required by the parent object.\n * @returns A map of strict IPropertyMetadata objects.\n */\n private static normalizeProperties(properties: Record<string, unknown>, requiredKeys: string[] = []): Record<string, IPropertyMetadata> {\n const normalizedProps: Record<string, IPropertyMetadata> = {};\n for (const key of Object.keys(properties)) {\n const isRequired = requiredKeys.includes(key);\n normalizedProps[key] = this.normalizePropertyMetadata(properties[key], key, isRequired);\n }\n return normalizedProps;\n }\n\n /**\n * Normalizes a single property against the ISchema specification.\n * @param prop The raw property definition.\n * @param keyName The string key name for generating default labels.\n * @param isRequired Indicates if the parent object mandated this property as required.\n * @returns A strict IPropertyMetadata instance.\n */\n private static normalizePropertyMetadata(prop: Record<string, unknown>, keyName: string, isRequired: boolean = false): IPropertyMetadata {\n const normalized: IPropertyMetadata = {\n type: prop.type || \"string\",\n ui: {\n label: prop.ui?.label || this.generateLabel(keyName),\n isKey: !!prop.ui?.isKey,\n readOnly: !!prop.ui?.readOnly,\n widget: prop.ui?.widget || (prop.valueHelp || prop.enum ? \"select\" : undefined),\n visibleOn: prop.ui?.visibleOn,\n enabledOn: prop.ui?.enabledOn,\n format: prop.ui?.format,\n validators: prop.ui?.validators,\n formatter: prop.ui?.formatter,\n args: prop.ui?.args,\n rows: prop.ui?.rows,\n fullWidth: prop.ui?.fullWidth,\n dialogButtonText: prop.ui?.dialogButtonText\n },\n required: isRequired || !!prop.required,\n maxLength: prop.maxLength as number,\n minLength: prop.minLength as number,\n minimum: prop.minimum,\n maximum: prop.maximum,\n pattern: prop.pattern,\n precision: prop.precision,\n scale: prop.scale,\n multipleOf: prop.multipleOf as number,\n valueHelp: prop.valueHelp,\n enum: prop.enum\n };\n\n if (normalized.type === \"object\" && prop.properties) {\n const requiredKeys = Array.isArray(prop.required) ? prop.required : [];\n normalized.properties = this.normalizeProperties(prop.properties as Record<string, unknown>, requiredKeys);\n normalized.uiLayout = prop.uiLayout;\n } else if (normalized.type === \"array\" && prop.items) {\n normalized.items = this.normalizePropertyMetadata(prop.items as Record<string, unknown>, \"items\", false);\n normalized.uiLayout = prop.uiLayout;\n }\n\n return normalized;\n }\n\n /**\n * Generates a Title Case label from camelCase or snake_case technical names.\n */\n private static generateLabel(name: string): string {\n if (!name) return \"\";\n let spaced = name.replace(/([A-Z])/g, \" $1\").replace(/_/g, \" \");\n return spaced.split(' ')\n .filter(w => w.length > 0)\n .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ')\n .trim();\n }\n\n /**\n * Infers a v2 ISchema structure dynamically from a plain data payload.\n */\n public static inferSchemaFromData(data: unknown): ISchema {\n const schema: ISchema = { type: \"object\", properties: {}, layoutStrategy: \"compact\", title: \"\" };\n\n if (!data || typeof data !== \"object\") {\n return schema;\n }\n\n if (Array.isArray(data)) {\n schema.type = \"array\";\n if (data.length > 0 && typeof data[0] !== \"object\") {\n schema.layoutStrategy = \"compact\";\n schema.items = { type: typeof data[0] as FieldType };\n } else {\n schema.layoutStrategy = \"table\";\n schema.items = {\n type: \"object\",\n layoutStrategy: \"compact\",\n properties: data.length > 0 ? this.inferPropertiesFromObject(data[0] as Record<string, unknown>) : {}\n };\n }\n } else {\n schema.type = \"object\";\n schema.properties = this.inferPropertiesFromObject(data);\n }\n\n return schema;\n }\n\n /**\n * Infers field metadata recursively from a raw data object.\n * @param obj The raw JavaScript object.\n * @returns A dictionary of inferred IPropertyMetadata.\n */\n private static inferPropertiesFromObject(obj: Record<string, unknown>): Record<string, IPropertyMetadata> {\n const properties: Record<string, IPropertyMetadata> = {};\n if (!obj || typeof obj !== \"object\") return properties;\n\n for (const key of Object.keys(obj)) {\n const val = obj[key];\n if (val === null || val === undefined) continue;\n\n let type: FieldType = \"string\";\n let items: IPropertyMetadata | undefined;\n let nestedProps: Record<string, IPropertyMetadata> | undefined;\n\n if (typeof val === \"number\") type = \"number\";\n else if (typeof val === \"boolean\") type = \"boolean\";\n else if (Array.isArray(val)) {\n type = \"array\";\n if (val.length > 0 && typeof val[0] !== \"object\") {\n items = {\n type: typeof val[0] as FieldType\n };\n } else {\n items = {\n type: \"object\",\n properties: val.length > 0 ? this.inferPropertiesFromObject(val[0] as Record<string, unknown>) : {}\n };\n }\n } else if (typeof val === \"object\") {\n type = \"object\";\n nestedProps = this.inferPropertiesFromObject(val);\n }\n\n properties[key] = {\n type,\n items,\n properties: nestedProps,\n ui: {\n label: this.generateLabel(key),\n isKey: false,\n readOnly: false,\n widget: type === \"array\" && items?.type !== \"object\" ? \"multiInput\" : undefined\n }\n };\n }\n\n return properties;\n }\n\n /**\n * Resolves a JSON Schema scope (e.g. '#/properties/header/properties/id')\n * against the ISchema, returning the PropertyMetadata and the UI5 binding path.\n */\n public static resolveScope(schema: ISchema, scope: string): { meta: IPropertyMetadata | undefined, bindingPath: string, propKey: string } {\n if (!scope || !scope.startsWith(\"#/properties/\")) {\n return { meta: undefined, bindingPath: scope || \"\", propKey: scope || \"\" };\n }\n \n const pathSegments = scope.replace(\"#/properties/\", \"\").split(\"/properties/\");\n let current: Record<string, IPropertyMetadata> | undefined = schema.properties;\n let meta: IPropertyMetadata | undefined;\n \n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Resolving scope '${scope}' with segments: ${JSON.stringify(pathSegments)}`, \"SchemaNormalizer\");\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Root schema keys: ${Object.keys(schema.properties || {})}`, \"SchemaNormalizer\");\n\n for (let i = 0; i < pathSegments.length; i++) {\n const segment = pathSegments[i];\n if (!current) {\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `current is undefined at segment '${segment}'`, \"SchemaNormalizer\");\n meta = undefined;\n break;\n }\n meta = current[segment];\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Segment '${segment}' resolved to meta: ${!!meta}. Available keys in current: ${Object.keys(current)}`, \"SchemaNormalizer\");\n if (i < pathSegments.length - 1) {\n current = meta?.properties;\n }\n }\n \n const bindingPath = pathSegments.join(\"/\");\n const propKey = scope.replace(\"#/properties/\", \"\"); // The original raw string for logging\n \n return {\n meta,\n bindingPath,\n propKey\n };\n }\n}\n"],"mappings":"2DAAA,MAOSA,EAAMC,EAAA,UAER,MAAMC,EAKFC,UAAUC,GAGb,GAAIA,EAAUC,SAAWD,EAAUE,QAAS,OAAO,MACnD,OAAO,IACX,CAKOC,MAAMH,GACT,OAAOF,EAAiBM,UAAUJ,EACtC,CAKA,gBAAcI,CAAUJ,EAAqBK,GACzC,IAAIC,EAAYN,EAEhB,UAAWM,IAAc,SAAU,CAC/B,IAAKA,EAAUC,OAAQ,CACnBD,EAAY,IAChB,KAAO,CACH,IACIA,EAAYE,KAAKC,MAAMH,EAC3B,CAAE,MAAOI,GACL,MAAMC,EAAM,kCAAqCD,EAAYE,QAC7DhB,EAAOiB,MAAM,4BAA6BF,GAC1C,MAAM,IAAIG,MAAMH,EACpB,CACJ,CACJ,CAEA,IAAKL,UAAoBA,IAAc,UAAYS,MAAMC,QAAQV,GAAY,CACzE,OAAOW,KAAKC,oBAAoBb,EACpC,CAEA,IAEI,MAAMc,EAAsB,CACxBC,MAAOd,EAAUc,MACjBC,KAAMf,EAAUe,OAASf,EAAUgB,MAAQ,QAAU,UACrDC,eAAgBjB,EAAUiB,eAC1BC,SAAUlB,EAAUkB,SACpBC,qBAAsBnB,EAAUmB,sBAGpC,IAAIC,EAAmBpB,EAAUqB,YAAc,CAAC,EAEhD,GAAIrB,EAAUmB,uBAAyB,MAAQpB,EAAM,CACjD,MAAMuB,EAAWX,KAAKC,oBAAoBb,GAC1C,GAAIuB,E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C7BoB,EAAUJ,GAAMpE,UACpB,CACJ,CAEA,MAAMqE,EAAcE,EAAaZ,KAAK,KACtC,MAAMW,EAAUJ,EAAMlB,QAAQ,gBAAiB,IAE/C,MAAO,CACHoB,OACAC,cACAC,UAER,EACH,IAAAO,EAAA,CAAAC,WAAA,MAAAD,EAAA1G,mBAAA,OAAA0G,CAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"SchemaNormalizer.js","names":["Logger","___utils_Logger","SchemaNormalizer","canHandle","rawSchema","build","targetDefinition","normalize","data","schemaObj","trim","JSON","parse","e","msg","message","error","Error","Array","isArray","this","inferSchemaFromData","normalized","title","type","items","layoutStrategy","uiLayout","additionalProperties","targetProperties","properties","inferred","deepMergeProperties","requiredKeys","required","normalizeProperties","normalizePropertyMetadata","base","override","merged","key","Object","keys","overrideVal","baseVal","normalizedProps","isRequired","includes","prop","keyName","$ref","ui","label","generateLabel","isKey","readOnly","widget","valueHelp","enum","undefined","visibleOn","enabledOn","format","validators","formatter","args","rows","fullWidth","dialogButtonText","maxLength","minLength","minimum","maximum","pattern","precision","scale","multipleOf","name","spaced","replace","split","filter","w","length","map","word","charAt","toUpperCase","slice","toLowerCase","join","schema","inferPropertiesFromObject","obj","val","nestedProps","resolveScope","scope","startsWith","meta","bindingPath","propKey","pathSegments","current","debug","stringify","i","segment","__exports","__esModule"],"sources":["SchemaNormalizer.ts"],"sourcesContent":["/**\n * @file SchemaNormalizer.ts\n * @description Transforms and validates incoming JSON payloads into the strict v2 ISchema dictionary matrix.\n */\n\nimport { ISchema, IPropertyMetadata, FieldType } from \"../interfaces/ISchema\";\nimport { ISchemaBuilderPlugin } from \"../interfaces/ISchemaBuilderPlugin\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class SchemaNormalizer implements ISchemaBuilderPlugin {\n\n /**\n * ISchemaBuilderPlugin Contract\n */\n public canHandle(rawSchema: unknown): boolean {\n // Fallback for native ISchemas or data inference.\n // It always returns true because it is the final fallback builder in the registry.\n return true;\n }\n\n /**\n * ISchemaBuilderPlugin Contract\n */\n public build(rawSchema: unknown, targetDefinition?: string): ISchema {\n return SchemaNormalizer.normalize(rawSchema);\n }\n\n /**\n * Validates that the provided raw payload conforms to the required ISchema structures.\n */\n public static normalize(rawSchema?: unknown, data?: unknown): ISchema {\n let schemaObj = rawSchema;\n\n if (typeof schemaObj === \"string\") {\n if (!schemaObj.trim()) {\n schemaObj = null;\n } else {\n try {\n schemaObj = JSON.parse(schemaObj);\n } catch (e) {\n const msg = \"Failed to parse schema string: \" + (e as Error).message;\n Logger.error(\"[MetaUI SchemaNormalizer]\", msg);\n throw new Error(msg);\n }\n }\n }\n\n if (!schemaObj || typeof schemaObj !== 'object' || Array.isArray(schemaObj)) {\n return this.inferSchemaFromData(data);\n }\n\n try {\n // It is an object. Ensure it conforms to v2 structure.\n const normalized: ISchema = {\n title: schemaObj.title,\n type: schemaObj.type || (schemaObj.items ? \"array\" : \"object\"),\n layoutStrategy: schemaObj.layoutStrategy,\n uiLayout: schemaObj.uiLayout,\n additionalProperties: schemaObj.additionalProperties\n };\n\n let targetProperties = schemaObj.properties || {};\n\n if (schemaObj.additionalProperties === true && data) {\n const inferred = this.inferSchemaFromData(data);\n if (inferred.type === \"object\" && inferred.properties) {\n targetProperties = this.deepMergeProperties(inferred.properties, targetProperties);\n } else if (inferred.type === \"array\" && inferred.items && inferred.items.properties) {\n // Array schema merging could be added here if we want full support.\n }\n }\n\n if (normalized.type === \"object\") {\n const requiredKeys = Array.isArray(schemaObj.required) ? schemaObj.required : [];\n normalized.properties = this.normalizeProperties(targetProperties, requiredKeys);\n } else if (normalized.type === \"array\") {\n // Future expansion: array deep merge\n normalized.items = this.normalizePropertyMetadata(schemaObj.items || { type: \"object\", properties: {} }, \"items\", false);\n }\n\n return normalized;\n } catch (error) {\n const msg = \"Critical error normalizing schema object: \" + (error as Error).message;\n Logger.error(\"[MetaUI SchemaNormalizer]\", msg);\n throw new Error(msg);\n }\n }\n\n /**\n * Recursively deep merges an inferred schema over a base schema.\n * @param base The base property dictionary.\n * @param override The overriding inferred dictionary.\n * @returns A new deeply merged property dictionary.\n */\n private static deepMergeProperties(base: Record<string, unknown>, override: Record<string, unknown>): Record<string, unknown> {\n const merged = { ...base };\n for (const key of Object.keys(override)) {\n const overrideVal = override[key];\n const baseVal = merged[key];\n\n if (baseVal && typeof baseVal === \"object\" && !Array.isArray(baseVal) &&\n overrideVal && typeof overrideVal === \"object\" && !Array.isArray(overrideVal)) {\n merged[key] = this.deepMergeProperties(baseVal, overrideVal);\n } else {\n merged[key] = overrideVal;\n }\n }\n return merged;\n }\n\n /**\n * Normalizes a collection of properties.\n * @param properties The raw properties map.\n * @param requiredKeys An optional array of keys that are required by the parent object.\n * @returns A map of strict IPropertyMetadata objects.\n */\n private static normalizeProperties(properties: Record<string, unknown>, requiredKeys: string[] = []): Record<string, IPropertyMetadata> {\n const normalizedProps: Record<string, IPropertyMetadata> = {};\n for (const key of Object.keys(properties)) {\n const isRequired = requiredKeys.includes(key);\n normalizedProps[key] = this.normalizePropertyMetadata(properties[key], key, isRequired);\n }\n return normalizedProps;\n }\n\n /**\n * Normalizes a single property against the ISchema specification.\n * @param prop The raw property definition.\n * @param keyName The string key name for generating default labels.\n * @param isRequired Indicates if the parent object mandated this property as required.\n * @returns A strict IPropertyMetadata instance.\n */\n private static normalizePropertyMetadata(prop: Record<string, unknown>, keyName: string, isRequired: boolean = false): IPropertyMetadata {\n const normalized: IPropertyMetadata = {\n type: (prop.type as FieldType) || \"string\",\n $ref: prop.$ref as string | undefined,\n ui: {\n label: (prop.ui as any)?.label || this.generateLabel(keyName),\n isKey: !!(prop.ui as any)?.isKey,\n readOnly: !!(prop.ui as any)?.readOnly,\n widget: (prop.ui as any)?.widget || (prop.valueHelp || prop.enum ? \"select\" : undefined),\n visibleOn: prop.ui?.visibleOn,\n enabledOn: prop.ui?.enabledOn,\n format: prop.ui?.format,\n validators: prop.ui?.validators,\n formatter: prop.ui?.formatter,\n args: prop.ui?.args,\n rows: prop.ui?.rows,\n fullWidth: prop.ui?.fullWidth,\n dialogButtonText: prop.ui?.dialogButtonText\n },\n required: isRequired || !!prop.required,\n maxLength: prop.maxLength as number,\n minLength: prop.minLength as number,\n minimum: prop.minimum,\n maximum: prop.maximum,\n pattern: prop.pattern,\n precision: prop.precision,\n scale: prop.scale,\n multipleOf: prop.multipleOf as number,\n valueHelp: prop.valueHelp,\n enum: prop.enum\n };\n\n if (normalized.type === \"object\" && prop.properties) {\n const requiredKeys = Array.isArray(prop.required) ? prop.required : [];\n normalized.properties = this.normalizeProperties(prop.properties as Record<string, unknown>, requiredKeys);\n normalized.uiLayout = prop.uiLayout;\n } else if (normalized.type === \"array\" && prop.items) {\n normalized.items = this.normalizePropertyMetadata(prop.items as Record<string, unknown>, \"items\", false);\n normalized.uiLayout = prop.uiLayout;\n }\n\n return normalized;\n }\n\n /**\n * Generates a Title Case label from camelCase or snake_case technical names.\n */\n private static generateLabel(name: string): string {\n if (!name) return \"\";\n let spaced = name.replace(/([A-Z])/g, \" $1\").replace(/_/g, \" \");\n return spaced.split(' ')\n .filter(w => w.length > 0)\n .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ')\n .trim();\n }\n\n /**\n * Infers a v2 ISchema structure dynamically from a plain data payload.\n */\n public static inferSchemaFromData(data: unknown): ISchema {\n const schema: ISchema = { type: \"object\", properties: {}, layoutStrategy: \"compact\", title: \"\" };\n\n if (!data || typeof data !== \"object\") {\n return schema;\n }\n\n if (Array.isArray(data)) {\n schema.type = \"array\";\n if (data.length > 0 && typeof data[0] !== \"object\") {\n schema.layoutStrategy = \"compact\";\n schema.items = { type: typeof data[0] as FieldType };\n } else {\n schema.layoutStrategy = \"table\";\n schema.items = {\n type: \"object\",\n layoutStrategy: \"compact\",\n properties: data.length > 0 ? this.inferPropertiesFromObject(data[0] as Record<string, unknown>) : {}\n };\n }\n } else {\n schema.type = \"object\";\n schema.properties = this.inferPropertiesFromObject(data);\n }\n\n return schema;\n }\n\n /**\n * Infers field metadata recursively from a raw data object.\n * @param obj The raw JavaScript object.\n * @returns A dictionary of inferred IPropertyMetadata.\n */\n private static inferPropertiesFromObject(obj: Record<string, unknown>): Record<string, IPropertyMetadata> {\n const properties: Record<string, IPropertyMetadata> = {};\n if (!obj || typeof obj !== \"object\") return properties;\n\n for (const key of Object.keys(obj)) {\n const val = obj[key];\n if (val === null || val === undefined) continue;\n\n let type: FieldType = \"string\";\n let items: IPropertyMetadata | undefined;\n let nestedProps: Record<string, IPropertyMetadata> | undefined;\n\n if (typeof val === \"number\") type = \"number\";\n else if (typeof val === \"boolean\") type = \"boolean\";\n else if (Array.isArray(val)) {\n type = \"array\";\n if (val.length > 0 && typeof val[0] !== \"object\") {\n items = {\n type: typeof val[0] as FieldType\n };\n } else {\n items = {\n type: \"object\",\n properties: val.length > 0 ? this.inferPropertiesFromObject(val[0] as Record<string, unknown>) : {}\n };\n }\n } else if (typeof val === \"object\") {\n type = \"object\";\n nestedProps = this.inferPropertiesFromObject(val);\n }\n\n properties[key] = {\n type,\n items,\n properties: nestedProps,\n ui: {\n label: this.generateLabel(key),\n isKey: false,\n readOnly: false,\n widget: type === \"array\" && items?.type !== \"object\" ? \"multiInput\" : undefined\n }\n };\n }\n\n return properties;\n }\n\n /**\n * Resolves a JSON Schema scope (e.g. '#/properties/header/properties/id')\n * against the ISchema, returning the PropertyMetadata and the UI5 binding path.\n */\n public static resolveScope(schema: ISchema, scope: string): { meta: IPropertyMetadata | undefined, bindingPath: string, propKey: string } {\n if (!scope || !scope.startsWith(\"#/properties/\")) {\n return { meta: undefined, bindingPath: scope || \"\", propKey: scope || \"\" };\n }\n \n const pathSegments = scope.replace(\"#/properties/\", \"\").split(\"/properties/\");\n let current: Record<string, IPropertyMetadata> | undefined = schema.properties;\n let meta: IPropertyMetadata | undefined;\n \n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Resolving scope '${scope}' with segments: ${JSON.stringify(pathSegments)}`, \"SchemaNormalizer\");\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Root schema keys: ${Object.keys(schema.properties || {})}`, \"SchemaNormalizer\");\n\n for (let i = 0; i < pathSegments.length; i++) {\n const segment = pathSegments[i];\n if (!current) {\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `current is undefined at segment '${segment}'`, \"SchemaNormalizer\");\n meta = undefined;\n break;\n }\n meta = current[segment];\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Segment '${segment}' resolved to meta: ${!!meta}. Available keys in current: ${Object.keys(current)}`, \"SchemaNormalizer\");\n if (i < pathSegments.length - 1) {\n current = meta?.properties;\n }\n }\n \n const bindingPath = pathSegments.join(\"/\");\n const propKey = scope.replace(\"#/properties/\", \"\"); // The original raw string for logging\n \n return {\n meta,\n bindingPath,\n propKey\n };\n }\n}\n"],"mappings":"2DAAA,MAOSA,EAAMC,EAAA,UAER,MAAMC,EAKFC,UAAUC,GAGb,OAAO,IACX,CAKOC,MAAMD,EAAoBE,GAC7B,OAAOJ,EAAiBK,UAAUH,EACtC,CAKA,gBAAcG,CAAUH,EAAqBI,GACzC,IAAIC,EAAYL,EAEhB,UAAWK,IAAc,SAAU,CAC/B,IAAKA,EAAUC,OAAQ,CACnBD,EAAY,IAChB,KAAO,CACH,IACIA,EAAYE,KAAKC,MAAMH,EAC3B,CAAE,MAAOI,GACL,MAAMC,EAAM,kCAAqCD,EAAYE,QAC7Df,EAAOgB,MAAM,4BAA6BF,GAC1C,MAAM,IAAIG,MAAMH,EACpB,CACJ,CACJ,CAEA,IAAKL,UAAoBA,IAAc,UAAYS,MAAMC,QAAQV,GAAY,CACzE,OAAOW,KAAKC,oBAAoBb,EACpC,CAEA,IAEI,MAAMc,EAAsB,CACxBC,MAAOd,EAAUc,MACjBC,KAAMf,EAAUe,OAASf,EAAUgB,MAAQ,QAAU,UACrDC,eAAgBjB,EAAUiB,eAC1BC,SAAUlB,EAAUkB,SACpBC,qBAAsBnB,EAAUmB,sBAGpC,IAAIC,EAAmBpB,EAAU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EAAOI,EAAQI,GACf3G,EAAOwG,MAAM,4BAA6B,YAAYG,0BAAgCR,iCAAoC1D,OAAOC,KAAK6D,KAAY,oBAClJ,GAAIG,EAAIJ,EAAanB,OAAS,EAAG,CAC7BoB,EAAUJ,GAAMrE,UACpB,CACJ,CAEA,MAAMsE,EAAcE,EAAaZ,KAAK,KACtC,MAAMW,EAAUJ,EAAMlB,QAAQ,gBAAiB,IAE/C,MAAO,CACHoB,OACAC,cACAC,UAER,EACH,IAAAO,EAAA,CAAAC,WAAA,MAAAD,EAAA1G,mBAAA,OAAA0G,CAAA","ignoreList":[]}
|
|
@@ -12,17 +12,16 @@ export class SchemaNormalizer implements ISchemaBuilderPlugin {
|
|
|
12
12
|
/**
|
|
13
13
|
* ISchemaBuilderPlugin Contract
|
|
14
14
|
*/
|
|
15
|
-
public canHandle(rawSchema:
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
if (rawSchema.openapi || rawSchema.swagger) return false;
|
|
15
|
+
public canHandle(rawSchema: unknown): boolean {
|
|
16
|
+
// Fallback for native ISchemas or data inference.
|
|
17
|
+
// It always returns true because it is the final fallback builder in the registry.
|
|
19
18
|
return true;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
/**
|
|
23
22
|
* ISchemaBuilderPlugin Contract
|
|
24
23
|
*/
|
|
25
|
-
public build(rawSchema:
|
|
24
|
+
public build(rawSchema: unknown, targetDefinition?: string): ISchema {
|
|
26
25
|
return SchemaNormalizer.normalize(rawSchema);
|
|
27
26
|
}
|
|
28
27
|
|
|
@@ -133,12 +132,13 @@ export class SchemaNormalizer implements ISchemaBuilderPlugin {
|
|
|
133
132
|
*/
|
|
134
133
|
private static normalizePropertyMetadata(prop: Record<string, unknown>, keyName: string, isRequired: boolean = false): IPropertyMetadata {
|
|
135
134
|
const normalized: IPropertyMetadata = {
|
|
136
|
-
type: prop.type || "string",
|
|
135
|
+
type: (prop.type as FieldType) || "string",
|
|
136
|
+
$ref: prop.$ref as string | undefined,
|
|
137
137
|
ui: {
|
|
138
|
-
label: prop.ui?.label || this.generateLabel(keyName),
|
|
139
|
-
isKey: !!prop.ui?.isKey,
|
|
140
|
-
readOnly: !!prop.ui?.readOnly,
|
|
141
|
-
widget: prop.ui?.widget || (prop.valueHelp || prop.enum ? "select" : undefined),
|
|
138
|
+
label: (prop.ui as any)?.label || this.generateLabel(keyName),
|
|
139
|
+
isKey: !!(prop.ui as any)?.isKey,
|
|
140
|
+
readOnly: !!(prop.ui as any)?.readOnly,
|
|
141
|
+
widget: (prop.ui as any)?.widget || (prop.valueHelp || prop.enum ? "select" : undefined),
|
|
142
142
|
visibleOn: prop.ui?.visibleOn,
|
|
143
143
|
enabledOn: prop.ui?.enabledOn,
|
|
144
144
|
format: prop.ui?.format,
|
|
@@ -34,7 +34,7 @@ sap.ui.define([], function () {
|
|
|
34
34
|
if (!prop.type) {
|
|
35
35
|
errors.push(`Property '${key}' is missing 'type'.`);
|
|
36
36
|
} else {
|
|
37
|
-
const allowedTypes = ["string", "number", "boolean", "date", "object", "array"];
|
|
37
|
+
const allowedTypes = ["string", "number", "integer", "boolean", "date", "object", "array"];
|
|
38
38
|
if (!allowedTypes.includes(prop.type)) {
|
|
39
39
|
errors.push(`Property '${key}' has invalid type '${prop.type}'. Allowed: ${allowedTypes.join(", ")}`);
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaValidator-dbg.js","names":["SchemaValidator","validateSchemaStructure","schema","errors","s","type","push","properties","key","Object","keys","prop","allowedTypes","includes","join","__exports","__esModule"],"sources":["SchemaValidator.ts"],"sourcesContent":["/**\n * @file SchemaValidator.ts\n * @description Structural validation utility to catch developer errors in the JSON schema itself.\n */\n\nimport { ISchema, FieldType } from \"../interfaces/ISchema\";\n\nexport class SchemaValidator {\n /**\n * Validates a parsed JSON schema object for structural correctness.\n * @param schema The schema object to validate\n * @returns An array of error strings. Empty if no errors.\n */\n public static validateSchemaStructure(schema: unknown): string[] {\n const errors: string[] = [];\n\n if (!schema || typeof schema !== \"object\") {\n return [\"Root schema must be an object.\"];\n }\n\n const s = schema as Record<string, any>;\n if (s.type !== \"object\" && s.type !== \"array\") {\n errors.push(`Root schema must have type 'object' or 'array'. Found: '${s.type}'`);\n }\n\n if (s.type === \"object\" && !s.properties) {\n errors.push(\"Object schema is missing the 'properties' node.\");\n }\n\n if (s.properties) {\n for (const key of Object.keys(s.properties)) {\n const prop = s.properties[key];\n if (!prop || typeof prop !== \"object\") {\n errors.push(`Property '${key}' must be an object.`);\n continue;\n }\n\n if (!prop.type) {\n errors.push(`Property '${key}' is missing 'type'.`);\n } else {\n const allowedTypes: FieldType[] = [\"string\", \"number\", \"boolean\", \"date\", \"object\", \"array\"];\n if (!allowedTypes.includes(prop.type)) {\n errors.push(`Property '${key}' has invalid type '${prop.type}'. Allowed: ${allowedTypes.join(\", \")}`);\n }\n }\n\n // Removed strict check for prop.items on array properties because inference handles empty definitions\n\n }\n }\n\n return errors;\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;;EAIO,MAAMA,eAAe,CAAC;IACzB;AACJ;AACA;AACA;AACA;IACI,OAAcC,uBAAuBA,CAACC,MAAe,EAAY;MAC7D,MAAMC,MAAgB,GAAG,EAAE;MAE3B,IAAI,CAACD,MAAM,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;QACvC,OAAO,CAAC,gCAAgC,CAAC;MAC7C;MAEA,MAAME,CAAC,GAAGF,MAA6B;MACvC,IAAIE,CAAC,CAACC,IAAI,KAAK,QAAQ,IAAID,CAAC,CAACC,IAAI,KAAK,OAAO,EAAE;QAC3CF,MAAM,CAACG,IAAI,CAAC,2DAA2DF,CAAC,CAACC,IAAI,GAAG,CAAC;MACrF;MAEA,IAAID,CAAC,CAACC,IAAI,KAAK,QAAQ,IAAI,CAACD,CAAC,CAACG,UAAU,EAAE;QACtCJ,MAAM,CAACG,IAAI,CAAC,iDAAiD,CAAC;MAClE;MAEA,IAAIF,CAAC,CAACG,UAAU,EAAE;QACd,KAAK,MAAMC,GAAG,IAAIC,MAAM,CAACC,IAAI,CAACN,CAAC,CAACG,UAAU,CAAC,EAAE;UACzC,MAAMI,IAAI,GAAGP,CAAC,CAACG,UAAU,CAACC,GAAG,CAAC;UAC9B,IAAI,CAACG,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;YACnCR,MAAM,CAACG,IAAI,CAAC,aAAaE,GAAG,sBAAsB,CAAC;YACnD;UACJ;UAEA,IAAI,CAACG,IAAI,CAACN,IAAI,EAAE;YACZF,MAAM,CAACG,IAAI,CAAC,aAAaE,GAAG,sBAAsB,CAAC;UACvD,CAAC,MAAM;YACH,MAAMI,YAAyB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SchemaValidator-dbg.js","names":["SchemaValidator","validateSchemaStructure","schema","errors","s","type","push","properties","key","Object","keys","prop","allowedTypes","includes","join","__exports","__esModule"],"sources":["SchemaValidator.ts"],"sourcesContent":["/**\n * @file SchemaValidator.ts\n * @description Structural validation utility to catch developer errors in the JSON schema itself.\n */\n\nimport { ISchema, FieldType } from \"../interfaces/ISchema\";\n\nexport class SchemaValidator {\n /**\n * Validates a parsed JSON schema object for structural correctness.\n * @param schema The schema object to validate\n * @returns An array of error strings. Empty if no errors.\n */\n public static validateSchemaStructure(schema: unknown): string[] {\n const errors: string[] = [];\n\n if (!schema || typeof schema !== \"object\") {\n return [\"Root schema must be an object.\"];\n }\n\n const s = schema as Record<string, any>;\n if (s.type !== \"object\" && s.type !== \"array\") {\n errors.push(`Root schema must have type 'object' or 'array'. Found: '${s.type}'`);\n }\n\n if (s.type === \"object\" && !s.properties) {\n errors.push(\"Object schema is missing the 'properties' node.\");\n }\n\n if (s.properties) {\n for (const key of Object.keys(s.properties)) {\n const prop = s.properties[key];\n if (!prop || typeof prop !== \"object\") {\n errors.push(`Property '${key}' must be an object.`);\n continue;\n }\n\n if (!prop.type) {\n errors.push(`Property '${key}' is missing 'type'.`);\n } else {\n const allowedTypes: FieldType[] = [\"string\", \"number\", \"integer\", \"boolean\", \"date\", \"object\", \"array\"];\n if (!allowedTypes.includes(prop.type)) {\n errors.push(`Property '${key}' has invalid type '${prop.type}'. Allowed: ${allowedTypes.join(\", \")}`);\n }\n }\n\n // Removed strict check for prop.items on array properties because inference handles empty definitions\n\n }\n }\n\n return errors;\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;;EAIO,MAAMA,eAAe,CAAC;IACzB;AACJ;AACA;AACA;AACA;IACI,OAAcC,uBAAuBA,CAACC,MAAe,EAAY;MAC7D,MAAMC,MAAgB,GAAG,EAAE;MAE3B,IAAI,CAACD,MAAM,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;QACvC,OAAO,CAAC,gCAAgC,CAAC;MAC7C;MAEA,MAAME,CAAC,GAAGF,MAA6B;MACvC,IAAIE,CAAC,CAACC,IAAI,KAAK,QAAQ,IAAID,CAAC,CAACC,IAAI,KAAK,OAAO,EAAE;QAC3CF,MAAM,CAACG,IAAI,CAAC,2DAA2DF,CAAC,CAACC,IAAI,GAAG,CAAC;MACrF;MAEA,IAAID,CAAC,CAACC,IAAI,KAAK,QAAQ,IAAI,CAACD,CAAC,CAACG,UAAU,EAAE;QACtCJ,MAAM,CAACG,IAAI,CAAC,iDAAiD,CAAC;MAClE;MAEA,IAAIF,CAAC,CAACG,UAAU,EAAE;QACd,KAAK,MAAMC,GAAG,IAAIC,MAAM,CAACC,IAAI,CAACN,CAAC,CAACG,UAAU,CAAC,EAAE;UACzC,MAAMI,IAAI,GAAGP,CAAC,CAACG,UAAU,CAACC,GAAG,CAAC;UAC9B,IAAI,CAACG,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;YACnCR,MAAM,CAACG,IAAI,CAAC,aAAaE,GAAG,sBAAsB,CAAC;YACnD;UACJ;UAEA,IAAI,CAACG,IAAI,CAACN,IAAI,EAAE;YACZF,MAAM,CAACG,IAAI,CAAC,aAAaE,GAAG,sBAAsB,CAAC;UACvD,CAAC,MAAM;YACH,MAAMI,YAAyB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;YACvG,IAAI,CAACA,YAAY,CAACC,QAAQ,CAACF,IAAI,CAACN,IAAI,CAAC,EAAE;cACnCF,MAAM,CAACG,IAAI,CAAC,aAAaE,GAAG,uBAAuBG,IAAI,CAACN,IAAI,eAAeO,YAAY,CAACE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACzG;UACJ;;UAEA;QAEJ;MACJ;MAEA,OAAOX,MAAM;IACjB;EACJ;EAAC,IAAAY,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAf,eAAA,GAAAA,eAAA;EAAA,OAAAe,SAAA;AAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
sap.ui.define([],function(){"use strict";class e{static validateSchemaStructure(e){const t=[];if(!e||typeof e!=="object"){return["Root schema must be an object."]}const o=e;if(o.type!=="object"&&o.type!=="array"){t.push(`Root schema must have type 'object' or 'array'. Found: '${o.type}'`)}if(o.type==="object"&&!o.properties){t.push("Object schema is missing the 'properties' node.")}if(o.properties){for(const e of Object.keys(o.properties)){const
|
|
1
|
+
sap.ui.define([],function(){"use strict";class e{static validateSchemaStructure(e){const t=[];if(!e||typeof e!=="object"){return["Root schema must be an object."]}const o=e;if(o.type!=="object"&&o.type!=="array"){t.push(`Root schema must have type 'object' or 'array'. Found: '${o.type}'`)}if(o.type==="object"&&!o.properties){t.push("Object schema is missing the 'properties' node.")}if(o.properties){for(const e of Object.keys(o.properties)){const r=o.properties[e];if(!r||typeof r!=="object"){t.push(`Property '${e}' must be an object.`);continue}if(!r.type){t.push(`Property '${e}' is missing 'type'.`)}else{const o=["string","number","integer","boolean","date","object","array"];if(!o.includes(r.type)){t.push(`Property '${e}' has invalid type '${r.type}'. Allowed: ${o.join(", ")}`)}}}}return t}}var t={__esModule:true};t.SchemaValidator=e;return t});
|
|
2
2
|
//# sourceMappingURL=SchemaValidator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaValidator.js","names":["SchemaValidator","validateSchemaStructure","schema","errors","s","type","push","properties","key","Object","keys","prop","allowedTypes","includes","join","__exports","__esModule"],"sources":["SchemaValidator.ts"],"sourcesContent":["/**\n * @file SchemaValidator.ts\n * @description Structural validation utility to catch developer errors in the JSON schema itself.\n */\n\nimport { ISchema, FieldType } from \"../interfaces/ISchema\";\n\nexport class SchemaValidator {\n /**\n * Validates a parsed JSON schema object for structural correctness.\n * @param schema The schema object to validate\n * @returns An array of error strings. Empty if no errors.\n */\n public static validateSchemaStructure(schema: unknown): string[] {\n const errors: string[] = [];\n\n if (!schema || typeof schema !== \"object\") {\n return [\"Root schema must be an object.\"];\n }\n\n const s = schema as Record<string, any>;\n if (s.type !== \"object\" && s.type !== \"array\") {\n errors.push(`Root schema must have type 'object' or 'array'. Found: '${s.type}'`);\n }\n\n if (s.type === \"object\" && !s.properties) {\n errors.push(\"Object schema is missing the 'properties' node.\");\n }\n\n if (s.properties) {\n for (const key of Object.keys(s.properties)) {\n const prop = s.properties[key];\n if (!prop || typeof prop !== \"object\") {\n errors.push(`Property '${key}' must be an object.`);\n continue;\n }\n\n if (!prop.type) {\n errors.push(`Property '${key}' is missing 'type'.`);\n } else {\n const allowedTypes: FieldType[] = [\"string\", \"number\", \"boolean\", \"date\", \"object\", \"array\"];\n if (!allowedTypes.includes(prop.type)) {\n errors.push(`Property '${key}' has invalid type '${prop.type}'. Allowed: ${allowedTypes.join(\", \")}`);\n }\n }\n\n // Removed strict check for prop.items on array properties because inference handles empty definitions\n\n }\n }\n\n return errors;\n }\n}\n"],"mappings":"yCAOO,MAAMA,EAMT,8BAAcC,CAAwBC,GAClC,MAAMC,EAAmB,GAEzB,IAAKD,UAAiBA,IAAW,SAAU,CACvC,MAAO,CAAC,iCACZ,CAEA,MAAME,EAAIF,EACV,GAAIE,EAAEC,OAAS,UAAYD,EAAEC,OAAS,QAAS,CAC3CF,EAAOG,KAAK,2DAA2DF,EAAEC,QAC7E,CAEA,GAAID,EAAEC,OAAS,WAAaD,EAAEG,WAAY,CACtCJ,EAAOG,KAAK,kDAChB,CAEA,GAAIF,EAAEG,WAAY,CACd,IAAK,MAAMC,KAAOC,OAAOC,KAAKN,EAAEG,YAAa,CACzC,MAAMI,EAAOP,EAAEG,WAAWC,GAC1B,IAAKG,UAAeA,IAAS,SAAU,CACnCR,EAAOG,KAAK,aAAaE,yBACzB,QACJ,CAEA,IAAKG,EAAKN,KAAM,CACZF,EAAOG,KAAK,aAAaE,wBAC7B,KAAO,CACH,MAAMI,EAA4B,CAAC,SAAU,SAAU,UAAW,OAAQ,SAAU,
|
|
1
|
+
{"version":3,"file":"SchemaValidator.js","names":["SchemaValidator","validateSchemaStructure","schema","errors","s","type","push","properties","key","Object","keys","prop","allowedTypes","includes","join","__exports","__esModule"],"sources":["SchemaValidator.ts"],"sourcesContent":["/**\n * @file SchemaValidator.ts\n * @description Structural validation utility to catch developer errors in the JSON schema itself.\n */\n\nimport { ISchema, FieldType } from \"../interfaces/ISchema\";\n\nexport class SchemaValidator {\n /**\n * Validates a parsed JSON schema object for structural correctness.\n * @param schema The schema object to validate\n * @returns An array of error strings. Empty if no errors.\n */\n public static validateSchemaStructure(schema: unknown): string[] {\n const errors: string[] = [];\n\n if (!schema || typeof schema !== \"object\") {\n return [\"Root schema must be an object.\"];\n }\n\n const s = schema as Record<string, any>;\n if (s.type !== \"object\" && s.type !== \"array\") {\n errors.push(`Root schema must have type 'object' or 'array'. Found: '${s.type}'`);\n }\n\n if (s.type === \"object\" && !s.properties) {\n errors.push(\"Object schema is missing the 'properties' node.\");\n }\n\n if (s.properties) {\n for (const key of Object.keys(s.properties)) {\n const prop = s.properties[key];\n if (!prop || typeof prop !== \"object\") {\n errors.push(`Property '${key}' must be an object.`);\n continue;\n }\n\n if (!prop.type) {\n errors.push(`Property '${key}' is missing 'type'.`);\n } else {\n const allowedTypes: FieldType[] = [\"string\", \"number\", \"integer\", \"boolean\", \"date\", \"object\", \"array\"];\n if (!allowedTypes.includes(prop.type)) {\n errors.push(`Property '${key}' has invalid type '${prop.type}'. Allowed: ${allowedTypes.join(\", \")}`);\n }\n }\n\n // Removed strict check for prop.items on array properties because inference handles empty definitions\n\n }\n }\n\n return errors;\n }\n}\n"],"mappings":"yCAOO,MAAMA,EAMT,8BAAcC,CAAwBC,GAClC,MAAMC,EAAmB,GAEzB,IAAKD,UAAiBA,IAAW,SAAU,CACvC,MAAO,CAAC,iCACZ,CAEA,MAAME,EAAIF,EACV,GAAIE,EAAEC,OAAS,UAAYD,EAAEC,OAAS,QAAS,CAC3CF,EAAOG,KAAK,2DAA2DF,EAAEC,QAC7E,CAEA,GAAID,EAAEC,OAAS,WAAaD,EAAEG,WAAY,CACtCJ,EAAOG,KAAK,kDAChB,CAEA,GAAIF,EAAEG,WAAY,CACd,IAAK,MAAMC,KAAOC,OAAOC,KAAKN,EAAEG,YAAa,CACzC,MAAMI,EAAOP,EAAEG,WAAWC,GAC1B,IAAKG,UAAeA,IAAS,SAAU,CACnCR,EAAOG,KAAK,aAAaE,yBACzB,QACJ,CAEA,IAAKG,EAAKN,KAAM,CACZF,EAAOG,KAAK,aAAaE,wBAC7B,KAAO,CACH,MAAMI,EAA4B,CAAC,SAAU,SAAU,UAAW,UAAW,OAAQ,SAAU,SAC/F,IAAKA,EAAaC,SAASF,EAAKN,MAAO,CACnCF,EAAOG,KAAK,aAAaE,wBAA0BG,EAAKN,mBAAmBO,EAAaE,KAAK,QACjG,CACJ,CAIJ,CACJ,CAEA,OAAOX,CACX,EACH,IAAAY,EAAA,CAAAC,WAAA,MAAAD,EAAAf,kBAAA,OAAAe,CAAA","ignoreList":[]}
|
|
@@ -38,7 +38,7 @@ export class SchemaValidator {
|
|
|
38
38
|
if (!prop.type) {
|
|
39
39
|
errors.push(`Property '${key}' is missing 'type'.`);
|
|
40
40
|
} else {
|
|
41
|
-
const allowedTypes: FieldType[] = ["string", "number", "boolean", "date", "object", "array"];
|
|
41
|
+
const allowedTypes: FieldType[] = ["string", "number", "integer", "boolean", "date", "object", "array"];
|
|
42
42
|
if (!allowedTypes.includes(prop.type)) {
|
|
43
43
|
errors.push(`Property '${key}' has invalid type '${prop.type}'. Allowed: ${allowedTypes.join(", ")}`);
|
|
44
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPlugin-dbg.js","names":[],"sources":["IPlugin.ts"],"sourcesContent":["/**\n * @file IPlugin.ts\n * @description Contract for all discrete UI control generation plugins.\n * Enforces a strict lifecycle for rendering, validation, and dynamic state updates.\n */\n\nimport Control from \"sap/ui/core/Control\";\nimport { IPropertyMetadata } from \"./ISchema\";\n\nexport interface IPluginValidationResult {\n isValid: boolean;\n errorMessage?: string;\n fieldKey?: string;\n}\n\nexport interface IPlugin {\n /**\n * Instructs the plugin whether to delegate visual error states to the global MessageManager.\n * @param useMessageManager True if the global MessageManager is active.\n */\n setUseMessageManager?(useMessageManager: boolean): void;\n\n /**\n * Instantiates the raw UI5 control and binds it to the specified data model.\n * \n * @param fieldMetadata The JSON Schema defining the field's constraints and UI hints.\n * @param bindingPath The specific JSON path representing the field within the payload.\n * @param modelName The UI5 JSONModel alias used for data binding (defaults to 'meta').\n * @param engineScopeId The deterministic scope ID provided by the Engine.\n * @param onChange The callback fired natively when a field value blur/change occurs.\n * @returns {Control} The generated UI5 control ready to be mounted.\n */\n render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control;\n\n /**\n * Triggers the internal validation pipeline for this specific plugin instance.\n * \n * @returns {IPluginValidationResult} The structural validity state and error messages.\n */\n validate(): IPluginValidationResult;\n\n /**\n * Executes when the ConditionEngine pushes dynamic metadata mutations to the field.\n * \n * @param newMetadata The mutated schema metadata.\n */\n onStateChange(newMetadata: IPropertyMetadata): void;\n\n /**\n * Optionally allows the plugin to natively manage its own UI control's visual ValueState (e.g., red borders).\n * Used when the global MessageManager is disabled.\n * \n * @param isValid Whether the field passed validation.\n * @param errorMessage The error message to display if invalid.\n */\n setVisualValidationState?(isValid: boolean, errorMessage?: string): void;\n\n /**\n * Optional lifecycle hook executed when the parent layout is destroyed.\n * Plugins must use this to destroy isolated JSONModels, custom EventBus listeners, \n * or embedded Dialogs to prevent memory leaks in the SAP Fiori Launchpad.\n */\n destroy?(): void;\n\n /**\n * Injects the global editable mode context into the plugin before rendering.\n * @param editable True if the plugin should render in an editable mode.\n */\n setEditable?(editable: boolean): void;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"IPlugin-dbg.js","names":[],"sources":["IPlugin.ts"],"sourcesContent":["/**\n * @file IPlugin.ts\n * @description Contract for all discrete UI control generation plugins.\n * Enforces a strict lifecycle for rendering, validation, and dynamic state updates.\n */\n\nimport Control from \"sap/ui/core/Control\";\nimport { IPropertyMetadata } from \"./ISchema\";\n\nexport interface IPluginValidationResult {\n isValid: boolean;\n errorMessage?: string;\n fieldKey?: string;\n}\n\nexport interface IPlugin {\n /**\n * Instructs the plugin whether to delegate visual error states to the global MessageManager.\n * @param useMessageManager True if the global MessageManager is active.\n */\n setUseMessageManager?(useMessageManager: boolean): void;\n\n /**\n * Instantiates the raw UI5 control and binds it to the specified data model.\n * \n * @param fieldMetadata The JSON Schema defining the field's constraints and UI hints.\n * @param bindingPath The specific JSON path representing the field within the payload.\n * @param modelName The UI5 JSONModel alias used for data binding (defaults to 'meta').\n * @param engineScopeId The deterministic scope ID provided by the Engine.\n * @param onChange The callback fired natively when a field value blur/change occurs.\n * @returns {Control} The generated UI5 control ready to be mounted.\n */\n render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void, model?: unknown): Control;\n\n /**\n * Triggers the internal validation pipeline for this specific plugin instance.\n * \n * @returns {IPluginValidationResult} The structural validity state and error messages.\n */\n validate(): IPluginValidationResult;\n\n /**\n * Executes when the ConditionEngine pushes dynamic metadata mutations to the field.\n * \n * @param newMetadata The mutated schema metadata.\n */\n onStateChange(newMetadata: IPropertyMetadata): void;\n\n /**\n * Optionally allows the plugin to natively manage its own UI control's visual ValueState (e.g., red borders).\n * Used when the global MessageManager is disabled.\n * \n * @param isValid Whether the field passed validation.\n * @param errorMessage The error message to display if invalid.\n */\n setVisualValidationState?(isValid: boolean, errorMessage?: string): void;\n\n /**\n * Optional lifecycle hook executed when the parent layout is destroyed.\n * Plugins must use this to destroy isolated JSONModels, custom EventBus listeners, \n * or embedded Dialogs to prevent memory leaks in the SAP Fiori Launchpad.\n */\n destroy?(): void;\n\n /**\n * Injects the global editable mode context into the plugin before rendering.\n * @param editable True if the plugin should render in an editable mode.\n */\n setEditable?(editable: boolean): void;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -27,7 +27,7 @@ declare module "nz/co/siliconst/ui5/metaui/interfaces/IPlugin" {
|
|
|
27
27
|
* @param onChange The callback fired natively when a field value blur/change occurs.
|
|
28
28
|
* @returns {Control} The generated UI5 control ready to be mounted.
|
|
29
29
|
*/
|
|
30
|
-
render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control;
|
|
30
|
+
render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void, model?: unknown): Control;
|
|
31
31
|
/**
|
|
32
32
|
* Triggers the internal validation pipeline for this specific plugin instance.
|
|
33
33
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPlugin.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,+CAA+C,CAAC;IAC/D;;;;OAIG;IAEH,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAElF,UAAiB,uBAAuB;QACpC,OAAO,EAAE,OAAO,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACrB;IAED,UAAiB,OAAO;QACpB;;;WAGG;QACH,oBAAoB,CAAC,CAAC,iBAAiB,EAAE,OAAO,GAAG,IAAI,CAAC;QAExD;;;;;;;;;WASG;QACH,MAAM,CAAC,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"IPlugin.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,+CAA+C,CAAC;IAC/D;;;;OAIG;IAEH,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAElF,UAAiB,uBAAuB;QACpC,OAAO,EAAE,OAAO,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACrB;IAED,UAAiB,OAAO;QACpB;;;WAGG;QACH,oBAAoB,CAAC,CAAC,iBAAiB,EAAE,OAAO,GAAG,IAAI,CAAC;QAExD;;;;;;;;;WASG;QACH,MAAM,CAAC,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;QAEzO;;;;WAIG;QACH,QAAQ,IAAI,uBAAuB,CAAC;QAEpC;;;;WAIG;QACH,aAAa,CAAC,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAAC;QAEpD;;;;;;WAMG;QACH,wBAAwB,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEzE;;;;WAIG;QACH,OAAO,CAAC,IAAI,IAAI,CAAC;QAEjB;;;WAGG;QACH,WAAW,CAAC,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;KACzC;CAEA"}
|
|
@@ -30,7 +30,7 @@ export interface IPlugin {
|
|
|
30
30
|
* @param onChange The callback fired natively when a field value blur/change occurs.
|
|
31
31
|
* @returns {Control} The generated UI5 control ready to be mounted.
|
|
32
32
|
*/
|
|
33
|
-
render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control;
|
|
33
|
+
render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void, model?: unknown): Control;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Triggers the internal validation pipeline for this specific plugin instance.
|