@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.
Files changed (423) hide show
  1. package/package.json +1 -1
  2. package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig-dbg.js +47 -0
  3. package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig-dbg.js.map +1 -0
  4. package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig.d.ts +28 -0
  5. package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig.d.ts.map +1 -0
  6. package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig.js +2 -0
  7. package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig.js.map +1 -0
  8. package/src/nz/co/siliconst/ui5/metaui/ai/AIConfig.ts +39 -0
  9. package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator-dbg.js +83 -0
  10. package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator-dbg.js.map +1 -0
  11. package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator.d.ts +30 -0
  12. package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator.d.ts.map +1 -0
  13. package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator.js +2 -0
  14. package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator.js.map +1 -0
  15. package/src/nz/co/siliconst/ui5/metaui/ai/BaseAIGenerator.ts +74 -0
  16. package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy-dbg.js +61 -0
  17. package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy-dbg.js.map +1 -0
  18. package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy.d.ts +13 -0
  19. package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy.d.ts.map +1 -0
  20. package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy.js +2 -0
  21. package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy.js.map +1 -0
  22. package/src/nz/co/siliconst/ui5/metaui/ai/MockLLMProxy.ts +59 -0
  23. package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy-dbg.js +50 -0
  24. package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy-dbg.js.map +1 -0
  25. package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy.d.ts +12 -0
  26. package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy.d.ts.map +1 -0
  27. package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy.js +2 -0
  28. package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy.js.map +1 -0
  29. package/src/nz/co/siliconst/ui5/metaui/ai/RestLLMProxy.ts +44 -0
  30. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +87 -16
  31. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js.map +1 -1
  32. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts +20 -0
  33. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +1 -1
  34. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js +1 -1
  35. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js.map +1 -1
  36. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts +79 -18
  37. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +44 -4
  38. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js.map +1 -1
  39. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts +23 -0
  40. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts.map +1 -1
  41. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js +1 -1
  42. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js.map +1 -1
  43. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.ts +35 -5
  44. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js +35 -0
  45. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js.map +1 -1
  46. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts +8 -0
  47. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts.map +1 -1
  48. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js +1 -1
  49. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js.map +1 -1
  50. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.ts +37 -0
  51. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate-dbg.js +13 -0
  52. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate-dbg.js.map +1 -1
  53. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts +4 -0
  54. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts.map +1 -1
  55. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.js +1 -1
  56. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.js.map +1 -1
  57. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.ts +13 -0
  58. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js +11 -32
  59. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js.map +1 -1
  60. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.d.ts.map +1 -1
  61. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js +1 -1
  62. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js.map +1 -1
  63. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts +9 -13
  64. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +14 -6
  65. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js.map +1 -1
  66. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts +7 -1
  67. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts.map +1 -1
  68. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js +1 -1
  69. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js.map +1 -1
  70. package/src/nz/co/siliconst/ui5/metaui/core/Engine.ts +21 -11
  71. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +6 -0
  72. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js.map +1 -1
  73. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts.map +1 -1
  74. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js +1 -1
  75. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js.map +1 -1
  76. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts +6 -0
  77. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry-dbg.js +3 -3
  78. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry-dbg.js.map +1 -1
  79. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.d.ts +1 -1
  80. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.d.ts.map +1 -1
  81. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.js +1 -1
  82. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.js.map +1 -1
  83. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.ts +3 -3
  84. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +4 -4
  85. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -1
  86. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +2 -2
  87. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
  88. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js +1 -1
  89. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
  90. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +10 -10
  91. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator-dbg.js +1 -1
  92. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator-dbg.js.map +1 -1
  93. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.js +1 -1
  94. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.js.map +1 -1
  95. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.ts +1 -1
  96. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin-dbg.js.map +1 -1
  97. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts +1 -1
  98. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts.map +1 -1
  99. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts +1 -1
  100. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema-dbg.js.map +1 -1
  101. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts +19 -3
  102. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts.map +1 -1
  103. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts +22 -3
  104. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin-dbg.js.map +1 -1
  105. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.d.ts +3 -2
  106. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.d.ts.map +1 -1
  107. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.ts +3 -2
  108. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js +18 -2
  109. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js.map +1 -1
  110. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.d.ts.map +1 -1
  111. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js +1 -1
  112. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js.map +1 -1
  113. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.ts +19 -2
  114. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js +1 -1
  115. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -1
  116. package/src/nz/co/siliconst/ui5/metaui/library-preload.js +66 -44
  117. package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
  118. package/src/nz/co/siliconst/ui5/metaui/library.d.ts +4 -0
  119. package/src/nz/co/siliconst/ui5/metaui/library.d.ts.map +1 -1
  120. package/src/nz/co/siliconst/ui5/metaui/library.js +1 -1
  121. package/src/nz/co/siliconst/ui5/metaui/library.js.map +1 -1
  122. package/src/nz/co/siliconst/ui5/metaui/library.ts +6 -0
  123. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder-dbg.js +93 -0
  124. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder-dbg.js.map +1 -0
  125. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder.d.ts +52 -0
  126. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder.d.ts.map +1 -0
  127. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder.js +2 -0
  128. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder.js.map +1 -0
  129. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiBuilder.ts +88 -0
  130. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory-dbg.js +47 -0
  131. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory-dbg.js.map +1 -0
  132. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.d.ts +25 -0
  133. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.d.ts.map +1 -0
  134. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.js +2 -0
  135. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.js.map +1 -0
  136. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.ts +43 -0
  137. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver-dbg.js +68 -0
  138. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver-dbg.js.map +1 -0
  139. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.d.ts +21 -0
  140. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.d.ts.map +1 -0
  141. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.js +2 -0
  142. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.js.map +1 -0
  143. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.ts +61 -0
  144. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiTypeMapper-dbg.js +45 -0
  145. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiTypeMapper-dbg.js.map +1 -0
  146. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiTypeMapper.d.ts +25 -0
  147. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiTypeMapper.d.ts.map +1 -0
  148. package/src/nz/co/siliconst/ui5/metaui/{swagger/SwaggerTypeMapper.js → openapi/OpenApiTypeMapper.js} +2 -2
  149. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiTypeMapper.js.map +1 -0
  150. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiTypeMapper.ts +36 -0
  151. package/src/nz/co/siliconst/ui5/metaui/{swagger/SwaggerUIMapper-dbg.js → openapi/OpenApiUIMapper-dbg.js} +29 -17
  152. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper-dbg.js.map +1 -0
  153. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.d.ts +34 -0
  154. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.d.ts.map +1 -0
  155. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.js +2 -0
  156. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.js.map +1 -0
  157. package/src/nz/co/siliconst/ui5/metaui/{swagger/SwaggerUIMapper.ts → openapi/OpenApiUIMapper.ts} +28 -16
  158. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine-dbg.js +50 -0
  159. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine-dbg.js.map +1 -0
  160. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.d.ts +25 -0
  161. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.d.ts.map +1 -0
  162. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.js +2 -0
  163. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.js.map +1 -0
  164. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.ts +43 -0
  165. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin-dbg.js +2 -0
  166. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin-dbg.js.map +1 -0
  167. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin.d.ts +23 -0
  168. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin.d.ts.map +1 -0
  169. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin.js +2 -0
  170. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin.js.map +1 -0
  171. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/interfaces/IHeuristicPlugin.ts +21 -0
  172. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic-dbg.js +117 -0
  173. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic-dbg.js.map +1 -0
  174. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.d.ts +47 -0
  175. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.d.ts.map +1 -0
  176. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.js +2 -0
  177. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.js.map +1 -0
  178. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.ts +113 -0
  179. package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin-dbg.js +2 -0
  180. package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin-dbg.js.map +1 -0
  181. package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin.d.ts +26 -0
  182. package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin.d.ts.map +1 -0
  183. package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin.js +2 -0
  184. package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin.js.map +1 -0
  185. package/src/nz/co/siliconst/ui5/metaui/openapi/interfaces/IOpenApiParserPlugin.ts +25 -0
  186. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser-dbg.js +106 -0
  187. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser-dbg.js.map +1 -0
  188. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.d.ts +27 -0
  189. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.d.ts.map +1 -0
  190. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.js +2 -0
  191. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.js.map +1 -0
  192. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.ts +104 -0
  193. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser-dbg.js +107 -0
  194. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser-dbg.js.map +1 -0
  195. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.d.ts +27 -0
  196. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.d.ts.map +1 -0
  197. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.js +2 -0
  198. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.js.map +1 -0
  199. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.ts +105 -0
  200. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper-dbg.js +347 -0
  201. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper-dbg.js.map +1 -0
  202. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.d.ts +110 -0
  203. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.d.ts.map +1 -0
  204. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.js +2 -0
  205. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.js.map +1 -0
  206. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.ts +377 -0
  207. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js +11 -0
  208. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js.map +1 -1
  209. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.d.ts.map +1 -1
  210. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js +1 -1
  211. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js.map +1 -1
  212. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts +13 -0
  213. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +2 -2
  214. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js.map +1 -1
  215. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js +1 -1
  216. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js.map +1 -1
  217. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +2 -2
  218. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js +31 -7
  219. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js.map +1 -1
  220. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts +17 -1
  221. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts.map +1 -1
  222. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js +1 -1
  223. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js.map +1 -1
  224. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +33 -8
  225. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +3 -4
  226. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
  227. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.d.ts.map +1 -1
  228. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js +1 -1
  229. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
  230. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +3 -4
  231. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +2 -2
  232. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
  233. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js +1 -1
  234. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
  235. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +2 -2
  236. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +1 -1
  237. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js.map +1 -1
  238. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js +1 -1
  239. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
  240. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +1 -1
  241. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +4 -8
  242. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
  243. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.d.ts.map +1 -1
  244. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
  245. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
  246. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +4 -8
  247. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +4 -8
  248. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
  249. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.d.ts.map +1 -1
  250. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
  251. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
  252. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +4 -8
  253. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin-dbg.js +217 -0
  254. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin-dbg.js.map +1 -0
  255. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.d.ts +26 -0
  256. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.d.ts.map +1 -0
  257. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.js +2 -0
  258. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.js.map +1 -0
  259. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.ts +249 -0
  260. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +3 -4
  261. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
  262. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.d.ts.map +1 -1
  263. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js +1 -1
  264. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
  265. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +3 -4
  266. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin-dbg.js +48 -0
  267. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin-dbg.js.map +1 -0
  268. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.d.ts +11 -0
  269. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.d.ts.map +1 -0
  270. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.js +2 -0
  271. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.js.map +1 -0
  272. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.ts +48 -0
  273. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +3 -3
  274. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
  275. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
  276. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
  277. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +3 -3
  278. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +3 -4
  279. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
  280. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.d.ts.map +1 -1
  281. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js +1 -1
  282. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
  283. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +4 -5
  284. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin-dbg.js +58 -0
  285. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin-dbg.js.map +1 -0
  286. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.d.ts +11 -0
  287. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.d.ts.map +1 -0
  288. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.js +2 -0
  289. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.js.map +1 -0
  290. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.ts +57 -0
  291. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js +1 -1
  292. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js.map +1 -1
  293. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.js +1 -1
  294. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.js.map +1 -1
  295. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.ts +1 -1
  296. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js +115 -49
  297. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js.map +1 -1
  298. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts +17 -2
  299. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts.map +1 -1
  300. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js +1 -1
  301. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js.map +1 -1
  302. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts +114 -54
  303. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +3 -4
  304. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js.map +1 -1
  305. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.d.ts.map +1 -1
  306. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js +1 -1
  307. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js.map +1 -1
  308. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +3 -4
  309. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +3 -2
  310. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
  311. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.d.ts.map +1 -1
  312. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
  313. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
  314. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +3 -2
  315. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin-dbg.js +49 -0
  316. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin-dbg.js.map +1 -0
  317. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.d.ts +11 -0
  318. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.d.ts.map +1 -0
  319. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.js +2 -0
  320. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.js.map +1 -0
  321. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.ts +49 -0
  322. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +2 -2
  323. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
  324. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
  325. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
  326. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +2 -2
  327. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin-dbg.js +194 -0
  328. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin-dbg.js.map +1 -0
  329. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.d.ts +25 -0
  330. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.d.ts.map +1 -0
  331. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.js +2 -0
  332. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.js.map +1 -0
  333. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.ts +192 -0
  334. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +2 -2
  335. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
  336. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js +1 -1
  337. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
  338. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +2 -2
  339. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +2 -2
  340. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
  341. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js +1 -1
  342. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
  343. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +2 -2
  344. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +2 -2
  345. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
  346. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
  347. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
  348. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +2 -2
  349. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin-dbg.js +2 -2
  350. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin-dbg.js.map +1 -1
  351. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.js +1 -1
  352. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.js.map +1 -1
  353. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.ts +2 -2
  354. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +2 -2
  355. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
  356. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js +1 -1
  357. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
  358. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +2 -2
  359. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +3 -4
  360. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js.map +1 -1
  361. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.d.ts.map +1 -1
  362. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js +1 -1
  363. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js.map +1 -1
  364. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +3 -4
  365. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +2 -2
  366. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
  367. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js +1 -1
  368. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
  369. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +2 -2
  370. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +4 -8
  371. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
  372. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.d.ts.map +1 -1
  373. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
  374. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
  375. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +4 -8
  376. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +3 -4
  377. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
  378. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.d.ts.map +1 -1
  379. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js +1 -1
  380. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
  381. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +3 -4
  382. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js +2 -2
  383. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js.map +1 -1
  384. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js +1 -1
  385. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js.map +1 -1
  386. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.ts +2 -2
  387. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js +2 -2
  388. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js.map +1 -1
  389. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js +1 -1
  390. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js.map +1 -1
  391. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.ts +2 -2
  392. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor-dbg.js +146 -0
  393. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor-dbg.js.map +1 -0
  394. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.d.ts +27 -0
  395. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.d.ts.map +1 -0
  396. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.js +2 -0
  397. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.js.map +1 -0
  398. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.ts +160 -0
  399. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder-dbg.js +0 -226
  400. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder-dbg.js.map +0 -1
  401. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.d.ts +0 -63
  402. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.d.ts.map +0 -1
  403. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.js +0 -2
  404. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.js.map +0 -1
  405. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.ts +0 -233
  406. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver-dbg.js +0 -43
  407. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver-dbg.js.map +0 -1
  408. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.d.ts +0 -15
  409. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.d.ts.map +0 -1
  410. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.js +0 -2
  411. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.js.map +0 -1
  412. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.ts +0 -37
  413. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper-dbg.js +0 -37
  414. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper-dbg.js.map +0 -1
  415. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.d.ts +0 -18
  416. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.d.ts.map +0 -1
  417. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.js.map +0 -1
  418. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.ts +0 -28
  419. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper-dbg.js.map +0 -1
  420. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.d.ts +0 -27
  421. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.d.ts.map +0 -1
  422. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.js +0 -2
  423. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.js.map +0 -1
@@ -32,14 +32,12 @@ export class TimePlugin extends BasePlugin {
32
32
 
33
33
  this.control = new TextControl({
34
34
  id: this.generateStableId(engineScopeId, bindingPath),
35
- text: {
36
- path: `${modelName}>${bindingPath}`,
37
- type: "sap.ui.model.type.Time",
35
+ text: this.generateBindingInfo(bindingPath, modelName, "sap.ui.model.type.Time", {
38
36
  formatOptions: {
39
37
  source: { pattern: "HH:mm:ss" },
40
38
  pattern: "HH:mm:ss"
41
39
  }
42
- }
40
+ })
43
41
  });
44
42
  this.applyCommonDirectives(this.control, fieldMetadata, modelName);
45
43
  return this.control as Control;
@@ -47,14 +45,12 @@ export class TimePlugin extends BasePlugin {
47
45
 
48
46
  this.control = new TimePicker({
49
47
  id: this.generateStableId(engineScopeId, bindingPath),
50
- value: {
51
- path: `${modelName}>${bindingPath}`,
52
- type: "sap.ui.model.type.Time",
48
+ value: this.generateBindingInfo(bindingPath, modelName, "sap.ui.model.type.Time", {
53
49
  formatOptions: {
54
50
  source: { pattern: "HH:mm:ss" },
55
51
  pattern: "HH:mm:ss"
56
52
  }
57
- },
53
+ }),
58
54
  displayFormat: "HH:mm:ss",
59
55
  editable: !fieldMetadata.ui?.readOnly,
60
56
  required: fieldMetadata.required,
@@ -25,20 +25,19 @@ sap.ui.define(["../controls/BasePlugin", "../../controls/VoiceInputControl", "sa
25
25
  if (!this.isEditable) {
26
26
  this.control = new TextControl({
27
27
  id: this.generateStableId(engineScopeId, bindingPath),
28
- text: {
29
- path: `${modelName}>${bindingPath}`,
28
+ text: this.generateBindingInfo(bindingPath, modelName, undefined, {
30
29
  formatter: val => {
31
30
  if (!val || val === "undefined" || val === "null") return "";
32
31
  return val;
33
32
  }
34
- }
33
+ })
35
34
  });
36
35
  this.applyCommonDirectives(this.control, metadata, modelName);
37
36
  return this.control;
38
37
  }
39
38
  this.control = new VoiceInputControl({
40
39
  id: this.generateStableId(engineScopeId, bindingPath),
41
- value: `{${modelName}>${bindingPath}}`,
40
+ value: this.generateBindingInfo(bindingPath, modelName),
42
41
  schemaMetadata: metadata,
43
42
  readOnly: !!metadata.ui?.readOnly
44
43
  });
@@ -1 +1 @@
1
- {"version":3,"file":"VoiceInputPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","VoiceInputControl","_interopRequireDefault","__VoiceInputControl","VoiceInputPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","path","formatter","val","applyCommonDirectives","value","schemaMetadata","readOnly","ui","attachCapture","result","validateAndApplyVisualState","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["VoiceInputPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport VoiceInputControl from \"../../controls/VoiceInputControl\";\nimport TextControl from \"sap/m/Text\";\n\nexport class VoiceInputPlugin extends BasePlugin {\n /**\n * Renders a `VoiceInputControl` component.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured VoiceInputControl.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: unknown) => {\n if (!val || val === \"undefined\" || val === \"null\") return \"\";\n return val;\n }\n }\n }) as Control;\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new VoiceInputControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n }) as Control;\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as VoiceInputControl).attachCapture(() => {\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n });\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current voice transcription text.\n * @returns {unknown} The text string.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as VoiceInputControl).getValue() : null;\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 sap.ui.core.Control).setProperty(\"readOnly\", !!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;;;;QAASA,UAAU,GAAAC,sBAAA;EAAA,MAGZC,iBAAiB,GAAAC,sBAAA,CAAAC,mBAAA;EAGjB,MAAMC,gBAAgB,SAASL,UAAU,CAAC;IAC7C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWM,MAAMA,CAACC,QAA2B,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MACrL,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACJ,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACK,QAAQ,GAAGJ,WAAW,CAACK,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;MAC5C,IAAI,CAACJ,SAAS,GAAGA,SAAS;MAE1B,IAAI,CAAC,IAAI,CAACK,UAAU,EAAE;QAElB,IAAI,CAACC,OAAO,GAAG,IAAIC,WAAW,CAAC;UAC3BC,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACR,aAAa,EAAEF,WAAW,CAAC;UACrDW,IAAI,EAAE;YACFC,IAAI,EAAE,GAAGX,SAAS,IAAID,WAAW,EAAE;YACnCa,SAAS,EAAGC,GAAY,IAAK;cACzB,IAAI,CAACA,GAAG,IAAIA,GAAG,KAAK,WAAW,IAAIA,GAAG,KAAK,M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B,QAAQ,CAACoB,EAAE,EAAED,QAAQ,CAAC;MAC/F;IACJ;EACJ;EAAC,IAAAS,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA9B,gBAAA,GAAAA,gBAAA;EAAA,OAAA8B,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"VoiceInputPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","VoiceInputControl","_interopRequireDefault","__VoiceInputControl","VoiceInputPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","generateBindingInfo","undefined","formatter","val","applyCommonDirectives","value","schemaMetadata","readOnly","ui","attachCapture","result","validateAndApplyVisualState","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["VoiceInputPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport VoiceInputControl from \"../../controls/VoiceInputControl\";\nimport TextControl from \"sap/m/Text\";\n\nexport class VoiceInputPlugin extends BasePlugin {\n /**\n * Renders a `VoiceInputControl` component.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured VoiceInputControl.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: this.generateBindingInfo(bindingPath, modelName, undefined, {\n formatter: (val: unknown) => {\n if (!val || val === \"undefined\" || val === \"null\") return \"\";\n return val;\n }\n })\n }) as Control;\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new VoiceInputControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: this.generateBindingInfo(bindingPath, modelName),\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n }) as Control;\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as VoiceInputControl).attachCapture(() => {\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n });\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current voice transcription text.\n * @returns {unknown} The text string.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as VoiceInputControl).getValue() : null;\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 sap.ui.core.Control).setProperty(\"readOnly\", !!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;;;;QAASA,UAAU,GAAAC,sBAAA;EAAA,MAGZC,iBAAiB,GAAAC,sBAAA,CAAAC,mBAAA;EAGjB,MAAMC,gBAAgB,SAASL,UAAU,CAAC;IAC7C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWM,MAAMA,CAACC,QAA2B,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MACrL,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACJ,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACK,QAAQ,GAAGJ,WAAW,CAACK,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;MAC5C,IAAI,CAACJ,SAAS,GAAGA,SAAS;MAE1B,IAAI,CAAC,IAAI,CAACK,UAAU,EAAE;QAElB,IAAI,CAACC,OAAO,GAAG,IAAIC,WAAW,CAAC;UAC3BC,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACR,aAAa,EAAEF,WAAW,CAAC;UACrDW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cC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACnB,OAAO,IAAI,IAAI,CAACR,QAAQ,EAAE;QAC/B,IAAI,CAAC,IAAI,CAACO,UAAU,EAAE;QACrB,IAAI,CAACC,OAAO,CAAyBoB,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC5B,QAAQ,CAACqB,EAAE,EAAED,QAAQ,CAAC;MAC/F;IACJ;EACJ;EAAC,IAAAS,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA/B,gBAAA,GAAAA,gBAAA;EAAA,OAAA+B,SAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"VoiceInputPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,8DAA8D,CAAC;IAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAClF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAI1C,MAAa,gBAAiB,SAAQ,UAAU;QAC5C;;;;;;;;;WASG;QACI,MAAM,CAAC,QAAQ,EAAE,iBAAiB,EAAG,WAAW,EAAE,MAAM,EAAG,SAAS,GAAE,MAAe,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO;QAyCxL;;;WAGG;QACH,SAAS,CAAC,QAAQ,IAAI,OAAO;QAI7B;;WAEG;QACH,SAAS,CAAC,UAAU,IAAI,IAAI;KAM/B;CAEA"}
1
+ {"version":3,"file":"VoiceInputPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,8DAA8D,CAAC;IAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAClF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAI1C,MAAa,gBAAiB,SAAQ,UAAU;QAC5C;;;;;;;;;WASG;QACI,MAAM,CAAC,QAAQ,EAAE,iBAAiB,EAAG,WAAW,EAAE,MAAM,EAAG,SAAS,GAAE,MAAe,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO;QAwCxL;;;WAGG;QACH,SAAS,CAAC,QAAQ,IAAI,OAAO;QAI7B;;WAEG;QACH,SAAS,CAAC,UAAU,IAAI,IAAI;KAM/B;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["../controls/BasePlugin","../../controls/VoiceInputControl","sap/m/Text"],function(t,e,i){"use strict";function n(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const a=t["BasePlugin"];const s=n(e);class r extends a{render(t,e,n="meta",a,r){this.onChange=r;this.metadata=t;this.fieldKey=e.replace("/","");this.modelName=n;if(!this.isEditable){this.control=new i({id:this.generateStableId(a,e),text:{path:`${n}>${e}`,formatter:t=>{if(!t||t==="undefined"||t==="null")return"";return t}}});this.applyCommonDirectives(this.control,t,n);return this.control}this.control=new s({id:this.generateStableId(a,e),value:`{${n}>${e}}`,schemaMetadata:t,readOnly:!!t.ui?.readOnly});this.applyCommonDirectives(this.control,t,n);this.control.attachCapture(()=>{const t=this.validateAndApplyVisualState();if(this.onChange){this.onChange(t.isValid,this.fieldKey)}});return this.control}getValue(){return this.control?this.control.getValue():null}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;this.control.setProperty("readOnly",!!this.metadata.ui?.readOnly)}}}var l={__esModule:true};l.VoiceInputPlugin=r;return l});
1
+ sap.ui.define(["../controls/BasePlugin","../../controls/VoiceInputControl","sap/m/Text"],function(t,e,n){"use strict";function i(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const a=t["BasePlugin"];const s=i(e);class r extends a{render(t,e,i="meta",a,r){this.onChange=r;this.metadata=t;this.fieldKey=e.replace("/","");this.modelName=i;if(!this.isEditable){this.control=new n({id:this.generateStableId(a,e),text:this.generateBindingInfo(e,i,undefined,{formatter:t=>{if(!t||t==="undefined"||t==="null")return"";return t}})});this.applyCommonDirectives(this.control,t,i);return this.control}this.control=new s({id:this.generateStableId(a,e),value:this.generateBindingInfo(e,i),schemaMetadata:t,readOnly:!!t.ui?.readOnly});this.applyCommonDirectives(this.control,t,i);this.control.attachCapture(()=>{const t=this.validateAndApplyVisualState();if(this.onChange){this.onChange(t.isValid,this.fieldKey)}});return this.control}getValue(){return this.control?this.control.getValue():null}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;this.control.setProperty("readOnly",!!this.metadata.ui?.readOnly)}}}var o={__esModule:true};o.VoiceInputPlugin=r;return o});
2
2
  //# sourceMappingURL=VoiceInputPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VoiceInputPlugin.js","names":["BasePlugin","___controls_BasePlugin","VoiceInputControl","_interopRequireDefault","__VoiceInputControl","VoiceInputPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","path","formatter","val","applyCommonDirectives","value","schemaMetadata","readOnly","ui","attachCapture","result","validateAndApplyVisualState","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["VoiceInputPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport VoiceInputControl from \"../../controls/VoiceInputControl\";\nimport TextControl from \"sap/m/Text\";\n\nexport class VoiceInputPlugin extends BasePlugin {\n /**\n * Renders a `VoiceInputControl` component.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured VoiceInputControl.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: unknown) => {\n if (!val || val === \"undefined\" || val === \"null\") return \"\";\n return val;\n }\n }\n }) as Control;\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new VoiceInputControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n }) as Control;\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as VoiceInputControl).attachCapture(() => {\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n });\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current voice transcription text.\n * @returns {unknown} The text string.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as VoiceInputControl).getValue() : null;\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 sap.ui.core.Control).setProperty(\"readOnly\", !!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"6MAASA,EAAUC,EAAA,oBAGZC,EAAiBC,EAAAC,GAGjB,MAAMC,UAAyBL,EAW3BM,OAAOC,EAA8BC,EAAsBC,EAAoB,OAAQC,EAAwBC,GAClHC,KAAKD,SAAWA,EAChBC,KAAKL,SAAWA,EAChBK,KAAKC,SAAWL,EAAYM,QAAQ,IAAK,IACzCF,KAAKH,UAAYA,EAEjB,IAAKG,KAAKG,WAAY,CAElBH,KAAKI,QAAU,IAAIC,EAAY,CAC3BC,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCY,KAAM,CACFC,KAAM,GAAGZ,KAAaD,IACtBc,UAAYC,IACR,IAAKA,GAAOA,IAAQ,aAAeA,IAAQ,OAAQ,MAAO,GAC1D,OAAOA,MAInBX,KAAKY,sBAAsBZ,KAAKI,QAAST,EAAUE,GACnD,OAAOG,KAAKI,OAChB,CAEAJ,KAAKI,QAAU,IAAId,EAAkB,CACjCgB,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCiB,MAAO,IAAIhB,KAAaD,KACxBkB,eAAgBnB,EAChBoB,WAAYpB,EAASqB,IAAID,WAG7Bf,KAAKY,sBAAsBZ,KAAKI,QAAST,EAAUE,GAElDG,KAAKI,QAA8Ba,cAAc,KAC9C,MAAMC,EAASlB,KAAKmB,8BAChB,GAAInB,KAAKD,SAAU,CACfC,KAAKD,SAASmB,EAAOE,QAASpB,KAAKC,SACvC,IAGR,OAAOD,KAAKI,OAChB,CAMUiB,WACN,OAAOrB,KAAKI,QAAWJ,KAAKI,QAA8BiB,WAAa,IAC3E,CAKUC,aACN,GAAItB,KAAKI,SAAWJ,KAAKL,SAAU,CAC/B,IAAKK,KAAKG,WAAY,OACrBH,KAAKI,QAAgCmB,YAAY,aAAcvB,KAAKL,SAASqB,IAAID,SACtF,CACJ,EACH,IAAAS,EAAA,CAAAC,WAAA,MAAAD,EAAA/B,mBAAA,OAAA+B,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"VoiceInputPlugin.js","names":["BasePlugin","___controls_BasePlugin","VoiceInputControl","_interopRequireDefault","__VoiceInputControl","VoiceInputPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","generateBindingInfo","undefined","formatter","val","applyCommonDirectives","value","schemaMetadata","readOnly","ui","attachCapture","result","validateAndApplyVisualState","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["VoiceInputPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport VoiceInputControl from \"../../controls/VoiceInputControl\";\nimport TextControl from \"sap/m/Text\";\n\nexport class VoiceInputPlugin extends BasePlugin {\n /**\n * Renders a `VoiceInputControl` component.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured VoiceInputControl.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: this.generateBindingInfo(bindingPath, modelName, undefined, {\n formatter: (val: unknown) => {\n if (!val || val === \"undefined\" || val === \"null\") return \"\";\n return val;\n }\n })\n }) as Control;\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new VoiceInputControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: this.generateBindingInfo(bindingPath, modelName),\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n }) as Control;\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as VoiceInputControl).attachCapture(() => {\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n });\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current voice transcription text.\n * @returns {unknown} The text string.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as VoiceInputControl).getValue() : null;\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 sap.ui.core.Control).setProperty(\"readOnly\", !!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"6MAASA,EAAUC,EAAA,oBAGZC,EAAiBC,EAAAC,GAGjB,MAAMC,UAAyBL,EAW3BM,OAAOC,EAA8BC,EAAsBC,EAAoB,OAAQC,EAAwBC,GAClHC,KAAKD,SAAWA,EAChBC,KAAKL,SAAWA,EAChBK,KAAKC,SAAWL,EAAYM,QAAQ,IAAK,IACzCF,KAAKH,UAAYA,EAEjB,IAAKG,KAAKG,WAAY,CAElBH,KAAKI,QAAU,IAAIC,EAAY,CAC3BC,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCY,KAAMR,KAAKS,oBAAoBb,EAAaC,EAAWa,UAAW,CAC9DC,UAAYC,IACR,IAAKA,GAAOA,IAAQ,aAAeA,IAAQ,OAAQ,MAAO,GAC1D,OAAOA,OAInBZ,KAAKa,sBAAsBb,KAAKI,QAAST,EAAUE,GACnD,OAAOG,KAAKI,OAChB,CAEAJ,KAAKI,QAAU,IAAId,EAAkB,CACjCgB,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCkB,MAAOd,KAAKS,oBAAoBb,EAAaC,GAC7CkB,eAAgBpB,EAChBqB,WAAYrB,EAASsB,IAAID,WAG7BhB,KAAKa,sBAAsBb,KAAKI,QAAST,EAAUE,GAElDG,KAAKI,QAA8Bc,cAAc,KAC9C,MAAMC,EAASnB,KAAKoB,8BAChB,GAAIpB,KAAKD,SAAU,CACfC,KAAKD,SAASoB,EAAOE,QAASrB,KAAKC,SACvC,IAGR,OAAOD,KAAKI,OAChB,CAMUkB,WACN,OAAOtB,KAAKI,QAAWJ,KAAKI,QAA8BkB,WAAa,IAC3E,CAKUC,aACN,GAAIvB,KAAKI,SAAWJ,KAAKL,SAAU,CAC/B,IAAKK,KAAKG,WAAY,OACrBH,KAAKI,QAAgCoB,YAAY,aAAcxB,KAAKL,SAASsB,IAAID,SACtF,CACJ,EACH,IAAAS,EAAA,CAAAC,WAAA,MAAAD,EAAAhC,mBAAA,OAAAgC,CAAA","ignoreList":[]}
@@ -25,13 +25,12 @@ export class VoiceInputPlugin extends BasePlugin {
25
25
 
26
26
  this.control = new TextControl({
27
27
  id: this.generateStableId(engineScopeId, bindingPath),
28
- text: {
29
- path: `${modelName}>${bindingPath}`,
28
+ text: this.generateBindingInfo(bindingPath, modelName, undefined, {
30
29
  formatter: (val: unknown) => {
31
30
  if (!val || val === "undefined" || val === "null") return "";
32
31
  return val;
33
32
  }
34
- }
33
+ })
35
34
  }) as Control;
36
35
  this.applyCommonDirectives(this.control, metadata, modelName);
37
36
  return this.control as Control;
@@ -39,7 +38,7 @@ export class VoiceInputPlugin extends BasePlugin {
39
38
 
40
39
  this.control = new VoiceInputControl({
41
40
  id: this.generateStableId(engineScopeId, bindingPath),
42
- value: `{${modelName}>${bindingPath}}`,
41
+ value: this.generateBindingInfo(bindingPath, modelName),
43
42
  schemaMetadata: metadata,
44
43
  readOnly: !!metadata.ui?.readOnly
45
44
  }) as Control;
@@ -66,8 +66,8 @@ sap.ui.define(["../controls/BasePlugin", "sap/m/Input", "sap/ui/core/Item", "../
66
66
  });
67
67
  filteredData.forEach(itemData => {
68
68
  input.addSuggestionItem(new Item({
69
- key: itemData[keyPath],
70
- text: itemData[textPath] || itemData[keyPath]
69
+ key: String(itemData[keyPath]),
70
+ text: String(itemData[textPath] || itemData[keyPath])
71
71
  }));
72
72
  });
73
73
  }).catch(err => {
@@ -1 +1 @@
1
- {"version":3,"file":"LiveSearchPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","LiveSearchPlugin","render","fieldMetadata","bindingPath","modelName","metadata","input","Input","value","enabled","ui","readOnly","placeholder","showSuggestion","suggest","oEvent","query","getParameter","fetchSuggestions","change","validate","control","vhConfig","valueHelp","url","error","removeAllSuggestionItems","setBusy","fetch","then","res","json","data","keyPath","textPath","lowerQuery","toLowerCase","filteredData","filter","item","textValue","String","includes","forEach","itemData","addSuggestionItem","Item","key","text","catch","err","message","finally","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["LiveSearchPlugin.ts"],"sourcesContent":["/**\n * @file LiveSearchPlugin.ts\n * @description A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport Input from \"sap/m/Input\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n * As the user types, it fetches suggestions from a remote endpoint.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class LiveSearchPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const input = new Input({\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Type to search...\",\n showSuggestion: true,\n suggest: (oEvent: sap.ui.base.Event) => {\n const query = (oEvent as sap.ui.base.Event).getParameter(\"suggestValue\");\n this.fetchSuggestions(input, query);\n },\n change: (oEvent: sap.ui.base.Event) => {\n this.validate();\n }\n });\n\n this.control = input;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for suggestions based on a query. Can be overridden by mock subclasses.\n * @param input The UI5 Input to populate with suggestions.\n * @param query The text typed by the user.\n */\n protected fetchSuggestions(input: Input, query: string): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"LiveSearchPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"LiveSearchPlugin\");\n return;\n }\n\n if (!query) {\n input.removeAllSuggestionItems();\n return;\n }\n \n input.setBusy(true);\n \n // In a real application, the query parameter would be passed to the backend (e.g. ?q=query)\n // Here, we simulate fetching and filter locally, but subclasses can override this entirely.\n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: Record<string, unknown>[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n input.removeAllSuggestionItems();\n\n // Simple client-side filter for demonstration\n const lowerQuery = query.toLowerCase();\n const filteredData = data.filter(item => {\n const textValue = String(item[textPath] || item[keyPath]).toLowerCase();\n return textValue.includes(lowerQuery);\n });\n \n filteredData.forEach(itemData => {\n input.addSuggestionItem(new Item({ \n key: itemData[keyPath], \n text: itemData[textPath] || itemData[keyPath]\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"LiveSearchPlugin\");\n })\n .finally(() => {\n input.setBusy(false);\n });\n }\n\n /**\n * Retrieves the current input value.\n * @returns {unknown} The input text.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as Input).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as Input).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,sBAAA;EAAA,MAKVC,MAAM,GAAAC,gBAAA;EAEf;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,gBAAgB,SAASJ,UAAU,CAAC;IACtCK,MAAMA,CAACC,aAAgC,EAAEC,WAAmB,EAAEC,SAAiB,GAAG,MAAM,EAAW;MACtG,IAAI,CAACC,QAAQ,GAAGH,aAAa;MAE7B,MAAMI,KAAK,GAAG,IAAIC,KAAK,CAAC;QACpBC,KAAK,EAAE,IAAIJ,SAAS,IAAID,WAAW,GAAG;QACtCM,OAAO,EAAE,C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AAAxD,gBAAA,GAAAA,gBAAA;EAAA,OAAAwD,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"LiveSearchPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","LiveSearchPlugin","render","fieldMetadata","bindingPath","modelName","metadata","input","Input","value","enabled","ui","readOnly","placeholder","showSuggestion","suggest","oEvent","query","getParameter","fetchSuggestions","change","validate","control","vhConfig","valueHelp","url","error","removeAllSuggestionItems","setBusy","fetch","then","res","json","data","keyPath","textPath","lowerQuery","toLowerCase","filteredData","filter","item","textValue","String","includes","forEach","itemData","addSuggestionItem","Item","key","text","catch","err","message","finally","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["LiveSearchPlugin.ts"],"sourcesContent":["/**\n * @file LiveSearchPlugin.ts\n * @description A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport Input from \"sap/m/Input\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n * As the user types, it fetches suggestions from a remote endpoint.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class LiveSearchPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const input = new Input({\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Type to search...\",\n showSuggestion: true,\n suggest: (oEvent: sap.ui.base.Event) => {\n const query = (oEvent as sap.ui.base.Event).getParameter(\"suggestValue\");\n this.fetchSuggestions(input, query);\n },\n change: (oEvent: sap.ui.base.Event) => {\n this.validate();\n }\n });\n\n this.control = input;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for suggestions based on a query. Can be overridden by mock subclasses.\n * @param input The UI5 Input to populate with suggestions.\n * @param query The text typed by the user.\n */\n protected fetchSuggestions(input: Input, query: string): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"LiveSearchPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"LiveSearchPlugin\");\n return;\n }\n\n if (!query) {\n input.removeAllSuggestionItems();\n return;\n }\n \n input.setBusy(true);\n \n // In a real application, the query parameter would be passed to the backend (e.g. ?q=query)\n // Here, we simulate fetching and filter locally, but subclasses can override this entirely.\n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: Record<string, unknown>[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n input.removeAllSuggestionItems();\n\n // Simple client-side filter for demonstration\n const lowerQuery = query.toLowerCase();\n const filteredData = data.filter(item => {\n const textValue = String(item[textPath] || item[keyPath]).toLowerCase();\n return textValue.includes(lowerQuery);\n });\n \n filteredData.forEach(itemData => {\n input.addSuggestionItem(new Item({ \n key: String(itemData[keyPath]), \n text: String(itemData[textPath] || itemData[keyPath])\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"LiveSearchPlugin\");\n })\n .finally(() => {\n input.setBusy(false);\n });\n }\n\n /**\n * Retrieves the current input value.\n * @returns {unknown} The input text.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as Input).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as Input).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,sBAAA;EAAA,MAKVC,MAAM,GAAAC,gBAAA;EAEf;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,gBAAgB,SAAS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AEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACjC,OAAO,IAAI,IAAI,CAAChB,QAAQ,EAAE;QAC9B,IAAI,CAACgB,OAAO,CAAWkC,UAAU,CAAC,CAAC,IAAI,CAAClD,QAAQ,CAACK,EAAE,EAAEC,QAAQ,CAAC;MACnE;IACJ;EACJ;EAAC,IAAA6C,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAxD,gBAAA,GAAAA,gBAAA;EAAA,OAAAwD,SAAA;AAAA","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["../controls/BasePlugin","sap/m/Input","sap/ui/core/Item","../../utils/Logger"],function(e,t,s,a){"use strict";const r=e["BasePlugin"];const n=a["Logger"];class o extends r{render(e,s,a="meta"){this.metadata=e;const r=new t({value:`{${a}>${s}}`,enabled:!e.ui?.readOnly,placeholder:"Type to search...",showSuggestion:true,suggest:e=>{const t=e.getParameter("suggestValue");this.fetchSuggestions(r,t)},change:e=>{this.validate()}});this.control=r;return this.control}fetchSuggestions(e,t){const a=this.metadata?.valueHelp;if(!a||!a.url){n.error("LiveSearchPlugin requires a valid valueHelp configuration with a URL.","","LiveSearchPlugin");return}if(!t){e.removeAllSuggestionItems();return}e.setBusy(true);fetch(a.url).then(e=>e.json()).then(r=>{const n=a.keyPath||"key";const o=a.textPath||"text";e.removeAllSuggestionItems();const l=t.toLowerCase();const i=r.filter(e=>{const t=String(e[o]||e[n]).toLowerCase();return t.includes(l)});i.forEach(t=>{e.addSuggestionItem(new s({key:t[n],text:t[o]||t[n]}))})}).catch(e=>{n.error("Failed to load value help from "+a.url,e.message,"LiveSearchPlugin")}).finally(()=>{e.setBusy(false)})}getValue(){return this.control?this.control.getValue():null}applyState(){if(this.control&&this.metadata){this.control.setEnabled(!this.metadata.ui?.readOnly)}}}var l={__esModule:true};l.LiveSearchPlugin=o;return l});
1
+ sap.ui.define(["../controls/BasePlugin","sap/m/Input","sap/ui/core/Item","../../utils/Logger"],function(e,t,s,r){"use strict";const a=e["BasePlugin"];const n=r["Logger"];class o extends a{render(e,s,r="meta"){this.metadata=e;const a=new t({value:`{${r}>${s}}`,enabled:!e.ui?.readOnly,placeholder:"Type to search...",showSuggestion:true,suggest:e=>{const t=e.getParameter("suggestValue");this.fetchSuggestions(a,t)},change:e=>{this.validate()}});this.control=a;return this.control}fetchSuggestions(e,t){const r=this.metadata?.valueHelp;if(!r||!r.url){n.error("LiveSearchPlugin requires a valid valueHelp configuration with a URL.","","LiveSearchPlugin");return}if(!t){e.removeAllSuggestionItems();return}e.setBusy(true);fetch(r.url).then(e=>e.json()).then(a=>{const n=r.keyPath||"key";const o=r.textPath||"text";e.removeAllSuggestionItems();const i=t.toLowerCase();const l=a.filter(e=>{const t=String(e[o]||e[n]).toLowerCase();return t.includes(i)});l.forEach(t=>{e.addSuggestionItem(new s({key:String(t[n]),text:String(t[o]||t[n])}))})}).catch(e=>{n.error("Failed to load value help from "+r.url,e.message,"LiveSearchPlugin")}).finally(()=>{e.setBusy(false)})}getValue(){return this.control?this.control.getValue():null}applyState(){if(this.control&&this.metadata){this.control.setEnabled(!this.metadata.ui?.readOnly)}}}var i={__esModule:true};i.LiveSearchPlugin=o;return i});
2
2
  //# sourceMappingURL=LiveSearchPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LiveSearchPlugin.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","LiveSearchPlugin","render","fieldMetadata","bindingPath","modelName","this","metadata","input","Input","value","enabled","ui","readOnly","placeholder","showSuggestion","suggest","oEvent","query","getParameter","fetchSuggestions","change","validate","control","vhConfig","valueHelp","url","error","removeAllSuggestionItems","setBusy","fetch","then","res","json","data","keyPath","textPath","lowerQuery","toLowerCase","filteredData","filter","item","textValue","String","includes","forEach","itemData","addSuggestionItem","Item","key","text","catch","err","message","finally","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["LiveSearchPlugin.ts"],"sourcesContent":["/**\n * @file LiveSearchPlugin.ts\n * @description A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport Input from \"sap/m/Input\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n * As the user types, it fetches suggestions from a remote endpoint.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class LiveSearchPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const input = new Input({\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Type to search...\",\n showSuggestion: true,\n suggest: (oEvent: sap.ui.base.Event) => {\n const query = (oEvent as sap.ui.base.Event).getParameter(\"suggestValue\");\n this.fetchSuggestions(input, query);\n },\n change: (oEvent: sap.ui.base.Event) => {\n this.validate();\n }\n });\n\n this.control = input;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for suggestions based on a query. Can be overridden by mock subclasses.\n * @param input The UI5 Input to populate with suggestions.\n * @param query The text typed by the user.\n */\n protected fetchSuggestions(input: Input, query: string): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"LiveSearchPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"LiveSearchPlugin\");\n return;\n }\n\n if (!query) {\n input.removeAllSuggestionItems();\n return;\n }\n \n input.setBusy(true);\n \n // In a real application, the query parameter would be passed to the backend (e.g. ?q=query)\n // Here, we simulate fetching and filter locally, but subclasses can override this entirely.\n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: Record<string, unknown>[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n input.removeAllSuggestionItems();\n\n // Simple client-side filter for demonstration\n const lowerQuery = query.toLowerCase();\n const filteredData = data.filter(item => {\n const textValue = String(item[textPath] || item[keyPath]).toLowerCase();\n return textValue.includes(lowerQuery);\n });\n \n filteredData.forEach(itemData => {\n input.addSuggestionItem(new Item({ \n key: itemData[keyPath], \n text: itemData[textPath] || itemData[keyPath]\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"LiveSearchPlugin\");\n })\n .finally(() => {\n input.setBusy(false);\n });\n }\n\n /**\n * Retrieves the current input value.\n * @returns {unknown} The input text.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as Input).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as Input).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"8HAAA,MAKSA,EAAUC,EAAA,oBAKVC,EAAMC,EAAA,UASR,MAAMC,UAAyBJ,EAC3BK,OAAOC,EAAkCC,EAAqBC,EAAoB,QACrFC,KAAKC,SAAWJ,EAEhB,MAAMK,EAAQ,IAAIC,EAAM,CACpBC,MAAO,IAAIL,KAAaD,KACxBO,SAAUR,EAAcS,IAAIC,SAC5BC,YAAa,oBACbC,eAAgB,KAChBC,QAAUC,IACN,MAAMC,EAASD,EAA6BE,aAAa,gBACzDb,KAAKc,iBAAiBZ,EAAOU,IAEjCG,OAASJ,IACLX,KAAKgB,cAIbhB,KAAKiB,QAAUf,EACf,OAAOF,KAAKiB,OAChB,CAOUH,iBAAiBZ,EAAcU,GACrC,MAAMM,EAAWlB,KAAKC,UAAUkB,UAChC,IAAKD,IAAaA,EAASE,IAAK,CAC5B3B,EAAO4B,MAAM,wEAAyE,GAAI,oBAC1F,MACJ,CAEA,IAAKT,EAAO,CACRV,EAAMoB,2BACN,MACJ,CAEApB,EAAMqB,QAAQ,MAIdC,MAAMN,EAASE,KACVK,KAAKC,GAAOA,EAAIC,QAChBF,KAAMG,IACH,MAAMC,EAAUX,EAASW,SAAW,MACpC,MAAMC,EAAWZ,EAASY,UAAY,OAEtC5B,EAAMoB,2BAGN,MAAMS,EAAanB,EAAMoB,cACzB,MAAMC,EAAeL,EAAKM,OAAOC,IAC7B,MAAMC,EAAYC,OAAOF,EAAKL,IAAaK,EAAKN,IAAUG,cAC1D,OAAOI,EAAUE,SAASP,KAG9BE,EAAaM,QAAQC,IACjBtC,EAAMuC,kBAAkB,IAAIC,EAAK,CAC7BC,IAAKH,EAASX,GACde,KAAMJ,EAASV,IAAaU,EAASX,UAIhDgB,MAAMC,IACHrD,EAAO4B,MAAM,kCAAoCH,EAASE,IAAK0B,EAAIC,QAAS,sBAE/EC,QAAQ,KACL9C,EAAMqB,QAAQ,QAE1B,CAMU0B,WACN,OAAOjD,KAAKiB,QAAWjB,KAAKiB,QAAkBgC,WAAa,IAC/D,CAKUC,aACN,GAAIlD,KAAKiB,SAAWjB,KAAKC,SAAU,CAC9BD,KAAKiB,QAAkBkC,YAAYnD,KAAKC,SAASK,IAAIC,SAC1D,CACJ,EACH,IAAA6C,EAAA,CAAAC,WAAA,MAAAD,EAAAzD,mBAAA,OAAAyD,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"LiveSearchPlugin.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","LiveSearchPlugin","render","fieldMetadata","bindingPath","modelName","this","metadata","input","Input","value","enabled","ui","readOnly","placeholder","showSuggestion","suggest","oEvent","query","getParameter","fetchSuggestions","change","validate","control","vhConfig","valueHelp","url","error","removeAllSuggestionItems","setBusy","fetch","then","res","json","data","keyPath","textPath","lowerQuery","toLowerCase","filteredData","filter","item","textValue","String","includes","forEach","itemData","addSuggestionItem","Item","key","text","catch","err","message","finally","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["LiveSearchPlugin.ts"],"sourcesContent":["/**\n * @file LiveSearchPlugin.ts\n * @description A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport Input from \"sap/m/Input\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n * As the user types, it fetches suggestions from a remote endpoint.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class LiveSearchPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const input = new Input({\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Type to search...\",\n showSuggestion: true,\n suggest: (oEvent: sap.ui.base.Event) => {\n const query = (oEvent as sap.ui.base.Event).getParameter(\"suggestValue\");\n this.fetchSuggestions(input, query);\n },\n change: (oEvent: sap.ui.base.Event) => {\n this.validate();\n }\n });\n\n this.control = input;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for suggestions based on a query. Can be overridden by mock subclasses.\n * @param input The UI5 Input to populate with suggestions.\n * @param query The text typed by the user.\n */\n protected fetchSuggestions(input: Input, query: string): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"LiveSearchPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"LiveSearchPlugin\");\n return;\n }\n\n if (!query) {\n input.removeAllSuggestionItems();\n return;\n }\n \n input.setBusy(true);\n \n // In a real application, the query parameter would be passed to the backend (e.g. ?q=query)\n // Here, we simulate fetching and filter locally, but subclasses can override this entirely.\n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: Record<string, unknown>[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n input.removeAllSuggestionItems();\n\n // Simple client-side filter for demonstration\n const lowerQuery = query.toLowerCase();\n const filteredData = data.filter(item => {\n const textValue = String(item[textPath] || item[keyPath]).toLowerCase();\n return textValue.includes(lowerQuery);\n });\n \n filteredData.forEach(itemData => {\n input.addSuggestionItem(new Item({ \n key: String(itemData[keyPath]), \n text: String(itemData[textPath] || itemData[keyPath])\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"LiveSearchPlugin\");\n })\n .finally(() => {\n input.setBusy(false);\n });\n }\n\n /**\n * Retrieves the current input value.\n * @returns {unknown} The input text.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as Input).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as Input).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"8HAAA,MAKSA,EAAUC,EAAA,oBAKVC,EAAMC,EAAA,UASR,MAAMC,UAAyBJ,EAC3BK,OAAOC,EAAkCC,EAAqBC,EAAoB,QACrFC,KAAKC,SAAWJ,EAEhB,MAAMK,EAAQ,IAAIC,EAAM,CACpBC,MAAO,IAAIL,KAAaD,KACxBO,SAAUR,EAAcS,IAAIC,SAC5BC,YAAa,oBACbC,eAAgB,KAChBC,QAAUC,IACN,MAAMC,EAASD,EAA6BE,aAAa,gBACzDb,KAAKc,iBAAiBZ,EAAOU,IAEjCG,OAASJ,IACLX,KAAKgB,cAIbhB,KAAKiB,QAAUf,EACf,OAAOF,KAAKiB,OAChB,CAOUH,iBAAiBZ,EAAcU,GACrC,MAAMM,EAAWlB,KAAKC,UAAUkB,UAChC,IAAKD,IAAaA,EAASE,IAAK,CAC5B3B,EAAO4B,MAAM,wEAAyE,GAAI,oBAC1F,MACJ,CAEA,IAAKT,EAAO,CACRV,EAAMoB,2BACN,MACJ,CAEApB,EAAMqB,QAAQ,MAIdC,MAAMN,EAASE,KACVK,KAAKC,GAAOA,EAAIC,QAChBF,KAAMG,IACH,MAAMC,EAAUX,EAASW,SAAW,MACpC,MAAMC,EAAWZ,EAASY,UAAY,OAEtC5B,EAAMoB,2BAGN,MAAMS,EAAanB,EAAMoB,cACzB,MAAMC,EAAeL,EAAKM,OAAOC,IAC7B,MAAMC,EAAYC,OAAOF,EAAKL,IAAaK,EAAKN,IAAUG,cAC1D,OAAOI,EAAUE,SAASP,KAG9BE,EAAaM,QAAQC,IACjBtC,EAAMuC,kBAAkB,IAAIC,EAAK,CAC7BC,IAAKN,OAAOG,EAASX,IACrBe,KAAMP,OAAOG,EAASV,IAAaU,EAASX,WAIvDgB,MAAMC,IACHrD,EAAO4B,MAAM,kCAAoCH,EAASE,IAAK0B,EAAIC,QAAS,sBAE/EC,QAAQ,KACL9C,EAAMqB,QAAQ,QAE1B,CAMU0B,WACN,OAAOjD,KAAKiB,QAAWjB,KAAKiB,QAAkBgC,WAAa,IAC/D,CAKUC,aACN,GAAIlD,KAAKiB,SAAWjB,KAAKC,SAAU,CAC9BD,KAAKiB,QAAkBkC,YAAYnD,KAAKC,SAASK,IAAIC,SAC1D,CACJ,EACH,IAAA6C,EAAA,CAAAC,WAAA,MAAAD,EAAAzD,mBAAA,OAAAyD,CAAA","ignoreList":[]}
@@ -77,8 +77,8 @@ export class LiveSearchPlugin extends BasePlugin {
77
77
 
78
78
  filteredData.forEach(itemData => {
79
79
  input.addSuggestionItem(new Item({
80
- key: itemData[keyPath],
81
- text: itemData[textPath] || itemData[keyPath]
80
+ key: String(itemData[keyPath]),
81
+ text: String(itemData[textPath] || itemData[keyPath])
82
82
  }));
83
83
  });
84
84
  })
@@ -62,8 +62,8 @@ sap.ui.define(["../controls/BasePlugin", "sap/m/ComboBox", "sap/ui/core/Item", "
62
62
  const textPath = vhConfig.textPath || "text";
63
63
  data.forEach(itemData => {
64
64
  comboBox.addItem(new Item({
65
- key: itemData[keyPath],
66
- text: itemData[textPath] || itemData[keyPath]
65
+ key: String(itemData[keyPath]),
66
+ text: String(itemData[textPath] || itemData[keyPath])
67
67
  }));
68
68
  });
69
69
  }).catch(err => {
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteValueHelpPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","RemoteValueHelpPlugin","isLoaded","render","fieldMetadata","bindingPath","modelName","metadata","comboBox","ComboBox","selectedKey","enabled","ui","readOnly","placeholder","change","oEvent","item","getParameter","val","getKey","validate","attachEventOnce","fetchData","control","vhConfig","valueHelp","url","error","setBusy","fetch","then","res","json","data","keyPath","textPath","forEach","itemData","addItem","Item","key","text","catch","err","message","finally","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["RemoteValueHelpPlugin.ts"],"sourcesContent":["/**\n * @file RemoteValueHelpPlugin.ts\n * @description A custom datasource plugin that simulates fetching data from a remote server.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport ComboBox from \"sap/m/ComboBox\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that simulates fetching data from a remote server.\n * Proves out custom data sources that dynamically load value help.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class RemoteValueHelpPlugin extends BasePlugin {\n private isLoaded = false;\n\n /**\n * Renders a `ComboBox` that simulates fetching data from a remote server.\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 * @returns {Control} The configured ComboBox control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const comboBox = new ComboBox({\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Select a country...\",\n change: (oEvent: sap.ui.base.Event) => {\n const item = (oEvent as sap.ui.base.Event).getParameter(\"selectedItem\");\n const val = item ? item.getKey() : (oEvent as sap.ui.base.Event).getParameter(\"value\"); // Allow free text as well\n this.validate();\n }\n });\n\n // Perform an async load against the REST endpoint\n comboBox.attachEventOnce(\"loadItems\", () => {\n this.fetchData(comboBox);\n });\n\n this.control = comboBox;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for data.\n * @param comboBox The UI5 ComboBox to populate.\n */\n protected fetchData(comboBox: ComboBox): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"RemoteValueHelpPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"RemoteValueHelpPlugin\");\n return;\n }\n \n comboBox.setBusy(true);\n \n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: Record<string, unknown>[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n data.forEach(itemData => {\n comboBox.addItem(new Item({ \n key: itemData[keyPath], \n text: itemData[textPath] || itemData[keyPath]\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"RemoteValueHelpPlugin\");\n })\n .finally(() => {\n comboBox.setBusy(false);\n this.isLoaded = true;\n });\n }\n\n /**\n * Retrieves the current selected key.\n * @returns {unknown} The selected key.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as ComboBox).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as ComboBox).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,sBAAA;EAAA,MAKVC,MAAM,GAAAC,gBAAA;EAEf;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,qBAAqB,SAASJ,UAAU,CAAC;IAC1CK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A,qBAAA;EAAA,OAAAkD,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"RemoteValueHelpPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","RemoteValueHelpPlugin","isLoaded","render","fieldMetadata","bindingPath","modelName","metadata","comboBox","ComboBox","selectedKey","enabled","ui","readOnly","placeholder","change","oEvent","item","getParameter","val","getKey","validate","attachEventOnce","fetchData","control","vhConfig","valueHelp","url","error","setBusy","fetch","then","res","json","data","keyPath","textPath","forEach","itemData","addItem","Item","key","String","text","catch","err","message","finally","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["RemoteValueHelpPlugin.ts"],"sourcesContent":["/**\n * @file RemoteValueHelpPlugin.ts\n * @description A custom datasource plugin that simulates fetching data from a remote server.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport ComboBox from \"sap/m/ComboBox\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that simulates fetching data from a remote server.\n * Proves out custom data sources that dynamically load value help.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class RemoteValueHelpPlugin extends BasePlugin {\n private isLoaded = false;\n\n /**\n * Renders a `ComboBox` that simulates fetching data from a remote server.\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 * @returns {Control} The configured ComboBox control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const comboBox = new ComboBox({\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Select a country...\",\n change: (oEvent: sap.ui.base.Event) => {\n const item = (oEvent as sap.ui.base.Event).getParameter(\"selectedItem\");\n const val = item ? item.getKey() : (oEvent as sap.ui.base.Event).getParameter(\"value\"); // Allow free text as well\n this.validate();\n }\n });\n\n // Perform an async load against the REST endpoint\n comboBox.attachEventOnce(\"loadItems\", () => {\n this.fetchData(comboBox);\n });\n\n this.control = comboBox;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for data.\n * @param comboBox The UI5 ComboBox to populate.\n */\n protected fetchData(comboBox: ComboBox): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"RemoteValueHelpPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"RemoteValueHelpPlugin\");\n return;\n }\n \n comboBox.setBusy(true);\n \n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: Record<string, unknown>[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n data.forEach(itemData => {\n comboBox.addItem(new Item({ \n key: String(itemData[keyPath]), \n text: String(itemData[textPath] || itemData[keyPath])\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"RemoteValueHelpPlugin\");\n })\n .finally(() => {\n comboBox.setBusy(false);\n this.isLoaded = true;\n });\n }\n\n /**\n * Retrieves the current selected key.\n * @returns {unknown} The selected key.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as ComboBox).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as ComboBox).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,sBAAA;EAAA,MAKVC,MAAM,GAAAC,gBAAA;EAEf;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,qBAAqB,SAASJ,UAAU,CAAC;IAC1CK,QAAQ,GAAG,KAAK;;IAExB;AACJ;AACA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AA,qBAAA;EAAA,OAAAmD,SAAA;AAAA","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["../controls/BasePlugin","sap/m/ComboBox","sap/ui/core/Item","../../utils/Logger"],function(e,t,a,l){"use strict";const s=e["BasePlugin"];const o=l["Logger"];class n extends s{isLoaded=false;render(e,a,l="meta"){this.metadata=e;const s=new t({selectedKey:`{${l}>${a}}`,enabled:!e.ui?.readOnly,placeholder:"Select a country...",change:e=>{const t=e.getParameter("selectedItem");const a=t?t.getKey():e.getParameter("value");this.validate()}});s.attachEventOnce("loadItems",()=>{this.fetchData(s)});this.control=s;return this.control}fetchData(e){const t=this.metadata?.valueHelp;if(!t||!t.url){o.error("RemoteValueHelpPlugin requires a valid valueHelp configuration with a URL.","","RemoteValueHelpPlugin");return}e.setBusy(true);fetch(t.url).then(e=>e.json()).then(l=>{const s=t.keyPath||"key";const o=t.textPath||"text";l.forEach(t=>{e.addItem(new a({key:t[s],text:t[o]||t[s]}))})}).catch(e=>{o.error("Failed to load value help from "+t.url,e.message,"RemoteValueHelpPlugin")}).finally(()=>{e.setBusy(false);this.isLoaded=true})}getValue(){return this.control?this.control.getSelectedKey():null}applyState(){if(this.control&&this.metadata){this.control.setEnabled(!this.metadata.ui?.readOnly)}}}var r={__esModule:true};r.RemoteValueHelpPlugin=n;return r});
1
+ sap.ui.define(["../controls/BasePlugin","sap/m/ComboBox","sap/ui/core/Item","../../utils/Logger"],function(e,t,a,l){"use strict";const s=e["BasePlugin"];const n=l["Logger"];class r extends s{isLoaded=false;render(e,a,l="meta"){this.metadata=e;const s=new t({selectedKey:`{${l}>${a}}`,enabled:!e.ui?.readOnly,placeholder:"Select a country...",change:e=>{const t=e.getParameter("selectedItem");const a=t?t.getKey():e.getParameter("value");this.validate()}});s.attachEventOnce("loadItems",()=>{this.fetchData(s)});this.control=s;return this.control}fetchData(e){const t=this.metadata?.valueHelp;if(!t||!t.url){n.error("RemoteValueHelpPlugin requires a valid valueHelp configuration with a URL.","","RemoteValueHelpPlugin");return}e.setBusy(true);fetch(t.url).then(e=>e.json()).then(l=>{const s=t.keyPath||"key";const n=t.textPath||"text";l.forEach(t=>{e.addItem(new a({key:String(t[s]),text:String(t[n]||t[s])}))})}).catch(e=>{n.error("Failed to load value help from "+t.url,e.message,"RemoteValueHelpPlugin")}).finally(()=>{e.setBusy(false);this.isLoaded=true})}getValue(){return this.control?this.control.getSelectedKey():null}applyState(){if(this.control&&this.metadata){this.control.setEnabled(!this.metadata.ui?.readOnly)}}}var o={__esModule:true};o.RemoteValueHelpPlugin=r;return o});
2
2
  //# sourceMappingURL=RemoteValueHelpPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteValueHelpPlugin.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","RemoteValueHelpPlugin","isLoaded","render","fieldMetadata","bindingPath","modelName","this","metadata","comboBox","ComboBox","selectedKey","enabled","ui","readOnly","placeholder","change","oEvent","item","getParameter","val","getKey","validate","attachEventOnce","fetchData","control","vhConfig","valueHelp","url","error","setBusy","fetch","then","res","json","data","keyPath","textPath","forEach","itemData","addItem","Item","key","text","catch","err","message","finally","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["RemoteValueHelpPlugin.ts"],"sourcesContent":["/**\n * @file RemoteValueHelpPlugin.ts\n * @description A custom datasource plugin that simulates fetching data from a remote server.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport ComboBox from \"sap/m/ComboBox\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that simulates fetching data from a remote server.\n * Proves out custom data sources that dynamically load value help.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class RemoteValueHelpPlugin extends BasePlugin {\n private isLoaded = false;\n\n /**\n * Renders a `ComboBox` that simulates fetching data from a remote server.\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 * @returns {Control} The configured ComboBox control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const comboBox = new ComboBox({\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Select a country...\",\n change: (oEvent: sap.ui.base.Event) => {\n const item = (oEvent as sap.ui.base.Event).getParameter(\"selectedItem\");\n const val = item ? item.getKey() : (oEvent as sap.ui.base.Event).getParameter(\"value\"); // Allow free text as well\n this.validate();\n }\n });\n\n // Perform an async load against the REST endpoint\n comboBox.attachEventOnce(\"loadItems\", () => {\n this.fetchData(comboBox);\n });\n\n this.control = comboBox;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for data.\n * @param comboBox The UI5 ComboBox to populate.\n */\n protected fetchData(comboBox: ComboBox): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"RemoteValueHelpPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"RemoteValueHelpPlugin\");\n return;\n }\n \n comboBox.setBusy(true);\n \n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: Record<string, unknown>[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n data.forEach(itemData => {\n comboBox.addItem(new Item({ \n key: itemData[keyPath], \n text: itemData[textPath] || itemData[keyPath]\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"RemoteValueHelpPlugin\");\n })\n .finally(() => {\n comboBox.setBusy(false);\n this.isLoaded = true;\n });\n }\n\n /**\n * Retrieves the current selected key.\n * @returns {unknown} The selected key.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as ComboBox).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as ComboBox).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"iIAAA,MAKSA,EAAUC,EAAA,oBAKVC,EAAMC,EAAA,UASR,MAAMC,UAA8BJ,EAC/BK,SAAW,MAUZC,OAAOC,EAAkCC,EAAqBC,EAAoB,QACrFC,KAAKC,SAAWJ,EAEhB,MAAMK,EAAW,IAAIC,EAAS,CAC1BC,YAAa,IAAIL,KAAaD,KAC9BO,SAAUR,EAAcS,IAAIC,SAC5BC,YAAa,sBACbC,OAASC,IACL,MAAMC,EAAQD,EAA6BE,aAAa,gBACxD,MAAMC,EAAMF,EAAOA,EAAKG,SAAYJ,EAA6BE,aAAa,SAC9EZ,KAAKe,cAKbb,EAASc,gBAAgB,YAAa,KAClChB,KAAKiB,UAAUf,KAGnBF,KAAKkB,QAAUhB,EACf,OAAOF,KAAKkB,OAChB,CAMUD,UAAUf,GAChB,MAAMiB,EAAWnB,KAAKC,UAAUmB,UAChC,IAAKD,IAAaA,EAASE,IAAK,CAC5B7B,EAAO8B,MAAM,6EAA8E,GAAI,yBAC/F,MACJ,CAEApB,EAASqB,QAAQ,MAEjBC,MAAML,EAASE,KACVI,KAAKC,GAAOA,EAAIC,QAChBF,KAAMG,IACH,MAAMC,EAAUV,EAASU,SAAW,MACpC,MAAMC,EAAWX,EAASW,UAAY,OAEtCF,EAAKG,QAAQC,IACT9B,EAAS+B,QAAQ,IAAIC,EAAK,CACtBC,IAAKH,EAASH,GACdO,KAAMJ,EAASF,IAAaE,EAASH,UAIhDQ,MAAMC,IACH9C,EAAO8B,MAAM,kCAAoCH,EAASE,IAAKiB,EAAIC,QAAS,2BAE/EC,QAAQ,KACLtC,EAASqB,QAAQ,OACjBvB,KAAKL,SAAW,MAE5B,CAMU8C,WACN,OAAOzC,KAAKkB,QAAWlB,KAAKkB,QAAqBwB,iBAAmB,IACxE,CAKUC,aACN,GAAI3C,KAAKkB,SAAWlB,KAAKC,SAAU,CAC9BD,KAAKkB,QAAqB0B,YAAY5C,KAAKC,SAASK,IAAIC,SAC7D,CACJ,EACH,IAAAsC,EAAA,CAAAC,WAAA,MAAAD,EAAAnD,wBAAA,OAAAmD,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"RemoteValueHelpPlugin.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","RemoteValueHelpPlugin","isLoaded","render","fieldMetadata","bindingPath","modelName","this","metadata","comboBox","ComboBox","selectedKey","enabled","ui","readOnly","placeholder","change","oEvent","item","getParameter","val","getKey","validate","attachEventOnce","fetchData","control","vhConfig","valueHelp","url","error","setBusy","fetch","then","res","json","data","keyPath","textPath","forEach","itemData","addItem","Item","key","String","text","catch","err","message","finally","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["RemoteValueHelpPlugin.ts"],"sourcesContent":["/**\n * @file RemoteValueHelpPlugin.ts\n * @description A custom datasource plugin that simulates fetching data from a remote server.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport ComboBox from \"sap/m/ComboBox\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that simulates fetching data from a remote server.\n * Proves out custom data sources that dynamically load value help.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class RemoteValueHelpPlugin extends BasePlugin {\n private isLoaded = false;\n\n /**\n * Renders a `ComboBox` that simulates fetching data from a remote server.\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 * @returns {Control} The configured ComboBox control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const comboBox = new ComboBox({\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Select a country...\",\n change: (oEvent: sap.ui.base.Event) => {\n const item = (oEvent as sap.ui.base.Event).getParameter(\"selectedItem\");\n const val = item ? item.getKey() : (oEvent as sap.ui.base.Event).getParameter(\"value\"); // Allow free text as well\n this.validate();\n }\n });\n\n // Perform an async load against the REST endpoint\n comboBox.attachEventOnce(\"loadItems\", () => {\n this.fetchData(comboBox);\n });\n\n this.control = comboBox;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for data.\n * @param comboBox The UI5 ComboBox to populate.\n */\n protected fetchData(comboBox: ComboBox): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"RemoteValueHelpPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"RemoteValueHelpPlugin\");\n return;\n }\n \n comboBox.setBusy(true);\n \n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: Record<string, unknown>[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n data.forEach(itemData => {\n comboBox.addItem(new Item({ \n key: String(itemData[keyPath]), \n text: String(itemData[textPath] || itemData[keyPath])\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"RemoteValueHelpPlugin\");\n })\n .finally(() => {\n comboBox.setBusy(false);\n this.isLoaded = true;\n });\n }\n\n /**\n * Retrieves the current selected key.\n * @returns {unknown} The selected key.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as ComboBox).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as ComboBox).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"iIAAA,MAKSA,EAAUC,EAAA,oBAKVC,EAAMC,EAAA,UASR,M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D,CAAA","ignoreList":[]}
@@ -72,8 +72,8 @@ export class RemoteValueHelpPlugin extends BasePlugin {
72
72
 
73
73
  data.forEach(itemData => {
74
74
  comboBox.addItem(new Item({
75
- key: itemData[keyPath],
76
- text: itemData[textPath] || itemData[keyPath]
75
+ key: String(itemData[keyPath]),
76
+ text: String(itemData[textPath] || itemData[keyPath])
77
77
  }));
78
78
  });
79
79
  })
@@ -0,0 +1,146 @@
1
+ sap.ui.define(["sap/ui/base/Object"], function (UI5Object) {
2
+ "use strict";
3
+
4
+ /**
5
+ * @class
6
+ * OpenApiExtractor utility.
7
+ * Dynamically crawls OpenAPI/Swagger JSON specifications to find all valid
8
+ * root endpoints and schema definitions that can be used as a schemaTarget.
9
+ *
10
+ * @extends sap.ui.base.Object
11
+ * @alias nz.co.siliconst.ui5.metaui.swagger.OpenApiExtractor
12
+ */
13
+ const OpenApiExtractor = UI5Object.extend("nz.co.siliconst.ui5.metaui.swagger.OpenApiExtractor", {});
14
+ /**
15
+ * Parses an OpenAPI document and extracts an array of valid targets.
16
+ *
17
+ * @public
18
+ * @param oSchema The parsed JSON schema object.
19
+ * @returns Array of target bindings.
20
+ */
21
+ OpenApiExtractor.extractTargets = function extractTargets(rawSchema) {
22
+ const aTargets = [];
23
+ if (!rawSchema || typeof rawSchema !== "object") {
24
+ return aTargets;
25
+ }
26
+ const oSchema = rawSchema;
27
+
28
+ // OpenAPI 3.0 (components/schemas)
29
+ if (typeof oSchema.openapi === "string" && oSchema.openapi.startsWith("3.") && oSchema.components && typeof oSchema.components.schemas === "object") {
30
+ Object.keys(oSchema.components.schemas).forEach(sKey => {
31
+ aTargets.push({
32
+ key: "#/components/schemas/" + sKey,
33
+ text: "Schema: " + sKey
34
+ });
35
+ });
36
+ }
37
+
38
+ // Swagger 2.0 (definitions)
39
+ if (typeof oSchema.swagger === "string" && oSchema.swagger.startsWith("2.") && typeof oSchema.definitions === "object" && oSchema.definitions !== null) {
40
+ Object.keys(oSchema.definitions).forEach(sKey => {
41
+ aTargets.push({
42
+ key: "#/definitions/" + sKey,
43
+ text: "Definition: " + sKey
44
+ });
45
+ });
46
+ }
47
+
48
+ // Extract endpoints
49
+ if (typeof oSchema.paths === "object" && oSchema.paths !== null) {
50
+ Object.keys(oSchema.paths).forEach(sPath => {
51
+ const methods = oSchema.paths[sPath];
52
+ if (methods && typeof methods === "object") {
53
+ Object.keys(methods).forEach(sMethod => {
54
+ const escapedPath = sPath.replace(/\//g, "~1");
55
+ aTargets.push({
56
+ key: "#/paths/" + escapedPath + "/" + sMethod,
57
+ text: "Operation: " + sMethod.toUpperCase() + " " + sPath
58
+ });
59
+ });
60
+ }
61
+ });
62
+ }
63
+
64
+ // Primary Schema Detection
65
+ if (aTargets.length > 1) {
66
+ let bestScore = -1;
67
+ let bestIndex = -1;
68
+ const info = oSchema.info;
69
+ const title = info && typeof info.title === "string" ? info.title.toLowerCase().replace(/[^a-z0-9]/g, "") : "";
70
+ const titleWords = info && typeof info.title === "string" ? info.title.toLowerCase().split(/[\s_-]+/) : [];
71
+ aTargets.forEach((target, index) => {
72
+ let score = 0;
73
+
74
+ // Only score Schemas/Definitions, not operations for the primary node heuristic
75
+ if (target.key.includes("/schemas/") || target.key.includes("/definitions/")) {
76
+ const name = target.key.split("/").pop() || "";
77
+ const nameLower = name.toLowerCase();
78
+ const nameClean = nameLower.replace(/[^a-z0-9]/g, "");
79
+ if (title && nameClean === title) score += 30; // Reduced from 100
80
+ else if (title && title.includes(nameClean)) score += 15; // Reduced from 50
81
+ else if (title && nameClean.includes(title)) score += 15; // Reduced from 50
82
+
83
+ titleWords.forEach(word => {
84
+ if (word.length > 3 && nameLower.includes(word)) score += 5; // Reduced from 10
85
+ });
86
+ const genericRoots = ["root", "main", "app", "application", "payload", "document"];
87
+ if (genericRoots.some(r => nameLower.includes(r))) score += 5;
88
+
89
+ // Complexity Fallback
90
+ let schemaDef = null;
91
+ if (target.key.startsWith("#/components/schemas/") && typeof oSchema.components === "object" && oSchema.components !== null) {
92
+ const components = oSchema.components;
93
+ if (typeof components.schemas === "object" && components.schemas !== null) {
94
+ schemaDef = components.schemas[name] || null;
95
+ }
96
+ } else if (target.key.startsWith("#/definitions/") && typeof oSchema.definitions === "object" && oSchema.definitions !== null) {
97
+ schemaDef = oSchema.definitions[name] || null;
98
+ }
99
+ if (schemaDef && typeof schemaDef === "object") {
100
+ const scoreSchemaNode = node => {
101
+ if (!node || typeof node !== "object") return;
102
+ const nodeObj = node;
103
+ if (nodeObj.properties && typeof nodeObj.properties === "object") {
104
+ score += Object.keys(nodeObj.properties).length * 2; // +2 per property
105
+ Object.values(nodeObj.properties).forEach(prop => {
106
+ if (prop && typeof prop === "object") {
107
+ const propObj = prop;
108
+ if (propObj.$ref) score += 20; // +20 for referencing sub-schemas (aggregate root)
109
+ if (propObj.items && typeof propObj.items === "object" && propObj.items.$ref) score += 20;
110
+ }
111
+ });
112
+ }
113
+ if (nodeObj.required && Array.isArray(nodeObj.required)) {
114
+ score += nodeObj.required.length * 5; // +5 per required constraint
115
+ }
116
+ };
117
+ scoreSchemaNode(schemaDef);
118
+
119
+ // Handle OpenAPI composition structures
120
+ if (schemaDef.allOf && Array.isArray(schemaDef.allOf)) {
121
+ schemaDef.allOf.forEach(scoreSchemaNode);
122
+ }
123
+ if (schemaDef.anyOf && Array.isArray(schemaDef.anyOf)) {
124
+ schemaDef.anyOf.forEach(scoreSchemaNode);
125
+ }
126
+ if (schemaDef.oneOf && Array.isArray(schemaDef.oneOf)) {
127
+ schemaDef.oneOf.forEach(scoreSchemaNode);
128
+ }
129
+ }
130
+ }
131
+ if (score > bestScore) {
132
+ bestScore = score;
133
+ bestIndex = index;
134
+ }
135
+ });
136
+ if (bestIndex !== -1 && bestScore > 0) {
137
+ const primary = aTargets.splice(bestIndex, 1)[0];
138
+ primary.text = `(Recommended) ${primary.text}`;
139
+ aTargets.unshift(primary);
140
+ }
141
+ }
142
+ return aTargets;
143
+ };
144
+ return OpenApiExtractor;
145
+ });
146
+ //# sourceMappingURL=OpenApiExtractor-dbg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenApiExtractor-dbg.js","names":["OpenApiExtractor","UI5Object","extend","extractTargets","rawSchema","aTargets","oSchema","openapi","startsWith","components","schemas","Object","keys","forEach","sKey","push","key","text","swagger","definitions","paths","sPath","methods","sMethod","escapedPath","replace","toUpperCase","length","bestScore","bestIndex","info","title","toLowerCase","titleWords","split","target","index","score","includes","name","pop","nameLower","nameClean","word","genericRoots","some","r","schemaDef","scoreSchemaNode","node","nodeObj","properties","values","prop","propObj","$ref","items","required","Array","isArray","allOf","anyOf","oneOf","primary","splice","unshift"],"sources":["OpenApiExtractor.ts"],"sourcesContent":["import UI5Object from \"sap/ui/base/Object\";\n\nexport interface OpenApiTarget {\n key: string;\n text: string;\n}\n\n/**\n * @class\n * OpenApiExtractor utility.\n * Dynamically crawls OpenAPI/Swagger JSON specifications to find all valid \n * root endpoints and schema definitions that can be used as a schemaTarget.\n * \n * @extends sap.ui.base.Object\n * @alias nz.co.siliconst.ui5.metaui.swagger.OpenApiExtractor\n */\nexport default class OpenApiExtractor extends UI5Object {\n\n /**\n * Parses an OpenAPI document and extracts an array of valid targets.\n * \n * @public\n * @param oSchema The parsed JSON schema object.\n * @returns Array of target bindings.\n */\n public static extractTargets(rawSchema: unknown): OpenApiTarget[] {\n const aTargets: OpenApiTarget[] = [];\n if (!rawSchema || typeof rawSchema !== \"object\") {\n return aTargets;\n }\n\n const oSchema = rawSchema as Record<string, unknown>;\n\n // OpenAPI 3.0 (components/schemas)\n if (typeof oSchema.openapi === \"string\" && oSchema.openapi.startsWith(\"3.\") && oSchema.components && typeof (oSchema.components as Record<string,unknown>).schemas === \"object\") {\n Object.keys((oSchema.components as Record<string,unknown>).schemas as Record<string,unknown>).forEach((sKey) => {\n aTargets.push({\n key: \"#/components/schemas/\" + sKey,\n text: \"Schema: \" + sKey\n });\n });\n }\n \n // Swagger 2.0 (definitions)\n if (typeof oSchema.swagger === \"string\" && oSchema.swagger.startsWith(\"2.\") && typeof oSchema.definitions === \"object\" && oSchema.definitions !== null) {\n Object.keys(oSchema.definitions as Record<string,unknown>).forEach((sKey) => {\n aTargets.push({\n key: \"#/definitions/\" + sKey,\n text: \"Definition: \" + sKey\n });\n });\n }\n\n // Extract endpoints\n if (typeof oSchema.paths === \"object\" && oSchema.paths !== null) {\n Object.keys(oSchema.paths as Record<string,unknown>).forEach((sPath) => {\n const methods = (oSchema.paths as Record<string,unknown>)[sPath];\n if (methods && typeof methods === \"object\") {\n Object.keys(methods).forEach((sMethod) => {\n const escapedPath = sPath.replace(/\\//g, \"~1\");\n aTargets.push({\n key: \"#/paths/\" + escapedPath + \"/\" + sMethod,\n text: \"Operation: \" + sMethod.toUpperCase() + \" \" + sPath\n });\n });\n }\n });\n }\n\n // Primary Schema Detection\n if (aTargets.length > 1) {\n let bestScore = -1;\n let bestIndex = -1;\n \n const info = oSchema.info as Record<string, unknown> | undefined;\n const title = (info && typeof info.title === \"string\") ? info.title.toLowerCase().replace(/[^a-z0-9]/g, \"\") : \"\";\n const titleWords = (info && typeof info.title === \"string\") ? info.title.toLowerCase().split(/[\\s_-]+/) : [];\n \n aTargets.forEach((target, index) => {\n let score = 0;\n \n // Only score Schemas/Definitions, not operations for the primary node heuristic\n if (target.key.includes(\"/schemas/\") || target.key.includes(\"/definitions/\")) {\n const name = target.key.split(\"/\").pop() || \"\";\n const nameLower = name.toLowerCase();\n const nameClean = nameLower.replace(/[^a-z0-9]/g, \"\");\n \n if (title && nameClean === title) score += 30; // Reduced from 100\n else if (title && title.includes(nameClean)) score += 15; // Reduced from 50\n else if (title && nameClean.includes(title)) score += 15; // Reduced from 50\n \n titleWords.forEach((word: string) => {\n if (word.length > 3 && nameLower.includes(word)) score += 5; // Reduced from 10\n });\n \n const genericRoots = [\"root\", \"main\", \"app\", \"application\", \"payload\", \"document\"];\n if (genericRoots.some(r => nameLower.includes(r))) score += 5;\n\n // Complexity Fallback\n let schemaDef: Record<string, unknown> | null = null;\n if (target.key.startsWith(\"#/components/schemas/\") && typeof oSchema.components === \"object\" && oSchema.components !== null) {\n const components = oSchema.components as Record<string, unknown>;\n if (typeof components.schemas === \"object\" && components.schemas !== null) {\n schemaDef = (components.schemas as Record<string, Record<string, unknown>>)[name] || null;\n }\n } else if (target.key.startsWith(\"#/definitions/\") && typeof oSchema.definitions === \"object\" && oSchema.definitions !== null) {\n schemaDef = (oSchema.definitions as Record<string, Record<string, unknown>>)[name] || null;\n }\n\n if (schemaDef && typeof schemaDef === \"object\") {\n const scoreSchemaNode = (node: unknown) => {\n if (!node || typeof node !== \"object\") return;\n const nodeObj = node as Record<string, unknown>;\n if (nodeObj.properties && typeof nodeObj.properties === \"object\") {\n score += Object.keys(nodeObj.properties).length * 2; // +2 per property\n Object.values(nodeObj.properties).forEach((prop: unknown) => {\n if (prop && typeof prop === \"object\") {\n const propObj = prop as Record<string, unknown>;\n if (propObj.$ref) score += 20; // +20 for referencing sub-schemas (aggregate root)\n if (propObj.items && typeof propObj.items === \"object\" && (propObj.items as Record<string, unknown>).$ref) score += 20;\n }\n });\n }\n \n if (nodeObj.required && Array.isArray(nodeObj.required)) {\n score += nodeObj.required.length * 5; // +5 per required constraint\n }\n };\n\n scoreSchemaNode(schemaDef);\n\n // Handle OpenAPI composition structures\n if (schemaDef.allOf && Array.isArray(schemaDef.allOf)) {\n schemaDef.allOf.forEach(scoreSchemaNode);\n }\n if (schemaDef.anyOf && Array.isArray(schemaDef.anyOf)) {\n schemaDef.anyOf.forEach(scoreSchemaNode);\n }\n if (schemaDef.oneOf && Array.isArray(schemaDef.oneOf)) {\n schemaDef.oneOf.forEach(scoreSchemaNode);\n }\n }\n }\n \n if (score > bestScore) {\n bestScore = score;\n bestIndex = index;\n }\n });\n\n if (bestIndex !== -1 && bestScore > 0) {\n const primary = aTargets.splice(bestIndex, 1)[0];\n primary.text = `(Recommended) ${primary.text}`;\n aTargets.unshift(primary);\n }\n }\n\n return aTargets;\n }\n}\n"],"mappings":";;;EAOA;A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C,OAAO,CAAC9C,IAAI,GAAG,iBAAiB8C,OAAO,CAAC9C,IAAI,EAAE;QAC9CZ,QAAQ,CAAC4D,OAAO,CAACF,OAAO,CAAC;MAC7B;IACJ;IAEA,OAAO1D,QAAQ;EACnB,CAAC;EAAA,OA9IgBL,gBAAgB;AAAA","ignoreList":[]}
@@ -0,0 +1,27 @@
1
+ declare module "nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor" {
2
+ import UI5Object from "sap/ui/base/Object";
3
+ export interface OpenApiTarget {
4
+ key: string;
5
+ text: string;
6
+ }
7
+ /**
8
+ * @class
9
+ * OpenApiExtractor utility.
10
+ * Dynamically crawls OpenAPI/Swagger JSON specifications to find all valid
11
+ * root endpoints and schema definitions that can be used as a schemaTarget.
12
+ *
13
+ * @extends sap.ui.base.Object
14
+ * @alias nz.co.siliconst.ui5.metaui.swagger.OpenApiExtractor
15
+ */
16
+ export default class OpenApiExtractor extends UI5Object {
17
+ /**
18
+ * Parses an OpenAPI document and extracts an array of valid targets.
19
+ *
20
+ * @public
21
+ * @param oSchema The parsed JSON schema object.
22
+ * @returns Array of target bindings.
23
+ */
24
+ static extractTargets(rawSchema: unknown): OpenApiTarget[];
25
+ }
26
+ }
27
+ //# sourceMappingURL=OpenApiExtractor.d.ts.map