@siliconst/metaui 1.4.17 → 1.4.21
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 +87 -16
- 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 +20 -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 +79 -18
- package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +44 -4
- 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 +23 -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 +35 -5
- 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/controls/host/delegates/ODataDelegate-dbg.js +13 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate-dbg.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts +4 -0
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.js +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.js.map +1 -1
- package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.ts +13 -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 +14 -6
- 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 +7 -1
- 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 +21 -11
- package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +6 -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 +6 -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 +66 -44
- 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} +29 -17
- 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} +28 -16
- 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/EmailPlugin-dbg.js +48 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.d.ts +11 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.ts +48 -0
- 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/LinkPlugin-dbg.js +58 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.d.ts +11 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.ts +57 -0
- 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/PasswordPlugin-dbg.js +49 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin-dbg.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.d.ts +11 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.d.ts.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.js +2 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.js.map +1 -0
- package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.ts +49 -0
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicHost.js","names":["GeneratorHost","_interopRequireDefault","__GeneratorHost","Logger","___utils_Logger","ODataDelegate","___host_delegates_ODataDelegate","SchemaBuilderRegistry","___core_SchemaBuilderRegistry","DynamicHost","Control","extend","constructor","prototype","apply","this","arguments","odataDelegate","_innerHost","_initializedInner","renderer","apiVersion","render","rm","control","openStart","style","openEnd","content","getAggregation","renderControl","close","metadata","properties","schemaDefinition","type","defaultValue","data","bindable","dataJson","liveUpdate","isValid","useMessageManager","modelName","debugMode","editable","aggregations","_content","multiple","visibility","events","beforeSubmit","parameters","payload","addError","preventDefault","submit","payloadJson","cancel","fieldChange","fieldPath","value","validationStateChanged","validationError","message","validationSuccess","error","exception","initODataDelegate","_initODataDelegate","getBindingInfo","dataBinding","path","oContext","getBindingContext","debug","getPath","requestObject","syncToEngine","Object","keys","setBindingContext","_setBindingContext","sModelName","Control.prototype.setBindingContext.call","bindElement","_bindElement","vPath","mParameters","Control.prototype.bindElement.call","model","undefined","oBinding","getElementBinding","attachChange","onBeforeRendering","_onBeforeRendering","schemaRaw","getProperty","startsWith","_fetchingSchema","sap","ui","require","BusyIndicator","MessageToast","show","fetch","then","res","ok","Error","status","json","plugin","getBuilderFor","finalSchema","build","Control.prototype.setProperty.call","hide","invalidate","catch","err","warn","schema","trim","JSON","parse","e","hasSchema","length","hasData","props","getMetadata","getProperties","propName","val","Control.prototype.getProperty.call","setProperty","setAggregation","getEvents","eventName","attachEvent","oEvent","params","getParameters","isLive","str","stringify","handleFieldChange","fireEvent","_setProperty","propertyName","suppressInvalidate","openInDialog","_openInDialog","title","submitButtonText","cancelButtonText","dialogWidth","parentView","triggerSubmit","_triggerSubmit","addCustomError","_addCustomError","clearCustomError","_clearCustomError","_getProperty"],"sources":["DynamicHost.ts"],"sourcesContent":["import Control from \"sap/ui/core/Control\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport GeneratorHost from \"./host/GeneratorHost\";\nimport { Logger } from \"../utils/Logger\";\nimport { ODataDelegate } from \"./host/delegates/ODataDelegate\";\nimport ODataV4Context from \"sap/ui/model/odata/v4/Context\";\nimport { SchemaBuilderRegistry } from \"../core/SchemaBuilderRegistry\";\n\n/**\n * A transparent wrapper control (Facade) that automatically chooses between Explicit Schema Mode \n * and Inference Mode based on the presence of a 'schemaDefinition'.\n * \n * This maintains total architectural separation of the modes without forcing developers to \n * use different XML tags.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nexport default class DynamicHost extends Control {\n private odataDelegate: ODataDelegate | null = null;\n\n static readonly metadata = {\n properties: {\n schemaDefinition: { type: \"any\", defaultValue: null },\n data: { type: \"object\", defaultValue: null, bindable: \"bindable\" },\n dataJson: { type: \"string\", defaultValue: null, bindable: \"bindable\" },\n liveUpdate: { type: \"boolean\", defaultValue: false },\n isValid: { type: \"boolean\", defaultValue: true },\n useMessageManager: { type: \"boolean\", defaultValue: false },\n modelName: { type: \"string\", defaultValue: \"meta\" },\n debugMode: { type: \"boolean\", defaultValue: false },\n editable: { type: \"boolean\", defaultValue: true }\n },\n aggregations: {\n _content: { type: \"sap.ui.core.Control\", multiple: false, visibility: \"hidden\" }\n },\n events: {\n beforeSubmit: {\n parameters: {\n payload: { type: \"object\" },\n addError: { type: \"function\" },\n preventDefault: { type: \"function\" }\n }\n },\n submit: {\n parameters: {\n payload: { type: \"object\" },\n payloadJson: { type: \"string\" }\n }\n },\n cancel: {},\n fieldChange: {\n parameters: {\n fieldPath: { type: \"string\" },\n value: { type: \"any\" },\n payload: { type: \"object\" },\n isValid: { type: \"boolean\" }\n }\n },\n validationStateChanged: { parameters: { isValid: { type: \"boolean\" } } },\n validationError: { parameters: { fieldPath: { type: \"string\" }, message: { type: \"string\" } } },\n validationSuccess: { parameters: { fieldPath: { type: \"string\" } } },\n error: { parameters: { message: { type: \"string\" }, exception: { type: \"object\" } } }\n }\n };\n\n static renderer = {\n apiVersion: 2,\n render(rm: RenderManager, control: DynamicHost) {\n rm.openStart(\"div\", control);\n rm.style(\"width\", \"100%\");\n rm.style(\"height\", \"100%\");\n rm.openEnd();\n\n const content = control.getAggregation(\"_content\") as Control;\n if (content) {\n rm.renderControl(content);\n }\n\n rm.close(\"div\");\n }\n };\n\n /**\n * Internal reference to the generated inner host instance.\n * @private\n */\n private _innerHost: GeneratorHost | null = null;\n\n /**\n * Flag indicating if the inner host has been initialized.\n * @private\n */\n private _initializedInner: boolean = false;\n\n /**\n * Initializes the OData Delegate if an OData context is detected.\n * This allows DynamicHost to seamlessly synchronize metadata and properties from an OData model.\n * @private\n */\n private initODataDelegate(): void {\n if (!this.odataDelegate) {\n // Guard: If the user explicitly bound dataJson, do not steal the context.\n if (this.getBindingInfo(\"dataJson\")) {\n return;\n }\n\n // Guard: If the user explicitly bound 'data' to a specific property path, do not steal the context.\n const dataBinding = this.getBindingInfo(\"data\") as any;\n if (dataBinding && dataBinding.path && dataBinding.path !== \"\") {\n return;\n }\n\n const oContext = this.getBindingContext(\"odata\") || this.getBindingContext();\n if (oContext) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context found for delegate initialization: ${oContext.getPath()}`, \"DynamicHost\");\n if (oContext && (oContext as ODataV4Context).requestObject && typeof (oContext as ODataV4Context).requestObject === \"function\") {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context supports requestObject/getObject. Instantiating ODataDelegate.`, \"DynamicHost\");\n this.odataDelegate = new ODataDelegate(this, oContext as ODataV4Context);\n this.odataDelegate.syncToEngine();\n } else {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context does NOT support requestObject/getObject! Keys: ${Object.keys(oContext)}`, \"DynamicHost\");\n }\n }\n }\n }\n\n /**\n * Standard UI5 method override.\n * Sets the binding context for the control and attempts to initialize the OData delegate\n * if the context points to an OData model.\n * \n * @param {sap.ui.model.Context | null | undefined} oContext The binding context object\n * @param {string} [sModelName] Optional model name\n * @returns {this} The control instance for chaining\n */\n public setBindingContext(oContext: sap.ui.model.Context | null | undefined, sModelName?: string): this {\n super.setBindingContext(oContext, sModelName);\n this.initODataDelegate();\n return this;\n }\n\n /**\n * Standard UI5 method override.\n * Binds the element to the given path and attaches a change listener to re-evaluate\n * the OData delegate when the element binding resolves.\n * \n * @param {string | Record<string, unknown>} vPath The binding path or configuration object\n * @param {object} [mParameters] Optional mapping parameters\n * @returns {this} Reference to this instance for chaining\n */\n public bindElement(vPath: string | Record<string, unknown>, mParameters?: object): this {\n super.bindElement(vPath, mParameters);\n const sModelName = typeof vPath === \"object\" ? vPath.model : undefined;\n const oBinding = this.getElementBinding(sModelName);\n if (oBinding) {\n oBinding.attachChange(() => {\n this.initODataDelegate();\n });\n }\n return this;\n }\n\n /**\n * Standard UI5 Lifecycle Hook.\n * Evaluates the initial properties and spawns the GeneratorHost.\n * It handles the complex lifecycle task of copying all bindings, raw properties, and event listeners \n * down to the inner host perfectly transparently.\n */\n public onBeforeRendering(): void {\n Logger.debug(\"[MetaUI DynamicHost]\", `onBeforeRendering called. _initializedInner: ${this._initializedInner}`, \"DynamicHost\");\n\n this.initODataDelegate();\n\n if (!this._initializedInner) {\n let schemaRaw = this.getProperty(\"schemaDefinition\");\n\n // 1. URL Detection & Fetching\n if (typeof schemaRaw === \"string\" && (schemaRaw.startsWith(\"http://\") || schemaRaw.startsWith(\"https://\"))) {\n if ((this as any)._fetchingSchema) return; // Prevent re-entry\n (this as any)._fetchingSchema = true;\n \n sap.ui.require([\"sap/ui/core/BusyIndicator\", \"sap/m/MessageToast\"], (BusyIndicator: any, MessageToast: any) => {\n BusyIndicator.show(0);\n fetch(schemaRaw as string)\n .then(res => {\n if (!res.ok) throw new Error(\"HTTP \" + res.status);\n return res.json();\n })\n .then(json => {\n const plugin = SchemaBuilderRegistry.getBuilderFor(json);\n const finalSchema = plugin ? plugin.build(json) : json;\n super.setProperty(\"schemaDefinition\", finalSchema, true);\n (this as any)._fetchingSchema = false;\n BusyIndicator.hide();\n this.invalidate(); // Force re-render with resolved schema\n })\n .catch(err => {\n Logger.warn(\"[MetaUI DynamicHost]\", \"Failed to fetch remote schema: \" + err, \"DynamicHost\");\n if (MessageToast) MessageToast.show(\"Failed to fetch remote schema\");\n super.setProperty(\"schemaDefinition\", null, true); // Fallback to full inference\n (this as any)._fetchingSchema = false;\n BusyIndicator.hide();\n this.invalidate();\n });\n });\n return; // Abort this render cycle until fetch completes\n }\n\n // 2. Local Plugin Detection (Stringified JSON or Raw Object)\n let schema = schemaRaw;\n if (schema && typeof schema === \"string\" && (schema as string).trim().startsWith(\"{\")) {\n try {\n schema = JSON.parse(schema);\n } catch (e) {\n // Ignore, let standard validation catch it\n }\n }\n\n if (schema && typeof schema === \"object\") {\n const plugin = SchemaBuilderRegistry.getBuilderFor(schema);\n if (plugin) {\n schema = plugin.build(schema);\n // Silently update the wrapper property so the inner host gets the final parsed MetaUI format\n super.setProperty(\"schemaDefinition\", schema, true);\n }\n }\n\n const dataJson = this.getProperty(\"dataJson\");\n const data = this.getProperty(\"data\");\n\n let hasSchema = !!schema;\n if (hasSchema && typeof schema === \"object\" && Object.keys(schema).length === 0) {\n hasSchema = false; // Treat empty object as no schema\n }\n\n const hasData = !!dataJson || !!data;\n\n Logger.debug(\"[MetaUI DynamicHost]\", `Evaluating boot. hasSchema: ${hasSchema}, hasData: ${hasData}`, \"DynamicHost\");\n\n // Only boot if we have either a schema or some data to infer from\n if (hasSchema || hasData) {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Booting inner host. hasSchema: ${hasSchema}, hasData: ${hasData}`, \"DynamicHost\");\n }\n // The architectural Facade router logic:\n // We've simplified this! We no longer use HostFactory or separate subclasses.\n // GeneratorHost is fully capable of inferring the schema if none is provided.\n this._innerHost = new GeneratorHost();\n\n // 1. Forward all static values to the spawned host BEFORE mounting.\n // Since we no longer use bindProperty, it's perfectly safe to set raw properties before mounting.\n const props = this.getMetadata().getProperties();\n for (const propName in props) {\n const val = super.getProperty(propName);\n if (val !== null && val !== undefined) {\n this._innerHost.setProperty(propName, val);\n }\n }\n\n // 2. Mount so it inherits models and triggers lifecycle.\n this.setAggregation(\"_content\", this._innerHost);\n\n // 3. Forward all event subscriptions.\n // By proxying the events upwards, the developer can subscribe to `<meta:DynamicHost submit=\"...\">` \n // and perfectly receive the inner host's submission event.\n const events = this.getMetadata().getEvents();\n for (const eventName in events) {\n this._innerHost.attachEvent(eventName, (oEvent: sap.ui.base.Event) => {\n // Natively push updated payload out to any bound Fiori Element properties.\n // Using super.setProperty prevents an infinite loop back down to _innerHost.\n if (eventName === \"submit\" || eventName === \"fieldChange\") {\n const params = oEvent.getParameters();\n if (params.payload) {\n const isLive = this.getProperty(\"liveUpdate\") === true;\n if (eventName === \"submit\" || isLive) {\n super.setProperty(\"data\", params.payload, true);\n\n const str = params.payloadJson || JSON.stringify(params.payload, null, 2);\n super.setProperty(\"dataJson\", str, true);\n }\n }\n if (eventName === \"fieldChange\" && this.odataDelegate) {\n this.odataDelegate.handleFieldChange(params.fieldPath, params.value);\n }\n }\n this.fireEvent(eventName, oEvent.getParameters());\n });\n }\n\n this._initializedInner = true;\n }\n }\n }\n\n /**\n * Overrides standard UI5 setProperty to act as a transparent proxy.\n * When a property is updated on the wrapper (either programmatically or via a binding update),\n * it instantly mirrors that value down to the inner instantiated host.\n */\n public setProperty(propertyName: string, value: unknown, suppressInvalidate?: boolean): this {\n if (propertyName === \"data\" || propertyName === \"dataJson\" || propertyName === \"schemaDefinition\") {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Wrapper received setProperty: ${propertyName}`, \"DynamicHost\");\n }\n }\n super.setProperty(propertyName, value, suppressInvalidate);\n if (this._innerHost) {\n this._innerHost.setProperty(propertyName, value, suppressInvalidate);\n } else if (propertyName === \"data\" || propertyName === \"dataJson\" || propertyName === \"schemaDefinition\") {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `_innerHost not yet initialized when ${propertyName} was set. Booting will happen on next render.`, \"DynamicHost\");\n }\n }\n return this;\n }\n\n\n\n\n\n /**\n * Programmatic API support. Routes dialog commands down to the spawned inner host.\n * If the inner host has not booted yet, it forces initialization immediately.\n * \n * @param {string} [title=\"Form\"] The title of the dialog\n * @param {string} [submitButtonText=\"OK\"] The text for the primary action button\n * @param {string} [cancelButtonText=\"Cancel\"] The text for the cancel button\n * @param {string} [dialogWidth=\"auto\"] The width of the dialog\n * @param {sap.ui.core.Control} [parentView] The parent view to attach the dialog to for model inheritance.\n */\n public openInDialog(title?: string, submitButtonText?: string, cancelButtonText?: string, dialogWidth?: string, parentView?: Control): void {\n if (!this._innerHost) {\n this.onBeforeRendering(); // Force init if they bypassed UI5 rendering\n }\n this._innerHost?.openInDialog(title, submitButtonText, cancelButtonText, dialogWidth, parentView);\n }\n\n /**\n * Proxies submission triggering down to the instantiated generator host.\n * Evaluates the internal Engine validation suite and returns true if structurally sound.\n * \n * @returns {boolean} True if the internal payload passes schema validation, false otherwise.\n */\n public triggerSubmit(): boolean {\n if (!this._innerHost) {\n return false;\n }\n return this._innerHost.triggerSubmit();\n }\n\n /**\n * Injects a custom error message onto a specific field.\n * Useful for injecting custom backend validation errors.\n * \n * @param {string} fieldPath The schema key path to target.\n * @param {string} message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this._innerHost && typeof (this._innerHost as any).addCustomError === \"function\") {\n (this._innerHost as any).addCustomError(fieldPath, message);\n }\n }\n\n /**\n * Clears a custom error message from a specific field.\n * \n * @param {string} fieldPath The schema key path to target.\n */\n public clearCustomError(fieldPath: string): void {\n if (this._innerHost && typeof (this._innerHost as any).clearCustomError === \"function\") {\n (this._innerHost as any).clearCustomError(fieldPath);\n }\n }\n\n /**\n * Overrides standard UI5 getProperty to transparently pull extracted data from the inner host.\n * Ensures that querying the DynamicHost facade for `data` always yields the freshest payload.\n * \n * @param {string} propertyName The name of the property to retrieve\n * @returns {unknown} The property value\n */\n public getProperty(propertyName: string): unknown {\n if (propertyName === \"outputData\") {\n propertyName = \"data\"; // Forward deprecated outputData to data\n }\n if (this._innerHost && (propertyName === \"data\" || propertyName === \"dataJson\")) {\n return this._innerHost.getProperty(propertyName);\n }\n return super.getProperty(propertyName);\n }\n}\n"],"mappings":"wQAEOA,EAAaC,EAAAC,GAAA,MACXC,EAAMC,EAAA,gBACNC,EAAaC,EAAA,uBAEbC,EAAqBC,EAAA,yBAE9B,MASqBC,EAAoBC,EAAOC,OAAA,mDAAAC,YAAA,SAAAA,IAAAF,EAAAG,UAAAD,YAAAE,MAAAC,KAAAC,WAAAD,KACpCE,cAAsC,KAgE9CF,KAIQG,WAAmC,KAE3CH,KAIQI,kBAA6B,KAAK,EA3BnCC,SAAW,CACdC,WAAY,EACZC,OAAOC,EAAmBC,GACtBD,EAAGE,UAAU,MAAOD,GACpBD,EAAGG,MAAM,QAAS,QAClBH,EAAGG,MAAM,SAAU,QACnBH,EAAGI,UAEH,MAAMC,EAAUJ,EAAQK,eAAe,YACvC,GAAID,EAAS,CACTL,EAAGO,cAAcF,EACrB,CAEAL,EAAGQ,MAAM,MACb,GA3DYC,SAAW,CACvBC,WAAY,CACRC,iBAAkB,CAAEC,KAAM,MAAOC,aAAc,MAC/CC,KAAM,CAAEF,KAAM,SAAUC,aAAc,KAAME,SAAU,YACtDC,SAAU,CAAEJ,KAAM,SAAUC,aAAc,KAAME,SAAU,YAC1DE,WAAY,CAAEL,KAAM,UAAWC,aAAc,OAC7CK,QAAS,CAAEN,KAAM,UAAWC,aAAc,MAC1CM,kBAAmB,CAAEP,KAAM,UAAWC,aAAc,OACpDO,UAAW,CAAER,KAAM,SAAUC,aAAc,QAC3CQ,UAAW,CAAET,KAAM,UAAWC,aAAc,OAC5CS,SAAU,CAAEV,KAAM,UAAWC,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AAC,IAChB,IAAKnJ,KAAKG,WAAY,CAClB,OAAO,KACX,CACA,OAAOH,KAAKG,WAAW+I,eAC3B,EASOE,eAAc,SAAAC,EAACxG,EAAmBI,GACrC,GAAIjD,KAAKG,mBAAsBH,KAAKG,WAAmBiJ,iBAAmB,WAAY,CACjFpJ,KAAKG,WAAmBiJ,eAAevG,EAAWI,EACvD,CACJ,EAOOqG,iBAAgB,SAAAC,EAAC1G,GACpB,GAAI7C,KAAKG,mBAAsBH,KAAKG,WAAmBmJ,mBAAqB,WAAY,CACnFtJ,KAAKG,WAAmBmJ,iBAAiBzG,EAC9C,CACJ,EASOsC,YAAW,SAAAqE,EAACf,GACf,GAAIA,IAAiB,aAAc,CAC/BA,EAAe,MACnB,CACA,GAAIzI,KAAKG,aAAesI,IAAiB,QAAUA,IAAiB,YAAa,CAC7E,OAAOzI,KAAKG,WAAWgF,YAAYsD,EACvC,CACA,OAAAf,6BAAA1H,KAAyByI,EAC7B,IAAC,OApXgB/I,CAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"DynamicHost.js","names":["GeneratorHost","_interopRequireDefault","__GeneratorHost","Logger","___utils_Logger","ODataDelegate","___host_delegates_ODataDelegate","SchemaBuilderRegistry","___core_SchemaBuilderRegistry","DynamicHost","Control","extend","constructor","prototype","apply","this","arguments","odataDelegate","_innerHost","_initializedInner","renderer","apiVersion","render","rm","control","openStart","style","openEnd","content","getAggregation","renderControl","close","metadata","properties","schemaDefinition","type","defaultValue","schemaDefinitions","schemaTarget","pluginRegistry","schemaBuilderRegistry","data","bindable","dataJson","liveUpdate","isValid","useMessageManager","modelName","debugMode","editable","inferenceStrategy","aggregations","_content","multiple","visibility","events","beforeSubmit","parameters","payload","addError","preventDefault","submit","payloadJson","cancel","fieldChange","fieldPath","value","validationStateChanged","validationError","message","validationSuccess","error","exception","initODataDelegate","_initODataDelegate","getBindingInfo","dataBinding","path","oContext","getBindingContext","debug","getPath","requestObject","syncToEngine","Object","keys","setBindingContext","_setBindingContext","sModelName","Control.prototype.setBindingContext.call","bindElement","_bindElement","vPath","mParameters","Control.prototype.bindElement.call","model","undefined","oBinding","getElementBinding","attachChange","onBeforeRendering","_onBeforeRendering","schemaRaw","getProperty","startsWith","self","_fetchingSchema","sap","ui","require","BusyIndicator","MessageToast","show","fetch","then","res","ok","Error","status","json","plugin","getBuilderFor","finalSchema","build","Control.prototype.setProperty.call","definitions","hide","invalidate","catch","err","warn","schema","trim","JSON","parse","e","hasSchema","length","hasData","rawDataObj","trace","AIConfig","proxy","getProxy","generateSchema","generatedSchema","props","getMetadata","getProperties","propName","val","Control.prototype.getProperty.call","setProperty","setAggregation","getEvents","eventName","attachEvent","oEvent","params","getParameters","isLive","str","stringify","fireEvent","_setProperty","propertyName","suppressInvalidate","openInDialog","_openInDialog","title","submitButtonText","cancelButtonText","dialogWidth","parentView","triggerSubmit","_triggerSubmit","addCustomError","_addCustomError","inner","clearCustomError","_clearCustomError","_getProperty"],"sources":["DynamicHost.ts"],"sourcesContent":["import Control from \"sap/ui/core/Control\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport GeneratorHost from \"./host/GeneratorHost\";\nimport { Logger } from \"../utils/Logger\";\nimport { ODataDelegate } from \"./host/delegates/ODataDelegate\";\nimport ODataV4Context from \"sap/ui/model/odata/v4/Context\";\nimport { SchemaBuilderRegistry } from \"../core/SchemaBuilderRegistry\";\n\n/**\n * A transparent wrapper control (Facade) that automatically chooses between Explicit Schema Mode \n * and Inference Mode based on the presence of a 'schemaDefinition'.\n * \n * This maintains total architectural separation of the modes without forcing developers to \n * use different XML tags.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nexport default class DynamicHost extends Control {\n private odataDelegate: ODataDelegate | null = null;\n\n static readonly metadata = {\n properties: {\n schemaDefinition: { type: \"any\", defaultValue: null },\n schemaDefinitions: { type: \"object\", defaultValue: null },\n schemaTarget: { type: \"string\", defaultValue: null },\n pluginRegistry: { type: \"object\", defaultValue: null },\n schemaBuilderRegistry: { type: \"object\", defaultValue: null },\n data: { type: \"object\", defaultValue: null, bindable: \"bindable\" },\n dataJson: { type: \"string\", defaultValue: null, bindable: \"bindable\" },\n liveUpdate: { type: \"boolean\", defaultValue: false },\n isValid: { type: \"boolean\", defaultValue: true },\n useMessageManager: { type: \"boolean\", defaultValue: false },\n modelName: { type: \"string\", defaultValue: \"meta\" },\n debugMode: { type: \"boolean\", defaultValue: false },\n editable: { type: \"boolean\", defaultValue: true },\n inferenceStrategy: { type: \"string\", defaultValue: \"RuleBased\" }\n },\n aggregations: {\n _content: { type: \"sap.ui.core.Control\", multiple: false, visibility: \"hidden\" }\n },\n events: {\n beforeSubmit: {\n parameters: {\n payload: { type: \"object\" },\n addError: { type: \"function\" },\n preventDefault: { type: \"function\" }\n }\n },\n submit: {\n parameters: {\n payload: { type: \"object\" },\n payloadJson: { type: \"string\" }\n }\n },\n cancel: {},\n fieldChange: {\n parameters: {\n fieldPath: { type: \"string\" },\n value: { type: \"any\" },\n payload: { type: \"object\" },\n isValid: { type: \"boolean\" }\n }\n },\n validationStateChanged: { parameters: { isValid: { type: \"boolean\" } } },\n validationError: { parameters: { fieldPath: { type: \"string\" }, message: { type: \"string\" } } },\n validationSuccess: { parameters: { fieldPath: { type: \"string\" } } },\n error: { parameters: { message: { type: \"string\" }, exception: { type: \"object\" } } }\n }\n };\n\n static renderer = {\n apiVersion: 2,\n render(rm: RenderManager, control: DynamicHost) {\n rm.openStart(\"div\", control);\n rm.style(\"width\", \"100%\");\n rm.style(\"height\", \"100%\");\n rm.openEnd();\n\n const content = control.getAggregation(\"_content\") as Control;\n if (content) {\n rm.renderControl(content);\n }\n\n rm.close(\"div\");\n }\n };\n\n /**\n * Internal reference to the generated inner host instance.\n * @private\n */\n private _innerHost: GeneratorHost | null = null;\n\n /**\n * Flag indicating if the inner host has been initialized.\n * @private\n */\n private _initializedInner: boolean = false;\n\n /**\n * Initializes the OData Delegate if an OData context is detected.\n * This allows DynamicHost to seamlessly synchronize metadata and properties from an OData model.\n * @private\n */\n private initODataDelegate(): void {\n if (!this.odataDelegate) {\n // Guard: If the user explicitly bound dataJson, do not steal the context.\n if (this.getBindingInfo(\"dataJson\")) {\n return;\n }\n\n // Guard: If the user explicitly bound 'data' to a specific property path, do not steal the context.\n const dataBinding = this.getBindingInfo(\"data\") as any;\n if (dataBinding && dataBinding.path && dataBinding.path !== \"\") {\n return;\n }\n\n const oContext = this.getBindingContext(\"odata\") || this.getBindingContext();\n if (oContext) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context found for delegate initialization: ${oContext.getPath()}`, \"DynamicHost\");\n if (oContext && (oContext as ODataV4Context).requestObject && typeof (oContext as ODataV4Context).requestObject === \"function\") {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context supports requestObject/getObject. Instantiating ODataDelegate.`, \"DynamicHost\");\n this.odataDelegate = new ODataDelegate(this, oContext as ODataV4Context);\n this.odataDelegate.syncToEngine();\n } else {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context does NOT support requestObject/getObject! Keys: ${Object.keys(oContext)}`, \"DynamicHost\");\n }\n }\n }\n }\n\n /**\n * Standard UI5 method override.\n * Sets the binding context for the control and attempts to initialize the OData delegate\n * if the context points to an OData model.\n * \n * @param {sap.ui.model.Context | null | undefined} oContext The binding context object\n * @param {string} [sModelName] Optional model name\n * @returns {this} The control instance for chaining\n */\n public setBindingContext(oContext: sap.ui.model.Context | null | undefined, sModelName?: string): this {\n super.setBindingContext(oContext, sModelName);\n this.initODataDelegate();\n return this;\n }\n\n /**\n * Standard UI5 method override.\n * Binds the element to the given path and attaches a change listener to re-evaluate\n * the OData delegate when the element binding resolves.\n * \n * @param {string | Record<string, unknown>} vPath The binding path or configuration object\n * @param {object} [mParameters] Optional mapping parameters\n * @returns {this} Reference to this instance for chaining\n */\n public bindElement(vPath: string | Record<string, unknown>, mParameters?: object): this {\n super.bindElement(vPath, mParameters);\n const sModelName = typeof vPath === \"object\" ? vPath.model : undefined;\n const oBinding = this.getElementBinding(sModelName);\n if (oBinding) {\n oBinding.attachChange(() => {\n this.initODataDelegate();\n });\n }\n return this;\n }\n\n /**\n * Standard UI5 Lifecycle Hook.\n * Evaluates the initial properties and spawns the GeneratorHost.\n * It handles the complex lifecycle task of copying all bindings, raw properties, and event listeners \n * down to the inner host perfectly transparently.\n */\n public onBeforeRendering(): void {\n Logger.debug(\"[MetaUI DynamicHost]\", `onBeforeRendering called. _initializedInner: ${this._initializedInner}`, \"DynamicHost\");\n\n this.initODataDelegate();\n\n if (!this._initializedInner) {\n let schemaRaw = this.getProperty(\"schemaDefinition\");\n\n // 1. URL Detection & Fetching\n if (typeof schemaRaw === \"string\" && (schemaRaw.startsWith(\"http://\") || schemaRaw.startsWith(\"https://\"))) {\n const self = this as unknown as { _fetchingSchema?: boolean };\n if (self._fetchingSchema) return; // Prevent re-entry\n self._fetchingSchema = true;\n \n sap.ui.require([\"sap/ui/core/BusyIndicator\", \"sap/m/MessageToast\"], (BusyIndicator: { show: (n: number) => void, hide: () => void }, MessageToast: { show: (s: string) => void }) => {\n BusyIndicator.show(0);\n fetch(schemaRaw as string)\n .then(res => {\n if (!res.ok) throw new Error(\"HTTP \" + res.status);\n return res.json();\n })\n .then(json => {\n const plugin = SchemaBuilderRegistry.getBuilderFor(json);\n const finalSchema = plugin ? plugin.build(json, this.getProperty(\"schemaTarget\")) : json;\n super.setProperty(\"schemaDefinition\", finalSchema, true);\n if (finalSchema.definitions) {\n super.setProperty(\"schemaDefinitions\", finalSchema.definitions, true);\n }\n const self = this as unknown as { _fetchingSchema?: boolean };\n self._fetchingSchema = false;\n BusyIndicator.hide();\n this.invalidate(); // Force re-render with resolved schema\n })\n .catch(err => {\n const self = this as unknown as { _fetchingSchema?: boolean };\n Logger.warn(\"[MetaUI DynamicHost]\", \"Failed to fetch remote schema: \" + err, \"DynamicHost\");\n if (MessageToast) MessageToast.show(\"Failed to fetch remote schema\");\n super.setProperty(\"schemaDefinition\", null, true); // Fallback to full inference\n self._fetchingSchema = false;\n BusyIndicator.hide();\n this.invalidate();\n });\n });\n return; // Abort this render cycle until fetch completes\n }\n\n // 2. Local Plugin Detection (Stringified JSON or Raw Object)\n let schema = schemaRaw;\n if (schema && typeof schema === \"string\" && (schema as string).trim().startsWith(\"{\")) {\n try {\n schema = JSON.parse(schema);\n } catch (e) {\n // Ignore, let standard validation catch it\n }\n }\n\n if (schema && typeof schema === \"object\") {\n const plugin = SchemaBuilderRegistry.getBuilderFor(schema);\n if (plugin) {\n schema = plugin.build(schema, this.getProperty(\"schemaTarget\"));\n // Silently update the wrapper property so the inner host gets the final parsed MetaUI format\n super.setProperty(\"schemaDefinition\", schema, true);\n if (schema.definitions) {\n super.setProperty(\"schemaDefinitions\", schema.definitions, true);\n }\n }\n }\n\n const dataJson = this.getProperty(\"dataJson\");\n const data = this.getProperty(\"data\");\n\n let hasSchema = !!schema;\n if (hasSchema && typeof schema === \"object\" && Object.keys(schema).length === 0) {\n hasSchema = false; // Treat empty object as no schema\n }\n\n const hasData = !!dataJson || !!data;\n\n // 3. AI Schema Inference Detection\n if (hasData && this.getProperty(\"inferenceStrategy\") === \"AI\") {\n const self = this as unknown as { _fetchingSchema?: boolean };\n if (self._fetchingSchema) return; // Prevent re-entry\n self._fetchingSchema = true;\n\n let rawDataObj = data;\n if (!rawDataObj && dataJson) {\n try { rawDataObj = JSON.parse(dataJson as string); } catch(e: Error) { Logger.trace(\"[DynamicHost] Ignored invalid dataJson parse: \" + e.message); }\n }\n\n if (rawDataObj) {\n sap.ui.require([\n \"sap/ui/core/BusyIndicator\", \n \"sap/m/MessageToast\",\n \"nz/co/siliconst/ui5/metaui/ai/AIConfig\"\n ], (BusyIndicator: { show: (n: number) => void, hide: () => void }, MessageToast: { show: (s: string) => void }, AIConfig: { getProxy: () => { generateSchema: (d: unknown, s?: unknown) => Promise<unknown> } }) => {\n BusyIndicator.show(0);\n const proxy = AIConfig.getProxy();\n \n proxy.generateSchema(rawDataObj, schema || undefined)\n .then((generatedSchema: unknown) => {\n const self = this as unknown as { _fetchingSchema?: boolean };\n super.setProperty(\"schemaDefinition\", generatedSchema, true);\n self._fetchingSchema = false;\n BusyIndicator.hide();\n this.invalidate(); // Force re-render with the new schema\n })\n .catch((err: Error) => {\n const self = this as unknown as { _fetchingSchema?: boolean };\n Logger.warn(\"[MetaUI DynamicHost]\", \"AI inference failed, falling back to RuleBased. Error: \" + err.message, \"DynamicHost\");\n if (MessageToast) MessageToast.show(\"AI Inference failed, using fallback.\");\n super.setProperty(\"inferenceStrategy\", \"RuleBased\", true); // Fallback to normal inference\n self._fetchingSchema = false;\n BusyIndicator.hide();\n this.invalidate(); \n });\n });\n return; // Abort render cycle until AI is done\n }\n }\n\n Logger.debug(\"[MetaUI DynamicHost]\", `Evaluating boot. hasSchema: ${hasSchema}, hasData: ${hasData}`, \"DynamicHost\");\n\n // Only boot if we have either a schema or some data to infer from\n if (hasSchema || hasData) {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Booting inner host. hasSchema: ${hasSchema}, hasData: ${hasData}`, \"DynamicHost\");\n }\n // The architectural Facade router logic:\n // We've simplified this! We no longer use HostFactory or separate subclasses.\n // GeneratorHost is fully capable of inferring the schema if none is provided.\n this._innerHost = new GeneratorHost();\n\n // 1. Forward all static values to the spawned host BEFORE mounting.\n // Since we no longer use bindProperty, it's perfectly safe to set raw properties before mounting.\n const props = this.getMetadata().getProperties();\n for (const propName in props) {\n if (propName === \"inferenceStrategy\") continue;\n const val = super.getProperty(propName);\n if (val !== null && val !== undefined) {\n if (propName === \"schemaDefinitions\") {\n Logger.debug(`[MetaUI DynamicHost] Proxying schemaDefinitions: ${Object.keys(val)}`, \"\", \"DynamicHost\");\n }\n this._innerHost.setProperty(propName, val);\n } else if (propName === \"schemaDefinitions\") {\n Logger.warn(`[MetaUI DynamicHost] Warning: schemaDefinitions is null/undefined in Wrapper. Defaulting to empty object in GeneratorHost.`, \"\", \"DynamicHost\");\n }\n }\n\n // 2. Mount so it inherits models and triggers lifecycle.\n this.setAggregation(\"_content\", this._innerHost);\n\n // 3. Forward all event subscriptions.\n // By proxying the events upwards, the developer can subscribe to `<meta:DynamicHost submit=\"...\">` \n // and perfectly receive the inner host's submission event.\n const events = this.getMetadata().getEvents();\n for (const eventName in events) {\n this._innerHost.attachEvent(eventName, (oEvent: sap.ui.base.Event) => {\n // Natively push updated payload out to any bound Fiori Element properties.\n // Using super.setProperty prevents an infinite loop back down to _innerHost.\n if (eventName === \"submit\" || eventName === \"fieldChange\") {\n const params = oEvent.getParameters();\n if (params.payload) {\n const isLive = this.getProperty(\"liveUpdate\") === true;\n if (eventName === \"submit\" || isLive) {\n super.setProperty(\"data\", params.payload, true);\n\n const str = params.payloadJson || JSON.stringify(params.payload, null, 2);\n super.setProperty(\"dataJson\", str, true);\n }\n }\n }\n this.fireEvent(eventName, oEvent.getParameters());\n });\n }\n\n this._initializedInner = true;\n }\n }\n }\n\n /**\n * Overrides standard UI5 setProperty to act as a transparent proxy.\n * When a property is updated on the wrapper (either programmatically or via a binding update),\n * it instantly mirrors that value down to the inner instantiated host.\n */\n public setProperty(propertyName: string, value: unknown, suppressInvalidate?: boolean): this {\n if (propertyName === \"data\" || propertyName === \"dataJson\" || propertyName === \"schemaDefinition\" || propertyName === \"schemaDefinitions\") {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Wrapper received setProperty: ${propertyName}`, \"DynamicHost\");\n }\n }\n super.setProperty(propertyName, value, suppressInvalidate);\n if (this._innerHost && propertyName !== \"inferenceStrategy\") {\n this._innerHost.setProperty(propertyName, value, suppressInvalidate);\n } else if (propertyName === \"data\" || propertyName === \"dataJson\" || propertyName === \"schemaDefinition\" || propertyName === \"schemaDefinitions\") {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `_innerHost not yet initialized when ${propertyName} was set. Booting will happen on next render.`, \"DynamicHost\");\n }\n }\n return this;\n }\n\n\n\n\n\n /**\n * Programmatic API support. Routes dialog commands down to the spawned inner host.\n * If the inner host has not booted yet, it forces initialization immediately.\n * \n * @param {string} [title=\"Form\"] The title of the dialog\n * @param {string} [submitButtonText=\"OK\"] The text for the primary action button\n * @param {string} [cancelButtonText=\"Cancel\"] The text for the cancel button\n * @param {string} [dialogWidth=\"auto\"] The width of the dialog\n * @param {sap.ui.core.Control} [parentView] The parent view to attach the dialog to for model inheritance.\n */\n public openInDialog(title?: string, submitButtonText?: string, cancelButtonText?: string, dialogWidth?: string, parentView?: Control): void {\n if (!this._innerHost) {\n this.onBeforeRendering(); // Force init if they bypassed UI5 rendering\n }\n this._innerHost?.openInDialog(title, submitButtonText, cancelButtonText, dialogWidth, parentView);\n }\n\n /**\n * Proxies submission triggering down to the instantiated generator host.\n * Evaluates the internal Engine validation suite and returns true if structurally sound.\n * \n * @returns {boolean} True if the internal payload passes schema validation, false otherwise.\n */\n public triggerSubmit(): boolean {\n if (!this._innerHost) {\n return false;\n }\n return this._innerHost.triggerSubmit();\n }\n\n /**\n * Injects a custom error message onto a specific field.\n * Useful for injecting custom backend validation errors.\n * \n * @param {string} fieldPath The schema key path to target.\n * @param {string} message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n const inner = this._innerHost as unknown as { addCustomError?: (p: string, m: string) => void };\n if (inner && typeof inner.addCustomError === \"function\") {\n inner.addCustomError(fieldPath, message);\n }\n }\n\n /**\n * Clears a custom error message from a specific field.\n * \n * @param {string} fieldPath The schema key path to target.\n */\n public clearCustomError(fieldPath: string): void {\n const inner = this._innerHost as unknown as { clearCustomError?: (p: string) => void };\n if (inner && typeof inner.clearCustomError === \"function\") {\n inner.clearCustomError(fieldPath);\n }\n }\n\n /**\n * Overrides standard UI5 getProperty to transparently pull extracted data from the inner host.\n * Ensures that querying the DynamicHost facade for `data` always yields the freshest payload.\n * \n * @param {string} propertyName The name of the property to retrieve\n * @returns {unknown} The property value\n */\n public getProperty(propertyName: string): unknown {\n if (propertyName === \"outputData\") {\n propertyName = \"data\"; // Forward deprecated outputData to data\n }\n if (this._innerHost && (propertyName === \"data\" || propertyName === \"dataJson\")) {\n return this._innerHost.getProperty(propertyName);\n }\n return super.getProperty(propertyName);\n }\n}\n"],"mappings":"wQAEOA,EAAaC,EAAAC,GAAA,MACXC,EAAMC,EAAA,gBACNC,EAAaC,EAAA,uBAEbC,EAAqBC,EAAA,yBAE9B,MASqBC,EAAoBC,EAAOC,OAAA,mDAAAC,YAAA,SAAAA,IAAAF,EAAAG,UAAAD,YAAAE,MAAAC,KAAAC,WAAAD,KACpCE,cAAsC,KAqE9CF,KAIQG,WAAmC,KAE3CH,KAIQI,kBAA6B,KAAK,EA3BnCC,SAAW,CACdC,WAAY,EACZC,OAAOC,EAAmBC,GACtBD,EAAGE,UAAU,MAAOD,GACpBD,EAAGG,MAAM,QAAS,QAClBH,EAAGG,MAAM,SAAU,QACnBH,EAAGI,UAEH,MAAMC,EAAUJ,EAAQK,eAAe,YACvC,GAAID,EAAS,CACTL,EAAGO,cAAcF,EACrB,CAEAL,EAAGQ,MAAM,MACb,GAhEYC,SAAW,CACvBC,WAAY,CACRC,iBAAkB,CAAEC,KAAM,MAAOC,aAAc,MAC/CC,kBAAmB,CAAEF,KAAM,SAAUC,aAAc,MACnDE,aAAc,CAAEH,KAAM,SAAUC,aAAc,MAC9CG,eAAgB,CAAEJ,KAAM,SAAUC,aAAc,MAChDI,sBAAuB,CAAEL,KAAM,SAAUC,aAAc,MACvDK,KAAM,CAAEN,KAAM,SAAUC,aAAc,KAAMM,SAAU,YACtDC,SAAU,CAAER,KAAM,SAAUC,aAAc,KAAMM,SAAU,YAC1DE,WAAY,CAAET,KAAM,UAAWC,aAAc,OAC7CS,QAAS,CAAEV,KAAM,UAAWC,aAAc,MAC1CU,kBAAmB,CAAEX,KAAM,UAAWC,aAAc,OACpDW,UAAW,CAAEZ,KAAM,SAAUC,aAAc,QAC3CY,UAAW,CAAEb,KAAM,UAAWC,aAAc,OAC5Ca,SAAU,CAAEd,KAAM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ClBH,KAAKqF,mBACT,CACArF,KAAKG,YAAYqJ,aAAaE,EAAOC,EAAkBC,EAAkBC,EAAaC,EAC1F,EAQOC,cAAa,SAAAC,IAChB,IAAKhK,KAAKG,WAAY,CAClB,OAAO,KACX,CACA,OAAOH,KAAKG,WAAW4J,eAC3B,EASOE,eAAc,SAAAC,EAAChH,EAAmBI,GACrC,MAAM6G,EAAQnK,KAAKG,WACnB,GAAIgK,UAAgBA,EAAMF,iBAAmB,WAAY,CACrDE,EAAMF,eAAe/G,EAAWI,EACpC,CACJ,EAOO8G,iBAAgB,SAAAC,EAACnH,GACpB,MAAMiH,EAAQnK,KAAKG,WACnB,GAAIgK,UAAgBA,EAAMC,mBAAqB,WAAY,CACvDD,EAAMC,iBAAiBlH,EAC3B,CACJ,EASOsC,YAAW,SAAA8E,EAAChB,GACf,GAAIA,IAAiB,aAAc,CAC/BA,EAAe,MACnB,CACA,GAAItJ,KAAKG,aAAemJ,IAAiB,QAAUA,IAAiB,YAAa,CAC7E,OAAOtJ,KAAKG,WAAWqF,YAAY8D,EACvC,CACA,OAAAd,6BAAAxI,KAAyBsJ,EAC7B,IAAC,OAjbgB5J,CAAW","ignoreList":[]}
|
|
@@ -21,6 +21,10 @@ export default class DynamicHost extends Control {
|
|
|
21
21
|
static readonly metadata = {
|
|
22
22
|
properties: {
|
|
23
23
|
schemaDefinition: { type: "any", defaultValue: null },
|
|
24
|
+
schemaDefinitions: { type: "object", defaultValue: null },
|
|
25
|
+
schemaTarget: { type: "string", defaultValue: null },
|
|
26
|
+
pluginRegistry: { type: "object", defaultValue: null },
|
|
27
|
+
schemaBuilderRegistry: { type: "object", defaultValue: null },
|
|
24
28
|
data: { type: "object", defaultValue: null, bindable: "bindable" },
|
|
25
29
|
dataJson: { type: "string", defaultValue: null, bindable: "bindable" },
|
|
26
30
|
liveUpdate: { type: "boolean", defaultValue: false },
|
|
@@ -28,7 +32,8 @@ export default class DynamicHost extends Control {
|
|
|
28
32
|
useMessageManager: { type: "boolean", defaultValue: false },
|
|
29
33
|
modelName: { type: "string", defaultValue: "meta" },
|
|
30
34
|
debugMode: { type: "boolean", defaultValue: false },
|
|
31
|
-
editable: { type: "boolean", defaultValue: true }
|
|
35
|
+
editable: { type: "boolean", defaultValue: true },
|
|
36
|
+
inferenceStrategy: { type: "string", defaultValue: "RuleBased" }
|
|
32
37
|
},
|
|
33
38
|
aggregations: {
|
|
34
39
|
_content: { type: "sap.ui.core.Control", multiple: false, visibility: "hidden" }
|
|
@@ -176,10 +181,11 @@ export default class DynamicHost extends Control {
|
|
|
176
181
|
|
|
177
182
|
// 1. URL Detection & Fetching
|
|
178
183
|
if (typeof schemaRaw === "string" && (schemaRaw.startsWith("http://") || schemaRaw.startsWith("https://"))) {
|
|
179
|
-
|
|
180
|
-
(
|
|
184
|
+
const self = this as unknown as { _fetchingSchema?: boolean };
|
|
185
|
+
if (self._fetchingSchema) return; // Prevent re-entry
|
|
186
|
+
self._fetchingSchema = true;
|
|
181
187
|
|
|
182
|
-
sap.ui.require(["sap/ui/core/BusyIndicator", "sap/m/MessageToast"], (BusyIndicator:
|
|
188
|
+
sap.ui.require(["sap/ui/core/BusyIndicator", "sap/m/MessageToast"], (BusyIndicator: { show: (n: number) => void, hide: () => void }, MessageToast: { show: (s: string) => void }) => {
|
|
183
189
|
BusyIndicator.show(0);
|
|
184
190
|
fetch(schemaRaw as string)
|
|
185
191
|
.then(res => {
|
|
@@ -188,17 +194,22 @@ export default class DynamicHost extends Control {
|
|
|
188
194
|
})
|
|
189
195
|
.then(json => {
|
|
190
196
|
const plugin = SchemaBuilderRegistry.getBuilderFor(json);
|
|
191
|
-
const finalSchema = plugin ? plugin.build(json) : json;
|
|
197
|
+
const finalSchema = plugin ? plugin.build(json, this.getProperty("schemaTarget")) : json;
|
|
192
198
|
super.setProperty("schemaDefinition", finalSchema, true);
|
|
193
|
-
(
|
|
199
|
+
if (finalSchema.definitions) {
|
|
200
|
+
super.setProperty("schemaDefinitions", finalSchema.definitions, true);
|
|
201
|
+
}
|
|
202
|
+
const self = this as unknown as { _fetchingSchema?: boolean };
|
|
203
|
+
self._fetchingSchema = false;
|
|
194
204
|
BusyIndicator.hide();
|
|
195
205
|
this.invalidate(); // Force re-render with resolved schema
|
|
196
206
|
})
|
|
197
207
|
.catch(err => {
|
|
208
|
+
const self = this as unknown as { _fetchingSchema?: boolean };
|
|
198
209
|
Logger.warn("[MetaUI DynamicHost]", "Failed to fetch remote schema: " + err, "DynamicHost");
|
|
199
210
|
if (MessageToast) MessageToast.show("Failed to fetch remote schema");
|
|
200
211
|
super.setProperty("schemaDefinition", null, true); // Fallback to full inference
|
|
201
|
-
|
|
212
|
+
self._fetchingSchema = false;
|
|
202
213
|
BusyIndicator.hide();
|
|
203
214
|
this.invalidate();
|
|
204
215
|
});
|
|
@@ -219,9 +230,12 @@ export default class DynamicHost extends Control {
|
|
|
219
230
|
if (schema && typeof schema === "object") {
|
|
220
231
|
const plugin = SchemaBuilderRegistry.getBuilderFor(schema);
|
|
221
232
|
if (plugin) {
|
|
222
|
-
schema = plugin.build(schema);
|
|
233
|
+
schema = plugin.build(schema, this.getProperty("schemaTarget"));
|
|
223
234
|
// Silently update the wrapper property so the inner host gets the final parsed MetaUI format
|
|
224
235
|
super.setProperty("schemaDefinition", schema, true);
|
|
236
|
+
if (schema.definitions) {
|
|
237
|
+
super.setProperty("schemaDefinitions", schema.definitions, true);
|
|
238
|
+
}
|
|
225
239
|
}
|
|
226
240
|
}
|
|
227
241
|
|
|
@@ -235,6 +249,48 @@ export default class DynamicHost extends Control {
|
|
|
235
249
|
|
|
236
250
|
const hasData = !!dataJson || !!data;
|
|
237
251
|
|
|
252
|
+
// 3. AI Schema Inference Detection
|
|
253
|
+
if (hasData && this.getProperty("inferenceStrategy") === "AI") {
|
|
254
|
+
const self = this as unknown as { _fetchingSchema?: boolean };
|
|
255
|
+
if (self._fetchingSchema) return; // Prevent re-entry
|
|
256
|
+
self._fetchingSchema = true;
|
|
257
|
+
|
|
258
|
+
let rawDataObj = data;
|
|
259
|
+
if (!rawDataObj && dataJson) {
|
|
260
|
+
try { rawDataObj = JSON.parse(dataJson as string); } catch(e: Error) { Logger.trace("[DynamicHost] Ignored invalid dataJson parse: " + e.message); }
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (rawDataObj) {
|
|
264
|
+
sap.ui.require([
|
|
265
|
+
"sap/ui/core/BusyIndicator",
|
|
266
|
+
"sap/m/MessageToast",
|
|
267
|
+
"nz/co/siliconst/ui5/metaui/ai/AIConfig"
|
|
268
|
+
], (BusyIndicator: { show: (n: number) => void, hide: () => void }, MessageToast: { show: (s: string) => void }, AIConfig: { getProxy: () => { generateSchema: (d: unknown, s?: unknown) => Promise<unknown> } }) => {
|
|
269
|
+
BusyIndicator.show(0);
|
|
270
|
+
const proxy = AIConfig.getProxy();
|
|
271
|
+
|
|
272
|
+
proxy.generateSchema(rawDataObj, schema || undefined)
|
|
273
|
+
.then((generatedSchema: unknown) => {
|
|
274
|
+
const self = this as unknown as { _fetchingSchema?: boolean };
|
|
275
|
+
super.setProperty("schemaDefinition", generatedSchema, true);
|
|
276
|
+
self._fetchingSchema = false;
|
|
277
|
+
BusyIndicator.hide();
|
|
278
|
+
this.invalidate(); // Force re-render with the new schema
|
|
279
|
+
})
|
|
280
|
+
.catch((err: Error) => {
|
|
281
|
+
const self = this as unknown as { _fetchingSchema?: boolean };
|
|
282
|
+
Logger.warn("[MetaUI DynamicHost]", "AI inference failed, falling back to RuleBased. Error: " + err.message, "DynamicHost");
|
|
283
|
+
if (MessageToast) MessageToast.show("AI Inference failed, using fallback.");
|
|
284
|
+
super.setProperty("inferenceStrategy", "RuleBased", true); // Fallback to normal inference
|
|
285
|
+
self._fetchingSchema = false;
|
|
286
|
+
BusyIndicator.hide();
|
|
287
|
+
this.invalidate();
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
return; // Abort render cycle until AI is done
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
238
294
|
Logger.debug("[MetaUI DynamicHost]", `Evaluating boot. hasSchema: ${hasSchema}, hasData: ${hasData}`, "DynamicHost");
|
|
239
295
|
|
|
240
296
|
// Only boot if we have either a schema or some data to infer from
|
|
@@ -251,9 +307,15 @@ export default class DynamicHost extends Control {
|
|
|
251
307
|
// Since we no longer use bindProperty, it's perfectly safe to set raw properties before mounting.
|
|
252
308
|
const props = this.getMetadata().getProperties();
|
|
253
309
|
for (const propName in props) {
|
|
310
|
+
if (propName === "inferenceStrategy") continue;
|
|
254
311
|
const val = super.getProperty(propName);
|
|
255
312
|
if (val !== null && val !== undefined) {
|
|
313
|
+
if (propName === "schemaDefinitions") {
|
|
314
|
+
Logger.debug(`[MetaUI DynamicHost] Proxying schemaDefinitions: ${Object.keys(val)}`, "", "DynamicHost");
|
|
315
|
+
}
|
|
256
316
|
this._innerHost.setProperty(propName, val);
|
|
317
|
+
} else if (propName === "schemaDefinitions") {
|
|
318
|
+
Logger.warn(`[MetaUI DynamicHost] Warning: schemaDefinitions is null/undefined in Wrapper. Defaulting to empty object in GeneratorHost.`, "", "DynamicHost");
|
|
257
319
|
}
|
|
258
320
|
}
|
|
259
321
|
|
|
@@ -279,9 +341,6 @@ export default class DynamicHost extends Control {
|
|
|
279
341
|
super.setProperty("dataJson", str, true);
|
|
280
342
|
}
|
|
281
343
|
}
|
|
282
|
-
if (eventName === "fieldChange" && this.odataDelegate) {
|
|
283
|
-
this.odataDelegate.handleFieldChange(params.fieldPath, params.value);
|
|
284
|
-
}
|
|
285
344
|
}
|
|
286
345
|
this.fireEvent(eventName, oEvent.getParameters());
|
|
287
346
|
});
|
|
@@ -298,15 +357,15 @@ export default class DynamicHost extends Control {
|
|
|
298
357
|
* it instantly mirrors that value down to the inner instantiated host.
|
|
299
358
|
*/
|
|
300
359
|
public setProperty(propertyName: string, value: unknown, suppressInvalidate?: boolean): this {
|
|
301
|
-
if (propertyName === "data" || propertyName === "dataJson" || propertyName === "schemaDefinition") {
|
|
360
|
+
if (propertyName === "data" || propertyName === "dataJson" || propertyName === "schemaDefinition" || propertyName === "schemaDefinitions") {
|
|
302
361
|
if (this.getProperty("debugMode")) {
|
|
303
362
|
Logger.debug("[MetaUI DynamicHost]", `Wrapper received setProperty: ${propertyName}`, "DynamicHost");
|
|
304
363
|
}
|
|
305
364
|
}
|
|
306
365
|
super.setProperty(propertyName, value, suppressInvalidate);
|
|
307
|
-
if (this._innerHost) {
|
|
366
|
+
if (this._innerHost && propertyName !== "inferenceStrategy") {
|
|
308
367
|
this._innerHost.setProperty(propertyName, value, suppressInvalidate);
|
|
309
|
-
} else if (propertyName === "data" || propertyName === "dataJson" || propertyName === "schemaDefinition") {
|
|
368
|
+
} else if (propertyName === "data" || propertyName === "dataJson" || propertyName === "schemaDefinition" || propertyName === "schemaDefinitions") {
|
|
310
369
|
if (this.getProperty("debugMode")) {
|
|
311
370
|
Logger.debug("[MetaUI DynamicHost]", `_innerHost not yet initialized when ${propertyName} was set. Booting will happen on next render.`, "DynamicHost");
|
|
312
371
|
}
|
|
@@ -356,8 +415,9 @@ export default class DynamicHost extends Control {
|
|
|
356
415
|
* @param {string} message The custom error message to display.
|
|
357
416
|
*/
|
|
358
417
|
public addCustomError(fieldPath: string, message: string): void {
|
|
359
|
-
|
|
360
|
-
|
|
418
|
+
const inner = this._innerHost as unknown as { addCustomError?: (p: string, m: string) => void };
|
|
419
|
+
if (inner && typeof inner.addCustomError === "function") {
|
|
420
|
+
inner.addCustomError(fieldPath, message);
|
|
361
421
|
}
|
|
362
422
|
}
|
|
363
423
|
|
|
@@ -367,8 +427,9 @@ export default class DynamicHost extends Control {
|
|
|
367
427
|
* @param {string} fieldPath The schema key path to target.
|
|
368
428
|
*/
|
|
369
429
|
public clearCustomError(fieldPath: string): void {
|
|
370
|
-
|
|
371
|
-
|
|
430
|
+
const inner = this._innerHost as unknown as { clearCustomError?: (p: string) => void };
|
|
431
|
+
if (inner && typeof inner.clearCustomError === "function") {
|
|
432
|
+
inner.clearCustomError(fieldPath);
|
|
372
433
|
}
|
|
373
434
|
}
|
|
374
435
|
|
|
@@ -40,6 +40,22 @@ sap.ui.define(["sap/ui/core/Control", "../../utils/Logger", "../../core/SchemaNo
|
|
|
40
40
|
type: "any",
|
|
41
41
|
defaultValue: null
|
|
42
42
|
},
|
|
43
|
+
schemaDefinitions: {
|
|
44
|
+
type: "object",
|
|
45
|
+
defaultValue: {}
|
|
46
|
+
},
|
|
47
|
+
schemaTarget: {
|
|
48
|
+
type: "string",
|
|
49
|
+
defaultValue: null
|
|
50
|
+
},
|
|
51
|
+
pluginRegistry: {
|
|
52
|
+
type: "object",
|
|
53
|
+
defaultValue: null
|
|
54
|
+
},
|
|
55
|
+
schemaBuilderRegistry: {
|
|
56
|
+
type: "object",
|
|
57
|
+
defaultValue: null
|
|
58
|
+
},
|
|
43
59
|
data: {
|
|
44
60
|
type: "object",
|
|
45
61
|
defaultValue: null,
|
|
@@ -214,6 +230,22 @@ sap.ui.define(["sap/ui/core/Control", "../../utils/Logger", "../../core/SchemaNo
|
|
|
214
230
|
getStateManager: function _getStateManager() {
|
|
215
231
|
return this.stateManager;
|
|
216
232
|
},
|
|
233
|
+
/**
|
|
234
|
+
* Resolves a reference pointer against the global schema definitions dictionary.
|
|
235
|
+
* @param refPath The string reference path (e.g., "#/definitions/User")
|
|
236
|
+
* @returns The resolved ISchema or undefined
|
|
237
|
+
*/
|
|
238
|
+
getSchemaDefinition: function _getSchemaDefinition(refPath) {
|
|
239
|
+
const defs = this.getProperty("schemaDefinitions");
|
|
240
|
+
if (!defs || !refPath) return undefined;
|
|
241
|
+
let key = refPath;
|
|
242
|
+
if (key.startsWith("#/definitions/")) {
|
|
243
|
+
key = key.substring(14);
|
|
244
|
+
} else if (key.startsWith("#/components/schemas/")) {
|
|
245
|
+
key = key.substring(21);
|
|
246
|
+
}
|
|
247
|
+
return defs[key];
|
|
248
|
+
},
|
|
217
249
|
/**
|
|
218
250
|
* Safely destroys the currently generated UI tree and cleans up references.
|
|
219
251
|
* This is called before every regeneration to prevent memory leaks.
|
|
@@ -393,7 +425,7 @@ sap.ui.define(["sap/ui/core/Control", "../../utils/Logger", "../../core/SchemaNo
|
|
|
393
425
|
this.dataSyncDelegate.handleInputDataHotSwap(propertyName, value, suppressInvalidate);
|
|
394
426
|
return this;
|
|
395
427
|
}
|
|
396
|
-
if (propertyName === "editable" || propertyName === "debugMode" || propertyName === "schemaDefinition") {
|
|
428
|
+
if (propertyName === "editable" || propertyName === "debugMode" || propertyName === "schemaDefinition" || propertyName === "schemaTarget") {
|
|
397
429
|
const currentVal = this.getProperty(propertyName);
|
|
398
430
|
if (currentVal !== value) {
|
|
399
431
|
Control.prototype.setProperty.call(this, propertyName, value, suppressInvalidate);
|
|
@@ -514,13 +546,19 @@ sap.ui.define(["sap/ui/core/Control", "../../utils/Logger", "../../core/SchemaNo
|
|
|
514
546
|
}
|
|
515
547
|
}
|
|
516
548
|
}
|
|
517
|
-
const
|
|
549
|
+
const activePluginRegistry = this.getProperty("pluginRegistry") || PluginRegistry.getInstance();
|
|
550
|
+
const pathsToLoad = activePluginRegistry.getPathsToLoad(normalizedSchema);
|
|
518
551
|
const needsNetworkLoad = Array.from(pathsToLoad).some(path => !sap.ui.require(path));
|
|
519
552
|
if (needsNetworkLoad) {
|
|
520
553
|
this.setBusy(true);
|
|
521
|
-
await
|
|
554
|
+
await activePluginRegistry.preloadDependencies(normalizedSchema);
|
|
522
555
|
this.setBusy(false);
|
|
523
556
|
}
|
|
557
|
+
|
|
558
|
+
// Inject defaults into empty payload values
|
|
559
|
+
if (normalizedSchema && finalData) {
|
|
560
|
+
this.dataSyncDelegate.injectSchemaDefaults(normalizedSchema, finalData);
|
|
561
|
+
}
|
|
524
562
|
this.activeModelName = "metaUI_" + this.getId();
|
|
525
563
|
this.stateManager = new StateManager(finalData, normalizedSchema, this.activeModelName);
|
|
526
564
|
this.stateManager.setUseMessageManager(this.getProperty("useMessageManager") === true);
|
|
@@ -528,7 +566,9 @@ sap.ui.define(["sap/ui/core/Control", "../../utils/Logger", "../../core/SchemaNo
|
|
|
528
566
|
if (!this.engine) {
|
|
529
567
|
const isEditable = this.getProperty("editable") !== false;
|
|
530
568
|
const useMessageManager = this.getProperty("useMessageManager") === true;
|
|
531
|
-
this.
|
|
569
|
+
const activePluginRegistry = this.getProperty("pluginRegistry") || PluginRegistry.getInstance();
|
|
570
|
+
this.engine = new Engine(isEditable, useMessageManager, activePluginRegistry);
|
|
571
|
+
this.engine.host = this;
|
|
532
572
|
}
|
|
533
573
|
this.generatedContent = this.engine.build(normalizedSchema, this.stateManager.getModel(), this.activeModelName, this.triggerSubmit.bind(this), this.getId(), this.onInternalFieldChange.bind(this));
|
|
534
574
|
let contentContainer = this.generatedContent;
|