@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 @@
|
|
|
1
|
+
{"version":3,"file":"LinkPlugin-dbg.js","names":["BasePlugin","___BasePlugin","LinkPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","fieldKey","replace","isEditable","control","Link","id","generateStableId","text","generateBindingInfo","href","target","applyCommonDirectives","Input","value","type","maxLength","required","change","oEvent","result","validateAndApplyVisualState","isValid","getValue","getMetadata","getName","getHref","applyState","input","setEditable","ui","readOnly","setRequired","__exports","__esModule"],"sources":["LinkPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Link from \"sap/m/Link\";\nimport Input from \"sap/m/Input\";\nimport Control from \"sap/ui/core/Control\";\n\nexport class LinkPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n this.fieldKey = bindingPath.replace(\"/\", \"\");\n \n if (!this.isEditable) {\n this.control = new Link({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: this.generateBindingInfo(bindingPath, modelName),\n href: this.generateBindingInfo(bindingPath, modelName),\n target: \"_blank\"\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n // Editable mode: user needs to type a URL, so we use an Input configured for URLs\n this.control = new Input({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: this.generateBindingInfo(bindingPath, modelName),\n type: \"Url\",\n maxLength: fieldMetadata.maxLength || 0,\n required: !!fieldMetadata.required,\n change: (oEvent: sap.ui.base.Event) => {\n const result = this.validateAndApplyVisualState();\n if (this.onChange) this.onChange(result.isValid, this.fieldKey);\n }\n });\n \n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n \n protected getValue(): unknown {\n if (!this.control) return null;\n if (this.control.getMetadata().getName() === \"sap.m.Input\") {\n return (this.control as Input).getValue();\n }\n return (this.control as Link).getHref();\n }\n \n protected applyState(): void {\n if (!this.control || !this.metadata) return;\n if (this.control.getMetadata().getName() === \"sap.m.Input\") {\n const input = this.control as Input;\n input.setEditable(!this.metadata.ui?.readOnly);\n input.setRequired(!!this.metadata.required);\n }\n }\n}\n"],"mappings":";;;QAASA,UAAU,GAAAC,aAAA;EAMZ,MAAMC,UAAU,SAASF,UAAU,CAAC;IAChCG,MAAMA,CAACC,aAAgC,EAAEC,WAAmB,EAAEC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MACxL,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACC,QAAQ,GAAGL,aAAa;MAC7B,IAAI,CAACM,QAAQ,GAAGL,WAAW,CAACM,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;MAE5C,IAAI,CAAC,IAAI,CAACC,UAAU,EAAE;QAClB,IAAI,CAACC,OAAO,GAAG,IAAIC,IAAI,CAAC;UACpBC,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACT,aAAa,EAAEF,WAAW,CAAC;UACrDY,IAAI,EAAE,IAAI,CAACC,mBAAmB,CAACb,WAAW,EAAEC,SAAS,CAAC;UACtDa,IAAI,EAAE,IAAI,CAACD,mBAAmB,CAACb,WAAW,EAAEC,SAAS,CAAC;UACtDc,MAAM,EAAE;QACZ,CAAC,CAAC;QACF,IAAI,CAACC,qBAAqB,CAAC,IAAI,CAACR,OAAO,EAAET,aAAa,EAAEE,SAAS,CAAC;QAClE,OAAO,IAAI,CAACO,OAAO;MACvB;;MAEA;MACA,IAAI,CAACA,OAAO,GAAG,IAAIS,KAAK,CAAC;QACrBP,EAAE,E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AC8B,EAAE,EAAEC,QAAQ,CAAC;QAC9CH,KAAK,CAACI,WAAW,CAAC,CAAC,CAAC,IAAI,CAAChC,QAAQ,CAACiB,QAAQ,CAAC;MAC/C;IACJ;EACJ;EAAC,IAAAgB,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAxC,UAAA,GAAAA,UAAA;EAAA,OAAAwC,SAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare module "nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin" {
|
|
2
|
+
import { BasePlugin } from "nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin";
|
|
3
|
+
import { IPropertyMetadata } from "nz/co/siliconst/ui5/metaui/interfaces/ISchema";
|
|
4
|
+
import Control from "sap/ui/core/Control";
|
|
5
|
+
export class LinkPlugin extends BasePlugin {
|
|
6
|
+
render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;
|
|
7
|
+
protected getValue(): unknown;
|
|
8
|
+
protected applyState(): void;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=LinkPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,wDAAwD,CAAC;IACxE,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAGlF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAE1C,MAAa,UAAW,SAAQ,UAAU;QAC/B,MAAM,CAAC,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,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;QAiC3L,SAAS,CAAC,QAAQ,IAAI,OAAO;QAQ7B,SAAS,CAAC,UAAU,IAAI,IAAI;KAQ/B;CAEA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
sap.ui.define(["./BasePlugin","sap/m/Link","sap/m/Input"],function(t,e,i){"use strict";const n=t["BasePlugin"];class a extends n{render(t,n,a="meta",s,r){this.onChange=r;this.metadata=t;this.fieldKey=n.replace("/","");if(!this.isEditable){this.control=new e({id:this.generateStableId(s,n),text:this.generateBindingInfo(n,a),href:this.generateBindingInfo(n,a),target:"_blank"});this.applyCommonDirectives(this.control,t,a);return this.control}this.control=new i({id:this.generateStableId(s,n),value:this.generateBindingInfo(n,a),type:"Url",maxLength:t.maxLength||0,required:!!t.required,change:t=>{const e=this.validateAndApplyVisualState();if(this.onChange)this.onChange(e.isValid,this.fieldKey)}});this.applyCommonDirectives(this.control,t,a);return this.control}getValue(){if(!this.control)return null;if(this.control.getMetadata().getName()==="sap.m.Input"){return this.control.getValue()}return this.control.getHref()}applyState(){if(!this.control||!this.metadata)return;if(this.control.getMetadata().getName()==="sap.m.Input"){const t=this.control;t.setEditable(!this.metadata.ui?.readOnly);t.setRequired(!!this.metadata.required)}}}var s={__esModule:true};s.LinkPlugin=a;return s});
|
|
2
|
+
//# sourceMappingURL=LinkPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkPlugin.js","names":["BasePlugin","___BasePlugin","LinkPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","fieldKey","replace","isEditable","control","Link","id","generateStableId","text","generateBindingInfo","href","target","applyCommonDirectives","Input","value","type","maxLength","required","change","oEvent","result","validateAndApplyVisualState","isValid","getValue","getMetadata","getName","getHref","applyState","input","setEditable","ui","readOnly","setRequired","__exports","__esModule"],"sources":["LinkPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Link from \"sap/m/Link\";\nimport Input from \"sap/m/Input\";\nimport Control from \"sap/ui/core/Control\";\n\nexport class LinkPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n this.fieldKey = bindingPath.replace(\"/\", \"\");\n \n if (!this.isEditable) {\n this.control = new Link({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: this.generateBindingInfo(bindingPath, modelName),\n href: this.generateBindingInfo(bindingPath, modelName),\n target: \"_blank\"\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n // Editable mode: user needs to type a URL, so we use an Input configured for URLs\n this.control = new Input({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: this.generateBindingInfo(bindingPath, modelName),\n type: \"Url\",\n maxLength: fieldMetadata.maxLength || 0,\n required: !!fieldMetadata.required,\n change: (oEvent: sap.ui.base.Event) => {\n const result = this.validateAndApplyVisualState();\n if (this.onChange) this.onChange(result.isValid, this.fieldKey);\n }\n });\n \n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n \n protected getValue(): unknown {\n if (!this.control) return null;\n if (this.control.getMetadata().getName() === \"sap.m.Input\") {\n return (this.control as Input).getValue();\n }\n return (this.control as Link).getHref();\n }\n \n protected applyState(): void {\n if (!this.control || !this.metadata) return;\n if (this.control.getMetadata().getName() === \"sap.m.Input\") {\n const input = this.control as Input;\n input.setEditable(!this.metadata.ui?.readOnly);\n input.setRequired(!!this.metadata.required);\n }\n }\n}\n"],"mappings":"6FAASA,EAAUC,EAAA,cAMZ,MAAMC,UAAmBF,EACrBG,OAAOC,EAAkCC,EAAqBC,EAAoB,OA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
+
import { BasePlugin } from "./BasePlugin";
|
|
2
|
+
import { IPropertyMetadata } from "../../interfaces/ISchema";
|
|
3
|
+
import Link from "sap/m/Link";
|
|
4
|
+
import Input from "sap/m/Input";
|
|
5
|
+
import Control from "sap/ui/core/Control";
|
|
6
|
+
|
|
7
|
+
export class LinkPlugin extends BasePlugin {
|
|
8
|
+
public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = "meta", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {
|
|
9
|
+
this.onChange = onChange;
|
|
10
|
+
this.metadata = fieldMetadata;
|
|
11
|
+
this.fieldKey = bindingPath.replace("/", "");
|
|
12
|
+
|
|
13
|
+
if (!this.isEditable) {
|
|
14
|
+
this.control = new Link({
|
|
15
|
+
id: this.generateStableId(engineScopeId, bindingPath),
|
|
16
|
+
text: this.generateBindingInfo(bindingPath, modelName),
|
|
17
|
+
href: this.generateBindingInfo(bindingPath, modelName),
|
|
18
|
+
target: "_blank"
|
|
19
|
+
});
|
|
20
|
+
this.applyCommonDirectives(this.control, fieldMetadata, modelName);
|
|
21
|
+
return this.control as Control;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Editable mode: user needs to type a URL, so we use an Input configured for URLs
|
|
25
|
+
this.control = new Input({
|
|
26
|
+
id: this.generateStableId(engineScopeId, bindingPath),
|
|
27
|
+
value: this.generateBindingInfo(bindingPath, modelName),
|
|
28
|
+
type: "Url",
|
|
29
|
+
maxLength: fieldMetadata.maxLength || 0,
|
|
30
|
+
required: !!fieldMetadata.required,
|
|
31
|
+
change: (oEvent: sap.ui.base.Event) => {
|
|
32
|
+
const result = this.validateAndApplyVisualState();
|
|
33
|
+
if (this.onChange) this.onChange(result.isValid, this.fieldKey);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
this.applyCommonDirectives(this.control, fieldMetadata, modelName);
|
|
38
|
+
return this.control as Control;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
protected getValue(): unknown {
|
|
42
|
+
if (!this.control) return null;
|
|
43
|
+
if (this.control.getMetadata().getName() === "sap.m.Input") {
|
|
44
|
+
return (this.control as Input).getValue();
|
|
45
|
+
}
|
|
46
|
+
return (this.control as Link).getHref();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
protected applyState(): void {
|
|
50
|
+
if (!this.control || !this.metadata) return;
|
|
51
|
+
if (this.control.getMetadata().getName() === "sap.m.Input") {
|
|
52
|
+
const input = this.control as Input;
|
|
53
|
+
input.setEditable(!this.metadata.ui?.readOnly);
|
|
54
|
+
input.setRequired(!!this.metadata.required);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -32,7 +32,7 @@ sap.ui.define(["./BasePlugin", "sap/m/MessageStrip"], function (___BasePlugin, M
|
|
|
32
32
|
// Use binding to display text if the field has a value, otherwise use the label
|
|
33
33
|
this.control = new MessageStrip({
|
|
34
34
|
id: this.generateStableId(engineScopeId, bindingPath),
|
|
35
|
-
text:
|
|
35
|
+
text: this.generateBindingInfo(bindingPath, modelName),
|
|
36
36
|
type: "Information",
|
|
37
37
|
// Can be driven by schema arguments in the future
|
|
38
38
|
showIcon: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageStripPlugin-dbg.js","names":["BasePlugin","___BasePlugin","MessageStripPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","fieldKey","startsWith","substring","control","MessageStrip","id","generateStableId","text","type","showIcon","showCloseButton","getValue","applyState","__exports","__esModule"],"sources":["MessageStripPlugin.ts"],"sourcesContent":["/**\n * @file MessageStripPlugin.ts\n * @description Renders a sap.m.MessageStrip for informational text.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport MessageStrip from \"sap/m/MessageStrip\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Renders read-only informational alerts within the layout.\n * Does not emit values to the payload.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class MessageStripPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.MessageStrip` component.\n * \n * @param fieldMetadata 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 MessageStrip control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n this.fieldKey = bindingPath.startsWith('/') ? bindingPath.substring(1) : bindingPath;\n \n // Use binding to display text if the field has a value, otherwise use the label\n this.control = new MessageStrip({\n id: this.generateStableId(engineScopeId, bindingPath),\n text:
|
|
1
|
+
{"version":3,"file":"MessageStripPlugin-dbg.js","names":["BasePlugin","___BasePlugin","MessageStripPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","fieldKey","startsWith","substring","control","MessageStrip","id","generateStableId","text","generateBindingInfo","type","showIcon","showCloseButton","getValue","applyState","__exports","__esModule"],"sources":["MessageStripPlugin.ts"],"sourcesContent":["/**\n * @file MessageStripPlugin.ts\n * @description Renders a sap.m.MessageStrip for informational text.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport MessageStrip from \"sap/m/MessageStrip\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Renders read-only informational alerts within the layout.\n * Does not emit values to the payload.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class MessageStripPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.MessageStrip` component.\n * \n * @param fieldMetadata 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 MessageStrip control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n this.fieldKey = bindingPath.startsWith('/') ? bindingPath.substring(1) : bindingPath;\n \n // Use binding to display text if the field has a value, otherwise use the label\n this.control = new MessageStrip({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: this.generateBindingInfo(bindingPath, modelName),\n type: \"Information\", // Can be driven by schema arguments in the future\n showIcon: true,\n showCloseButton: false\n });\n\n return this.control as Control;\n }\n\n /**\n * Read-only control, returns null.\n */\n protected getValue(): unknown {\n return null; // Read-only component\n }\n\n /**\n * Read-only control, no dynamic state needed.\n */\n protected applyState(): void {\n // Read-only component, no dynamic state needed currently\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAKnB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,kBAAkB,SAASF,UAAU,CAAC;IAC/C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWG,MAAMA,CAACC,aAAgC,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MAC1L,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACC,QAAQ,GAAGL,aAAa;MAC7B,IAAI,CAACM,QAAQ,GAAGL,WAAW,CAACM,UAAU,CAAC,GAAG,CAAC,GAAGN,WAAW,CAACO,SAAS,CAAC,CAAC,CAAC,GAAGP,WAAW;;MAEpF;MACA,IAAI,CAACQ,OAAO,GAAG,IAAIC,YAAY,CAAC;QAC5BC,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACT,aAAa,EAAEF,WAAW,CAAC;QACrDY,IAAI,EAAE,IAAI,CAACC,mBAAmB,CAACb,WAAW,EAAEC,SAAS,CAAC;QACtDa,IAAI,EAAE,aAAa;QAAE;QACrBC,QAAQ,EAAE,IAAI;QACdC,eAAe,EAAE;MACrB,CAAC,CAAC;MAEF,OAAO,IAAI,CAACR,OAAO;IACvB;;IAEA;AACJ;AACA;IACcS,QAAQA,CAAA,EAAY;MAC1B,OAAO,IAAI,CAAC,CAAC;IACjB;;IAEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB;IAAA;EAER;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAtB,kBAAA,GAAAA,kBAAA;EAAA,OAAAsB,SAAA;AAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
sap.ui.define(["./BasePlugin","sap/m/MessageStrip"],function(t
|
|
1
|
+
sap.ui.define(["./BasePlugin","sap/m/MessageStrip"],function(e,t){"use strict";const s=e["BasePlugin"];class n extends s{render(e,s,n="meta",i,a){this.onChange=a;this.metadata=e;this.fieldKey=s.startsWith("/")?s.substring(1):s;this.control=new t({id:this.generateStableId(i,s),text:this.generateBindingInfo(s,n),type:"Information",showIcon:true,showCloseButton:false});return this.control}getValue(){return null}applyState(){}}var i={__esModule:true};i.MessageStripPlugin=n;return i});
|
|
2
2
|
//# sourceMappingURL=MessageStripPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageStripPlugin.js","names":["BasePlugin","___BasePlugin","MessageStripPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","fieldKey","startsWith","substring","control","MessageStrip","id","generateStableId","text","type","showIcon","showCloseButton","getValue","applyState","__exports","__esModule"],"sources":["MessageStripPlugin.ts"],"sourcesContent":["/**\n * @file MessageStripPlugin.ts\n * @description Renders a sap.m.MessageStrip for informational text.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport MessageStrip from \"sap/m/MessageStrip\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Renders read-only informational alerts within the layout.\n * Does not emit values to the payload.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class MessageStripPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.MessageStrip` component.\n * \n * @param fieldMetadata 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 MessageStrip control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n this.fieldKey = bindingPath.startsWith('/') ? bindingPath.substring(1) : bindingPath;\n \n // Use binding to display text if the field has a value, otherwise use the label\n this.control = new MessageStrip({\n id: this.generateStableId(engineScopeId, bindingPath),\n text:
|
|
1
|
+
{"version":3,"file":"MessageStripPlugin.js","names":["BasePlugin","___BasePlugin","MessageStripPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","fieldKey","startsWith","substring","control","MessageStrip","id","generateStableId","text","generateBindingInfo","type","showIcon","showCloseButton","getValue","applyState","__exports","__esModule"],"sources":["MessageStripPlugin.ts"],"sourcesContent":["/**\n * @file MessageStripPlugin.ts\n * @description Renders a sap.m.MessageStrip for informational text.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport MessageStrip from \"sap/m/MessageStrip\";\nimport Control from \"sap/ui/core/Control\";\n\n/**\n * Renders read-only informational alerts within the layout.\n * Does not emit values to the payload.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class MessageStripPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.MessageStrip` component.\n * \n * @param fieldMetadata 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 MessageStrip control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n this.fieldKey = bindingPath.startsWith('/') ? bindingPath.substring(1) : bindingPath;\n \n // Use binding to display text if the field has a value, otherwise use the label\n this.control = new MessageStrip({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: this.generateBindingInfo(bindingPath, modelName),\n type: \"Information\", // Can be driven by schema arguments in the future\n showIcon: true,\n showCloseButton: false\n });\n\n return this.control as Control;\n }\n\n /**\n * Read-only control, returns null.\n */\n protected getValue(): unknown {\n return null; // Read-only component\n }\n\n /**\n * Read-only control, no dynamic state needed.\n */\n protected applyState(): void {\n // Read-only component, no dynamic state needed currently\n }\n}\n"],"mappings":"+EAAA,MAKSA,EAAUC,EAAA,cAYZ,MAAMC,UAA2BF,EAW7BG,OAAOC,EAAmCC,EAAsBC,EAAoB,OAAQC,EAAwBC,GACvHC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAChBK,KAAKE,SAAWN,EAAYO,WAAW,KAAOP,EAAYQ,UAAU,GAAKR,EAGzEI,KAAKK,QAAU,IAAIC,EAAa,CAC5BC,GAAIP,KAAKQ,iBAAiBV,EAAeF,GACzCa,KAAMT,KAAKU,oBAAoBd,EAAaC,GAC5Cc,KAAM,cACNC,SAAU,KACVC,gBAAiB,QAGrB,OAAOb,KAAKK,OAChB,CAKUS,WACN,OAAO,IACX,CAKUC,aACN,EAEP,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAAvB,qBAAA,OAAAuB,CAAA","ignoreList":[]}
|
|
@@ -34,7 +34,7 @@ export class MessageStripPlugin extends BasePlugin {
|
|
|
34
34
|
// Use binding to display text if the field has a value, otherwise use the label
|
|
35
35
|
this.control = new MessageStrip({
|
|
36
36
|
id: this.generateStableId(engineScopeId, bindingPath),
|
|
37
|
-
text:
|
|
37
|
+
text: this.generateBindingInfo(bindingPath, modelName),
|
|
38
38
|
type: "Information", // Can be driven by schema arguments in the future
|
|
39
39
|
showIcon: true,
|
|
40
40
|
showCloseButton: false
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
sap.ui.define(["./BasePlugin", "sap/m/MultiInput", "sap/m/Token", "sap/m/Text"], function (___BasePlugin, MultiInput, Token, TextControl) {
|
|
1
|
+
sap.ui.define(["./BasePlugin", "sap/m/MultiInput", "sap/m/Token", "sap/m/Text", "../../utils/Logger"], function (___BasePlugin, MultiInput, Token, TextControl, ____utils_Logger) {
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -6,16 +6,18 @@ sap.ui.define(["./BasePlugin", "sap/m/MultiInput", "sap/m/Token", "sap/m/Text"],
|
|
|
6
6
|
* @description Renders a sap.m.MultiInput for primitive arrays (e.g. arrays of strings).
|
|
7
7
|
*/
|
|
8
8
|
const BasePlugin = ___BasePlugin["BasePlugin"];
|
|
9
|
+
const Logger = ____utils_Logger["Logger"];
|
|
9
10
|
/**
|
|
10
11
|
* Handles rendering logic for arrays of primitive strings.
|
|
11
12
|
* Users can type custom strings and press Enter to add them as tokens.
|
|
13
|
+
* Adheres strictly to native UI5 Model-View-Controller ListBinding principles.
|
|
12
14
|
*
|
|
13
15
|
* @namespace nz.co.siliconst.ui5.metaui.plugins.controls
|
|
14
16
|
* @public
|
|
15
17
|
*/
|
|
16
18
|
class MultiInputPlugin extends BasePlugin {
|
|
17
19
|
/**
|
|
18
|
-
* Renders a `sap.m.MultiInput` component.
|
|
20
|
+
* Renders a `sap.m.MultiInput` component natively bound to a JSONModel array.
|
|
19
21
|
*
|
|
20
22
|
* @param fieldMetadata The specific JSON schema properties for this field.
|
|
21
23
|
* @param bindingPath The JSON path bound to this control.
|
|
@@ -28,17 +30,18 @@ sap.ui.define(["./BasePlugin", "sap/m/MultiInput", "sap/m/Token", "sap/m/Text"],
|
|
|
28
30
|
this.onChange = onChange;
|
|
29
31
|
this.metadata = fieldMetadata;
|
|
30
32
|
this.fieldKey = bindingPath.startsWith('/') ? bindingPath.substring(1) : bindingPath;
|
|
33
|
+
this.modelName = modelName;
|
|
31
34
|
if (!this.isEditable) {
|
|
32
35
|
this.control = new TextControl({
|
|
33
36
|
id: this.generateStableId(engineScopeId, bindingPath),
|
|
34
|
-
text: {
|
|
35
|
-
path: `${modelName}>${bindingPath}`,
|
|
37
|
+
text: this.generateBindingInfo(bindingPath, modelName, undefined, {
|
|
36
38
|
formatter: val => Array.isArray(val) ? val.join(", ") : ""
|
|
37
|
-
}
|
|
39
|
+
})
|
|
38
40
|
});
|
|
39
41
|
this.applyCommonDirectives(this.control, fieldMetadata, modelName);
|
|
40
42
|
return this.control;
|
|
41
43
|
}
|
|
44
|
+
const plugin = this;
|
|
42
45
|
const mi = new MultiInput({
|
|
43
46
|
id: this.generateStableId(engineScopeId, bindingPath),
|
|
44
47
|
enabled: !fieldMetadata.ui?.readOnly,
|
|
@@ -46,61 +49,70 @@ sap.ui.define(["./BasePlugin", "sap/m/MultiInput", "sap/m/Token", "sap/m/Text"],
|
|
|
46
49
|
showValueHelp: false,
|
|
47
50
|
// We don't have a list of options for primitive tags
|
|
48
51
|
tokenUpdate: oEvent => {
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
if (type === "removed") {
|
|
52
|
-
const model = mi.getModel(modelName);
|
|
53
|
-
|
|
54
|
-
// Get current array from model
|
|
55
|
-
const rawArr = model.getProperty(bindingPath);
|
|
56
|
-
const arr = Array.isArray(rawArr) ? [...rawArr] : [];
|
|
57
|
-
const removedTokens = params.removedTokens;
|
|
58
|
-
removedTokens.forEach(t => {
|
|
59
|
-
const text = t.getText();
|
|
60
|
-
const idx = arr.indexOf(text);
|
|
61
|
-
if (idx > -1) {
|
|
62
|
-
arr.splice(idx, 1);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
52
|
+
const type = oEvent.getParameter("type");
|
|
53
|
+
const sourceMi = oEvent.getSource();
|
|
65
54
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
72
|
-
|
|
55
|
+
// Native UI5 tokens removed via the 'x' icon. We sync this directly back to the model.
|
|
56
|
+
if (type === "removed") {
|
|
57
|
+
const removedTokens = oEvent.getParameter("removedTokens");
|
|
58
|
+
const removedTexts = removedTokens.map(t => t.getText());
|
|
59
|
+
const bindingInfo = plugin.getNativeBindingContext(sourceMi);
|
|
60
|
+
if (bindingInfo) {
|
|
61
|
+
const {
|
|
62
|
+
model,
|
|
63
|
+
absPath
|
|
64
|
+
} = bindingInfo;
|
|
65
|
+
const currentArray = model.getProperty(absPath) || [];
|
|
66
|
+
const newArray = currentArray.filter(text => !removedTexts.includes(text));
|
|
67
|
+
Logger.debug(`[MultiInputPlugin] Removing tokens from absolute path: ${absPath}`, removedTexts.join(", "), "MultiInputPlugin");
|
|
68
|
+
plugin.syncTokensToModel(sourceMi, newArray);
|
|
73
69
|
}
|
|
74
70
|
}
|
|
75
71
|
}
|
|
76
72
|
});
|
|
77
73
|
|
|
78
|
-
//
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
74
|
+
// The native addValidator pipeline is notoriously unreliable when there is no suggestion list bound,
|
|
75
|
+
// often completely dropping the 'Enter' key event. Therefore, we use the standard `submit` event
|
|
76
|
+
// inherited from InputBase to robustly capture when the user presses Enter.
|
|
77
|
+
if (typeof mi.attachSubmit === "function") {
|
|
78
|
+
mi.attachSubmit(oEvent => {
|
|
79
|
+
const sourceMi = oEvent.getSource();
|
|
80
|
+
const val = (oEvent.getParameter("value") || sourceMi.getValue()).trim();
|
|
81
|
+
if (val) {
|
|
82
|
+
const bindingInfo = plugin.getNativeBindingContext(sourceMi);
|
|
83
|
+
if (bindingInfo) {
|
|
84
|
+
const {
|
|
85
|
+
model,
|
|
86
|
+
absPath
|
|
87
|
+
} = bindingInfo;
|
|
88
|
+
const currentArray = model.getProperty(absPath) || [];
|
|
89
|
+
if (!currentArray.includes(val)) {
|
|
90
|
+
// Prevent exact duplicates in primitive arrays
|
|
91
|
+
const newArray = [...currentArray, val];
|
|
92
|
+
Logger.debug(`[MultiInputPlugin] submit (Enter) fired. Adding token to absolute path: ${absPath}`, val, "MultiInputPlugin");
|
|
87
93
|
|
|
88
|
-
|
|
89
|
-
|
|
94
|
+
// Natively clear the text input
|
|
95
|
+
sourceMi.setValue("");
|
|
90
96
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
// Synchronize natively to the JSON model
|
|
98
|
+
plugin.syncTokensToModel(sourceMi, newArray);
|
|
99
|
+
} else {
|
|
100
|
+
sourceMi.setValue("");
|
|
101
|
+
}
|
|
102
|
+
}
|
|
95
103
|
}
|
|
96
|
-
}
|
|
97
|
-
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// We must still register an addValidator returning null.
|
|
108
|
+
// If UI5 *does* sporadically trigger the validator pipeline, this prevents the control
|
|
109
|
+
// from attempting to natively mutate the bound ListBinding aggregation, which causes a core crash.
|
|
110
|
+
mi.addValidator(function (args) {
|
|
98
111
|
return null;
|
|
99
112
|
});
|
|
100
113
|
|
|
101
114
|
// Bind existing strings to tokens using a factory function
|
|
102
|
-
mi.bindAggregation("tokens", {
|
|
103
|
-
path: `${modelName}>${bindingPath}`,
|
|
115
|
+
mi.bindAggregation("tokens", this.generateBindingInfo(bindingPath, modelName, undefined, {
|
|
104
116
|
factory: (sId, oContext) => {
|
|
105
117
|
const text = oContext.getObject() || "";
|
|
106
118
|
return new Token(sId, {
|
|
@@ -108,14 +120,68 @@ sap.ui.define(["./BasePlugin", "sap/m/MultiInput", "sap/m/Token", "sap/m/Text"],
|
|
|
108
120
|
text: text
|
|
109
121
|
});
|
|
110
122
|
}
|
|
111
|
-
});
|
|
123
|
+
}));
|
|
112
124
|
this.control = mi;
|
|
113
125
|
this.applyCommonDirectives(this.control, fieldMetadata, modelName);
|
|
114
126
|
return this.control;
|
|
115
127
|
}
|
|
116
128
|
|
|
117
129
|
/**
|
|
118
|
-
*
|
|
130
|
+
* Extracts the native UI5 ListBinding, its absolute path, and underlying JSONModel.
|
|
131
|
+
*
|
|
132
|
+
* @param sourceMi The live, cloned MultiInput control instance inside the DOM tree.
|
|
133
|
+
* @returns Object containing model and absolute path, or null if resolution fails.
|
|
134
|
+
*/
|
|
135
|
+
getNativeBindingContext(sourceMi) {
|
|
136
|
+
const binding = sourceMi.getBinding("tokens");
|
|
137
|
+
if (!binding) {
|
|
138
|
+
Logger.error("[MultiInputPlugin] token list binding is completely missing on the source clone.");
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
const model = binding.getModel();
|
|
142
|
+
if (!model) {
|
|
143
|
+
Logger.error("[MultiInputPlugin] Failed to resolve underlying JSONModel from ListBinding.");
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
let absPath;
|
|
147
|
+
const ctx = binding.getContext();
|
|
148
|
+
const bindingPath = binding.getPath();
|
|
149
|
+
if (ctx) {
|
|
150
|
+
const cp = ctx.getPath();
|
|
151
|
+
absPath = cp.endsWith("/") ? cp + bindingPath : cp === "/" ? "/" + bindingPath : cp + "/" + bindingPath;
|
|
152
|
+
} else {
|
|
153
|
+
absPath = bindingPath.startsWith("/") ? bindingPath : "/" + bindingPath;
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
model,
|
|
157
|
+
absPath
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Synchronizes the primitive string array derived from the MultiInput tokens directly back into the Model.
|
|
163
|
+
*
|
|
164
|
+
* @param sourceMi The live MultiInput clone.
|
|
165
|
+
* @param newArray The final array of string values to save.
|
|
166
|
+
*/
|
|
167
|
+
syncTokensToModel(sourceMi, newArray) {
|
|
168
|
+
const bindingInfo = this.getNativeBindingContext(sourceMi);
|
|
169
|
+
if (!bindingInfo) return;
|
|
170
|
+
const {
|
|
171
|
+
model,
|
|
172
|
+
absPath
|
|
173
|
+
} = bindingInfo;
|
|
174
|
+
model.setProperty(absPath, newArray);
|
|
175
|
+
model.refresh(true); // Force UI5 to sync bindings down the tree
|
|
176
|
+
|
|
177
|
+
if (this.onChange) {
|
|
178
|
+
const result = this.validateAndApplyVisualState();
|
|
179
|
+
this.onChange(result.isValid, this.fieldKey);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Retrieves the current primitive array from the control.
|
|
119
185
|
* @returns {unknown} The array of string tokens.
|
|
120
186
|
*/
|
|
121
187
|
getValue() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiInputPlugin-dbg.js","names":["BasePlugin","___BasePlugin","MultiInputPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","fieldKey","startsWith","substring","isEditable","control","TextControl","id","generateStableId","text","path","formatter","val","Array","isArray","join","applyCommonDirectives","mi","MultiInput","enabled","ui","readOnly","placeholder","label","showValueHelp","tokenUpdate","oEvent","params","getParameters","type","model","getModel","rawArr","getProperty","arr","removedTokens","forEach","t","getText","idx","indexOf","splice","setProperty","result","validateAndApplyVisualState","isValid","addValidator","args","trim","push","setValue","bindAggregation","factory","sId","oContext","getObject","Token","key","getValue","tokens","getTokens","map","applyState","setEnabled","__exports","__esModule"],"sources":["MultiInputPlugin.ts"],"sourcesContent":["/**\n * @file MultiInputPlugin.ts\n * @description Renders a sap.m.MultiInput for primitive arrays (e.g. arrays of strings).\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport MultiInput from \"sap/m/MultiInput\";\nimport Token from \"sap/m/Token\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport Event from \"sap/ui/base/Event\";\nimport Context from \"sap/ui/model/Context\";\n\n/**\n * Handles rendering logic for arrays of primitive strings.\n * Users can type custom strings and press Enter to add them as tokens.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class MultiInputPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.MultiInput` component.\n * \n * @param fieldMetadata 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 MultiInput control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n this.fieldKey = bindingPath.startsWith('/') ? bindingPath.substring(1) : bindingPath;\n\n if (!this.isEditable) {\n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: unknown[]) => Array.isArray(val) ? val.join(\", \") : \"\"\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n \n const mi = new MultiInput({\n id: this.generateStableId(engineScopeId, bindingPath),\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: fieldMetadata.ui?.label || \"Type and press Enter...\",\n showValueHelp: false, // We don't have a list of options for primitive tags\n tokenUpdate: (oEvent: Event) => {\n const params = oEvent.getParameters();\n const type = params.type;\n \n if (type === \"removed\") {\n const model = mi.getModel(modelName) as JSONModel;\n \n // Get current array from model\n const rawArr = model.getProperty(bindingPath);\n const arr: string[] = Array.isArray(rawArr) ? [...rawArr] : [];\n\n const removedTokens = params.removedTokens as Token[];\n removedTokens.forEach(t => {\n const text = t.getText();\n const idx = arr.indexOf(text);\n if (idx > -1) {\n arr.splice(idx, 1);\n }\n });\n \n // Update model\n model.setProperty(bindingPath, arr);\n \n // Trigger engine validation/extraction\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n }\n });\n\n // Add validator to instantly accept typed text, update model, and clear input\n mi.addValidator((args: { text: string }) => {\n const text = args.text?.trim();\n if (text) {\n const model = mi.getModel(modelName) as JSONModel;\n const rawArr = model.getProperty(bindingPath);\n const arr: string[] = Array.isArray(rawArr) ? [...rawArr] : [];\n \n arr.push(text);\n model.setProperty(bindingPath, arr);\n \n // Clear the input value immediately\n mi.setValue(\"\");\n \n // Trigger engine validation/extraction\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n // Return null to explicitly prevent MultiInput from modifying the bound aggregation\n return null;\n });\n\n // Bind existing strings to tokens using a factory function\n mi.bindAggregation(\"tokens\", {\n path: `${modelName}>${bindingPath}`,\n factory: (sId: string, oContext: Context) => {\n const text = (oContext.getObject() as string) || \"\";\n return new Token(sId, { key: text, text: text });\n }\n });\n\n this.control = mi;\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the current primitive array from the model.\n * @returns {unknown} The array of string tokens.\n */\n protected getValue(): unknown {\n if (!this.control) return [];\n const tokens = (this.control as MultiInput).getTokens();\n return tokens.map(t => t.getText());\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as MultiInput).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAUnB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,gBAAgB,SAASF,UAAU,CAAC;IAC7C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AACC,OAAO,CAAC,CAAC,CAAC;IACvC;;IAEA;AACJ;AACA;IACcwB,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACzD,OAAO,IAAI,IAAI,CAACL,QAAQ,EAAE;QAC/B,IAAI,CAAC,IAAI,CAACI,UAAU,EAAE;QACrB,IAAI,CAACC,OAAO,CAAgB0D,UAAU,CAAC,CAAC,IAAI,CAAC/D,QAAQ,CAACoB,EAAE,EAAEC,QAAQ,CAAC;MACxE;IACJ;EACJ;EAAC,IAAA2C,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAvE,gBAAA,GAAAA,gBAAA;EAAA,OAAAuE,SAAA;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"MultiInputPlugin-dbg.js","names":["BasePlugin","___BasePlugin","Logger","____utils_Logger","MultiInputPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","fieldKey","startsWith","substring","isEditable","control","TextControl","id","generateStableId","text","generateBindingInfo","undefined","formatter","val","Array","isArray","join","applyCommonDirectives","plugin","mi","MultiInput","enabled","ui","readOnly","placeholder","label","showValueHelp","tokenUpdate","oEvent","type","getParameter","sourceMi","getSource","removedTokens","removedTexts","map","t","getText","bindingInfo","getNativeBindingContext","model","absPath","currentArray","getProperty","newArray","filter","includes","debug","syncTokensToModel","attachSubmit","getValue","trim","setValue","addValidator","args","bindAggregation","factory","sId","oContext","getObject","Token","key","binding","getBinding","error","getModel","ctx","getContext","getPath","cp","endsWith","setProperty","refresh","result","validateAndApplyVisualState","isValid","tokens","getTokens","applyState","setEnabled","__exports","__esModule"],"sources":["MultiInputPlugin.ts"],"sourcesContent":["/**\n * @file MultiInputPlugin.ts\n * @description Renders a sap.m.MultiInput for primitive arrays (e.g. arrays of strings).\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport MultiInput from \"sap/m/MultiInput\";\nimport Token from \"sap/m/Token\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport Event from \"sap/ui/base/Event\";\nimport ListBinding from \"sap/ui/model/ListBinding\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * Handles rendering logic for arrays of primitive strings.\n * Users can type custom strings and press Enter to add them as tokens.\n * Adheres strictly to native UI5 Model-View-Controller ListBinding principles.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class MultiInputPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.MultiInput` component natively bound to a JSONModel array.\n * \n * @param fieldMetadata 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 MultiInput control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n this.fieldKey = bindingPath.startsWith('/') ? bindingPath.substring(1) : bindingPath;\n this.modelName = modelName;\n\n if (!this.isEditable) {\n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: this.generateBindingInfo(bindingPath, modelName, undefined, {\n formatter: (val: unknown[]) => Array.isArray(val) ? val.join(\", \") : \"\"\n })\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n const plugin = this;\n\n const mi = new MultiInput({\n id: this.generateStableId(engineScopeId, bindingPath),\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: fieldMetadata.ui?.label || \"Type and press Enter...\",\n showValueHelp: false, // We don't have a list of options for primitive tags\n tokenUpdate: (oEvent: Event) => {\n const type = oEvent.getParameter(\"type\");\n const sourceMi = oEvent.getSource() as MultiInput;\n \n // Native UI5 tokens removed via the 'x' icon. We sync this directly back to the model.\n if (type === \"removed\") {\n const removedTokens = oEvent.getParameter(\"removedTokens\") as Token[];\n const removedTexts = removedTokens.map(t => t.getText());\n \n const bindingInfo = plugin.getNativeBindingContext(sourceMi);\n if (bindingInfo) {\n const { model, absPath } = bindingInfo;\n const currentArray = (model.getProperty(absPath) || []) as string[];\n const newArray = currentArray.filter(text => !removedTexts.includes(text));\n \n Logger.debug(`[MultiInputPlugin] Removing tokens from absolute path: ${absPath}`, removedTexts.join(\", \"), \"MultiInputPlugin\");\n plugin.syncTokensToModel(sourceMi, newArray);\n }\n }\n }\n });\n\n // The native addValidator pipeline is notoriously unreliable when there is no suggestion list bound,\n // often completely dropping the 'Enter' key event. Therefore, we use the standard `submit` event \n // inherited from InputBase to robustly capture when the user presses Enter.\n if (typeof mi.attachSubmit === \"function\") {\n mi.attachSubmit((oEvent: Event) => {\n const sourceMi = oEvent.getSource() as MultiInput;\n const val = (oEvent.getParameter(\"value\") as string || sourceMi.getValue()).trim();\n \n if (val) {\n const bindingInfo = plugin.getNativeBindingContext(sourceMi);\n if (bindingInfo) {\n const { model, absPath } = bindingInfo;\n const currentArray = (model.getProperty(absPath) || []) as string[];\n \n if (!currentArray.includes(val)) { // Prevent exact duplicates in primitive arrays\n const newArray = [...currentArray, val];\n Logger.debug(`[MultiInputPlugin] submit (Enter) fired. Adding token to absolute path: ${absPath}`, val, \"MultiInputPlugin\");\n \n // Natively clear the text input\n sourceMi.setValue(\"\");\n \n // Synchronize natively to the JSON model\n plugin.syncTokensToModel(sourceMi, newArray);\n } else {\n sourceMi.setValue(\"\");\n }\n }\n }\n });\n }\n\n // We must still register an addValidator returning null.\n // If UI5 *does* sporadically trigger the validator pipeline, this prevents the control \n // from attempting to natively mutate the bound ListBinding aggregation, which causes a core crash.\n mi.addValidator(function(args: { text: string }) {\n return null;\n });\n\n // Bind existing strings to tokens using a factory function\n mi.bindAggregation(\"tokens\", this.generateBindingInfo(bindingPath, modelName, undefined, {\n factory: (sId: string, oContext: sap.ui.model.Context) => {\n const text = (oContext.getObject() as string) || \"\";\n return new Token(sId, { key: text, text: text });\n }\n }));\n\n this.control = mi;\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Extracts the native UI5 ListBinding, its absolute path, and underlying JSONModel.\n * \n * @param sourceMi The live, cloned MultiInput control instance inside the DOM tree.\n * @returns Object containing model and absolute path, or null if resolution fails.\n */\n private getNativeBindingContext(sourceMi: MultiInput): { model: JSONModel, absPath: string } | null {\n const binding = sourceMi.getBinding(\"tokens\") as ListBinding;\n if (!binding) {\n Logger.error(\"[MultiInputPlugin] token list binding is completely missing on the source clone.\");\n return null;\n }\n\n const model = binding.getModel() as JSONModel;\n if (!model) {\n Logger.error(\"[MultiInputPlugin] Failed to resolve underlying JSONModel from ListBinding.\");\n return null;\n }\n\n let absPath: string;\n const ctx = binding.getContext();\n const bindingPath = binding.getPath();\n\n if (ctx) {\n const cp = ctx.getPath();\n absPath = cp.endsWith(\"/\") ? cp + bindingPath : (cp === \"/\" ? \"/\" + bindingPath : cp + \"/\" + bindingPath);\n } else {\n absPath = bindingPath.startsWith(\"/\") ? bindingPath : \"/\" + bindingPath;\n }\n\n return { model, absPath };\n }\n\n /**\n * Synchronizes the primitive string array derived from the MultiInput tokens directly back into the Model.\n * \n * @param sourceMi The live MultiInput clone.\n * @param newArray The final array of string values to save.\n */\n private syncTokensToModel(sourceMi: MultiInput, newArray: string[]): void {\n const bindingInfo = this.getNativeBindingContext(sourceMi);\n if (!bindingInfo) return;\n\n const { model, absPath } = bindingInfo;\n \n model.setProperty(absPath, newArray);\n model.refresh(true); // Force UI5 to sync bindings down the tree\n\n if (this.onChange) {\n const result = this.validateAndApplyVisualState();\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n\n /**\n * Retrieves the current primitive array from the control.\n * @returns {unknown} The array of string tokens.\n */\n protected getValue(): unknown {\n if (!this.control) return [];\n const tokens = (this.control as MultiInput).getTokens();\n return tokens.map(t => t.getText());\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as MultiInput).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAAA,MASVC,MAAM,GAAAC,gBAAA;EAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,gBAAgB,SAASJ,UAAU,CAAC;IAC7C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWK,MAAMA,CAACC,aAAgC,EAAEC,WAAmB,EAAEC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MACxL,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACC,QAAQ,GAAGL,aAAa;MAC7B,IAAI,CAACM,QAAQ,GAAGL,WAAW,CAACM,UAAU,CAAC,GAAG,CAAC,GAAGN,WAAW,CAACO,SAAS,CAAC,CAAC,CAAC,GAAGP,WAAW;MACpF,IAAI,CAACC,SAAS,GAAGA,SAAS;MAE1B,IAAI,CAAC,IAAI,CAACO,UAAU,EAAE;QAClB,IAAI,CAACC,OAAO,GAAG,IAAIC,WAAW,CAAC;UAC3BC,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACV,aAAa,EAAEF,WAAW,CAAC;UACrDa,IAAI,EAAE,IAAI,CAACC,mBAAmB,CAACd,WAAW,EAAEC,SAAS,EAAEc,SAAS,EAAE;YAC9DC,SAAS,EAAGC,GAAc,IAAKC,KAAK,CAACC,OAAO,CAACF,GAAG,CAAC,GAAGA,GAAG,CAACG,IAAI,CAAC,IAAI,CAAC,GAAG;UACzE,CAAC;QACL,CAAC,CAAC;QACF,IAAI,CAACC,qBAAqB,CAAC,IAAI,CAACZ,OAAO,EAAEV,aAAa,EAAEE,SAAS,CAAC;QAClE,OAAO,IAAI,CAACQ,OAAO;MACvB;MACA,MAAMa,MAAM,GAA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C,IAAI,CAAC/E,QAAQ,CAACsB,EAAE,EAAEC,QAAQ,CAAC;MACxE;IACJ;EACJ;EAAC,IAAAyD,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAvF,gBAAA,GAAAA,gBAAA;EAAA,OAAAuF,SAAA;AAAA","ignoreList":[]}
|
|
@@ -9,13 +9,14 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin" {
|
|
|
9
9
|
/**
|
|
10
10
|
* Handles rendering logic for arrays of primitive strings.
|
|
11
11
|
* Users can type custom strings and press Enter to add them as tokens.
|
|
12
|
+
* Adheres strictly to native UI5 Model-View-Controller ListBinding principles.
|
|
12
13
|
*
|
|
13
14
|
* @namespace nz.co.siliconst.ui5.metaui.plugins.controls
|
|
14
15
|
* @public
|
|
15
16
|
*/
|
|
16
17
|
export class MultiInputPlugin extends BasePlugin {
|
|
17
18
|
/**
|
|
18
|
-
* Renders a `sap.m.MultiInput` component.
|
|
19
|
+
* Renders a `sap.m.MultiInput` component natively bound to a JSONModel array.
|
|
19
20
|
*
|
|
20
21
|
* @param fieldMetadata The specific JSON schema properties for this field.
|
|
21
22
|
* @param bindingPath The JSON path bound to this control.
|
|
@@ -26,7 +27,21 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin" {
|
|
|
26
27
|
*/
|
|
27
28
|
render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
+
* Extracts the native UI5 ListBinding, its absolute path, and underlying JSONModel.
|
|
31
|
+
*
|
|
32
|
+
* @param sourceMi The live, cloned MultiInput control instance inside the DOM tree.
|
|
33
|
+
* @returns Object containing model and absolute path, or null if resolution fails.
|
|
34
|
+
*/
|
|
35
|
+
private getNativeBindingContext;
|
|
36
|
+
/**
|
|
37
|
+
* Synchronizes the primitive string array derived from the MultiInput tokens directly back into the Model.
|
|
38
|
+
*
|
|
39
|
+
* @param sourceMi The live MultiInput clone.
|
|
40
|
+
* @param newArray The final array of string values to save.
|
|
41
|
+
*/
|
|
42
|
+
private syncTokensToModel;
|
|
43
|
+
/**
|
|
44
|
+
* Retrieves the current primitive array from the control.
|
|
30
45
|
* @returns {unknown} The array of string tokens.
|
|
31
46
|
*/
|
|
32
47
|
protected getValue(): unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiInputPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,8DAA8D,CAAC;IAC9E;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAGlF,OAAO,OAAO,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"MultiInputPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,8DAA8D,CAAC;IAC9E;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAGlF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAO1C;;;;;;;OAOG;IACH,MAAa,gBAAiB,SAAQ,UAAU;QAC5C;;;;;;;;;WASG;QACI,MAAM,CAAC,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,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;QAgG3L;;;;;WAKG;QACH,OAAO,CAAC,uBAAuB;QA2B/B;;;;;WAKG;QACH,OAAO,CAAC,iBAAiB;QAezB;;;WAGG;QACH,SAAS,CAAC,QAAQ,IAAI,OAAO;QAM7B;;WAEG;QACH,SAAS,CAAC,UAAU,IAAI,IAAI;KAM/B;CAEA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
sap.ui.define(["./BasePlugin","sap/m/MultiInput","sap/m/Token","sap/m/Text"],function(t,e,
|
|
1
|
+
sap.ui.define(["./BasePlugin","sap/m/MultiInput","sap/m/Token","sap/m/Text","../../utils/Logger"],function(t,e,n,i,o){"use strict";const s=t["BasePlugin"];const r=o["Logger"];class a extends s{render(t,o,s="meta",a,l){this.onChange=l;this.metadata=t;this.fieldKey=o.startsWith("/")?o.substring(1):o;this.modelName=s;if(!this.isEditable){this.control=new i({id:this.generateStableId(a,o),text:this.generateBindingInfo(o,s,undefined,{formatter:t=>Array.isArray(t)?t.join(", "):""})});this.applyCommonDirectives(this.control,t,s);return this.control}const u=this;const d=new e({id:this.generateStableId(a,o),enabled:!t.ui?.readOnly,placeholder:t.ui?.label||"Type and press Enter...",showValueHelp:false,tokenUpdate:t=>{const e=t.getParameter("type");const n=t.getSource();if(e==="removed"){const e=t.getParameter("removedTokens");const i=e.map(t=>t.getText());const o=u.getNativeBindingContext(n);if(o){const{model:t,absPath:e}=o;const s=t.getProperty(e)||[];const a=s.filter(t=>!i.includes(t));r.debug(`[MultiInputPlugin] Removing tokens from absolute path: ${e}`,i.join(", "),"MultiInputPlugin");u.syncTokensToModel(n,a)}}}});if(typeof d.attachSubmit==="function"){d.attachSubmit(t=>{const e=t.getSource();const n=(t.getParameter("value")||e.getValue()).trim();if(n){const t=u.getNativeBindingContext(e);if(t){const{model:i,absPath:o}=t;const s=i.getProperty(o)||[];if(!s.includes(n)){const t=[...s,n];r.debug(`[MultiInputPlugin] submit (Enter) fired. Adding token to absolute path: ${o}`,n,"MultiInputPlugin");e.setValue("");u.syncTokensToModel(e,t)}else{e.setValue("")}}}})}d.addValidator(function(t){return null});d.bindAggregation("tokens",this.generateBindingInfo(o,s,undefined,{factory:(t,e)=>{const i=e.getObject()||"";return new n(t,{key:i,text:i})}}));this.control=d;this.applyCommonDirectives(this.control,t,s);return this.control}getNativeBindingContext(t){const e=t.getBinding("tokens");if(!e){r.error("[MultiInputPlugin] token list binding is completely missing on the source clone.");return null}const n=e.getModel();if(!n){r.error("[MultiInputPlugin] Failed to resolve underlying JSONModel from ListBinding.");return null}let i;const o=e.getContext();const s=e.getPath();if(o){const t=o.getPath();i=t.endsWith("/")?t+s:t==="/"?"/"+s:t+"/"+s}else{i=s.startsWith("/")?s:"/"+s}return{model:n,absPath:i}}syncTokensToModel(t,e){const n=this.getNativeBindingContext(t);if(!n)return;const{model:i,absPath:o}=n;i.setProperty(o,e);i.refresh(true);if(this.onChange){const t=this.validateAndApplyVisualState();this.onChange(t.isValid,this.fieldKey)}}getValue(){if(!this.control)return[];const t=this.control.getTokens();return t.map(t=>t.getText())}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;this.control.setEnabled(!this.metadata.ui?.readOnly)}}}var l={__esModule:true};l.MultiInputPlugin=a;return l});
|
|
2
2
|
//# sourceMappingURL=MultiInputPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiInputPlugin.js","names":["BasePlugin","___BasePlugin","MultiInputPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","fieldKey","startsWith","substring","isEditable","control","TextControl","id","generateStableId","text","path","formatter","val","Array","isArray","join","applyCommonDirectives","mi","MultiInput","enabled","ui","readOnly","placeholder","label","showValueHelp","tokenUpdate","oEvent","params","getParameters","type","model","getModel","rawArr","getProperty","arr","removedTokens","forEach","t","getText","idx","indexOf","splice","setProperty","result","validateAndApplyVisualState","isValid","addValidator","args","trim","push","setValue","bindAggregation","factory","sId","oContext","getObject","Token","key","getValue","tokens","getTokens","map","applyState","setEnabled","__exports","__esModule"],"sources":["MultiInputPlugin.ts"],"sourcesContent":["/**\n * @file MultiInputPlugin.ts\n * @description Renders a sap.m.MultiInput for primitive arrays (e.g. arrays of strings).\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport MultiInput from \"sap/m/MultiInput\";\nimport Token from \"sap/m/Token\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport Event from \"sap/ui/base/Event\";\nimport Context from \"sap/ui/model/Context\";\n\n/**\n * Handles rendering logic for arrays of primitive strings.\n * Users can type custom strings and press Enter to add them as tokens.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class MultiInputPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.MultiInput` component.\n * \n * @param fieldMetadata 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 MultiInput control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n this.fieldKey = bindingPath.startsWith('/') ? bindingPath.substring(1) : bindingPath;\n\n if (!this.isEditable) {\n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: unknown[]) => Array.isArray(val) ? val.join(\", \") : \"\"\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n \n const mi = new MultiInput({\n id: this.generateStableId(engineScopeId, bindingPath),\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: fieldMetadata.ui?.label || \"Type and press Enter...\",\n showValueHelp: false, // We don't have a list of options for primitive tags\n tokenUpdate: (oEvent: Event) => {\n const params = oEvent.getParameters();\n const type = params.type;\n \n if (type === \"removed\") {\n const model = mi.getModel(modelName) as JSONModel;\n \n // Get current array from model\n const rawArr = model.getProperty(bindingPath);\n const arr: string[] = Array.isArray(rawArr) ? [...rawArr] : [];\n\n const removedTokens = params.removedTokens as Token[];\n removedTokens.forEach(t => {\n const text = t.getText();\n const idx = arr.indexOf(text);\n if (idx > -1) {\n arr.splice(idx, 1);\n }\n });\n \n // Update model\n model.setProperty(bindingPath, arr);\n \n // Trigger engine validation/extraction\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n }\n });\n\n // Add validator to instantly accept typed text, update model, and clear input\n mi.addValidator((args: { text: string }) => {\n const text = args.text?.trim();\n if (text) {\n const model = mi.getModel(modelName) as JSONModel;\n const rawArr = model.getProperty(bindingPath);\n const arr: string[] = Array.isArray(rawArr) ? [...rawArr] : [];\n \n arr.push(text);\n model.setProperty(bindingPath, arr);\n \n // Clear the input value immediately\n mi.setValue(\"\");\n \n // Trigger engine validation/extraction\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n // Return null to explicitly prevent MultiInput from modifying the bound aggregation\n return null;\n });\n\n // Bind existing strings to tokens using a factory function\n mi.bindAggregation(\"tokens\", {\n path: `${modelName}>${bindingPath}`,\n factory: (sId: string, oContext: Context) => {\n const text = (oContext.getObject() as string) || \"\";\n return new Token(sId, { key: text, text: text });\n }\n });\n\n this.control = mi;\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the current primitive array from the model.\n * @returns {unknown} The array of string tokens.\n */\n protected getValue(): unknown {\n if (!this.control) return [];\n const tokens = (this.control as MultiInput).getTokens();\n return tokens.map(t => t.getText());\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as MultiInput).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,KAAKE,SACvC,CACJ,KAKRgB,EAAG6B,aAAcC,IACb,MAAMtC,EAAOsC,EAAKtC,MAAMuC,OACxB,GAAIvC,EAAM,CACN,MAAMqB,EAAQb,EAAGc,SAASnC,GAC1B,MAAMoC,EAASF,EAAMG,YAAYtC,GACjC,MAAMuC,EAAgBrB,MAAMC,QAAQkB,GAAU,IAAIA,GAAU,GAE5DE,EAAIe,KAAKxC,GACTqB,EAAMY,YAAY/C,EAAauC,GAG/BjB,EAAGiC,SAAS,IAGZ,MAAMP,EAAS5C,KAAK6C,8BACpB,GAAI7C,KAAKD,SAAU,CACfC,KAAKD,SAAS6C,EAAOE,QAAS9C,KAAKE,SACvC,CACJ,CAEA,OAAO,OAIXgB,EAAGkC,gBAAgB,SAAU,CACzBzC,KAAM,GAAGd,KAAaD,IACtByD,QAASA,CAACC,EAAaC,KACnB,MAAM7C,EAAQ6C,EAASC,aAA0B,GACjD,OAAO,IAAIC,EAAMH,EAAK,CAAEI,IAAKhD,EAAMA,KAAMA,OAIjDV,KAAKM,QAAUY,EACflB,KAAKiB,sBAAsBjB,KAAKM,QAASX,EAAeE,GACxD,OAAOG,KAAKM,OAChB,CAMUqD,WACN,IAAK3D,KAAKM,QAAS,MAAO,GAC1B,MAAMsD,EAAU5D,KAAKM,QAAuBuD,YAC5C,OAAOD,EAAOE,IAAIxB,GAAKA,EAAEC,UAC7B,CAKUwB,aACN,GAAI/D,KAAKM,SAAWN,KAAKC,SAAU,CAC/B,IAAKD,KAAKK,WAAY,OACrBL,KAAKM,QAAuB0D,YAAYhE,KAAKC,SAASoB,IAAIC,SAC/D,CACJ,EACH,IAAA2C,EAAA,CAAAC,WAAA,MAAAD,EAAAxE,mBAAA,OAAAwE,CAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"MultiInputPlugin.js","names":["BasePlugin","___BasePlugin","Logger","____utils_Logger","MultiInputPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","fieldKey","startsWith","substring","isEditable","control","TextControl","id","generateStableId","text","generateBindingInfo","undefined","formatter","val","Array","isArray","join","applyCommonDirectives","plugin","mi","MultiInput","enabled","ui","readOnly","placeholder","label","showValueHelp","tokenUpdate","oEvent","type","getParameter","sourceMi","getSource","removedTokens","removedTexts","map","t","getText","bindingInfo","getNativeBindingContext","model","absPath","currentArray","getProperty","newArray","filter","includes","debug","syncTokensToModel","attachSubmit","getValue","trim","setValue","addValidator","args","bindAggregation","factory","sId","oContext","getObject","Token","key","binding","getBinding","error","getModel","ctx","getContext","getPath","cp","endsWith","setProperty","refresh","result","validateAndApplyVisualState","isValid","tokens","getTokens","applyState","setEnabled","__exports","__esModule"],"sources":["MultiInputPlugin.ts"],"sourcesContent":["/**\n * @file MultiInputPlugin.ts\n * @description Renders a sap.m.MultiInput for primitive arrays (e.g. arrays of strings).\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport MultiInput from \"sap/m/MultiInput\";\nimport Token from \"sap/m/Token\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport Event from \"sap/ui/base/Event\";\nimport ListBinding from \"sap/ui/model/ListBinding\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * Handles rendering logic for arrays of primitive strings.\n * Users can type custom strings and press Enter to add them as tokens.\n * Adheres strictly to native UI5 Model-View-Controller ListBinding principles.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class MultiInputPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.MultiInput` component natively bound to a JSONModel array.\n * \n * @param fieldMetadata 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 MultiInput control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n this.fieldKey = bindingPath.startsWith('/') ? bindingPath.substring(1) : bindingPath;\n this.modelName = modelName;\n\n if (!this.isEditable) {\n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: this.generateBindingInfo(bindingPath, modelName, undefined, {\n formatter: (val: unknown[]) => Array.isArray(val) ? val.join(\", \") : \"\"\n })\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n const plugin = this;\n\n const mi = new MultiInput({\n id: this.generateStableId(engineScopeId, bindingPath),\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: fieldMetadata.ui?.label || \"Type and press Enter...\",\n showValueHelp: false, // We don't have a list of options for primitive tags\n tokenUpdate: (oEvent: Event) => {\n const type = oEvent.getParameter(\"type\");\n const sourceMi = oEvent.getSource() as MultiInput;\n \n // Native UI5 tokens removed via the 'x' icon. We sync this directly back to the model.\n if (type === \"removed\") {\n const removedTokens = oEvent.getParameter(\"removedTokens\") as Token[];\n const removedTexts = removedTokens.map(t => t.getText());\n \n const bindingInfo = plugin.getNativeBindingContext(sourceMi);\n if (bindingInfo) {\n const { model, absPath } = bindingInfo;\n const currentArray = (model.getProperty(absPath) || []) as string[];\n const newArray = currentArray.filter(text => !removedTexts.includes(text));\n \n Logger.debug(`[MultiInputPlugin] Removing tokens from absolute path: ${absPath}`, removedTexts.join(\", \"), \"MultiInputPlugin\");\n plugin.syncTokensToModel(sourceMi, newArray);\n }\n }\n }\n });\n\n // The native addValidator pipeline is notoriously unreliable when there is no suggestion list bound,\n // often completely dropping the 'Enter' key event. Therefore, we use the standard `submit` event \n // inherited from InputBase to robustly capture when the user presses Enter.\n if (typeof mi.attachSubmit === \"function\") {\n mi.attachSubmit((oEvent: Event) => {\n const sourceMi = oEvent.getSource() as MultiInput;\n const val = (oEvent.getParameter(\"value\") as string || sourceMi.getValue()).trim();\n \n if (val) {\n const bindingInfo = plugin.getNativeBindingContext(sourceMi);\n if (bindingInfo) {\n const { model, absPath } = bindingInfo;\n const currentArray = (model.getProperty(absPath) || []) as string[];\n \n if (!currentArray.includes(val)) { // Prevent exact duplicates in primitive arrays\n const newArray = [...currentArray, val];\n Logger.debug(`[MultiInputPlugin] submit (Enter) fired. Adding token to absolute path: ${absPath}`, val, \"MultiInputPlugin\");\n \n // Natively clear the text input\n sourceMi.setValue(\"\");\n \n // Synchronize natively to the JSON model\n plugin.syncTokensToModel(sourceMi, newArray);\n } else {\n sourceMi.setValue(\"\");\n }\n }\n }\n });\n }\n\n // We must still register an addValidator returning null.\n // If UI5 *does* sporadically trigger the validator pipeline, this prevents the control \n // from attempting to natively mutate the bound ListBinding aggregation, which causes a core crash.\n mi.addValidator(function(args: { text: string }) {\n return null;\n });\n\n // Bind existing strings to tokens using a factory function\n mi.bindAggregation(\"tokens\", this.generateBindingInfo(bindingPath, modelName, undefined, {\n factory: (sId: string, oContext: sap.ui.model.Context) => {\n const text = (oContext.getObject() as string) || \"\";\n return new Token(sId, { key: text, text: text });\n }\n }));\n\n this.control = mi;\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Extracts the native UI5 ListBinding, its absolute path, and underlying JSONModel.\n * \n * @param sourceMi The live, cloned MultiInput control instance inside the DOM tree.\n * @returns Object containing model and absolute path, or null if resolution fails.\n */\n private getNativeBindingContext(sourceMi: MultiInput): { model: JSONModel, absPath: string } | null {\n const binding = sourceMi.getBinding(\"tokens\") as ListBinding;\n if (!binding) {\n Logger.error(\"[MultiInputPlugin] token list binding is completely missing on the source clone.\");\n return null;\n }\n\n const model = binding.getModel() as JSONModel;\n if (!model) {\n Logger.error(\"[MultiInputPlugin] Failed to resolve underlying JSONModel from ListBinding.\");\n return null;\n }\n\n let absPath: string;\n const ctx = binding.getContext();\n const bindingPath = binding.getPath();\n\n if (ctx) {\n const cp = ctx.getPath();\n absPath = cp.endsWith(\"/\") ? cp + bindingPath : (cp === \"/\" ? \"/\" + bindingPath : cp + \"/\" + bindingPath);\n } else {\n absPath = bindingPath.startsWith(\"/\") ? bindingPath : \"/\" + bindingPath;\n }\n\n return { model, absPath };\n }\n\n /**\n * Synchronizes the primitive string array derived from the MultiInput tokens directly back into the Model.\n * \n * @param sourceMi The live MultiInput clone.\n * @param newArray The final array of string values to save.\n */\n private syncTokensToModel(sourceMi: MultiInput, newArray: string[]): void {\n const bindingInfo = this.getNativeBindingContext(sourceMi);\n if (!bindingInfo) return;\n\n const { model, absPath } = bindingInfo;\n \n model.setProperty(absPath, newArray);\n model.refresh(true); // Force UI5 to sync bindings down the tree\n\n if (this.onChange) {\n const result = this.validateAndApplyVisualState();\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n\n /**\n * Retrieves the current primitive array from the control.\n * @returns {unknown} The array of string tokens.\n */\n protected getValue(): unknown {\n if (!this.control) return [];\n const tokens = (this.control as MultiInput).getTokens();\n return tokens.map(t => t.getText());\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as MultiInput).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"mIAAA,MAKSA,EAAUC,EAAA,oBASVC,EAAMC,EAAA,UAUR,MAAMC,UAAyBJ,EAW3BK,OAAOC,EAAkCC,EAAqBC,EAAoB,OAAQC,EAAwBC,GACrHC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAChBK,KAAKE,SAAWN,EAAYO,WAAW,KAAOP,EAAYQ,UAAU,GAAKR,EACzEI,KAAKH,UAAYA,EAEjB,IAAKG,KAAKK,WAAY,CAClBL,KAAKM,QAAU,IAAIC,EAAY,CAC3BC,GAAIR,KAAKS,iBAAiBX,EAAeF,GACzCc,KAAMV,KAAKW,oBAAoBf,EAAaC,EAAWe,UAAW,CAC9DC,UAAYC,GAAmBC,MAAMC,QAAQF,GAAOA,E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