@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
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file OpenApiPropertyMapper.ts
|
|
3
|
+
* @description Extracts and maps OpenAPI properties into MetaUI IPropertyMetadata.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { IPropertyMetadata } from "../../interfaces/ISchema";
|
|
7
|
+
import { OpenApiRefResolver } from "../OpenApiRefResolver";
|
|
8
|
+
import { OpenApiTypeMapper } from "../OpenApiTypeMapper";
|
|
9
|
+
import { OpenApiUIMapper } from "../OpenApiUIMapper";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Utility class responsible for extracting and mapping OpenAPI properties into the native MetaUI IPropertyMetadata schema format.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export class OpenApiPropertyMapper {
|
|
17
|
+
/**
|
|
18
|
+
* Recursively traverses and translates an OpenAPI properties block into a MetaUI IPropertyMetadata dictionary.
|
|
19
|
+
*
|
|
20
|
+
* @param {Record<string, any>} properties The OpenAPI properties block.
|
|
21
|
+
* @param {string[]} requiredKeys Array of required property keys.
|
|
22
|
+
* @param {any} openApiRoot The OpenAPI root document for resolving references.
|
|
23
|
+
* @param {"2.0" | "3.0"} version The OpenAPI version.
|
|
24
|
+
* @param {number} [depth=0] Recursion depth limiter to prevent stack overflows on circular refs.
|
|
25
|
+
* @returns {Record<string, IPropertyMetadata>} The normalized MetaUI properties mapping.
|
|
26
|
+
*/
|
|
27
|
+
public static mapProperties(
|
|
28
|
+
properties: Record<string, any>,
|
|
29
|
+
requiredKeys: string[],
|
|
30
|
+
openApiRoot: unknown,
|
|
31
|
+
version: "2.0" | "3.0",
|
|
32
|
+
depth: number = 0
|
|
33
|
+
): Record<string, IPropertyMetadata> {
|
|
34
|
+
const normalizedProps: Record<string, IPropertyMetadata> = {};
|
|
35
|
+
|
|
36
|
+
if (depth > 8) return normalizedProps;
|
|
37
|
+
|
|
38
|
+
for (const key of Object.keys(properties)) {
|
|
39
|
+
const isRequired = requiredKeys.includes(key);
|
|
40
|
+
let propDef = properties[key];
|
|
41
|
+
|
|
42
|
+
if (propDef.$ref) {
|
|
43
|
+
const resolved = OpenApiRefResolver.resolve(propDef.$ref, openApiRoot);
|
|
44
|
+
if (resolved) {
|
|
45
|
+
propDef = { ...resolved, ...propDef };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
normalizedProps[key] = this.mapPropertyMetadata(propDef, key, isRequired, openApiRoot, version, depth + 1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return normalizedProps;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Translates a single OpenAPI property schema block into a MetaUI IPropertyMetadata block.
|
|
57
|
+
* Delegates specific mapping tasks to focused private methods to adhere to SRP.
|
|
58
|
+
*
|
|
59
|
+
* @param {any} swaggerProp The specific OpenAPI property schema to map.
|
|
60
|
+
* @param {string} keyName The key/name of this property.
|
|
61
|
+
* @param {boolean} isRequired Whether this property is strictly required.
|
|
62
|
+
* @param {any} openApiRoot The OpenAPI root document for resolving references.
|
|
63
|
+
* @param {"2.0" | "3.0"} version The OpenAPI version.
|
|
64
|
+
* @param {number} [depth=0] Recursion depth limiter.
|
|
65
|
+
* @returns {IPropertyMetadata} The normalized MetaUI property metadata.
|
|
66
|
+
*/
|
|
67
|
+
public static mapPropertyMetadata(
|
|
68
|
+
swaggerProp: unknown,
|
|
69
|
+
keyName: string,
|
|
70
|
+
isRequired: boolean,
|
|
71
|
+
openApiRoot: unknown,
|
|
72
|
+
version: "2.0" | "3.0",
|
|
73
|
+
depth: number = 0
|
|
74
|
+
): IPropertyMetadata {
|
|
75
|
+
let currentProp = swaggerProp;
|
|
76
|
+
|
|
77
|
+
// 1. Resolve References
|
|
78
|
+
const refResult = this._resolveReference(currentProp, keyName, isRequired, openApiRoot, version, depth);
|
|
79
|
+
if (refResult) {
|
|
80
|
+
return refResult;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// 2. Resolve Composition (allOf)
|
|
84
|
+
currentProp = this._resolveAllOf(currentProp, openApiRoot);
|
|
85
|
+
|
|
86
|
+
// 3. Base Initialization
|
|
87
|
+
const type = OpenApiTypeMapper.mapType(currentProp.type);
|
|
88
|
+
const metaProp: IPropertyMetadata = {
|
|
89
|
+
type: type,
|
|
90
|
+
required: isRequired
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// 4. UI Directive Binding
|
|
94
|
+
const uiDirective = OpenApiUIMapper.build(currentProp, keyName);
|
|
95
|
+
if (Object.keys(uiDirective).length > 0) {
|
|
96
|
+
metaProp.ui = uiDirective;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// 5. Constraints & State Modifiers
|
|
100
|
+
this._applyConstraints(metaProp, currentProp, version);
|
|
101
|
+
this._applyStateModifiers(metaProp, currentProp);
|
|
102
|
+
|
|
103
|
+
if (currentProp.default !== undefined) {
|
|
104
|
+
metaProp.default = currentProp.default;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (Array.isArray(currentProp.enum)) {
|
|
108
|
+
metaProp.enum = currentProp.enum;
|
|
109
|
+
if (!metaProp.ui) metaProp.ui = {};
|
|
110
|
+
metaProp.ui.widget = "dropdown";
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// 6. Polymorphism & Nesting
|
|
114
|
+
this._applyPolymorphism(metaProp, currentProp, openApiRoot, version, depth);
|
|
115
|
+
this._applyNestedTypes(metaProp, currentProp, openApiRoot, version, depth, type);
|
|
116
|
+
|
|
117
|
+
return metaProp;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Attempts to resolve a $ref block. If it resolves to a primitive, it inlines it.
|
|
122
|
+
* Otherwise, it returns a reference widget payload.
|
|
123
|
+
*
|
|
124
|
+
* @param {any} currentProp The current schema property definition.
|
|
125
|
+
* @param {string} keyName The structural key name.
|
|
126
|
+
* @param {boolean} isRequired Whether the property is strictly required.
|
|
127
|
+
* @param {any} openApiRoot The root API definition for relative resolution.
|
|
128
|
+
* @param {"2.0" | "3.0"} version The structural version context.
|
|
129
|
+
* @param {number} depth The recursive resolution depth.
|
|
130
|
+
* @returns {IPropertyMetadata | null} Resolved metadata, or null if no reference exists.
|
|
131
|
+
* @private
|
|
132
|
+
*/
|
|
133
|
+
private static _resolveReference(
|
|
134
|
+
currentProp: unknown,
|
|
135
|
+
keyName: string,
|
|
136
|
+
isRequired: boolean,
|
|
137
|
+
openApiRoot: unknown,
|
|
138
|
+
version: "2.0" | "3.0",
|
|
139
|
+
depth: number
|
|
140
|
+
): IPropertyMetadata | null {
|
|
141
|
+
if (!currentProp.$ref) {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const resolved = OpenApiRefResolver.resolve(currentProp.$ref, openApiRoot);
|
|
146
|
+
const resolvedType = currentProp.type || (resolved && resolved.type);
|
|
147
|
+
|
|
148
|
+
if (resolvedType && ["string", "number", "integer", "boolean"].includes(resolvedType)) {
|
|
149
|
+
const inlineProp = { ...resolved, ...currentProp };
|
|
150
|
+
delete inlineProp.$ref;
|
|
151
|
+
return this.mapPropertyMetadata(inlineProp, keyName, isRequired, openApiRoot, version, depth + 1);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return {
|
|
155
|
+
type: "object",
|
|
156
|
+
$ref: currentProp.$ref,
|
|
157
|
+
required: isRequired,
|
|
158
|
+
ui: { widget: "reference" }
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Evaluates and merges 'allOf' arrays into a unified schema definition.
|
|
164
|
+
*
|
|
165
|
+
* @param {any} currentProp The structural property definition containing potential aggregations.
|
|
166
|
+
* @param {any} openApiRoot The base schema for deep resolution.
|
|
167
|
+
* @returns {any} A flattened and merged schema entity.
|
|
168
|
+
* @private
|
|
169
|
+
*/
|
|
170
|
+
private static _resolveAllOf(currentProp: unknown, openApiRoot: unknown): unknown {
|
|
171
|
+
if (!Array.isArray(currentProp.allOf)) {
|
|
172
|
+
return currentProp;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
let merged = { ...currentProp };
|
|
176
|
+
delete merged.allOf;
|
|
177
|
+
for (const subSchema of currentProp.allOf) {
|
|
178
|
+
let resolvedSub = subSchema;
|
|
179
|
+
if (subSchema.$ref) {
|
|
180
|
+
resolvedSub = OpenApiRefResolver.resolve(subSchema.$ref, openApiRoot) || {};
|
|
181
|
+
}
|
|
182
|
+
merged = this.deepMergeSchemas(merged, resolvedSub);
|
|
183
|
+
}
|
|
184
|
+
return merged;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Extracts structural constraints (min/max, regex, etc.) and maps them natively to the output metadata.
|
|
189
|
+
*
|
|
190
|
+
* @param {IPropertyMetadata} metaProp The target metadata definition block.
|
|
191
|
+
* @param {any} currentProp The source OpenAPI schema chunk.
|
|
192
|
+
* @param {"2.0" | "3.0"} version The version, utilized for nuanced boundary matching.
|
|
193
|
+
* @private
|
|
194
|
+
*/
|
|
195
|
+
private static _applyConstraints(metaProp: IPropertyMetadata, currentProp: unknown, version: "2.0" | "3.0"): void {
|
|
196
|
+
// String Constraints
|
|
197
|
+
if (typeof currentProp.maxLength === "number") metaProp.maxLength = currentProp.maxLength;
|
|
198
|
+
if (typeof currentProp.minLength === "number") metaProp.minLength = currentProp.minLength;
|
|
199
|
+
if (typeof currentProp.pattern === "string") metaProp.pattern = currentProp.pattern;
|
|
200
|
+
|
|
201
|
+
// Numeric Constraints
|
|
202
|
+
if (typeof currentProp.maximum === "number") metaProp.maximum = currentProp.maximum;
|
|
203
|
+
if (typeof currentProp.minimum === "number") metaProp.minimum = currentProp.minimum;
|
|
204
|
+
if (typeof currentProp.multipleOf === "number") metaProp.multipleOf = currentProp.multipleOf;
|
|
205
|
+
|
|
206
|
+
// Array Constraints
|
|
207
|
+
if (typeof currentProp.maxItems === "number") metaProp.maxItems = currentProp.maxItems;
|
|
208
|
+
if (typeof currentProp.minItems === "number") metaProp.minItems = currentProp.minItems;
|
|
209
|
+
if (typeof currentProp.uniqueItems === "boolean") metaProp.uniqueItems = currentProp.uniqueItems;
|
|
210
|
+
|
|
211
|
+
// Object Constraints
|
|
212
|
+
if (typeof currentProp.maxProperties === "number") metaProp.maxProperties = currentProp.maxProperties;
|
|
213
|
+
if (typeof currentProp.minProperties === "number") metaProp.minProperties = currentProp.minProperties;
|
|
214
|
+
|
|
215
|
+
// Exclusive Min/Max version-specific logic
|
|
216
|
+
if (version === "2.0") {
|
|
217
|
+
if (currentProp.exclusiveMaximum === true && typeof currentProp.maximum === "number") {
|
|
218
|
+
metaProp.exclusiveMaximum = true;
|
|
219
|
+
}
|
|
220
|
+
if (currentProp.exclusiveMinimum === true && typeof currentProp.minimum === "number") {
|
|
221
|
+
metaProp.exclusiveMinimum = true;
|
|
222
|
+
}
|
|
223
|
+
} else if (version === "3.0") {
|
|
224
|
+
if (typeof currentProp.exclusiveMaximum === "number" || typeof currentProp.exclusiveMaximum === "boolean") {
|
|
225
|
+
metaProp.exclusiveMaximum = currentProp.exclusiveMaximum;
|
|
226
|
+
}
|
|
227
|
+
if (typeof currentProp.exclusiveMinimum === "number" || typeof currentProp.exclusiveMinimum === "boolean") {
|
|
228
|
+
metaProp.exclusiveMinimum = currentProp.exclusiveMinimum;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Extracts operational state flags like readOnly or nullable mapping them onto the internal specification.
|
|
235
|
+
*
|
|
236
|
+
* @param {IPropertyMetadata} metaProp Target native specification.
|
|
237
|
+
* @param {any} currentProp Source raw schema payload.
|
|
238
|
+
* @private
|
|
239
|
+
*/
|
|
240
|
+
private static _applyStateModifiers(metaProp: IPropertyMetadata, currentProp: unknown): void {
|
|
241
|
+
if (currentProp.readOnly === true) metaProp.readOnly = true;
|
|
242
|
+
if (currentProp.writeOnly === true) metaProp.writeOnly = true;
|
|
243
|
+
if (currentProp.nullable === true) metaProp.nullable = true;
|
|
244
|
+
if (currentProp.deprecated === true) metaProp.deprecated = true;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Extracts and maps polymorphic discriminator and union types (oneOf/anyOf) to MetaUI structural directives.
|
|
249
|
+
*
|
|
250
|
+
* @param {IPropertyMetadata} metaProp Native MetaUI definition tree.
|
|
251
|
+
* @param {any} currentProp Raw schema block.
|
|
252
|
+
* @param {any} openApiRoot Master OpenAPI root.
|
|
253
|
+
* @param {"2.0" | "3.0"} version Protocol version identifier.
|
|
254
|
+
* @param {number} depth Internal depth tracker.
|
|
255
|
+
* @private
|
|
256
|
+
*/
|
|
257
|
+
private static _applyPolymorphism(
|
|
258
|
+
metaProp: IPropertyMetadata,
|
|
259
|
+
currentProp: unknown,
|
|
260
|
+
openApiRoot: unknown,
|
|
261
|
+
version: "2.0" | "3.0",
|
|
262
|
+
depth: number
|
|
263
|
+
): void {
|
|
264
|
+
// Discriminator handling
|
|
265
|
+
if (currentProp.discriminator) {
|
|
266
|
+
if (version === "2.0" && typeof currentProp.discriminator === "string") {
|
|
267
|
+
metaProp.discriminator = { propertyName: currentProp.discriminator };
|
|
268
|
+
} else if (version === "3.0" && typeof currentProp.discriminator === "object") {
|
|
269
|
+
metaProp.discriminator = {
|
|
270
|
+
propertyName: currentProp.discriminator.propertyName,
|
|
271
|
+
mapping: currentProp.discriminator.mapping
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// Handle oneOf polymorphic mapping
|
|
277
|
+
if (Array.isArray(currentProp.oneOf)) {
|
|
278
|
+
metaProp.oneOf = [];
|
|
279
|
+
for (let i = 0; i < currentProp.oneOf.length; i++) {
|
|
280
|
+
metaProp.oneOf.push(this.mapPropertyMetadata(currentProp.oneOf[i], `Variant${i}`, false, openApiRoot, version, depth + 1));
|
|
281
|
+
}
|
|
282
|
+
if (!metaProp.ui) metaProp.ui = {};
|
|
283
|
+
metaProp.ui.widget = "polymorphic";
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// Handle anyOf mapping
|
|
287
|
+
if (Array.isArray(currentProp.anyOf)) {
|
|
288
|
+
metaProp.anyOf = [];
|
|
289
|
+
for (let i = 0; i < currentProp.anyOf.length; i++) {
|
|
290
|
+
metaProp.anyOf.push(this.mapPropertyMetadata(currentProp.anyOf[i], `AnyVariant${i}`, false, openApiRoot, version, depth + 1));
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// Handle not mapping
|
|
295
|
+
if (currentProp.not) {
|
|
296
|
+
metaProp.not = this.mapPropertyMetadata(currentProp.not, `NotVariant`, false, openApiRoot, version, depth + 1);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Recursively traverses into nested objects and arrays constructing the structural node trees.
|
|
302
|
+
*
|
|
303
|
+
* @param {IPropertyMetadata} metaProp The localized destination structure.
|
|
304
|
+
* @param {any} currentProp The source chunk representing a complex element.
|
|
305
|
+
* @param {any} openApiRoot The OpenAPI dictionary context.
|
|
306
|
+
* @param {"2.0" | "3.0"} version System schema version.
|
|
307
|
+
* @param {number} depth Invocation stack depth.
|
|
308
|
+
* @param {string} type Normalized atomic structure type.
|
|
309
|
+
* @private
|
|
310
|
+
*/
|
|
311
|
+
private static _applyNestedTypes(
|
|
312
|
+
metaProp: IPropertyMetadata,
|
|
313
|
+
currentProp: unknown,
|
|
314
|
+
openApiRoot: unknown,
|
|
315
|
+
version: "2.0" | "3.0",
|
|
316
|
+
depth: number,
|
|
317
|
+
type: string
|
|
318
|
+
): void {
|
|
319
|
+
if (type === "object") {
|
|
320
|
+
if (currentProp.properties) {
|
|
321
|
+
const childRequired = Array.isArray(currentProp.required) ? currentProp.required : [];
|
|
322
|
+
metaProp.properties = this.mapProperties(currentProp.properties, childRequired, openApiRoot, version, depth + 1);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
if (currentProp.additionalProperties) {
|
|
326
|
+
if (currentProp.additionalProperties === true) {
|
|
327
|
+
metaProp.additionalProperties = true;
|
|
328
|
+
} else if (typeof currentProp.additionalProperties === "object") {
|
|
329
|
+
metaProp.additionalProperties = this.mapPropertyMetadata(currentProp.additionalProperties, "value", false, openApiRoot, version, depth + 1);
|
|
330
|
+
if (!metaProp.ui) metaProp.ui = {};
|
|
331
|
+
metaProp.ui.widget = "dictionary";
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// Opaque JSON object definition mapping
|
|
336
|
+
if (!currentProp.properties && !currentProp.additionalProperties) {
|
|
337
|
+
if (!metaProp.ui) metaProp.ui = {};
|
|
338
|
+
metaProp.ui.widget = "codeEditor";
|
|
339
|
+
}
|
|
340
|
+
} else if (type === "array" && currentProp.items) {
|
|
341
|
+
metaProp.items = this.mapPropertyMetadata(currentProp.items, "items", false, openApiRoot, version, depth + 1);
|
|
342
|
+
if (metaProp.items.type !== "object") {
|
|
343
|
+
if (!metaProp.ui) metaProp.ui = {};
|
|
344
|
+
metaProp.ui.widget = "multiInput";
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Recursively deep-merges two OpenAPI objects, ensuring array boundaries and nested structures are preserved.
|
|
351
|
+
*
|
|
352
|
+
* @param {any} target The target base object.
|
|
353
|
+
* @param {any} source The source object providing override details.
|
|
354
|
+
* @returns {any} The synthesized output object.
|
|
355
|
+
*/
|
|
356
|
+
public static deepMergeSchemas(target: unknown, source: unknown): unknown {
|
|
357
|
+
const output = Object.assign({}, target);
|
|
358
|
+
if (source === null || typeof source !== "object") return output;
|
|
359
|
+
|
|
360
|
+
Object.keys(source).forEach(key => {
|
|
361
|
+
if (Array.isArray(source[key])) {
|
|
362
|
+
output[key] = Array.isArray(target[key])
|
|
363
|
+
? Array.from(new Set([...target[key], ...source[key]]))
|
|
364
|
+
: [...source[key]];
|
|
365
|
+
} else if (typeof source[key] === "object" && source[key] !== null) {
|
|
366
|
+
if (target[key] && typeof target[key] === "object") {
|
|
367
|
+
output[key] = this.deepMergeSchemas(target[key], source[key]);
|
|
368
|
+
} else {
|
|
369
|
+
output[key] = Object.assign({}, source[key]);
|
|
370
|
+
}
|
|
371
|
+
} else {
|
|
372
|
+
output[key] = source[key];
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
return output;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
@@ -49,9 +49,20 @@ sap.ui.define(["./BasePlugin", "sap/m/Button"], function (___BasePlugin, Button)
|
|
|
49
49
|
|
|
50
50
|
// Deep clone to prevent live-mutations on the parent model before 'Submit' is clicked
|
|
51
51
|
const nestedData = JSON.parse(JSON.stringify(parentModel.getProperty(updatePath) || []));
|
|
52
|
+
let parent = btn.getParent();
|
|
53
|
+
let parentHost = null;
|
|
54
|
+
while (parent) {
|
|
55
|
+
if (parent.getMetadata().getName() === "nz.co.siliconst.ui5.metaui.controls.host.GeneratorHost" || parent.getMetadata().getName() === "nz.co.siliconst.ui5.metaui.controls.DynamicHost") {
|
|
56
|
+
parentHost = parent;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
parent = parent.getParent();
|
|
60
|
+
}
|
|
61
|
+
const schemaDefs = parentHost ? parentHost.getProperty("schemaDefinitions") : null;
|
|
52
62
|
sap.ui.require(["nz/co/siliconst/ui5/metaui/controls/DynamicHost"], DynamicHost => {
|
|
53
63
|
const host = new DynamicHost({
|
|
54
64
|
schemaDefinition: subSchema,
|
|
65
|
+
schemaDefinitions: schemaDefs,
|
|
55
66
|
data: nestedData,
|
|
56
67
|
editable: this.isEditable // Pass the display mode down to the child Engine!
|
|
57
68
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayPlugin-dbg.js","names":["BasePlugin","___BasePlugin","ArrayPlugin","render","field","bindingPath","modelName","engineScopeId","onChange","metadata","propKey","startsWith","substring","subSchema","type","title","ui","label","items","properties","uiLayout","control","Button","id","generateStableId","text","isEditable","icon","press","oEvent","btn","getSource","parentModel","getModel","bindingContext","getBindingContext","updatePath","ctxPath","getPath","endsWith","nestedData","JSON","parse","stringify","getProperty","sap","require","DynamicHost","host","schemaDefinition","data","editable","attachSubmit","e","payload","getParameter","setProperty","buttonText","dialogButtonText","openInDialog","getValue","applyState","__exports","__esModule"],"sources":["ArrayPlugin.ts"],"sourcesContent":["/**\n * @file ArrayPlugin.ts\n * @description Renders a button that drills down into a nested table (array) via a recursive Dialog using v2 schema.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport Button from \"sap/m/Button\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nexport class ArrayPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Button` to open a nested array form dialog.\n * \n * @param field The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured Button control.\n */\n public render(field: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = field;\n const propKey = bindingPath.startsWith(\"/\") ? bindingPath.substring(1) : bindingPath;\n \n const subSchema: ISchema = {\n type: \"array\",\n title: field.ui?.label || propKey,\n items: field.items || {\n type: \"object\",\n properties: {} // inference will handle it if empty\n }\n };\n\n if (field.uiLayout) {\n subSchema.uiLayout = field.uiLayout;\n }\n\n this.control = new Button({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: !this.isEditable ? \"View Records\" : \"Edit Records\",\n icon: !this.isEditable ? \"sap-icon://display\" : \"sap-icon://list\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const parentModel = btn.getModel(modelName) as JSONModel;\n if (!parentModel) return;\n \n const bindingContext = btn.getBindingContext(modelName);\n let updatePath = bindingPath;\n if (bindingContext && !bindingPath.startsWith(\"/\")) {\n const ctxPath = bindingContext.getPath();\n updatePath = ctxPath.endsWith(\"/\") ? ctxPath + bindingPath : (ctxPath === \"/\" ? \"/\" + bindingPath : ctxPath + \"/\" + bindingPath);\n }\n \n // Deep clone to prevent live-mutations on the parent model before 'Submit' is clicked\n const nestedData = JSON.parse(JSON.stringify(parentModel.getProperty(updatePath) || []));\n\n sap.ui.require([\"nz/co/siliconst/ui5/metaui/controls/DynamicHost\"], (DynamicHost: typeof import(\"../../controls/DynamicHost\").default) => {\n const host = new DynamicHost({\n schemaDefinition: subSchema,\n data: nestedData,\n editable: this.isEditable // Pass the display mode down to the child Engine!\n });\n\n // Only attach submit event if we are not in display mode\n if (!!this.isEditable) {\n host.attachSubmit((e: sap.ui.base.Event) => {\n const payload = e.getParameter(\"payload\");\n parentModel.setProperty(updatePath, payload);\n\n // CRITICAL: Notify the parent Engine that this field mutated\n // so it can trigger LiveUpdate syncs and validate!\n if (this.onChange) {\n this.onChange(true, propKey);\n }\n });\n }\n\n const buttonText = field.ui?.dialogButtonText || (!this.isEditable ? \"Close\" : \"OK\");\n host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);\n });\n }\n });\n \n return this.control as Control;\n }\n\n /**\n * Read-only component for the engine, returns null.\n */\n protected getValue(): unknown {\n return null;\n }\n\n /**\n * Read-only component, no dynamic state handling needed for the button itself.\n */\n protected applyState(): void {\n // dynamic state changes\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAMZ,MAAMC,WAAW,SAASF,UAAU,CAAC;IACxC;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWG,MAAMA,CAACC,KAAwB,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MAClL,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACC,QAAQ,GAAGL,KAAK;MACrB,MAAMM,OAAO,GAAGL,WAAW,CAACM,UAAU,CAAC,GAAG,CAAC,GAAGN,WAAW,CAACO,SAAS,CAAC,CAAC,CAAC,GAAGP,WAAW;MAEpF,MAAMQ,SAAkB,GAAG;QACvBC,IAAI,EAAE,OAAO;QACbC,KAAK,EAAEX,KAAK,CAACY,EAAE,EAAEC,KAAK,IAAIP,OAAO;QACjCQ,KAAK,EAAEd,KAAK,CAACc,KAAK,IAAI;UAClBJ,IAAI,EAAE,QAAQ;UACdK,UAAU,EAAE,CAAC,CAAC,CAAC;QACnB;MACJ,CAAC;MAED,IAAIf,KAAK,CAACgB,QAAQ,EAAE;QAChBP,SAAS,CAACO,QAAQ,GAAGhB,KAAK,CAACgB,QAAQ;MACvC;MAEA,IAAI,CAACC,OAAO,GAAG,IAAIC,MAAM,CAAC;QACtBC,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACjB,aAAa,EAAEF,WAAW,CAAC;QACrDoB,IAAI,EAAE,CAAC,IAAI,CAACC,UAAU,GAAG,cAAc,GAAG,cAAc;QACxDC,IAAI,EAAE,CAAC,IAAI,CAACD,UAAU,GAAG,oBAAoB,GAAG,iBAAiB;QACjEE,KAAK,EAAGC,MAAyB,IAAK;UAClC,MAAMC,GAAG,GAAGD,MAAM,CAACE,SAAS,CAAC,CAAW;UACxC,MAAMC,WAAW,GAAGF,GAAG,CAACG,QAAQ,CAAC3B,SAAS,CAAc;UACxD,IAAI,CAAC0B,WAAW,EAAE;UAElB,MAAME,cAAc,GAAGJ,GAAG,CAACK,iBAAiB,CAAC7B,SAAS,CAAC;UACvD,IAAI8B,UAAU,GAAG/B,WAAW;UAC5B,IAAI6B,cAAc,IAAI,CAAC7B,WAAW,CAACM,UAAU,CAAC,GAAG,CAAC,EAAE;YAChD,MAAM0B,OAAO,GAAGH,cAAc,CAACI,OAAO,CAAC,CAAC;YACxCF,UAAU,GAAGC,OAAO,CAACE,QAAQ,CAAC,GAAG,CAAC,GAAGF,OAAO,GAAGhC,WAAW,GAAIgC,OAAO,KAAK,GAAG,GAAG,GAAG,GAAGhC,WAAW,GAAGgC,OAAO,GAAG,GAAG,GAAGhC,WAAY;UACpI;;UAEA;UACA,MAAMmC,UAAU,GAAGC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,SAAS,CAACX,WAAW,CAACY,WAAW,CAACR,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"ArrayPlugin-dbg.js","names":["BasePlugin","___BasePlugin","ArrayPlugin","render","field","bindingPath","modelName","engineScopeId","onChange","metadata","propKey","startsWith","substring","subSchema","type","title","ui","label","items","properties","uiLayout","control","Button","id","generateStableId","text","isEditable","icon","press","oEvent","btn","getSource","parentModel","getModel","bindingContext","getBindingContext","updatePath","ctxPath","getPath","endsWith","nestedData","JSON","parse","stringify","getProperty","parent","getParent","parentHost","getMetadata","getName","schemaDefs","sap","require","DynamicHost","host","schemaDefinition","schemaDefinitions","data","editable","attachSubmit","e","payload","getParameter","setProperty","buttonText","dialogButtonText","openInDialog","getValue","applyState","__exports","__esModule"],"sources":["ArrayPlugin.ts"],"sourcesContent":["/**\n * @file ArrayPlugin.ts\n * @description Renders a button that drills down into a nested table (array) via a recursive Dialog using v2 schema.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport Button from \"sap/m/Button\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nexport class ArrayPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Button` to open a nested array form dialog.\n * \n * @param field The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured Button control.\n */\n public render(field: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = field;\n const propKey = bindingPath.startsWith(\"/\") ? bindingPath.substring(1) : bindingPath;\n \n const subSchema: ISchema = {\n type: \"array\",\n title: field.ui?.label || propKey,\n items: field.items || {\n type: \"object\",\n properties: {} // inference will handle it if empty\n }\n };\n\n if (field.uiLayout) {\n subSchema.uiLayout = field.uiLayout;\n }\n\n this.control = new Button({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: !this.isEditable ? \"View Records\" : \"Edit Records\",\n icon: !this.isEditable ? \"sap-icon://display\" : \"sap-icon://list\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const parentModel = btn.getModel(modelName) as JSONModel;\n if (!parentModel) return;\n \n const bindingContext = btn.getBindingContext(modelName);\n let updatePath = bindingPath;\n if (bindingContext && !bindingPath.startsWith(\"/\")) {\n const ctxPath = bindingContext.getPath();\n updatePath = ctxPath.endsWith(\"/\") ? ctxPath + bindingPath : (ctxPath === \"/\" ? \"/\" + bindingPath : ctxPath + \"/\" + bindingPath);\n }\n \n // Deep clone to prevent live-mutations on the parent model before 'Submit' is clicked\n const nestedData = JSON.parse(JSON.stringify(parentModel.getProperty(updatePath) || []));\n\n let parent = btn.getParent();\n let parentHost = null;\n while (parent) {\n if (parent.getMetadata().getName() === \"nz.co.siliconst.ui5.metaui.controls.host.GeneratorHost\" || \n parent.getMetadata().getName() === \"nz.co.siliconst.ui5.metaui.controls.DynamicHost\") {\n parentHost = parent as any;\n break;\n }\n parent = parent.getParent();\n }\n const schemaDefs = parentHost ? parentHost.getProperty(\"schemaDefinitions\") : null;\n\n sap.ui.require([\"nz/co/siliconst/ui5/metaui/controls/DynamicHost\"], (DynamicHost: typeof import(\"../../controls/DynamicHost\").default) => {\n const host = new DynamicHost({\n schemaDefinition: subSchema,\n schemaDefinitions: schemaDefs,\n data: nestedData,\n editable: this.isEditable // Pass the display mode down to the child Engine!\n });\n\n // Only attach submit event if we are not in display mode\n if (!!this.isEditable) {\n host.attachSubmit((e: sap.ui.base.Event) => {\n const payload = e.getParameter(\"payload\");\n parentModel.setProperty(updatePath, payload);\n\n // CRITICAL: Notify the parent Engine that this field mutated\n // so it can trigger LiveUpdate syncs and validate!\n if (this.onChange) {\n this.onChange(true, propKey);\n }\n });\n }\n\n const buttonText = field.ui?.dialogButtonText || (!this.isEditable ? \"Close\" : \"OK\");\n host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);\n });\n }\n });\n \n return this.control as Control;\n }\n\n /**\n * Read-only component for the engine, returns null.\n */\n protected getValue(): unknown {\n return null;\n }\n\n /**\n * Read-only component, no dynamic state handling needed for the button itself.\n */\n protected applyState(): void {\n // dynamic state changes\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,yDAAyD,CAAC;IACzE;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAClF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAI1C,MAAa,WAAY,SAAQ,UAAU;QACvC;;;;;;;;;WASG;QACI,MAAM,CAAC,KAAK,EAAE,iBAAiB,EAAG,WAAW,EAAE,MAAM,EAAG,SAAS,GAAE,MAAe,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"ArrayPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,yDAAyD,CAAC;IACzE;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAClF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAI1C,MAAa,WAAY,SAAQ,UAAU;QACvC;;;;;;;;;WASG;QACI,MAAM,CAAC,KAAK,EAAE,iBAAiB,EAAG,WAAW,EAAE,MAAM,EAAG,SAAS,GAAE,MAAe,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO;QAgFrL;;WAEG;QACH,SAAS,CAAC,QAAQ,IAAI,OAAO;QAI7B;;WAEG;QACH,SAAS,CAAC,UAAU,IAAI,IAAI;KAG/B;CAEA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
sap.ui.define(["./BasePlugin","sap/m/Button"],function(t,e){"use strict";const i=t["BasePlugin"];class s extends i{render(t,i,s="meta",n,a){this.onChange=a;this.metadata=t;const o=i.startsWith("/")?i.substring(1):i;const r={type:"array",title:t.ui?.label||o,items:t.items||{type:"object",properties:{}}};if(t.uiLayout){r.uiLayout=t.uiLayout}this.control=new e({id:this.generateStableId(n,i),text:!this.isEditable?"View Records":"Edit Records",icon:!this.isEditable?"sap-icon://display":"sap-icon://list",press:e=>{const n=e.getSource();const a=n.getModel(s);if(!a)return;const l=n.getBindingContext(s);let
|
|
1
|
+
sap.ui.define(["./BasePlugin","sap/m/Button"],function(t,e){"use strict";const i=t["BasePlugin"];class s extends i{render(t,i,s="meta",n,a){this.onChange=a;this.metadata=t;const o=i.startsWith("/")?i.substring(1):i;const r={type:"array",title:t.ui?.label||o,items:t.items||{type:"object",properties:{}}};if(t.uiLayout){r.uiLayout=t.uiLayout}this.control=new e({id:this.generateStableId(n,i),text:!this.isEditable?"View Records":"Edit Records",icon:!this.isEditable?"sap-icon://display":"sap-icon://list",press:e=>{const n=e.getSource();const a=n.getModel(s);if(!a)return;const l=n.getBindingContext(s);let c=i;if(l&&!i.startsWith("/")){const t=l.getPath();c=t.endsWith("/")?t+i:t==="/"?"/"+i:t+"/"+i}const u=JSON.parse(JSON.stringify(a.getProperty(c)||[]));let d=n.getParent();let g=null;while(d){if(d.getMetadata().getName()==="nz.co.siliconst.ui5.metaui.controls.host.GeneratorHost"||d.getMetadata().getName()==="nz.co.siliconst.ui5.metaui.controls.DynamicHost"){g=d;break}d=d.getParent()}const h=g?g.getProperty("schemaDefinitions"):null;sap.ui.require(["nz/co/siliconst/ui5/metaui/controls/DynamicHost"],e=>{const i=new e({schemaDefinition:r,schemaDefinitions:h,data:u,editable:this.isEditable});if(!!this.isEditable){i.attachSubmit(t=>{const e=t.getParameter("payload");a.setProperty(c,e);if(this.onChange){this.onChange(true,o)}})}const s=t.ui?.dialogButtonText||(!this.isEditable?"Close":"OK");i.openInDialog(`Nested Records: ${t.ui?.label||o}`,s)})}});return this.control}getValue(){return null}applyState(){}}var n={__esModule:true};n.ArrayPlugin=s;return n});
|
|
2
2
|
//# sourceMappingURL=ArrayPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayPlugin.js","names":["BasePlugin","___BasePlugin","ArrayPlugin","render","field","bindingPath","modelName","engineScopeId","onChange","this","metadata","propKey","startsWith","substring","subSchema","type","title","ui","label","items","properties","uiLayout","control","Button","id","generateStableId","text","isEditable","icon","press","oEvent","btn","getSource","parentModel","getModel","bindingContext","getBindingContext","updatePath","ctxPath","getPath","endsWith","nestedData","JSON","parse","stringify","getProperty","sap","require","DynamicHost","host","schemaDefinition","data","editable","attachSubmit","e","payload","getParameter","setProperty","buttonText","dialogButtonText","openInDialog","getValue","applyState","__exports","__esModule"],"sources":["ArrayPlugin.ts"],"sourcesContent":["/**\n * @file ArrayPlugin.ts\n * @description Renders a button that drills down into a nested table (array) via a recursive Dialog using v2 schema.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport Button from \"sap/m/Button\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nexport class ArrayPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Button` to open a nested array form dialog.\n * \n * @param field The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured Button control.\n */\n public render(field: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = field;\n const propKey = bindingPath.startsWith(\"/\") ? bindingPath.substring(1) : bindingPath;\n \n const subSchema: ISchema = {\n type: \"array\",\n title: field.ui?.label || propKey,\n items: field.items || {\n type: \"object\",\n properties: {} // inference will handle it if empty\n }\n };\n\n if (field.uiLayout) {\n subSchema.uiLayout = field.uiLayout;\n }\n\n this.control = new Button({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: !this.isEditable ? \"View Records\" : \"Edit Records\",\n icon: !this.isEditable ? \"sap-icon://display\" : \"sap-icon://list\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const parentModel = btn.getModel(modelName) as JSONModel;\n if (!parentModel) return;\n \n const bindingContext = btn.getBindingContext(modelName);\n let updatePath = bindingPath;\n if (bindingContext && !bindingPath.startsWith(\"/\")) {\n const ctxPath = bindingContext.getPath();\n updatePath = ctxPath.endsWith(\"/\") ? ctxPath + bindingPath : (ctxPath === \"/\" ? \"/\" + bindingPath : ctxPath + \"/\" + bindingPath);\n }\n \n // Deep clone to prevent live-mutations on the parent model before 'Submit' is clicked\n const nestedData = JSON.parse(JSON.stringify(parentModel.getProperty(updatePath) || []));\n\n sap.ui.require([\"nz/co/siliconst/ui5/metaui/controls/DynamicHost\"], (DynamicHost: typeof import(\"../../controls/DynamicHost\").default) => {\n const host = new DynamicHost({\n schemaDefinition: subSchema,\n data: nestedData,\n editable: this.isEditable // Pass the display mode down to the child Engine!\n });\n\n // Only attach submit event if we are not in display mode\n if (!!this.isEditable) {\n host.attachSubmit((e: sap.ui.base.Event) => {\n const payload = e.getParameter(\"payload\");\n parentModel.setProperty(updatePath, payload);\n\n // CRITICAL: Notify the parent Engine that this field mutated\n // so it can trigger LiveUpdate syncs and validate!\n if (this.onChange) {\n this.onChange(true, propKey);\n }\n });\n }\n\n const buttonText = field.ui?.dialogButtonText || (!this.isEditable ? \"Close\" : \"OK\");\n host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);\n });\n }\n });\n \n return this.control as Control;\n }\n\n /**\n * Read-only component for the engine, returns null.\n */\n protected getValue(): unknown {\n return null;\n }\n\n /**\n * Read-only component, no dynamic state handling needed for the button itself.\n */\n protected applyState(): void {\n // dynamic state changes\n }\n}\n"],"mappings":"yEAAA,MAKSA,EAAUC,EAAA,cAMZ,MAAMC,UAAoBF,EAWtBG,OAAOC,EAA2BC,EAAsBC,EAAoB,OAAQC,EAAwBC,GAC/GC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAChB,MAAMO,EAAUN,EAAYO,WAAW,KAAOP,EAAYQ,UAAU,GAAKR,EAEzE,MAAMS,EAAqB,CACvBC,KAAM,QACNC,MAAOZ,EAAMa,IAAIC,OAASP,EAC1BQ,MAAOf,EAAMe,OAAS,CAClBJ,KAAM,SACNK,WAAY,CAAC,IAIrB,GAAIhB,EAAMiB,SAAU,CAChBP,EAAUO,SAAWjB,EAAMiB,QAC/B,CAEAZ,KAAKa,QAAU,IAAIC,EAAO,CACtBC,GAAIf,KAAKgB,iBAAiBlB,EAAeF,GACzCqB,MAAOjB,KAAKkB,WAAa,eAAiB,eAC1CC,MAAOnB,KAAKkB,WAAa,qBAAuB,kBAChDE,MAAQC,IACJ,MAAMC,EAAMD,EAAOE,YACnB,MAAMC,EAAcF,EAAIG,SAAS5B,GACjC,IAAK2B,EAAa,OAElB,MAAME,EAAiBJ,EAAIK,kBAAkB9B,GAC7C,IAAI+B,EAAahC,EACjB,GAAI8B,IAAmB9B,EAAYO,WAAW,KAAM,CAChD,MAAM0B,EAAUH,EAAeI,UAC/BF,EAAaC,EAAQE,SAAS,KAAOF,EAAUjC,EAAeiC,IAAY,IAAM,IAAMjC,EAAciC,EAAU,IAAMjC,CACxH,CAGA,MAAMoC,EAAaC,KAAKC,MAAMD,KAAKE,UAAUX,EAAYY,YAAYR,IAAe,
|
|
1
|
+
{"version":3,"file":"ArrayPlugin.js","names":["BasePlugin","___BasePlugin","ArrayPlugin","render","field","bindingPath","modelName","engineScopeId","onChange","this","metadata","propKey","startsWith","substring","subSchema","type","title","ui","label","items","properties","uiLayout","control","Button","id","generateStableId","text","isEditable","icon","press","oEvent","btn","getSource","parentModel","getModel","bindingContext","getBindingContext","updatePath","ctxPath","getPath","endsWith","nestedData","JSON","parse","stringify","getProperty","parent","getParent","parentHost","getMetadata","getName","schemaDefs","sap","require","DynamicHost","host","schemaDefinition","schemaDefinitions","data","editable","attachSubmit","e","payload","getParameter","setProperty","buttonText","dialogButtonText","openInDialog","getValue","applyState","__exports","__esModule"],"sources":["ArrayPlugin.ts"],"sourcesContent":["/**\n * @file ArrayPlugin.ts\n * @description Renders a button that drills down into a nested table (array) via a recursive Dialog using v2 schema.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport Button from \"sap/m/Button\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nexport class ArrayPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Button` to open a nested array form dialog.\n * \n * @param field The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured Button control.\n */\n public render(field: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = field;\n const propKey = bindingPath.startsWith(\"/\") ? bindingPath.substring(1) : bindingPath;\n \n const subSchema: ISchema = {\n type: \"array\",\n title: field.ui?.label || propKey,\n items: field.items || {\n type: \"object\",\n properties: {} // inference will handle it if empty\n }\n };\n\n if (field.uiLayout) {\n subSchema.uiLayout = field.uiLayout;\n }\n\n this.control = new Button({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: !this.isEditable ? \"View Records\" : \"Edit Records\",\n icon: !this.isEditable ? \"sap-icon://display\" : \"sap-icon://list\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const parentModel = btn.getModel(modelName) as JSONModel;\n if (!parentModel) return;\n \n const bindingContext = btn.getBindingContext(modelName);\n let updatePath = bindingPath;\n if (bindingContext && !bindingPath.startsWith(\"/\")) {\n const ctxPath = bindingContext.getPath();\n updatePath = ctxPath.endsWith(\"/\") ? ctxPath + bindingPath : (ctxPath === \"/\" ? \"/\" + bindingPath : ctxPath + \"/\" + bindingPath);\n }\n \n // Deep clone to prevent live-mutations on the parent model before 'Submit' is clicked\n const nestedData = JSON.parse(JSON.stringify(parentModel.getProperty(updatePath) || []));\n\n let parent = btn.getParent();\n let parentHost = null;\n while (parent) {\n if (parent.getMetadata().getName() === \"nz.co.siliconst.ui5.metaui.controls.host.GeneratorHost\" || \n parent.getMetadata().getName() === \"nz.co.siliconst.ui5.metaui.controls.DynamicHost\") {\n parentHost = parent as any;\n break;\n }\n parent = parent.getParent();\n }\n const schemaDefs = parentHost ? parentHost.getProperty(\"schemaDefinitions\") : null;\n\n sap.ui.require([\"nz/co/siliconst/ui5/metaui/controls/DynamicHost\"], (DynamicHost: typeof import(\"../../controls/DynamicHost\").default) => {\n const host = new DynamicHost({\n schemaDefinition: subSchema,\n schemaDefinitions: schemaDefs,\n data: nestedData,\n editable: this.isEditable // Pass the display mode down to the child Engine!\n });\n\n // Only attach submit event if we are not in display mode\n if (!!this.isEditable) {\n host.attachSubmit((e: sap.ui.base.Event) => {\n const payload = e.getParameter(\"payload\");\n parentModel.setProperty(updatePath, payload);\n\n // CRITICAL: Notify the parent Engine that this field mutated\n // so it can trigger LiveUpdate syncs and validate!\n if (this.onChange) {\n this.onChange(true, propKey);\n }\n });\n }\n\n const buttonText = field.ui?.dialogButtonText || (!this.isEditable ? \"Close\" : \"OK\");\n host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);\n });\n }\n });\n \n return this.control as Control;\n }\n\n /**\n * Read-only component for the engine, returns null.\n */\n protected getValue(): unknown {\n return null;\n }\n\n /**\n * Read-only component, no dynamic state handling needed for the button itself.\n */\n protected applyState(): void {\n // dynamic state changes\n }\n}\n"],"mappings":"yEAAA,MAKSA,EAAUC,EAAA,cAMZ,MAAMC,UAAoBF,EAWtBG,OAAOC,EAA2BC,EAAsBC,EAAoB,OAAQC,EAAwBC,GAC/GC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAChB,MAAMO,EAAUN,EAAYO,WAAW,KAAOP,EAAYQ,UAAU,GAAKR,EAEzE,MAAMS,EAAqB,CACvBC,KAAM,QACNC,MAAOZ,EAAMa,IAAIC,OAASP,EAC1BQ,MAAOf,EAAMe,OAAS,CAClBJ,KAAM,SACNK,WAAY,CAAC,IAIrB,GAAIhB,EAAMiB,SAAU,CAChBP,EAAUO,SAAWjB,EAAMiB,QAC/B,CAEAZ,KAAKa,QAAU,IAAIC,EAAO,CACtBC,GAAIf,KAAKgB,iBAAiBlB,EAAeF,GACzCqB,MAAOjB,KAAKkB,WAAa,eAAiB,eAC1CC,MAAOnB,KAAKkB,WAAa,qBAAuB,kBAChDE,MAAQC,IACJ,MAAMC,EAAMD,EAAOE,YACnB,MAAMC,EAAcF,EAAIG,SAAS5B,GACjC,IAAK2B,EAAa,OAElB,MAAME,EAAiBJ,EAAIK,kBAAkB9B,GAC7C,IAAI+B,EAAahC,EACjB,GAAI8B,IAAmB9B,EAAYO,WAAW,KAAM,CAChD,MAAM0B,EAAUH,EAAeI,UAC/BF,EAAaC,EAAQE,SAAS,KAAOF,EAAUjC,EAAeiC,IAAY,IAAM,IAAMjC,EAAciC,EAAU,IAAMjC,CACxH,CAGA,MAAMoC,EAAaC,KAAKC,MAAMD,KAAKE,UAAUX,EAAYY,YAAYR,IAAe,KAEpF,IAAIS,EAASf,EAAIgB,YACjB,IAAIC,EAAa,KACjB,MAAOF,EAAQ,CACX,GAAIA,EAAOG,cAAcC,YAAc,0DACnCJ,EAAOG,cAAcC,YAAc,kDAAmD,CACtFF,EAAaF,EACb,KACJ,CACAA,EAASA,EAAOC,WACpB,CACA,MAAMI,EAAaH,EAAaA,EAAWH,YAAY,qBAAuB,KAE9EO,IAAInC,GAAGoC,QAAQ,CAAC,mDAAqDC,IACjE,MAAMC,EAAO,IAAID,EAAY,CACzBE,iBAAkB1C,EAClB2C,kBAAmBN,EACnBO,KAAMjB,EACNkB,SAAUlD,KAAKkB,aAInB,KAAMlB,KAAKkB,WAAY,CACnB4B,EAAKK,aAAcC,IACf,MAAMC,EAAUD,EAAEE,aAAa,WAC/B9B,EAAY+B,YAAY3B,EAAYyB,GAIpC,GAAIrD,KAAKD,SAAU,CACfC,KAAKD,SAAS,KAAMG,EACxB,GAER,CAEA,MAAMsD,EAAa7D,EAAMa,IAAIiD,oBAAsBzD,KAAKkB,WAAa,QAAU,MAC/E4B,EAAKY,aAAa,mBAAmB/D,EAAMa,IAAIC,OAASP,IAAWsD,QAK/E,OAAOxD,KAAKa,OAChB,CAKU8C,WACN,OAAO,IACX,CAKUC,aACN,EAEP,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAApE,cAAA,OAAAoE,CAAA","ignoreList":[]}
|
|
@@ -57,9 +57,22 @@ export class ArrayPlugin extends BasePlugin {
|
|
|
57
57
|
// Deep clone to prevent live-mutations on the parent model before 'Submit' is clicked
|
|
58
58
|
const nestedData = JSON.parse(JSON.stringify(parentModel.getProperty(updatePath) || []));
|
|
59
59
|
|
|
60
|
+
let parent = btn.getParent();
|
|
61
|
+
let parentHost = null;
|
|
62
|
+
while (parent) {
|
|
63
|
+
if (parent.getMetadata().getName() === "nz.co.siliconst.ui5.metaui.controls.host.GeneratorHost" ||
|
|
64
|
+
parent.getMetadata().getName() === "nz.co.siliconst.ui5.metaui.controls.DynamicHost") {
|
|
65
|
+
parentHost = parent as any;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
parent = parent.getParent();
|
|
69
|
+
}
|
|
70
|
+
const schemaDefs = parentHost ? parentHost.getProperty("schemaDefinitions") : null;
|
|
71
|
+
|
|
60
72
|
sap.ui.require(["nz/co/siliconst/ui5/metaui/controls/DynamicHost"], (DynamicHost: typeof import("../../controls/DynamicHost").default) => {
|
|
61
73
|
const host = new DynamicHost({
|
|
62
74
|
schemaDefinition: subSchema,
|
|
75
|
+
schemaDefinitions: schemaDefs,
|
|
63
76
|
data: nestedData,
|
|
64
77
|
editable: this.isEditable // Pass the display mode down to the child Engine!
|
|
65
78
|
});
|
|
@@ -21,14 +21,14 @@ sap.ui.define(["../controls/BasePlugin", "sap/m/HBox", "sap/m/Input", "sap/ndc/B
|
|
|
21
21
|
if (!this.isEditable) {
|
|
22
22
|
this.control = new TextControl({
|
|
23
23
|
id: this.generateStableId(engineScopeId, bindingPath),
|
|
24
|
-
text:
|
|
24
|
+
text: this.generateBindingInfo(bindingPath, modelName)
|
|
25
25
|
});
|
|
26
26
|
this.applyCommonDirectives(this.control, metadata, modelName);
|
|
27
27
|
return this.control;
|
|
28
28
|
}
|
|
29
29
|
this.inputControl = new Input({
|
|
30
30
|
id: this.generateStableId(engineScopeId, bindingPath + "-input"),
|
|
31
|
-
value:
|
|
31
|
+
value: this.generateBindingInfo(bindingPath, modelName),
|
|
32
32
|
editable: !metadata.ui?.readOnly,
|
|
33
33
|
width: "100%",
|
|
34
34
|
change: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarcodeScannerPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","applyCommonDirectives","inputControl","Input","value","editable","ui","readOnly","width","change","result","validateAndApplyVisualState","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","HBox","items","addStyleClass","getValue","applyState","setEditable","__exports","__esModule"],"sources":["BarcodeScannerPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport HBox from \"sap/m/HBox\";\nimport Input from \"sap/m/Input\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\nimport TextControl from \"sap/m/Text\";\n\nexport class BarcodeScannerPlugin extends BasePlugin {\n private inputControl!: Input;\n\n /**\n * Renders a `BarcodeScannerButton` alongside an `Input`.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured HBox control.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text:
|
|
1
|
+
{"version":3,"file":"BarcodeScannerPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","generateBindingInfo","applyCommonDirectives","inputControl","Input","value","editable","ui","readOnly","width","change","result","validateAndApplyVisualState","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","HBox","items","addStyleClass","getValue","applyState","setEditable","__exports","__esModule"],"sources":["BarcodeScannerPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport HBox from \"sap/m/HBox\";\nimport Input from \"sap/m/Input\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\nimport TextControl from \"sap/m/Text\";\n\nexport class BarcodeScannerPlugin extends BasePlugin {\n private inputControl!: Input;\n\n /**\n * Renders a `BarcodeScannerButton` alongside an `Input`.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured HBox control.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: this.generateBindingInfo(bindingPath, modelName)\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.inputControl = new Input({\n id: this.generateStableId(engineScopeId, bindingPath + \"-input\"),\n value: this.generateBindingInfo(bindingPath, modelName),\n editable: !metadata.ui?.readOnly,\n width: \"100%\",\n change: () => {\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n \n const scannerBtn = new BarcodeScannerButton({\n id: this.generateStableId(engineScopeId, bindingPath + \"-btn\"),\n scanSuccess: (oEvent: sap.ui.base.Event) => {\n const text = oEvent.getParameter(\"text\") as string;\n if (text) {\n this.inputControl.setValue(text);\n // UI5's two-way data binding on the input will sync the model automatically\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n }\n });\n\n this.control = new HBox({\n id: this.generateStableId(engineScopeId, bindingPath),\n items: [this.inputControl, scannerBtn],\n width: \"100%\"\n }).addStyleClass(\"sapUiSmallMarginBottom\");\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current scanned text.\n * @returns {unknown} The barcode string.\n */\n protected getValue(): unknown {\n return this.inputControl ? this.inputControl.getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.inputControl && this.metadata) {\n if (!this.isEditable) return;\n this.inputControl.setEditable(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;QAASA,UAAU,GAAAC,sBAAA;EASZ,MAAMC,oBAAoB,SAASF,UAAU,CAAC;IAGjD;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWG,MAAMA,CAACC,QAA2B,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MACrL,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACJ,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACK,QAAQ,GAAGJ,WAAW,CAACK,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;MAC5C,IAAI,CAACJ,SAAS,GAAGA,SAAS;MAE1B,IAAI,CAAC,IAAI,CAACK,UAAU,EAAE;QAElB,IAAI,CAACC,OAAO,GAAG,IAAIC,WAAW,CAAC;UAC3BC,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACR,aAAa,EAAEF,WAAW,CAAC;UACrDW,IAAI,EAAE,IAAI,CAACC,mBAAmB,CAACZ,WAAW,EAAEC,SAAS;QACzD,CAAC,CAAC;QACF,IAAI,CAACY,qBAAqB,CAAC,IAAI,CAACN,OAAO,EAAER,QAAQ,EAAEE,SAAS,CAAC;QAC7D,OAAO,IAAI,CAACM,OAAO;MACvB;MAEA,IAAI,CAACO,YAAY,GAAG,IAAIC,KAAK,CAAC;QAC1BN,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACR,aAAa,EAAEF,WAAW,GAAG,QAAQ,CAAC;QAChEgB,KAAK,EAAE,IAAI,CAACJ,mBAAmB,CAACZ,WAAW,EAAEC,SAAS,CAAC;QACvDgB,QAAQ,EAAE,CAAClB,QAAQ,CAACmB,EAAE,EAAEC,QAAQ;QAChCC,KAAK,EAAE,MAAM;QACbC,MAAM,EAAEA,CAAA,KAAM;UACV,MAAMC,MAAM,GAAG,IAAI,CAACC,2BAA2B,CAAC,CAAC;UACjD,IAAI,IAAI,CAACpB,QAAQ,EAAE;YACf,IAAI,CAACA,QAAQ,CAACmB,MAAM,CAACE,OAAO,EAAE,IAAI,CAACpB,QAAQ,CAAC;UAChD;QACJ;MACJ,CAAC,CAAC;MAEF,MAAMqB,UAAU,GAAG,IAAIC,oBAAoB,CAAC;QACxCjB,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACR,aAAa,EAAEF,WAAW,GAAG,MAAM,CAAC;QAC9D2B,WAAW,EAAGC,MAAyB,IAAK;UACxC,MAAMjB,IAAI,GAAGiB,MAAM,CAACC,YAAY,CAAC,MAAM,CAAW;UAClD,IAAIlB,IAAI,EAAE;YACN,IAAI,CAACG,YAAY,CAACgB,QAAQ,CAACnB,IAAI,CAAC;YAChC;YACA,MAAMW,MAAM,GAAG,IAAI,CAACC,2BAA2B,CAAC,CAAC;YACjD,IAAI,IAAI,CAACpB,QAAQ,EAAE;cACf,IAAI,CAACA,QAAQ,CAACmB,MAAM,CAACE,OAAO,EAAE,IAAI,CAACpB,QAAQ,CAAC;YAChD;UACJ;QACJ;MACJ,CAAC,CAAC;MAEF,IAAI,CAACG,OAAO,GAAG,IAAIwB,IAAI,CAAC;QACpBtB,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACR,aAAa,EAAEF,WAAW,CAAC;QACrDgC,KAAK,EAAE,CAAC,IAAI,CAAClB,YAAY,EAAEW,UAAU,CAAC;QACtCL,KAAK,EAAE;MACX,CAAC,CAAC,CAACa,aAAa,CAAC,wBAAwB,CAAC;MAE1C,IAAI,CAACpB,qBAAqB,CAAC,IAAI,CAACN,OAAO,EAAER,QAAQ,EAAEE,SAAS,CAAC;MAE7D,OAAO,IAAI,CAACM,OAAO;IACvB;;IAEA;AACJ;AACA;AACA;IACc2B,QAAQA,CAAA,EAAY;MAC1B,OAAO,IAAI,CAACpB,YAAY,GAAG,IAAI,CAACA,YAAY,CAACoB,QAAQ,CAAC,CAAC,GAAG,IAAI;IAClE;;IAEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACrB,YAAY,IAAI,IAAI,CAACf,QAAQ,EAAE;QACpC,IAAI,CAAC,IAAI,CAACO,UAAU,EAAE;QACtB,IAAI,CAACQ,YAAY,CAACsB,WAAW,CAAC,CAAC,IAAI,CAACrC,QAAQ,CAACmB,EAAE,EAAEC,QAAQ,CAAC;MAC9D;IACJ;EACJ;EAAC,IAAAkB,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAxC,oBAAA,GAAAA,oBAAA;EAAA,OAAAwC,SAAA;AAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
sap.ui.define(["../controls/BasePlugin","sap/m/HBox","sap/m/Input","sap/ndc/BarcodeScannerButton","sap/m/Text"],function(t,e,i,n,a){"use strict";const s=t["BasePlugin"];class l extends s{render(t,s,l="meta",o,r){this.onChange=r;this.metadata=t;this.fieldKey=s.replace("/","");this.modelName=l;if(!this.isEditable){this.control=new a({id:this.generateStableId(o,s),text
|
|
1
|
+
sap.ui.define(["../controls/BasePlugin","sap/m/HBox","sap/m/Input","sap/ndc/BarcodeScannerButton","sap/m/Text"],function(t,e,i,n,a){"use strict";const s=t["BasePlugin"];class l extends s{render(t,s,l="meta",o,r){this.onChange=r;this.metadata=t;this.fieldKey=s.replace("/","");this.modelName=l;if(!this.isEditable){this.control=new a({id:this.generateStableId(o,s),text:this.generateBindingInfo(s,l)});this.applyCommonDirectives(this.control,t,l);return this.control}this.inputControl=new i({id:this.generateStableId(o,s+"-input"),value:this.generateBindingInfo(s,l),editable:!t.ui?.readOnly,width:"100%",change:()=>{const t=this.validateAndApplyVisualState();if(this.onChange){this.onChange(t.isValid,this.fieldKey)}}});const h=new n({id:this.generateStableId(o,s+"-btn"),scanSuccess:t=>{const e=t.getParameter("text");if(e){this.inputControl.setValue(e);const t=this.validateAndApplyVisualState();if(this.onChange){this.onChange(t.isValid,this.fieldKey)}}}});this.control=new e({id:this.generateStableId(o,s),items:[this.inputControl,h],width:"100%"}).addStyleClass("sapUiSmallMarginBottom");this.applyCommonDirectives(this.control,t,l);return this.control}getValue(){return this.inputControl?this.inputControl.getValue():null}applyState(){if(this.inputControl&&this.metadata){if(!this.isEditable)return;this.inputControl.setEditable(!this.metadata.ui?.readOnly)}}}var o={__esModule:true};o.BarcodeScannerPlugin=l;return o});
|
|
2
2
|
//# sourceMappingURL=BarcodeScannerPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarcodeScannerPlugin.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","applyCommonDirectives","inputControl","Input","value","editable","ui","readOnly","width","change","result","validateAndApplyVisualState","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","HBox","items","addStyleClass","getValue","applyState","setEditable","__exports","__esModule"],"sources":["BarcodeScannerPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport HBox from \"sap/m/HBox\";\nimport Input from \"sap/m/Input\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\nimport TextControl from \"sap/m/Text\";\n\nexport class BarcodeScannerPlugin extends BasePlugin {\n private inputControl!: Input;\n\n /**\n * Renders a `BarcodeScannerButton` alongside an `Input`.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured HBox control.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text:
|
|
1
|
+
{"version":3,"file":"BarcodeScannerPlugin.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","generateBindingInfo","applyCommonDirectives","inputControl","Input","value","editable","ui","readOnly","width","change","result","validateAndApplyVisualState","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","HBox","items","addStyleClass","getValue","applyState","setEditable","__exports","__esModule"],"sources":["BarcodeScannerPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport HBox from \"sap/m/HBox\";\nimport Input from \"sap/m/Input\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\nimport TextControl from \"sap/m/Text\";\n\nexport class BarcodeScannerPlugin extends BasePlugin {\n private inputControl!: Input;\n\n /**\n * Renders a `BarcodeScannerButton` alongside an `Input`.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured HBox control.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: this.generateBindingInfo(bindingPath, modelName)\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.inputControl = new Input({\n id: this.generateStableId(engineScopeId, bindingPath + \"-input\"),\n value: this.generateBindingInfo(bindingPath, modelName),\n editable: !metadata.ui?.readOnly,\n width: \"100%\",\n change: () => {\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n \n const scannerBtn = new BarcodeScannerButton({\n id: this.generateStableId(engineScopeId, bindingPath + \"-btn\"),\n scanSuccess: (oEvent: sap.ui.base.Event) => {\n const text = oEvent.getParameter(\"text\") as string;\n if (text) {\n this.inputControl.setValue(text);\n // UI5's two-way data binding on the input will sync the model automatically\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n }\n });\n\n this.control = new HBox({\n id: this.generateStableId(engineScopeId, bindingPath),\n items: [this.inputControl, scannerBtn],\n width: \"100%\"\n }).addStyleClass(\"sapUiSmallMarginBottom\");\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current scanned text.\n * @returns {unknown} The barcode string.\n */\n protected getValue(): unknown {\n return this.inputControl ? this.inputControl.getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.inputControl && this.metadata) {\n if (!this.isEditable) return;\n this.inputControl.setEditable(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"uJAASA,EAAUC,EAAA,cASZ,MAAMC,UAA6BF,EAa/BG,OAAOC,EAA8BC,EAAsBC,EAAoB,OAAQC,EAAwBC,GAClHC,KAAKD,SAAWA,EAChBC,KAAKL,SAAWA,EAChBK,KAAKC,SAAWL,EAAYM,QAAQ,IAAK,IACzCF,KAAKH,UAAYA,EAEjB,IAAKG,KAAKG,WAAY,CAElBH,KAAKI,QAAU,IAAIC,EAAY,CAC3BC,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCY,KAAMR,KAAKS,oBAAoBb,EAAaC,KAEhDG,KAAKU,sBAAsBV,KAAKI,QAAST,EAAUE,GACnD,OAAOG,KAAKI,OAChB,CAEAJ,KAAKW,aAAe,IAAIC,EAAM,CAC1BN,GAAIN,KAAKO,iBAAiBT,EAAeF,EAAc,UACvDiB,MAAOb,KAAKS,oBAAoBb,EAAaC,GAC7CiB,UAAWnB,EAASoB,IAAIC,SACxBC,MAAO,OACPC,OAAQA,KACJ,MAAMC,EAASnB,KAAKoB,8BACpB,GAAIpB,KAAKD,SAAU,CACfC,KAAKD,SAASoB,EAAOE,QAASrB,KAAKC,SACvC,KAIR,MAAMqB,EAAa,IAAIC,EAAqB,CACxCjB,GAAIN,KAAKO,iBAAiBT,EAAeF,EAAc,QACvD4B,YAAcC,IACV,MAAMjB,EAAOiB,EAAOC,aAAa,QACjC,GAAIlB,EAAM,CACNR,KAAKW,aAAagB,SAASnB,GAE3B,MAAMW,EAASnB,KAAKoB,8BACpB,GAAIpB,KAAKD,SAAU,CACfC,KAAKD,SAASoB,EAAOE,QAASrB,KAAKC,SACvC,CACJ,KAIRD,KAAKI,QAAU,IAAIwB,EAAK,CACpBtB,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCiC,MAAO,CAAC7B,KAAKW,aAAcW,GAC3BL,MAAO,SACRa,cAAc,0BAEjB9B,KAAKU,sBAAsBV,KAAKI,QAAST,EAAUE,GAEnD,OAAOG,KAAKI,OAChB,CAMU2B,WACN,OAAO/B,KAAKW,aAAeX,KAAKW,aAAaoB,WAAa,IAC9D,CAKUC,aACN,GAAIhC,KAAKW,cAAgBX,KAAKL,SAAU,CACpC,IAAKK,KAAKG,WAAY,OACtBH,KAAKW,aAAasB,aAAajC,KAAKL,SAASoB,IAAIC,SACrD,CACJ,EACH,IAAAkB,EAAA,CAAAC,WAAA,MAAAD,EAAAzC,uBAAA,OAAAyC,CAAA","ignoreList":[]}
|