@siliconst/metaui 1.4.14 → 1.4.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) 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 +79 -13
  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 +12 -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 +77 -15
  37. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +31 -1
  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 +15 -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 +26 -1
  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/DialogDelegate-dbg.js +28 -6
  52. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js.map +1 -1
  53. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts +3 -2
  54. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts.map +1 -1
  55. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js +1 -1
  56. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js.map +1 -1
  57. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts +30 -6
  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 +6 -2
  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 +2 -0
  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 +12 -7
  71. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +4 -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 +4 -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 +63 -43
  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} +23 -14
  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} +22 -13
  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 +34 -27
  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 +36 -11
  225. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +4 -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.js +1 -1
  228. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
  229. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +4 -4
  230. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +2 -2
  231. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
  232. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js +1 -1
  233. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
  234. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +2 -2
  235. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +1 -1
  236. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js.map +1 -1
  237. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js +1 -1
  238. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
  239. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +1 -1
  240. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +5 -8
  241. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
  242. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.d.ts.map +1 -1
  243. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
  244. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
  245. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +5 -8
  246. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +5 -8
  247. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
  248. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.d.ts.map +1 -1
  249. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
  250. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
  251. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +5 -8
  252. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin-dbg.js +217 -0
  253. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin-dbg.js.map +1 -0
  254. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.d.ts +26 -0
  255. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.d.ts.map +1 -0
  256. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.js +2 -0
  257. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.js.map +1 -0
  258. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin.ts +249 -0
  259. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +4 -4
  260. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
  261. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js +1 -1
  262. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
  263. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +4 -4
  264. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +4 -3
  265. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
  266. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.d.ts.map +1 -1
  267. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
  268. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
  269. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +4 -3
  270. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +3 -4
  271. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
  272. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.d.ts.map +1 -1
  273. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js +1 -1
  274. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
  275. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +4 -5
  276. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js +2 -1
  277. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js.map +1 -1
  278. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.d.ts.map +1 -1
  279. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.js +1 -1
  280. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.js.map +1 -1
  281. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.ts +2 -1
  282. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js +116 -49
  283. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js.map +1 -1
  284. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts +17 -2
  285. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts.map +1 -1
  286. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js +1 -1
  287. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js.map +1 -1
  288. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts +115 -54
  289. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +4 -4
  290. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js.map +1 -1
  291. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js +1 -1
  292. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js.map +1 -1
  293. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +4 -4
  294. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +37 -12
  295. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
  296. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.d.ts +4 -4
  297. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.d.ts.map +1 -1
  298. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
  299. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
  300. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +40 -15
  301. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +3 -2
  302. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
  303. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.d.ts.map +1 -1
  304. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
  305. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
  306. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +3 -2
  307. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin-dbg.js +194 -0
  308. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin-dbg.js.map +1 -0
  309. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.d.ts +25 -0
  310. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.d.ts.map +1 -0
  311. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.js +2 -0
  312. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.js.map +1 -0
  313. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.ts +192 -0
  314. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +2 -2
  315. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
  316. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js +1 -1
  317. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
  318. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +2 -2
  319. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +2 -2
  320. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
  321. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js +1 -1
  322. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
  323. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +2 -2
  324. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +3 -2
  325. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
  326. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.d.ts.map +1 -1
  327. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
  328. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
  329. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +3 -2
  330. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin-dbg.js +79 -0
  331. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin-dbg.js.map +1 -0
  332. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.d.ts +35 -0
  333. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.d.ts.map +1 -0
  334. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.js +2 -0
  335. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.js.map +1 -0
  336. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.ts +80 -0
  337. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +2 -2
  338. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
  339. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js +1 -1
  340. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
  341. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +2 -2
  342. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +4 -4
  343. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js.map +1 -1
  344. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js +1 -1
  345. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js.map +1 -1
  346. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +4 -4
  347. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +2 -2
  348. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
  349. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js +1 -1
  350. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
  351. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +2 -2
  352. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +5 -8
  353. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
  354. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.d.ts.map +1 -1
  355. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
  356. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
  357. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +5 -8
  358. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +3 -4
  359. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
  360. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.d.ts.map +1 -1
  361. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js +1 -1
  362. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
  363. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +3 -4
  364. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js +2 -2
  365. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js.map +1 -1
  366. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js +1 -1
  367. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js.map +1 -1
  368. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.ts +2 -2
  369. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js +2 -2
  370. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js.map +1 -1
  371. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js +1 -1
  372. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js.map +1 -1
  373. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.ts +2 -2
  374. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor-dbg.js +146 -0
  375. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor-dbg.js.map +1 -0
  376. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.d.ts +27 -0
  377. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.d.ts.map +1 -0
  378. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.js +2 -0
  379. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.js.map +1 -0
  380. package/src/nz/co/siliconst/ui5/metaui/swagger/OpenApiExtractor.ts +160 -0
  381. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder-dbg.js +0 -226
  382. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder-dbg.js.map +0 -1
  383. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.d.ts +0 -63
  384. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.d.ts.map +0 -1
  385. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.js +0 -2
  386. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.js.map +0 -1
  387. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.ts +0 -233
  388. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver-dbg.js +0 -43
  389. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver-dbg.js.map +0 -1
  390. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.d.ts +0 -15
  391. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.d.ts.map +0 -1
  392. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.js +0 -2
  393. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.js.map +0 -1
  394. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.ts +0 -37
  395. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper-dbg.js +0 -37
  396. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper-dbg.js.map +0 -1
  397. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.d.ts +0 -18
  398. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.d.ts.map +0 -1
  399. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.js.map +0 -1
  400. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.ts +0 -28
  401. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper-dbg.js.map +0 -1
  402. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.d.ts +0 -27
  403. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.d.ts.map +0 -1
  404. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.js +0 -2
  405. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultLayoutGenerator-dbg.js","names":["DefaultLayoutGenerator","ensureLayout","schema","uiLayout","Array","isArray","length","type","props","items","properties","Object","keys","elements","generateElementsFromProperties","filter","e","label","title","basePath","key","prop","currentPath","push","ui","scope","error","msg","message","__ui5_require_async","then","m","Logger","Error","__exports","__esModule"],"sources":["DefaultLayoutGenerator.ts"],"sourcesContent":["/**\n * @file DefaultLayoutGenerator.ts\n * @description Automatically synthesizes a default UI layout for schemas that lack an explicit mapping.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\n\n/**\n * Encapsulates the logic to dynamically build a safe, default layout orchestration\n * when the developer or backend fails to provide an explicit `uiLayout`.\n * \n * By elevating this into a dedicated utility, we avoid polluting layout engines\n * (like FormLayout or TableLayout) with structural inference responsibilities.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class DefaultLayoutGenerator {\n /**\n * Inspects a schema. If it has properties but no `uiLayout`, it synthesizes a default.\n * @param schema The ISchema dictionary.\n * @returns boolean True if a layout was synthesized, false if it already existed or was empty.\n */\n public static ensureLayout(schema: ISchema): boolean {\n // If it already has a valid array, do nothing\n if (schema.uiLayout && Array.isArray(schema.uiLayout) && schema.uiLayout.length > 0) {\n return false;\n }\n\n const isArray = schema.type === \"array\";\n const props = isArray ? schema.items?.properties : schema.properties;\n\n if (!props || Object.keys(props).length === 0) {\n return false; // Nothing to map\n }\n\n const elements = this.generateElementsFromProperties(props, \"#/properties\");\n\n if (isArray) {\n // Table layouts expect an array of flat Controls at the root uiLayout\n // For tables, we flatten the deep elements or just render the root level\n // To keep it safe, we'll just use the flat elements for tables\n schema.uiLayout = elements.filter(e => e.type === \"Control\");\n } else {\n // Form layouts expect a grouped structure\n schema.uiLayout = [\n {\n type: \"Group\",\n label: schema.title,\n elements: elements\n }\n ];\n }\n\n return true;\n }\n\n /**\n * Recursively traverses property metadata to synthesize generic Group and Control layout definitions.\n * @param props The properties object from the schema.\n * @param basePath The absolute JSON scope path to prefix bindings.\n * @returns An array of generated layout element descriptors.\n */\n private static generateElementsFromProperties(props: Record<string, import(\"../interfaces/ISchema\").IPropertyMetadata>, basePath: string): ILayoutElement[] {\n const elements: ILayoutElement[] = [];\n for (const key of Object.keys(props)) {\n try {\n const prop = props[key];\n const currentPath = `${basePath}/${key}`;\n\n if (prop.type === \"object\" && prop.properties) {\n elements.push({\n type: \"Group\",\n label: prop.ui?.label || key,\n elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)\n });\n } else {\n elements.push({\n type: \"Control\",\n scope: currentPath\n });\n }\n } catch (error) {\n // Do not swallow errors. A failure to synthesize a property is a critical failure.\n const msg = `[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}': ${(error as Error).message}`;\n import(\"../utils/Logger\").then(m => m.Logger.error(msg));\n throw new Error(msg);\n }\n }\n return elements;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAAA;AACA;AACA;AACA;;EAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,sBAAsB,CAAC;IAChC;AACJ;AACA;AACA;AACA;IACI,OAAcC,YAAYA,CAACC,MAAe,EAAW;MACjD;MACA,IAAIA,MAAM,CAACC,QAAQ,IAAIC,KAAK,CAACC,OAAO,CAACH,MAAM,CAACC,QAAQ,CAAC,IAAID,MAAM,CAACC,QAAQ,CAACG,MAAM,GAAG,CAAC,EAAE;QACjF,OAAO,KAAK;MAChB;MAEA,MAAMD,OAAO,GAAGH,MAAM,CAACK,IAAI,KAAK,OAAO;MACvC,MAAMC,KAAK,GAAGH,OAAO,GAAGH,MAAM,CAACO,KAAK,EAAEC,UAAU,GAAGR,MAAM,CAACQ,UAAU;MAEpE,IAAI,CAACF,KAAK,IAAIG,MAAM,CAAC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CAAC,CAAC;UACN;QACJ,CAAC,CAAC,OAAOI,KAAK,EAAE;UACZ;UACA,MAAMC,GAAG,GAAG,kEAAkEP,GAAG,MAAOM,KAAK,CAAWE,OAAO,EAAE;UACjHC,mBAAA,CAAO,iBAAiB,CAAC,CAACC,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,MAAM,CAACN,KAAK,CAACC,GAAG,CAAC,CAAC;UACxD,MAAM,IAAIM,KAAK,CAACN,GAAG,CAAC;QACxB;MACJ;MACA,OAAOd,QAAQ;IACnB;EACJ;EAAC,IAAAqB,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAlC,sBAAA,GAAAA,sBAAA;EAAA,OAAAkC,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"DefaultLayoutGenerator-dbg.js","names":["Logger","___utils_Logger","DefaultLayoutGenerator","ensureLayout","schema","uiLayout","Array","isArray","length","type","props","items","properties","Object","keys","elements","generateElementsFromProperties","filter","e","label","title","basePath","key","prop","currentPath","push","scope","error","msg","message","Error","__exports","__esModule"],"sources":["DefaultLayoutGenerator.ts"],"sourcesContent":["/**\n * @file DefaultLayoutGenerator.ts\n * @description Automatically synthesizes a default UI layout for schemas that lack an explicit mapping.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\nimport { Logger } from \"../utils/Logger\";\n\n/**\n * Encapsulates the logic to dynamically build a safe, default layout orchestration\n * when the developer or backend fails to provide an explicit `uiLayout`.\n * \n * By elevating this into a dedicated utility, we avoid polluting layout engines\n * (like FormLayout or TableLayout) with structural inference responsibilities.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class DefaultLayoutGenerator {\n /**\n * Inspects a schema. If it has properties but no `uiLayout`, it synthesizes a default.\n * @param schema The ISchema dictionary.\n * @returns boolean True if a layout was synthesized, false if it already existed or was empty.\n */\n public static ensureLayout(schema: ISchema): boolean {\n // If it already has a valid array, do nothing\n if (schema.uiLayout && Array.isArray(schema.uiLayout) && schema.uiLayout.length > 0) {\n return false;\n }\n\n const isArray = schema.type === \"array\";\n const props = isArray ? schema.items?.properties : schema.properties;\n\n if (!props || Object.keys(props).length === 0) {\n return false; // Nothing to map\n }\n\n const elements = this.generateElementsFromProperties(props, \"#/properties\");\n\n if (isArray) {\n // Table layouts expect an array of flat Controls at the root uiLayout\n // For tables, we flatten the deep elements or just render the root level\n // To keep it safe, we'll just use the flat elements for tables\n schema.uiLayout = elements.filter(e => e.type === \"Control\");\n } else {\n // Form layouts expect a grouped structure\n schema.uiLayout = [\n {\n type: \"Group\",\n label: schema.title,\n elements: elements\n }\n ];\n }\n\n return true;\n }\n\n /**\n * Recursively traverses property metadata to synthesize generic Group and Control layout definitions.\n * @param props The properties object from the schema.\n * @param basePath The absolute JSON scope path to prefix bindings.\n * @returns An array of generated layout element descriptors.\n */\n private static generateElementsFromProperties(props: Record<string, import(\"../interfaces/ISchema\").IPropertyMetadata>, basePath: string): ILayoutElement[] {\n const elements: ILayoutElement[] = [];\n for (const key of Object.keys(props)) {\n try {\n const prop = props[key];\n const currentPath = `${basePath}/${key}`;\n\n // We do not recursively inline nested objects as Groups.\n // MetaUI handles nested objects dynamically via the ObjectPlugin drill-down dialog.\n // This prevents duplicate Tables and infinite recursion on circular $refs.\n elements.push({\n type: \"Control\",\n scope: currentPath\n });\n } catch (error) {\n // Do not swallow errors. A failure to synthesize a property is a critical failure.\n const msg = `[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}': ${(error as Error).message}`;\n Logger.error(msg);\n throw new Error(msg);\n }\n }\n return elements;\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAMSA,MAAM,GAAAC,eAAA;EAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,sBAAsB,CAAC;IAChC;AACJ;AACA;AACA;AACA;IACI,OAAcC,YAAYA,CAACC,MAAe,EAAW;MACjD;MACA,IAAIA,MAAM,CAACC,QAAQ,IAAIC,KAA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EAAEF;UACX,CAAC,CAAC;QACN,CAAC,CAAC,OAAOG,KAAK,EAAE;UACZ;UACA,MAAMC,GAAG,GAAG,kEAAkEN,GAAG,MAAOK,KAAK,CAAWE,OAAO,EAAE;UACjH7B,MAAM,CAAC2B,KAAK,CAACC,GAAG,CAAC;UACjB,MAAM,IAAIE,KAAK,CAACF,GAAG,CAAC;QACxB;MACJ;MACA,OAAOb,QAAQ;IACnB;EACJ;EAAC,IAAAgB,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA7B,sBAAA,GAAAA,sBAAA;EAAA,OAAA6B,SAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultLayoutGenerator.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,wDAAwD,CAAC;IACxE;;;OAGG;IAEH,OAAO,EAAE,OAAO,EAAkB,MAAM,+CAA+C,CAAC;IAExF;;;;;;;;;OASG;IACH,MAAa,sBAAsB;QAC/B;;;;WAIG;eACW,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO;QAkCpD;;;;;WAKG;QACH,OAAO,CAAC,MAAM,CAAC,8BAA8B;KA4BhD;CAEA"}
1
+ {"version":3,"file":"DefaultLayoutGenerator.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,wDAAwD,CAAC;IACxE;;;OAGG;IAEH,OAAO,EAAE,OAAO,EAAkB,MAAM,+CAA+C,CAAC;IAGxF;;;;;;;;;OASG;IACH,MAAa,sBAAsB;QAC/B;;;;WAIG;eACW,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO;QAkCpD;;;;;WAKG;QACH,OAAO,CAAC,MAAM,CAAC,8BAA8B;KAuBhD;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define([],function(){"use strict";function e(e){return new Promise(function(t,r){sap.ui.require([e],function(r){if(!(r&&r.__esModule)){r=r===null||!(typeof r==="object"&&e.endsWith("/library"))?{default:r}:r;Object.defineProperty(r,"__esModule",{value:true})}t(r)},function(e){r(e)})})}class t{static ensureLayout(e){if(e.uiLayout&&Array.isArray(e.uiLayout)&&e.uiLayout.length>0){return false}const t=e.type==="array";const r=t?e.items?.properties:e.properties;if(!r||Object.keys(r).length===0){return false}const o=this.generateElementsFromProperties(r,"#/properties");if(t){e.uiLayout=o.filter(e=>e.type==="Control")}else{e.uiLayout=[{type:"Group",label:e.title,elements:o}]}return true}static generateElementsFromProperties(t,r){const o=[];for(const s of Object.keys(t)){try{const e=t[s];const n=`${r}/${s}`;if(e.type==="object"&&e.properties){o.push({type:"Group",label:e.ui?.label||s,elements:this.generateElementsFromProperties(e.properties,`${n}/properties`)})}else{o.push({type:"Control",scope:n})}}catch(t){const r=`[MetaUI] DefaultLayoutGenerator failed to synthesize property '${s}': ${t.message}`;e("../utils/Logger").then(e=>e.Logger.error(r));throw new Error(r)}}return o}}var r={__esModule:true};r.DefaultLayoutGenerator=t;return r});
1
+ sap.ui.define(["../utils/Logger"],function(e){"use strict";const t=e["Logger"];class r{static ensureLayout(e){if(e.uiLayout&&Array.isArray(e.uiLayout)&&e.uiLayout.length>0){return false}const t=e.type==="array";const r=t?e.items?.properties:e.properties;if(!r||Object.keys(r).length===0){return false}const o=this.generateElementsFromProperties(r,"#/properties");if(t){e.uiLayout=o.filter(e=>e.type==="Control")}else{e.uiLayout=[{type:"Group",label:e.title,elements:o}]}return true}static generateElementsFromProperties(e,r){const o=[];for(const s of Object.keys(e)){try{const t=e[s];const n=`${r}/${s}`;o.push({type:"Control",scope:n})}catch(e){const r=`[MetaUI] DefaultLayoutGenerator failed to synthesize property '${s}': ${e.message}`;t.error(r);throw new Error(r)}}return o}}var o={__esModule:true};o.DefaultLayoutGenerator=r;return o});
2
2
  //# sourceMappingURL=DefaultLayoutGenerator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultLayoutGenerator.js","names":["DefaultLayoutGenerator","ensureLayout","schema","uiLayout","Array","isArray","length","type","props","items","properties","Object","keys","elements","this","generateElementsFromProperties","filter","e","label","title","basePath","key","prop","currentPath","push","ui","scope","error","msg","message","__ui5_require_async","then","m","Logger","Error","__exports","__esModule"],"sources":["DefaultLayoutGenerator.ts"],"sourcesContent":["/**\n * @file DefaultLayoutGenerator.ts\n * @description Automatically synthesizes a default UI layout for schemas that lack an explicit mapping.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\n\n/**\n * Encapsulates the logic to dynamically build a safe, default layout orchestration\n * when the developer or backend fails to provide an explicit `uiLayout`.\n * \n * By elevating this into a dedicated utility, we avoid polluting layout engines\n * (like FormLayout or TableLayout) with structural inference responsibilities.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class DefaultLayoutGenerator {\n /**\n * Inspects a schema. If it has properties but no `uiLayout`, it synthesizes a default.\n * @param schema The ISchema dictionary.\n * @returns boolean True if a layout was synthesized, false if it already existed or was empty.\n */\n public static ensureLayout(schema: ISchema): boolean {\n // If it already has a valid array, do nothing\n if (schema.uiLayout && Array.isArray(schema.uiLayout) && schema.uiLayout.length > 0) {\n return false;\n }\n\n const isArray = schema.type === \"array\";\n const props = isArray ? schema.items?.properties : schema.properties;\n\n if (!props || Object.keys(props).length === 0) {\n return false; // Nothing to map\n }\n\n const elements = this.generateElementsFromProperties(props, \"#/properties\");\n\n if (isArray) {\n // Table layouts expect an array of flat Controls at the root uiLayout\n // For tables, we flatten the deep elements or just render the root level\n // To keep it safe, we'll just use the flat elements for tables\n schema.uiLayout = elements.filter(e => e.type === \"Control\");\n } else {\n // Form layouts expect a grouped structure\n schema.uiLayout = [\n {\n type: \"Group\",\n label: schema.title,\n elements: elements\n }\n ];\n }\n\n return true;\n }\n\n /**\n * Recursively traverses property metadata to synthesize generic Group and Control layout definitions.\n * @param props The properties object from the schema.\n * @param basePath The absolute JSON scope path to prefix bindings.\n * @returns An array of generated layout element descriptors.\n */\n private static generateElementsFromProperties(props: Record<string, import(\"../interfaces/ISchema\").IPropertyMetadata>, basePath: string): ILayoutElement[] {\n const elements: ILayoutElement[] = [];\n for (const key of Object.keys(props)) {\n try {\n const prop = props[key];\n const currentPath = `${basePath}/${key}`;\n\n if (prop.type === \"object\" && prop.properties) {\n elements.push({\n type: \"Group\",\n label: prop.ui?.label || key,\n elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)\n });\n } else {\n elements.push({\n type: \"Control\",\n scope: currentPath\n });\n }\n } catch (error) {\n // Do not swallow errors. A failure to synthesize a property is a critical failure.\n const msg = `[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}': ${(error as Error).message}`;\n import(\"../utils/Logger\").then(m => m.Logger.error(msg));\n throw new Error(msg);\n }\n }\n return elements;\n }\n}\n"],"mappings":"qSAiBO,MAAMA,EAMT,mBAAcC,CAAaC,GAEvB,GAAIA,EAAOC,UAAYC,MAAMC,QAAQH,EAAOC,WAAaD,EAAOC,SAASG,OAAS,EAAG,CACjF,OAAO,KACX,CAEA,MAAMD,EAAUH,EAAOK,OAAS,QAChC,MAAMC,EAAQH,EAAUH,EAAOO,OAAOC,WAAaR,EAAOQ,WAE1D,IAAKF,GAASG,OAAOC,KAAKJ,GAAOF,SAAW,EAAG,CAC3C,OAAO,KACX,CAEA,MAAMO,EAAWC,KAAKC,+BAA+BP,EAAO,gBAE5D,GAAIH,EAAS,CAITH,EAAOC,SAAWU,EAASG,OAAOC,GAAKA,EAAEV,OAAS,UACtD,KAAO,CAEHL,EAAOC,SAAW,CACd,CACII,KAAM,QACNW,MAAOhB,EAAOiB,MACdN,SAAUA,GAGtB,CAEA,OAAO,IACX,CAQA,qCAAeE,CAA+BP,EAA0EY,GACpH,MAAMP,EAA6B,GACnC,IAAK,MAAMQ,KAAOV,OAAOC,KAAKJ,GAAQ,CAClC,IACI,MAAMc,EAAOd,EAAMa,GACnB,MAAME,EAAc,GAAGH,KAAYC,IAEnC,GAAIC,EAAKf,OAAS,UAAYe,EAAKZ,WAAY,CAC3CG,EAASW,KAAK,CACVjB,KAAM,QACNW,MAAOI,EAAKG,IAAIP,OAASG,EACzBR,SAAUC,KAAKC,+BAA+BO,EAAKZ,WAAY,GAAGa,iBAE1E,KAAO,CACHV,EAASW,KAAK,CACVjB,KAAM,UACNmB,MAAOH,GAEf,CACJ,CAAE,MAAOI,GAEL,MAAMC,EAAM,kEAAkEP,OAAUM,EAAgBE,UACxGC,EAAO,mBAAmBC,KAAKC,GAAKA,EAAEC,OAAON,MAAMC,IACnD,MAAM,IAAIM,MAAMN,EACpB,CACJ,CACA,OAAOf,CACX,EACH,IAAAsB,EAAA,CAAAC,WAAA,MAAAD,EAAAnC,yBAAA,OAAAmC,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"DefaultLayoutGenerator.js","names":["Logger","___utils_Logger","DefaultLayoutGenerator","ensureLayout","schema","uiLayout","Array","isArray","length","type","props","items","properties","Object","keys","elements","this","generateElementsFromProperties","filter","e","label","title","basePath","key","prop","currentPath","push","scope","error","msg","message","Error","__exports","__esModule"],"sources":["DefaultLayoutGenerator.ts"],"sourcesContent":["/**\n * @file DefaultLayoutGenerator.ts\n * @description Automatically synthesizes a default UI layout for schemas that lack an explicit mapping.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\nimport { Logger } from \"../utils/Logger\";\n\n/**\n * Encapsulates the logic to dynamically build a safe, default layout orchestration\n * when the developer or backend fails to provide an explicit `uiLayout`.\n * \n * By elevating this into a dedicated utility, we avoid polluting layout engines\n * (like FormLayout or TableLayout) with structural inference responsibilities.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class DefaultLayoutGenerator {\n /**\n * Inspects a schema. If it has properties but no `uiLayout`, it synthesizes a default.\n * @param schema The ISchema dictionary.\n * @returns boolean True if a layout was synthesized, false if it already existed or was empty.\n */\n public static ensureLayout(schema: ISchema): boolean {\n // If it already has a valid array, do nothing\n if (schema.uiLayout && Array.isArray(schema.uiLayout) && schema.uiLayout.length > 0) {\n return false;\n }\n\n const isArray = schema.type === \"array\";\n const props = isArray ? schema.items?.properties : schema.properties;\n\n if (!props || Object.keys(props).length === 0) {\n return false; // Nothing to map\n }\n\n const elements = this.generateElementsFromProperties(props, \"#/properties\");\n\n if (isArray) {\n // Table layouts expect an array of flat Controls at the root uiLayout\n // For tables, we flatten the deep elements or just render the root level\n // To keep it safe, we'll just use the flat elements for tables\n schema.uiLayout = elements.filter(e => e.type === \"Control\");\n } else {\n // Form layouts expect a grouped structure\n schema.uiLayout = [\n {\n type: \"Group\",\n label: schema.title,\n elements: elements\n }\n ];\n }\n\n return true;\n }\n\n /**\n * Recursively traverses property metadata to synthesize generic Group and Control layout definitions.\n * @param props The properties object from the schema.\n * @param basePath The absolute JSON scope path to prefix bindings.\n * @returns An array of generated layout element descriptors.\n */\n private static generateElementsFromProperties(props: Record<string, import(\"../interfaces/ISchema\").IPropertyMetadata>, basePath: string): ILayoutElement[] {\n const elements: ILayoutElement[] = [];\n for (const key of Object.keys(props)) {\n try {\n const prop = props[key];\n const currentPath = `${basePath}/${key}`;\n\n // We do not recursively inline nested objects as Groups.\n // MetaUI handles nested objects dynamically via the ObjectPlugin drill-down dialog.\n // This prevents duplicate Tables and infinite recursion on circular $refs.\n elements.push({\n type: \"Control\",\n scope: currentPath\n });\n } catch (error) {\n // Do not swallow errors. A failure to synthesize a property is a critical failure.\n const msg = `[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}': ${(error as Error).message}`;\n Logger.error(msg);\n throw new Error(msg);\n }\n }\n return elements;\n }\n}\n"],"mappings":"2DAAA,MAMSA,EAAMC,EAAA,UAYR,MAAMC,EAMT,mBAAcC,CAAaC,GAEvB,GAAIA,EAAOC,UAAYC,MAAMC,QAAQH,EAAOC,WAAaD,EAAOC,SAASG,OAAS,EAAG,CACjF,OAAO,KACX,CAEA,MAAMD,EAAUH,EAAOK,OAAS,QAChC,MAAMC,EAAQH,EAAUH,EAAOO,OAAOC,WAAaR,EAAOQ,WAE1D,IAAKF,GAASG,OAAOC,KAAKJ,GAAOF,SAAW,EAAG,CAC3C,OAAO,KACX,CAEA,MAAMO,EAAWC,KAAKC,+BAA+BP,EAAO,gBAE5D,GAAIH,EAAS,CAITH,EAAOC,SAAWU,EAASG,OAAOC,GAAKA,EAAEV,OAAS,UACtD,KAAO,CAEHL,EAAOC,SAAW,CACd,CACII,KAAM,QACNW,MAAOhB,EAAOiB,MACdN,SAAUA,GAGtB,CAEA,OAAO,IACX,CAQA,qCAAeE,CAA+BP,EAA0EY,GACpH,MAAMP,EAA6B,GACnC,IAAK,MAAMQ,KAAOV,OAAOC,KAAKJ,GAAQ,CAClC,IACI,MAAMc,EAAOd,EAAMa,GACnB,MAAME,EAAc,GAAGH,KAAYC,IAKnCR,EAASW,KAAK,CACVjB,KAAM,UACNkB,MAAOF,GAEf,CAAE,MAAOG,GAEL,MAAMC,EAAM,kEAAkEN,OAAUK,EAAgBE,UACxG9B,EAAO4B,MAAMC,GACb,MAAM,IAAIE,MAAMF,EACpB,CACJ,CACA,OAAOd,CACX,EACH,IAAAiB,EAAA,CAAAC,WAAA,MAAAD,EAAA9B,yBAAA,OAAA8B,CAAA","ignoreList":[]}
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  import { ISchema, ILayoutElement } from "../interfaces/ISchema";
7
+ import { Logger } from "../utils/Logger";
7
8
 
8
9
  /**
9
10
  * Encapsulates the logic to dynamically build a safe, default layout orchestration
@@ -68,22 +69,17 @@ export class DefaultLayoutGenerator {
68
69
  const prop = props[key];
69
70
  const currentPath = `${basePath}/${key}`;
70
71
 
71
- if (prop.type === "object" && prop.properties) {
72
- elements.push({
73
- type: "Group",
74
- label: prop.ui?.label || key,
75
- elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)
76
- });
77
- } else {
78
- elements.push({
79
- type: "Control",
80
- scope: currentPath
81
- });
82
- }
72
+ // We do not recursively inline nested objects as Groups.
73
+ // MetaUI handles nested objects dynamically via the ObjectPlugin drill-down dialog.
74
+ // This prevents duplicate Tables and infinite recursion on circular $refs.
75
+ elements.push({
76
+ type: "Control",
77
+ scope: currentPath
78
+ });
83
79
  } catch (error) {
84
80
  // Do not swallow errors. A failure to synthesize a property is a critical failure.
85
81
  const msg = `[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}': ${(error as Error).message}`;
86
- import("../utils/Logger").then(m => m.Logger.error(msg));
82
+ Logger.error(msg);
87
83
  throw new Error(msg);
88
84
  }
89
85
  }
@@ -28,6 +28,8 @@ sap.ui.define(["./ConditionEngine", "./PluginRegistry", "sap/m/Text", "../utils/
28
28
 
29
29
  /** Deterministic scope ID injected by the host control to prevent clone collisions. */
30
30
 
31
+ /** Reference to the GeneratorHost that instantiated this engine, for retrieving global definitions. */
32
+
31
33
  /** Callback to notify the host that an internal field changed. */
32
34
 
33
35
  /** Tracks whether the entire engine is running in Editable mode. */
@@ -104,7 +106,9 @@ sap.ui.define(["./ConditionEngine", "./PluginRegistry", "sap/m/Text", "../utils/
104
106
  generateField(fieldMeta, bindingPath, modelName, isTemplate = false) {
105
107
  try {
106
108
  const plugin = PluginRegistry.getInstance().getPlugin(fieldMeta.type || "string", fieldMeta.ui?.widget);
107
- plugin.setEditable(this.isEditable);
109
+ if (typeof plugin.setEditable === "function") {
110
+ plugin.setEditable(this.isEditable);
111
+ }
108
112
  if (typeof plugin.setUseMessageManager === "function") {
109
113
  plugin.setUseMessageManager(this.useMessageManager);
110
114
  }
@@ -115,7 +119,7 @@ sap.ui.define(["./ConditionEngine", "./PluginRegistry", "sap/m/Text", "../utils/
115
119
  });
116
120
  }
117
121
  const scopeId = isTemplate ? undefined : this.engineScopeId;
118
- const control = plugin.render(fieldMeta, bindingPath, modelName, scopeId, this.onChange);
122
+ const control = plugin.render(fieldMeta, bindingPath, modelName, scopeId, this.onChange, this.activeModel);
119
123
  if (this.conditionEngine) {
120
124
  this.conditionEngine.registerPlugin(bindingPath, plugin);
121
125
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Engine-dbg.js","names":["ConditionEngine","___ConditionEngine","PluginRegistry","___PluginRegistry","Logger","___utils_Logger","DefaultLayoutGenerator","___DefaultLayoutGenerator","Engine","conditionEngine","activePlugins","isEditable","hasPartialRenderingErrors","useMessageManager","constructor","editable","build","schema","model","modelName","onSubmit","engineScopeId","onChange","activeModel","isValid","fieldKey","errorMessage","controlId","handleEvent","ensureLayout","warn","layoutStrategy","type","layoutManager","getInstance","getLayout","render","error","msg","message","showErrorPopup","Text","text","generateField","fieldMeta","bindingPath","isTemplate","plugin","getPlugin","ui","widget","setEditable","setUseMessageManager","push","path","scopeId","undefined","control","registerPlugin","generateLayout","validateAll","applyVisualState","errors","item","result","validate","setVisualValidationState","replace","name","getPluginByPath","cleanPath","startsWith","match","find","p","destroy","messageManager","Messaging","existingMessages","getMessageModel","getData","messagesToRemove","targetPath","matched","filter","getTarget","getMessageProcessor","getId","length","removeMessages","__exports","__esModule"],"sources":["Engine.ts"],"sourcesContent":["/**\n * @file Engine.ts\n * @description The central orchestrator that routes data between the Layout Factory and Plugin Registry (v2).\n */\n\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { IPlugin, IPluginValidationResult } from \"../interfaces/IPlugin\";\nimport { ConditionEngine } from \"./ConditionEngine\";\nimport { PluginRegistry } from \"./PluginRegistry\";\nimport Control from \"sap/ui/core/Control\";\nimport VBox from \"sap/m/VBox\";\nimport Text from \"sap/m/Text\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\nimport Core from \"sap/ui/core/Core\";\nimport Messaging from \"sap/ui/core/Messaging\";\n\n/**\n * The Engine is responsible for translating a normalized schema into a physical UI5 layout.\n * It delegates layout generation to the configured `LayoutManager` and field generation to the `PluginRegistry`.\n * It strictly routes execution flow and tracks active plugins for validation.\n * It embodies the \"Plugin-First Philosophy\" by routing all complex field and layout rendering\n * through discrete, decoupled plugins rather than handling native overrides.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class Engine {\n /** Handles dynamic conditional logic across the active form. */\n private conditionEngine: ConditionEngine | null = null;\n\n /** Array of all instantiated plugins generated during the current build. */\n private activePlugins: { plugin: IPlugin, path: string }[] = [];\n\n /** Deterministic scope ID injected by the host control to prevent clone collisions. */\n public engineScopeId?: string;\n\n private activeModel?: sap.ui.model.Model;\n\n /** Callback to notify the host that an internal field changed. */\n public onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void;\n\n /** Tracks whether the entire engine is running in Editable mode. */\n public readonly isEditable: boolean = true;\n\n /** Tracks if any fields or sub-layouts failed to render, requiring a warning strip. */\n public hasPartialRenderingErrors: boolean = false;\n\n /** Tracks whether the engine should delegate visual state to the global MessageManager. */\n public readonly useMessageManager: boolean = false;\n\n /**\n * Initializes a new Engine instance.\n * @param editable Whether the engine should render form fields as editable or read-only.\n * @param useMessageManager Whether to delegate visual state to UI5 MessageManager.\n */\n constructor(editable: boolean = true, useMessageManager: boolean = false) {\n this.isEditable = editable;\n this.useMessageManager = useMessageManager;\n }\n\n /**\n * Bootstraps the layout generation process by resolving the correct layout strategy.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param model The active StateManager JSONModel instance.\n * @param modelName The UI5 model alias used for isolation.\n * @param onSubmit Callback fired when form is submitted.\n * @param engineScopeId Deterministic scope ID for this engine instance.\n * @param onChange Callback fired when field values change.\n * @returns The generated root UI5 Control container.\n */\n public build(schema: ISchema, model: sap.ui.model.Model, modelName: string = \"meta\", onSubmit?: () => void, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control {\n this.conditionEngine = new ConditionEngine(schema);\n this.activePlugins = [];\n this.activeModel = model;\n this.engineScopeId = engineScopeId;\n this.onChange = (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => {\n if (this.conditionEngine && fieldKey) {\n this.conditionEngine.handleEvent(fieldKey, isValid);\n }\n if (onChange) {\n onChange(isValid, fieldKey, errorMessage, controlId);\n }\n };\n\n try {\n // Intercept and synthesize a default layout if the developer/backend failed to provide one\n if (DefaultLayoutGenerator.ensureLayout(schema)) {\n Logger.warn(\"[MetaUI Engine] Missing 'uiLayout' array in schema. Synthesized a default layout mapping to prevent a blank render.\");\n }\n\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n\n return layoutManager.render(schema, modelName, this, onSubmit);\n } catch (error) {\n this.hasPartialRenderingErrors = true;\n const msg = (error as Error).message;\n Logger.error(\"[MetaUI Engine] Critical error during layout generation\", msg);\n Logger.showErrorPopup(`Engine failed to generate the layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Layout Error\" });\n }\n }\n\n /**\n * Instantiates the correct plugin for a specific field based on type and widget hints,\n * and tracks the plugin for global validation.\n * \n * @param fieldMeta The metadata schema specific to the field.\n * @param bindingPath The JSON path representing the field within the payload.\n * @param modelName The UI5 JSONModel name used for data binding.\n * @returns The generated UI5 Control for the field.\n */\n public generateField(fieldMeta: IPropertyMetadata, bindingPath: string, modelName: string, isTemplate: boolean = false): Control {\n try {\n const plugin = PluginRegistry.getInstance().getPlugin(fieldMeta.type || \"string\", fieldMeta.ui?.widget);\n plugin.setEditable(this.isEditable);\n \n if (typeof plugin.setUseMessageManager === \"function\") {\n plugin.setUseMessageManager(this.useMessageManager);\n }\n\n if (!isTemplate) {\n this.activePlugins.push({ plugin, path: bindingPath });\n }\n const scopeId = isTemplate ? undefined : this.engineScopeId;\n const control = plugin.render(fieldMeta, bindingPath, modelName, scopeId, this.onChange);\n\n if (this.conditionEngine) {\n this.conditionEngine.registerPlugin(bindingPath, plugin);\n }\n\n return control;\n } catch (error) {\n this.hasPartialRenderingErrors = true;\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Failed to generate field at ${bindingPath}`, msg);\n Logger.showErrorPopup(`Failed to generate field '${bindingPath}'.\\n\\nDetails: ${msg}`);\n return new Text({ text: `[Error generating field ${bindingPath}]` });\n }\n }\n\n /**\n * Generates a sub-layout (like an embedded table or nested form) without \n * destroying the current Engine state or Condition tracking.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param modelName The UI5 JSONModel name used for data binding (defaults to \"meta\").\n * @param bindingPath Optional path to bind the sub-layout to a specific array/object property.\n * @returns The generated root UI5 Control container.\n */\n public generateLayout(schema: ISchema, modelName: string, bindingPath?: string): Control {\n try {\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n return layoutManager.render(schema, modelName, this, undefined, bindingPath);\n } catch (error) {\n this.hasPartialRenderingErrors = true;\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Critical error generating sub-layout for ${bindingPath}`, msg);\n Logger.showErrorPopup(`Engine failed to generate a sub-layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Sub-Layout Error\" });\n }\n }\n\n /**\n * Iterates through all active plugins and triggers their internal validation pipelines.\n * \n * @param applyVisualState If true, explicitly instructs the plugin to natively paint its own ValueState.\n * @returns {IPluginValidationResult[]} Array of validation error objects. Empty array if valid.\n */\n public validateAll(applyVisualState: boolean = false): IPluginValidationResult[] {\n const errors: IPluginValidationResult[] = [];\n for (const item of this.activePlugins) {\n try {\n const result = item.plugin.validate();\n if (applyVisualState && typeof item.plugin.setVisualValidationState === \"function\") {\n item.plugin.setVisualValidationState(result.isValid, result.errorMessage);\n }\n \n if (!result.isValid) {\n // Ensure the path is bound to the error so GeneratorHost knows where to target it\n result.fieldKey = result.fieldKey || item.path.replace(/^\\//, \"\");\n errors.push(result);\n // Add console log to find which plugin fails silently\n Logger.error(\"[MetaUI Validation] Plugin failed validation silently:\", item.path || item.plugin.constructor.name);\n }\n } catch (error) {\n Logger.error(`[MetaUI Engine] Error validating plugin at ${item.path}`, (error as Error).message);\n }\n }\n return errors;\n }\n\n /**\n * Retrieves an active plugin instance by its absolute binding path.\n * Useful for programmatic field manipulation (e.g., custom error injection).\n * \n * @param path The binding path (e.g. \"/General/CustomerName\").\n * @returns {IPlugin | undefined} The plugin instance, or undefined if not found.\n */\n public getPluginByPath(path: string): import(\"../interfaces/IPlugin\").IPlugin | undefined {\n const cleanPath = path.startsWith(\"/\") ? path : `/${path}`;\n const match = this.activePlugins.find(p => p.path === cleanPath || p.path === `/${cleanPath}`);\n return match ? match.plugin : undefined;\n }\n\n /**\n * Cleans up internal state and destroys the condition engine to prevent memory leaks.\n */\n public destroy(): void {\n if (this.conditionEngine) {\n this.conditionEngine.destroy();\n this.conditionEngine = null;\n }\n\n // ------------------------------------------------------------------------\n // Ghost Error Prevention\n // Flush MessageManager for active plugins before destroying their controls\n // ------------------------------------------------------------------------\n const messageManager = Messaging;\n const existingMessages = messageManager.getMessageModel().getData();\n const messagesToRemove: sap.ui.core.message.Message[] = [];\n\n for (const item of this.activePlugins) {\n if (this.activeModel) {\n const targetPath = `/${item.path.replace(/^\\//, \"\")}`;\n const matched = existingMessages.filter((msg: sap.ui.core.message.Message) =>\n msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.activeModel.getId()\n );\n messagesToRemove.push(...matched);\n }\n if (typeof item.plugin.destroy === \"function\") {\n item.plugin.destroy();\n }\n }\n\n if (messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n\n this.activePlugins = [];\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAQSA,eAAe,GAAAC,kBAAA;EAAA,MACfC,cAAc,GAAAC,iBAAA;EAAA,MAIdC,MAAM,GAAAC,eAAA;EAAA,MACNC,sBAAsB,GAAAC,yBAAA;EAI/B;AACA;AACA;AACA;AACA;AACA;A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AACgE,KAAK,CAAC,CAChI,CAAC;UACDN,gBAAgB,CAAC5B,IAAI,CAAC,GAAG8B,OAAO,CAAC;QACrC;QACA,IAAI,OAAOpB,IAAI,CAAChB,MAAM,CAAC4B,OAAO,KAAK,UAAU,EAAE;UAC3CZ,IAAI,CAAChB,MAAM,CAAC4B,OAAO,CAAC,CAAC;QACzB;MACJ;MAEA,IAAIM,gBAAgB,CAACO,MAAM,GAAG,CAAC,EAAE;QAC7BZ,cAAc,CAACa,cAAc,CAACR,gBAAgB,CAAC;MACnD;MAEA,IAAI,CAACvE,aAAa,GAAG,EAAE;IAC3B;EACJ;EAAC,IAAAgF,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAlF,MAAA,GAAAA,MAAA;EAAA,OAAAkF,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"Engine-dbg.js","names":["ConditionEngine","___ConditionEngine","PluginRegistry","___PluginRegistry","Logger","___utils_Logger","DefaultLayoutGenerator","___DefaultLayoutGenerator","Engine","conditionEngine","activePlugins","isEditable","hasPartialRenderingErrors","useMessageManager","constructor","editable","build","schema","model","modelName","onSubmit","engineScopeId","onChange","activeModel","isValid","fieldKey","errorMessage","controlId","handleEvent","ensureLayout","warn","layoutStrategy","type","layoutManager","getInstance","getLayout","render","error","msg","message","showErrorPopup","Text","text","generateField","fieldMeta","bindingPath","isTemplate","plugin","getPlugin","ui","widget","setEditable","setUseMessageManager","push","path","scopeId","undefined","control","registerPlugin","generateLayout","validateAll","applyVisualState","errors","item","result","validate","setVisualValidationState","replace","name","getPluginByPath","cleanPath","startsWith","match","find","p","destroy","messageManager","Messaging","existingMessages","getMessageModel","getData","messagesToRemove","targetPath","matched","filter","getTarget","getMessageProcessor","getId","length","removeMessages","__exports","__esModule"],"sources":["Engine.ts"],"sourcesContent":["/**\n * @file Engine.ts\n * @description The central orchestrator that routes data between the Layout Factory and Plugin Registry (v2).\n */\n\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { IPlugin, IPluginValidationResult } from \"../interfaces/IPlugin\";\nimport { ConditionEngine } from \"./ConditionEngine\";\nimport { PluginRegistry } from \"./PluginRegistry\";\nimport Control from \"sap/ui/core/Control\";\nimport VBox from \"sap/m/VBox\";\nimport Text from \"sap/m/Text\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\nimport Core from \"sap/ui/core/Core\";\nimport Messaging from \"sap/ui/core/Messaging\";\n\n/**\n * The Engine is responsible for translating a normalized schema into a physical UI5 layout.\n * It delegates layout generation to the configured `LayoutManager` and field generation to the `PluginRegistry`.\n * It strictly routes execution flow and tracks active plugins for validation.\n * It embodies the \"Plugin-First Philosophy\" by routing all complex field and layout rendering\n * through discrete, decoupled plugins rather than handling native overrides.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class Engine {\n /** Handles dynamic conditional logic across the active form. */\n private conditionEngine: ConditionEngine | null = null;\n\n /** Array of all instantiated plugins generated during the current build. */\n private activePlugins: { plugin: IPlugin, path: string }[] = [];\n\n /** Deterministic scope ID injected by the host control to prevent clone collisions. */\n public engineScopeId?: string;\n\n private activeModel?: sap.ui.model.Model;\n\n /** Reference to the GeneratorHost that instantiated this engine, for retrieving global definitions. */\n public host?: unknown;\n\n /** Callback to notify the host that an internal field changed. */\n public onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void;\n\n /** Tracks whether the entire engine is running in Editable mode. */\n public readonly isEditable: boolean = true;\n\n /** Tracks if any fields or sub-layouts failed to render, requiring a warning strip. */\n public hasPartialRenderingErrors: boolean = false;\n\n /** Tracks whether the engine should delegate visual state to the global MessageManager. */\n public readonly useMessageManager: boolean = false;\n\n /**\n * Initializes a new Engine instance.\n * @param editable Whether the engine should render form fields as editable or read-only.\n * @param useMessageManager Whether to delegate visual state to UI5 MessageManager.\n */\n constructor(editable: boolean = true, useMessageManager: boolean = false) {\n this.isEditable = editable;\n this.useMessageManager = useMessageManager;\n }\n\n /**\n * Bootstraps the layout generation process by resolving the correct layout strategy.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param model The active StateManager JSONModel instance.\n * @param modelName The UI5 model alias used for isolation.\n * @param onSubmit Callback fired when form is submitted.\n * @param engineScopeId Deterministic scope ID for this engine instance.\n * @param onChange Callback fired when field values change.\n * @returns The generated root UI5 Control container.\n */\n public build(schema: ISchema, model: sap.ui.model.Model, modelName: string = \"meta\", onSubmit?: () => void, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control {\n this.conditionEngine = new ConditionEngine(schema);\n this.activePlugins = [];\n this.activeModel = model;\n this.engineScopeId = engineScopeId;\n this.onChange = (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => {\n if (this.conditionEngine && fieldKey) {\n this.conditionEngine.handleEvent(fieldKey, isValid);\n }\n if (onChange) {\n onChange(isValid, fieldKey, errorMessage, controlId);\n }\n };\n\n try {\n // Intercept and synthesize a default layout if the developer/backend failed to provide one\n if (DefaultLayoutGenerator.ensureLayout(schema)) {\n Logger.warn(\"[MetaUI Engine] Missing 'uiLayout' array in schema. Synthesized a default layout mapping to prevent a blank render.\");\n }\n\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n\n return layoutManager.render(schema, modelName, this, onSubmit);\n } catch (error) {\n this.hasPartialRenderingErrors = true;\n const msg = (error as Error).message;\n Logger.error(\"[MetaUI Engine] Critical error during layout generation\", msg);\n Logger.showErrorPopup(`Engine failed to generate the layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Layout Error\" });\n }\n }\n\n /**\n * Instantiates the correct plugin for a specific field based on type and widget hints,\n * and tracks the plugin for global validation.\n * \n * @param fieldMeta The metadata schema specific to the field.\n * @param bindingPath The JSON path representing the field within the payload.\n * @param modelName The UI5 JSONModel name used for data binding.\n * @returns The generated UI5 Control for the field.\n */\n public generateField(fieldMeta: IPropertyMetadata, bindingPath: string, modelName: string, isTemplate: boolean = false): Control {\n try {\n const plugin = PluginRegistry.getInstance().getPlugin(fieldMeta.type || \"string\", fieldMeta.ui?.widget);\n if (typeof plugin.setEditable === \"function\") {\n plugin.setEditable(this.isEditable);\n }\n\n if (typeof plugin.setUseMessageManager === \"function\") {\n plugin.setUseMessageManager(this.useMessageManager);\n }\n\n if (!isTemplate) {\n this.activePlugins.push({ plugin, path: bindingPath });\n }\n const scopeId = isTemplate ? undefined : this.engineScopeId;\n const control = plugin.render(fieldMeta, bindingPath, modelName, scopeId, this.onChange, this.activeModel);\n\n if (this.conditionEngine) {\n this.conditionEngine.registerPlugin(bindingPath, plugin);\n }\n\n return control;\n } catch (error) {\n this.hasPartialRenderingErrors = true;\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Failed to generate field at ${bindingPath}`, msg);\n Logger.showErrorPopup(`Failed to generate field '${bindingPath}'.\\n\\nDetails: ${msg}`);\n return new Text({ text: `[Error generating field ${bindingPath}]` });\n }\n }\n\n /**\n * Generates a sub-layout (like an embedded table or nested form) without \n * destroying the current Engine state or Condition tracking.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param modelName The UI5 JSONModel name used for data binding (defaults to \"meta\").\n * @param bindingPath Optional path to bind the sub-layout to a specific array/object property.\n * @returns The generated root UI5 Control container.\n */\n public generateLayout(schema: ISchema, modelName: string, bindingPath?: string): Control {\n try {\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n return layoutManager.render(schema, modelName, this, undefined, bindingPath);\n } catch (error) {\n this.hasPartialRenderingErrors = true;\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Critical error generating sub-layout for ${bindingPath}`, msg);\n Logger.showErrorPopup(`Engine failed to generate a sub-layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Sub-Layout Error\" });\n }\n }\n\n /**\n * Iterates through all active plugins and triggers their internal validation pipelines.\n * \n * @param applyVisualState If true, explicitly instructs the plugin to natively paint its own ValueState.\n * @returns {IPluginValidationResult[]} Array of validation error objects. Empty array if valid.\n */\n public validateAll(applyVisualState: boolean = false): IPluginValidationResult[] {\n const errors: IPluginValidationResult[] = [];\n for (const item of this.activePlugins) {\n try {\n const result = item.plugin.validate();\n if (applyVisualState && typeof item.plugin.setVisualValidationState === \"function\") {\n item.plugin.setVisualValidationState(result.isValid, result.errorMessage);\n }\n\n if (!result.isValid) {\n // Ensure the path is bound to the error so GeneratorHost knows where to target it\n result.fieldKey = result.fieldKey || item.path.replace(/^\\//, \"\");\n errors.push(result);\n // Add console log to find which plugin fails silently\n Logger.error(\"[MetaUI Validation] Plugin failed validation silently:\", item.path || item.plugin.constructor.name);\n }\n } catch (error) {\n Logger.error(`[MetaUI Engine] Error validating plugin at ${item.path}`, (error as Error).message);\n }\n }\n return errors;\n }\n\n /**\n * Retrieves an active plugin instance by its absolute binding path.\n * Useful for programmatic field manipulation (e.g., custom error injection).\n * \n * @param path The binding path (e.g. \"/General/CustomerName\").\n * @returns {IPlugin | undefined} The plugin instance, or undefined if not found.\n */\n public getPluginByPath(path: string): import(\"../interfaces/IPlugin\").IPlugin | undefined {\n const cleanPath = path.startsWith(\"/\") ? path : `/${path}`;\n const match = this.activePlugins.find(p => p.path === cleanPath || p.path === `/${cleanPath}`);\n return match ? match.plugin : undefined;\n }\n\n /**\n * Cleans up internal state and destroys the condition engine to prevent memory leaks.\n */\n public destroy(): void {\n if (this.conditionEngine) {\n this.conditionEngine.destroy();\n this.conditionEngine = null;\n }\n\n // ------------------------------------------------------------------------\n // Ghost Error Prevention\n // Flush MessageManager for active plugins before destroying their controls\n // ------------------------------------------------------------------------\n const messageManager = Messaging;\n const existingMessages = messageManager.getMessageModel().getData();\n const messagesToRemove: unknown[] = [];\n\n for (const item of this.activePlugins) {\n if (this.activeModel) {\n const targetPath = `/${item.path.replace(/^\\//, \"\")}`;\n const matched = (existingMessages as { getTarget: () => string, getMessageProcessor: () => { getId: () => string } }[]).filter(msg =>\n msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.activeModel!.getId()\n );\n messagesToRemove.push(...matched);\n }\n if (typeof item.plugin.destroy === \"function\") {\n item.plugin.destroy();\n }\n }\n\n if (messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n\n this.activePlugins = [];\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAQSA,eAAe,GAAAC,kBAAA;EAAA,MACfC,cAAc,GAAAC,iBAAA;EAAA,MAIdC,MAAM,GAAAC,eAAA;EAAA,MACNC,sBAAsB,GAAAC,yBAAA;EAI/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,MAAM,CAAC;IAChB;IACQC,eAAe,GAA2B,IAAI;;IAEtD;IACQC,aAAa,GAAwC,EAAE;;IAE/D;;IAKA;;IAGA;;IAGA;IACgBC,UAAU,GAAY,IAAI;;IAE1C;IACOC,yBAAyB,GAAY,KAAK;;IAEjD;IACgBC,iBAAiB,GAAY,KAAK;;IAElD;AACJ;AACA;AACA;AACA;IACIC,WAAWA,CAACC,QAAiB,GAAG,IAAI,EAAEF,iBAA0B,GAAG,KAAK,EAAE;MACtE,IAAI,CAACF,UAAU,GAAGI,QAAQ;MAC1B,IAAI,CAACF,iBAAiB,GAAGA,iBAAiB;IAC9C;;IAEA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWG,KAAKA,CAACC,MAAe,EAAEC,KAAyB,EAAEC,SAAiB,GAAG,MAAM,EAAEC,QAAqB,EAAEC,aAAsB,EAAEC,QAAmG,EAAW;MAC9O,IAAI,CAACb,eAAe,GAAG,IAAIT,eAAe,CAACiB,MAAM,CAAC;MAClD,IAAI,CAACP,aAAa,GAAG,E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,GAAG,IAAI;MAC/B;;MAEA;MACA;MACA;MACA;MACA,MAAMmE,cAAc,GAAGC,SAAS;MAChC,MAAMC,gBAAgB,GAAGF,cAAc,CAACG,eAAe,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;MACnE,MAAMC,gBAA2B,GAAG,EAAE;MAEtC,KAAK,MAAMlB,IAAI,IAAI,IAAI,CAACrD,aAAa,EAAE;QACnC,IAAI,IAAI,CAACa,WAAW,EAAE;UAClB,MAAM2D,UAAU,GAAG,IAAInB,IAAI,CAACT,IAAI,CAACa,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE;UACrD,MAAMgB,OAAO,GAAIL,gBAAgB,CAAuFM,MAAM,CAAC9C,GAAG,IAC9HA,GAAG,CAAC+C,SAAS,CAAC,CAAC,KAAKH,UAAU,IAAI5C,GAAG,CAACgD,mBAAmB,CAAC,CAAC,IAAIhD,GAAG,CAACgD,mBAAmB,CAAC,CAAC,CAACC,KAAK,CAAC,CAAC,KAAK,IAAI,CAAChE,WAAW,CAAEgE,KAAK,CAAC,CACjI,CAAC;UACDN,gBAAgB,CAAC5B,IAAI,CAAC,GAAG8B,OAAO,CAAC;QACrC;QACA,IAAI,OAAOpB,IAAI,CAAChB,MAAM,CAAC4B,OAAO,KAAK,UAAU,EAAE;UAC3CZ,IAAI,CAAChB,MAAM,CAAC4B,OAAO,CAAC,CAAC;QACzB;MACJ;MAEA,IAAIM,gBAAgB,CAACO,MAAM,GAAG,CAAC,EAAE;QAC7BZ,cAAc,CAACa,cAAc,CAACR,gBAAgB,CAAC;MACnD;MAEA,IAAI,CAACvE,aAAa,GAAG,EAAE;IAC3B;EACJ;EAAC,IAAAgF,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAlF,MAAA,GAAAA,MAAA;EAAA,OAAAkF,SAAA;AAAA","ignoreList":[]}
@@ -24,6 +24,8 @@ declare module "nz/co/siliconst/ui5/metaui/core/Engine" {
24
24
  /** Deterministic scope ID injected by the host control to prevent clone collisions. */
25
25
  engineScopeId?: string;
26
26
  private activeModel?;
27
+ /** Reference to the GeneratorHost that instantiated this engine, for retrieving global definitions. */
28
+ host?: unknown;
27
29
  /** Callback to notify the host that an internal field changed. */
28
30
  onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void;
29
31
  /** Tracks whether the entire engine is running in Editable mode. */
@@ -1 +1 @@
1
- {"version":3,"file":"Engine.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/Engine.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,wCAAwC,CAAC;IACxD;;;OAGG;IAEH,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAE3F,OAAO,EAAW,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;IAGjG,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAQ1C;;;;;;;;;OASG;IACH,MAAa,MAAM;QACf,gEAAgE;QAChE,OAAO,CAAC,eAAe,CAAgC;QAEvD,4EAA4E;QAC5E,OAAO,CAAC,aAAa,CAA2C;QAEhE,uFAAuF;QAChF,aAAa,CAAC,EAAE,MAAM,CAAC;QAE9B,OAAO,CAAC,WAAW,CAAC,CAAqB;QAEzC,kEAAkE;QAC3D,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;QAE3G,oEAAoE;QACpE,SAAgB,UAAU,EAAE,OAAO,CAAQ;QAE3C,uFAAuF;QAChF,yBAAyB,EAAE,OAAO,CAAS;QAElD,2FAA2F;QAC3F,SAAgB,iBAAiB,EAAE,OAAO,CAAS;QAEnD;;;;WAIG;oBACS,QAAQ,GAAE,OAAc,EAAE,iBAAiB,GAAE,OAAe;QAKxE;;;;;;;;;;WAUG;QACI,KAAK,CAAC,MAAM,EAAE,OA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;QACI,WAAW,CAAC,gBAAgB,GAAE,OAAe,GAAG,uBAAuB,EAAE;QAuBhF;;;;;;WAMG;QACI,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,+CAA+C,EAAE,OAAO,GAAG,SAAS;QAMjH;;WAEG;QACI,OAAO,IAAI,IAAI;KAiCzB;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["./ConditionEngine","./PluginRegistry","sap/m/Text","../utils/Logger","./DefaultLayoutGenerator","sap/ui/core/Messaging"],function(e,t,n,i,a,r){"use strict";const s=e["ConditionEngine"];const o=t["PluginRegistry"];const g=i["Logger"];const l=a["DefaultLayoutGenerator"];class u{conditionEngine=null;activePlugins=[];isEditable=true;hasPartialRenderingErrors=false;useMessageManager=false;constructor(e=true,t=false){this.isEditable=e;this.useMessageManager=t}build(e,t,i="meta",a,r,u){this.conditionEngine=new s(e);this.activePlugins=[];this.activeModel=t;this.engineScopeId=r;this.onChange=(e,t,n,i)=>{if(this.conditionEngine&&t){this.conditionEngine.handleEvent(t,e)}if(u){u(e,t,n,i)}};try{if(l.ensureLayout(e)){g.warn("[MetaUI Engine] Missing 'uiLayout' array in schema. Synthesized a default layout mapping to prevent a blank render.")}const t=e.layoutStrategy||(e.type==="array"?"table":"form");const n=o.getInstance().getLayout(t);return n.render(e,i,this,a)}catch(e){this.hasPartialRenderingErrors=true;const t=e.message;g.error("[MetaUI Engine] Critical error during layout generation",t);g.showErrorPopup(`Engine failed to generate the layout.\n\nDetails: ${t}`);return new n({text:"Critical Layout Error"})}}generateField(e,t,i,a=false){try{const n=o.getInstance().getPlugin(e.type||"string",e.ui?.widget);n.setEditable(this.isEditable);if(typeof n.setUseMessageManager==="function"){n.setUseMessageManager(this.useMessageManager)}if(!a){this.activePlugins.push({plugin:n,path:t})}const r=a?undefined:this.engineScopeId;const s=n.render(e,t,i,r,this.onChange);if(this.conditionEngine){this.conditionEngine.registerPlugin(t,n)}return s}catch(e){this.hasPartialRenderingErrors=true;const i=e.message;g.error(`[MetaUI Engine] Failed to generate field at ${t}`,i);g.showErrorPopup(`Failed to generate field '${t}'.\n\nDetails: ${i}`);return new n({text:`[Error generating field ${t}]`})}}generateLayout(e,t,i){try{const n=e.layoutStrategy||(e.type==="array"?"table":"form");const a=o.getInstance().getLayout(n);return a.render(e,t,this,undefined,i)}catch(e){this.hasPartialRenderingErrors=true;const t=e.message;g.error(`[MetaUI Engine] Critical error generating sub-layout for ${i}`,t);g.showErrorPopup(`Engine failed to generate a sub-layout.\n\nDetails: ${t}`);return new n({text:"Critical Sub-Layout Error"})}}validateAll(e=false){const t=[];for(const n of this.activePlugins){try{const i=n.plugin.validate();if(e&&typeof n.plugin.setVisualValidationState==="function"){n.plugin.setVisualValidationState(i.isValid,i.errorMessage)}if(!i.isValid){i.fieldKey=i.fieldKey||n.path.replace(/^\//,"");t.push(i);g.error("[MetaUI Validation] Plugin failed validation silently:",n.path||n.plugin.constructor.name)}}catch(e){g.error(`[MetaUI Engine] Error validating plugin at ${n.path}`,e.message)}}return t}getPluginByPath(e){const t=e.startsWith("/")?e:`/${e}`;const n=this.activePlugins.find(e=>e.path===t||e.path===`/${t}`);return n?n.plugin:undefined}destroy(){if(this.conditionEngine){this.conditionEngine.destroy();this.conditionEngine=null}const e=r;const t=e.getMessageModel().getData();const n=[];for(const e of this.activePlugins){if(this.activeModel){const i=`/${e.path.replace(/^\//,"")}`;const a=t.filter(e=>e.getTarget()===i&&e.getMessageProcessor()&&e.getMessageProcessor().getId()===this.activeModel.getId());n.push(...a)}if(typeof e.plugin.destroy==="function"){e.plugin.destroy()}}if(n.length>0){e.removeMessages(n)}this.activePlugins=[]}}var c={__esModule:true};c.Engine=u;return c});
1
+ sap.ui.define(["./ConditionEngine","./PluginRegistry","sap/m/Text","../utils/Logger","./DefaultLayoutGenerator","sap/ui/core/Messaging"],function(e,t,n,i,a,s){"use strict";const r=e["ConditionEngine"];const o=t["PluginRegistry"];const g=i["Logger"];const l=a["DefaultLayoutGenerator"];class u{conditionEngine=null;activePlugins=[];isEditable=true;hasPartialRenderingErrors=false;useMessageManager=false;constructor(e=true,t=false){this.isEditable=e;this.useMessageManager=t}build(e,t,i="meta",a,s,u){this.conditionEngine=new r(e);this.activePlugins=[];this.activeModel=t;this.engineScopeId=s;this.onChange=(e,t,n,i)=>{if(this.conditionEngine&&t){this.conditionEngine.handleEvent(t,e)}if(u){u(e,t,n,i)}};try{if(l.ensureLayout(e)){g.warn("[MetaUI Engine] Missing 'uiLayout' array in schema. Synthesized a default layout mapping to prevent a blank render.")}const t=e.layoutStrategy||(e.type==="array"?"table":"form");const n=o.getInstance().getLayout(t);return n.render(e,i,this,a)}catch(e){this.hasPartialRenderingErrors=true;const t=e.message;g.error("[MetaUI Engine] Critical error during layout generation",t);g.showErrorPopup(`Engine failed to generate the layout.\n\nDetails: ${t}`);return new n({text:"Critical Layout Error"})}}generateField(e,t,i,a=false){try{const n=o.getInstance().getPlugin(e.type||"string",e.ui?.widget);if(typeof n.setEditable==="function"){n.setEditable(this.isEditable)}if(typeof n.setUseMessageManager==="function"){n.setUseMessageManager(this.useMessageManager)}if(!a){this.activePlugins.push({plugin:n,path:t})}const s=a?undefined:this.engineScopeId;const r=n.render(e,t,i,s,this.onChange,this.activeModel);if(this.conditionEngine){this.conditionEngine.registerPlugin(t,n)}return r}catch(e){this.hasPartialRenderingErrors=true;const i=e.message;g.error(`[MetaUI Engine] Failed to generate field at ${t}`,i);g.showErrorPopup(`Failed to generate field '${t}'.\n\nDetails: ${i}`);return new n({text:`[Error generating field ${t}]`})}}generateLayout(e,t,i){try{const n=e.layoutStrategy||(e.type==="array"?"table":"form");const a=o.getInstance().getLayout(n);return a.render(e,t,this,undefined,i)}catch(e){this.hasPartialRenderingErrors=true;const t=e.message;g.error(`[MetaUI Engine] Critical error generating sub-layout for ${i}`,t);g.showErrorPopup(`Engine failed to generate a sub-layout.\n\nDetails: ${t}`);return new n({text:"Critical Sub-Layout Error"})}}validateAll(e=false){const t=[];for(const n of this.activePlugins){try{const i=n.plugin.validate();if(e&&typeof n.plugin.setVisualValidationState==="function"){n.plugin.setVisualValidationState(i.isValid,i.errorMessage)}if(!i.isValid){i.fieldKey=i.fieldKey||n.path.replace(/^\//,"");t.push(i);g.error("[MetaUI Validation] Plugin failed validation silently:",n.path||n.plugin.constructor.name)}}catch(e){g.error(`[MetaUI Engine] Error validating plugin at ${n.path}`,e.message)}}return t}getPluginByPath(e){const t=e.startsWith("/")?e:`/${e}`;const n=this.activePlugins.find(e=>e.path===t||e.path===`/${t}`);return n?n.plugin:undefined}destroy(){if(this.conditionEngine){this.conditionEngine.destroy();this.conditionEngine=null}const e=s;const t=e.getMessageModel().getData();const n=[];for(const e of this.activePlugins){if(this.activeModel){const i=`/${e.path.replace(/^\//,"")}`;const a=t.filter(e=>e.getTarget()===i&&e.getMessageProcessor()&&e.getMessageProcessor().getId()===this.activeModel.getId());n.push(...a)}if(typeof e.plugin.destroy==="function"){e.plugin.destroy()}}if(n.length>0){e.removeMessages(n)}this.activePlugins=[]}}var c={__esModule:true};c.Engine=u;return c});
2
2
  //# sourceMappingURL=Engine.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Engine.js","names":["ConditionEngine","___ConditionEngine","PluginRegistry","___PluginRegistry","Logger","___utils_Logger","DefaultLayoutGenerator","___DefaultLayoutGenerator","Engine","conditionEngine","activePlugins","isEditable","hasPartialRenderingErrors","useMessageManager","constructor","editable","this","build","schema","model","modelName","onSubmit","engineScopeId","onChange","activeModel","isValid","fieldKey","errorMessage","controlId","handleEvent","ensureLayout","warn","layoutStrategy","type","layoutManager","getInstance","getLayout","render","error","msg","message","showErrorPopup","Text","text","generateField","fieldMeta","bindingPath","isTemplate","plugin","getPlugin","ui","widget","setEditable","setUseMessageManager","push","path","scopeId","undefined","control","registerPlugin","generateLayout","validateAll","applyVisualState","errors","item","result","validate","setVisualValidationState","replace","name","getPluginByPath","cleanPath","startsWith","match","find","p","destroy","messageManager","Messaging","existingMessages","getMessageModel","getData","messagesToRemove","targetPath","matched","filter","getTarget","getMessageProcessor","getId","length","removeMessages","__exports","__esModule"],"sources":["Engine.ts"],"sourcesContent":["/**\n * @file Engine.ts\n * @description The central orchestrator that routes data between the Layout Factory and Plugin Registry (v2).\n */\n\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { IPlugin, IPluginValidationResult } from \"../interfaces/IPlugin\";\nimport { ConditionEngine } from \"./ConditionEngine\";\nimport { PluginRegistry } from \"./PluginRegistry\";\nimport Control from \"sap/ui/core/Control\";\nimport VBox from \"sap/m/VBox\";\nimport Text from \"sap/m/Text\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\nimport Core from \"sap/ui/core/Core\";\nimport Messaging from \"sap/ui/core/Messaging\";\n\n/**\n * The Engine is responsible for translating a normalized schema into a physical UI5 layout.\n * It delegates layout generation to the configured `LayoutManager` and field generation to the `PluginRegistry`.\n * It strictly routes execution flow and tracks active plugins for validation.\n * It embodies the \"Plugin-First Philosophy\" by routing all complex field and layout rendering\n * through discrete, decoupled plugins rather than handling native overrides.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class Engine {\n /** Handles dynamic conditional logic across the active form. */\n private conditionEngine: ConditionEngine | null = null;\n\n /** Array of all instantiated plugins generated during the current build. */\n private activePlugins: { plugin: IPlugin, path: string }[] = [];\n\n /** Deterministic scope ID injected by the host control to prevent clone collisions. */\n public engineScopeId?: string;\n\n private activeModel?: sap.ui.model.Model;\n\n /** Callback to notify the host that an internal field changed. */\n public onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void;\n\n /** Tracks whether the entire engine is running in Editable mode. */\n public readonly isEditable: boolean = true;\n\n /** Tracks if any fields or sub-layouts failed to render, requiring a warning strip. */\n public hasPartialRenderingErrors: boolean = false;\n\n /** Tracks whether the engine should delegate visual state to the global MessageManager. */\n public readonly useMessageManager: boolean = false;\n\n /**\n * Initializes a new Engine instance.\n * @param editable Whether the engine should render form fields as editable or read-only.\n * @param useMessageManager Whether to delegate visual state to UI5 MessageManager.\n */\n constructor(editable: boolean = true, useMessageManager: boolean = false) {\n this.isEditable = editable;\n this.useMessageManager = useMessageManager;\n }\n\n /**\n * Bootstraps the layout generation process by resolving the correct layout strategy.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param model The active StateManager JSONModel instance.\n * @param modelName The UI5 model alias used for isolation.\n * @param onSubmit Callback fired when form is submitted.\n * @param engineScopeId Deterministic scope ID for this engine instance.\n * @param onChange Callback fired when field values change.\n * @returns The generated root UI5 Control container.\n */\n public build(schema: ISchema, model: sap.ui.model.Model, modelName: string = \"meta\", onSubmit?: () => void, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control {\n this.conditionEngine = new ConditionEngine(schema);\n this.activePlugins = [];\n this.activeModel = model;\n this.engineScopeId = engineScopeId;\n this.onChange = (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => {\n if (this.conditionEngine && fieldKey) {\n this.conditionEngine.handleEvent(fieldKey, isValid);\n }\n if (onChange) {\n onChange(isValid, fieldKey, errorMessage, controlId);\n }\n };\n\n try {\n // Intercept and synthesize a default layout if the developer/backend failed to provide one\n if (DefaultLayoutGenerator.ensureLayout(schema)) {\n Logger.warn(\"[MetaUI Engine] Missing 'uiLayout' array in schema. Synthesized a default layout mapping to prevent a blank render.\");\n }\n\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n\n return layoutManager.render(schema, modelName, this, onSubmit);\n } catch (error) {\n this.hasPartialRenderingErrors = true;\n const msg = (error as Error).message;\n Logger.error(\"[MetaUI Engine] Critical error during layout generation\", msg);\n Logger.showErrorPopup(`Engine failed to generate the layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Layout Error\" });\n }\n }\n\n /**\n * Instantiates the correct plugin for a specific field based on type and widget hints,\n * and tracks the plugin for global validation.\n * \n * @param fieldMeta The metadata schema specific to the field.\n * @param bindingPath The JSON path representing the field within the payload.\n * @param modelName The UI5 JSONModel name used for data binding.\n * @returns The generated UI5 Control for the field.\n */\n public generateField(fieldMeta: IPropertyMetadata, bindingPath: string, modelName: string, isTemplate: boolean = false): Control {\n try {\n const plugin = PluginRegistry.getInstance().getPlugin(fieldMeta.type || \"string\", fieldMeta.ui?.widget);\n plugin.setEditable(this.isEditable);\n \n if (typeof plugin.setUseMessageManager === \"function\") {\n plugin.setUseMessageManager(this.useMessageManager);\n }\n\n if (!isTemplate) {\n this.activePlugins.push({ plugin, path: bindingPath });\n }\n const scopeId = isTemplate ? undefined : this.engineScopeId;\n const control = plugin.render(fieldMeta, bindingPath, modelName, scopeId, this.onChange);\n\n if (this.conditionEngine) {\n this.conditionEngine.registerPlugin(bindingPath, plugin);\n }\n\n return control;\n } catch (error) {\n this.hasPartialRenderingErrors = true;\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Failed to generate field at ${bindingPath}`, msg);\n Logger.showErrorPopup(`Failed to generate field '${bindingPath}'.\\n\\nDetails: ${msg}`);\n return new Text({ text: `[Error generating field ${bindingPath}]` });\n }\n }\n\n /**\n * Generates a sub-layout (like an embedded table or nested form) without \n * destroying the current Engine state or Condition tracking.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param modelName The UI5 JSONModel name used for data binding (defaults to \"meta\").\n * @param bindingPath Optional path to bind the sub-layout to a specific array/object property.\n * @returns The generated root UI5 Control container.\n */\n public generateLayout(schema: ISchema, modelName: string, bindingPath?: string): Control {\n try {\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n return layoutManager.render(schema, modelName, this, undefined, bindingPath);\n } catch (error) {\n this.hasPartialRenderingErrors = true;\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Critical error generating sub-layout for ${bindingPath}`, msg);\n Logger.showErrorPopup(`Engine failed to generate a sub-layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Sub-Layout Error\" });\n }\n }\n\n /**\n * Iterates through all active plugins and triggers their internal validation pipelines.\n * \n * @param applyVisualState If true, explicitly instructs the plugin to natively paint its own ValueState.\n * @returns {IPluginValidationResult[]} Array of validation error objects. Empty array if valid.\n */\n public validateAll(applyVisualState: boolean = false): IPluginValidationResult[] {\n const errors: IPluginValidationResult[] = [];\n for (const item of this.activePlugins) {\n try {\n const result = item.plugin.validate();\n if (applyVisualState && typeof item.plugin.setVisualValidationState === \"function\") {\n item.plugin.setVisualValidationState(result.isValid, result.errorMessage);\n }\n \n if (!result.isValid) {\n // Ensure the path is bound to the error so GeneratorHost knows where to target it\n result.fieldKey = result.fieldKey || item.path.replace(/^\\//, \"\");\n errors.push(result);\n // Add console log to find which plugin fails silently\n Logger.error(\"[MetaUI Validation] Plugin failed validation silently:\", item.path || item.plugin.constructor.name);\n }\n } catch (error) {\n Logger.error(`[MetaUI Engine] Error validating plugin at ${item.path}`, (error as Error).message);\n }\n }\n return errors;\n }\n\n /**\n * Retrieves an active plugin instance by its absolute binding path.\n * Useful for programmatic field manipulation (e.g., custom error injection).\n * \n * @param path The binding path (e.g. \"/General/CustomerName\").\n * @returns {IPlugin | undefined} The plugin instance, or undefined if not found.\n */\n public getPluginByPath(path: string): import(\"../interfaces/IPlugin\").IPlugin | undefined {\n const cleanPath = path.startsWith(\"/\") ? path : `/${path}`;\n const match = this.activePlugins.find(p => p.path === cleanPath || p.path === `/${cleanPath}`);\n return match ? match.plugin : undefined;\n }\n\n /**\n * Cleans up internal state and destroys the condition engine to prevent memory leaks.\n */\n public destroy(): void {\n if (this.conditionEngine) {\n this.conditionEngine.destroy();\n this.conditionEngine = null;\n }\n\n // ------------------------------------------------------------------------\n // Ghost Error Prevention\n // Flush MessageManager for active plugins before destroying their controls\n // ------------------------------------------------------------------------\n const messageManager = Messaging;\n const existingMessages = messageManager.getMessageModel().getData();\n const messagesToRemove: sap.ui.core.message.Message[] = [];\n\n for (const item of this.activePlugins) {\n if (this.activeModel) {\n const targetPath = `/${item.path.replace(/^\\//, \"\")}`;\n const matched = existingMessages.filter((msg: sap.ui.core.message.Message) =>\n msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.activeModel.getId()\n );\n messagesToRemove.push(...matched);\n }\n if (typeof item.plugin.destroy === \"function\") {\n item.plugin.destroy();\n }\n }\n\n if (messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n\n this.activePlugins = [];\n }\n}\n"],"mappings":"4KAAA,MAQSA,EAAeC,EAAA,yBACfC,EAAcC,EAAA,wBAIdC,EAAMC,EAAA,gBACNC,EAAsBC,EAAA,0BAcxB,MAAMC,EAEDC,gBAA0C,KAG1CC,cAAqD,GAW7CC,WAAsB,KAG/BC,0BAAqC,MAG5BC,kBAA6B,MAO7CC,YAAYC,EAAoB,KAAMF,EAA6B,OAC/DG,KAAKL,WAAaI,EAClBC,KAAKH,kBAAoBA,CAC7B,CAaOI,MAAMC,EAAiBC,EAA2BC,EAAoB,OAAQC,EAAuBC,EAAwBC,GAChIP,KAAKP,gBAAkB,IAAIT,EAAgBkB,GAC3CF,KAAKN,cAAgB,GACrBM,KAAKQ,YAAcL,EACnBH,KAAKM,cAAgBA,EACrBN,KAAKO,SAAW,CAACE,EAAkBC,EAAmBC,EAAuBC,KACzE,GAAIZ,KAAKP,iBAAmBiB,EAAU,CAClCV,KAAKP,gBAAgBoB,YAAYH,EAAUD,EAC/C,CACA,GAAIF,EAAU,CACVA,EAASE,EAASC,EAAUC,EAAcC,EAC9C,GAGJ,IAEI,GAAItB,EAAuBwB,aAAaZ,GAAS,CAC7Cd,EAAO2B,KAAK,sHAChB,CAEA,MAAMC,EAAiBd,EAAOc,iBAAmBd,EAAOe,OAAS,QAAU,QAAU,QACrF,MAAM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,CAClB,MAAM2D,EAAa,IAAInB,EAAKT,KAAKa,QAAQ,MAAO,MAChD,MAAMgB,EAAUL,EAAiBM,OAAQ9C,GACrCA,EAAI+C,cAAgBH,GAAc5C,EAAIgD,uBAAyBhD,EAAIgD,sBAAsBC,UAAYxE,KAAKQ,YAAYgE,SAE1HN,EAAiB5B,QAAQ8B,EAC7B,CACA,UAAWpB,EAAKhB,OAAO4B,UAAY,WAAY,CAC3CZ,EAAKhB,OAAO4B,SAChB,CACJ,CAEA,GAAIM,EAAiBO,OAAS,EAAG,CAC7BZ,EAAea,eAAeR,EAClC,CAEAlE,KAAKN,cAAgB,EACzB,EACH,IAAAiF,EAAA,CAAAC,WAAA,MAAAD,EAAAnF,SAAA,OAAAmF,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"Engine.js","names":["ConditionEngine","___ConditionEngine","PluginRegistry","___PluginRegistry","Logger","___utils_Logger","DefaultLayoutGenerator","___DefaultLayoutGenerator","Engine","conditionEngine","activePlugins","isEditable","hasPartialRenderingErrors","useMessageManager","constructor","editable","this","build","schema","model","modelName","onSubmit","engineScopeId","onChange","activeModel","isValid","fieldKey","errorMessage","controlId","handleEvent","ensureLayout","warn","layoutStrategy","type","layoutManager","getInstance","getLayout","render","error","msg","message","showErrorPopup","Text","text","generateField","fieldMeta","bindingPath","isTemplate","plugin","getPlugin","ui","widget","setEditable","setUseMessageManager","push","path","scopeId","undefined","control","registerPlugin","generateLayout","validateAll","applyVisualState","errors","item","result","validate","setVisualValidationState","replace","name","getPluginByPath","cleanPath","startsWith","match","find","p","destroy","messageManager","Messaging","existingMessages","getMessageModel","getData","messagesToRemove","targetPath","matched","filter","getTarget","getMessageProcessor","getId","length","removeMessages","__exports","__esModule"],"sources":["Engine.ts"],"sourcesContent":["/**\n * @file Engine.ts\n * @description The central orchestrator that routes data between the Layout Factory and Plugin Registry (v2).\n */\n\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { IPlugin, IPluginValidationResult } from \"../interfaces/IPlugin\";\nimport { ConditionEngine } from \"./ConditionEngine\";\nimport { PluginRegistry } from \"./PluginRegistry\";\nimport Control from \"sap/ui/core/Control\";\nimport VBox from \"sap/m/VBox\";\nimport Text from \"sap/m/Text\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\nimport Core from \"sap/ui/core/Core\";\nimport Messaging from \"sap/ui/core/Messaging\";\n\n/**\n * The Engine is responsible for translating a normalized schema into a physical UI5 layout.\n * It delegates layout generation to the configured `LayoutManager` and field generation to the `PluginRegistry`.\n * It strictly routes execution flow and tracks active plugins for validation.\n * It embodies the \"Plugin-First Philosophy\" by routing all complex field and layout rendering\n * through discrete, decoupled plugins rather than handling native overrides.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class Engine {\n /** Handles dynamic conditional logic across the active form. */\n private conditionEngine: ConditionEngine | null = null;\n\n /** Array of all instantiated plugins generated during the current build. */\n private activePlugins: { plugin: IPlugin, path: string }[] = [];\n\n /** Deterministic scope ID injected by the host control to prevent clone collisions. */\n public engineScopeId?: string;\n\n private activeModel?: sap.ui.model.Model;\n\n /** Reference to the GeneratorHost that instantiated this engine, for retrieving global definitions. */\n public host?: unknown;\n\n /** Callback to notify the host that an internal field changed. */\n public onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void;\n\n /** Tracks whether the entire engine is running in Editable mode. */\n public readonly isEditable: boolean = true;\n\n /** Tracks if any fields or sub-layouts failed to render, requiring a warning strip. */\n public hasPartialRenderingErrors: boolean = false;\n\n /** Tracks whether the engine should delegate visual state to the global MessageManager. */\n public readonly useMessageManager: boolean = false;\n\n /**\n * Initializes a new Engine instance.\n * @param editable Whether the engine should render form fields as editable or read-only.\n * @param useMessageManager Whether to delegate visual state to UI5 MessageManager.\n */\n constructor(editable: boolean = true, useMessageManager: boolean = false) {\n this.isEditable = editable;\n this.useMessageManager = useMessageManager;\n }\n\n /**\n * Bootstraps the layout generation process by resolving the correct layout strategy.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param model The active StateManager JSONModel instance.\n * @param modelName The UI5 model alias used for isolation.\n * @param onSubmit Callback fired when form is submitted.\n * @param engineScopeId Deterministic scope ID for this engine instance.\n * @param onChange Callback fired when field values change.\n * @returns The generated root UI5 Control container.\n */\n public build(schema: ISchema, model: sap.ui.model.Model, modelName: string = \"meta\", onSubmit?: () => void, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control {\n this.conditionEngine = new ConditionEngine(schema);\n this.activePlugins = [];\n this.activeModel = model;\n this.engineScopeId = engineScopeId;\n this.onChange = (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => {\n if (this.conditionEngine && fieldKey) {\n this.conditionEngine.handleEvent(fieldKey, isValid);\n }\n if (onChange) {\n onChange(isValid, fieldKey, errorMessage, controlId);\n }\n };\n\n try {\n // Intercept and synthesize a default layout if the developer/backend failed to provide one\n if (DefaultLayoutGenerator.ensureLayout(schema)) {\n Logger.warn(\"[MetaUI Engine] Missing 'uiLayout' array in schema. Synthesized a default layout mapping to prevent a blank render.\");\n }\n\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n\n return layoutManager.render(schema, modelName, this, onSubmit);\n } catch (error) {\n this.hasPartialRenderingErrors = true;\n const msg = (error as Error).message;\n Logger.error(\"[MetaUI Engine] Critical error during layout generation\", msg);\n Logger.showErrorPopup(`Engine failed to generate the layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Layout Error\" });\n }\n }\n\n /**\n * Instantiates the correct plugin for a specific field based on type and widget hints,\n * and tracks the plugin for global validation.\n * \n * @param fieldMeta The metadata schema specific to the field.\n * @param bindingPath The JSON path representing the field within the payload.\n * @param modelName The UI5 JSONModel name used for data binding.\n * @returns The generated UI5 Control for the field.\n */\n public generateField(fieldMeta: IPropertyMetadata, bindingPath: string, modelName: string, isTemplate: boolean = false): Control {\n try {\n const plugin = PluginRegistry.getInstance().getPlugin(fieldMeta.type || \"string\", fieldMeta.ui?.widget);\n if (typeof plugin.setEditable === \"function\") {\n plugin.setEditable(this.isEditable);\n }\n\n if (typeof plugin.setUseMessageManager === \"function\") {\n plugin.setUseMessageManager(this.useMessageManager);\n }\n\n if (!isTemplate) {\n this.activePlugins.push({ plugin, path: bindingPath });\n }\n const scopeId = isTemplate ? undefined : this.engineScopeId;\n const control = plugin.render(fieldMeta, bindingPath, modelName, scopeId, this.onChange, this.activeModel);\n\n if (this.conditionEngine) {\n this.conditionEngine.registerPlugin(bindingPath, plugin);\n }\n\n return control;\n } catch (error) {\n this.hasPartialRenderingErrors = true;\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Failed to generate field at ${bindingPath}`, msg);\n Logger.showErrorPopup(`Failed to generate field '${bindingPath}'.\\n\\nDetails: ${msg}`);\n return new Text({ text: `[Error generating field ${bindingPath}]` });\n }\n }\n\n /**\n * Generates a sub-layout (like an embedded table or nested form) without \n * destroying the current Engine state or Condition tracking.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param modelName The UI5 JSONModel name used for data binding (defaults to \"meta\").\n * @param bindingPath Optional path to bind the sub-layout to a specific array/object property.\n * @returns The generated root UI5 Control container.\n */\n public generateLayout(schema: ISchema, modelName: string, bindingPath?: string): Control {\n try {\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n return layoutManager.render(schema, modelName, this, undefined, bindingPath);\n } catch (error) {\n this.hasPartialRenderingErrors = true;\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Critical error generating sub-layout for ${bindingPath}`, msg);\n Logger.showErrorPopup(`Engine failed to generate a sub-layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Sub-Layout Error\" });\n }\n }\n\n /**\n * Iterates through all active plugins and triggers their internal validation pipelines.\n * \n * @param applyVisualState If true, explicitly instructs the plugin to natively paint its own ValueState.\n * @returns {IPluginValidationResult[]} Array of validation error objects. Empty array if valid.\n */\n public validateAll(applyVisualState: boolean = false): IPluginValidationResult[] {\n const errors: IPluginValidationResult[] = [];\n for (const item of this.activePlugins) {\n try {\n const result = item.plugin.validate();\n if (applyVisualState && typeof item.plugin.setVisualValidationState === \"function\") {\n item.plugin.setVisualValidationState(result.isValid, result.errorMessage);\n }\n\n if (!result.isValid) {\n // Ensure the path is bound to the error so GeneratorHost knows where to target it\n result.fieldKey = result.fieldKey || item.path.replace(/^\\//, \"\");\n errors.push(result);\n // Add console log to find which plugin fails silently\n Logger.error(\"[MetaUI Validation] Plugin failed validation silently:\", item.path || item.plugin.constructor.name);\n }\n } catch (error) {\n Logger.error(`[MetaUI Engine] Error validating plugin at ${item.path}`, (error as Error).message);\n }\n }\n return errors;\n }\n\n /**\n * Retrieves an active plugin instance by its absolute binding path.\n * Useful for programmatic field manipulation (e.g., custom error injection).\n * \n * @param path The binding path (e.g. \"/General/CustomerName\").\n * @returns {IPlugin | undefined} The plugin instance, or undefined if not found.\n */\n public getPluginByPath(path: string): import(\"../interfaces/IPlugin\").IPlugin | undefined {\n const cleanPath = path.startsWith(\"/\") ? path : `/${path}`;\n const match = this.activePlugins.find(p => p.path === cleanPath || p.path === `/${cleanPath}`);\n return match ? match.plugin : undefined;\n }\n\n /**\n * Cleans up internal state and destroys the condition engine to prevent memory leaks.\n */\n public destroy(): void {\n if (this.conditionEngine) {\n this.conditionEngine.destroy();\n this.conditionEngine = null;\n }\n\n // ------------------------------------------------------------------------\n // Ghost Error Prevention\n // Flush MessageManager for active plugins before destroying their controls\n // ------------------------------------------------------------------------\n const messageManager = Messaging;\n const existingMessages = messageManager.getMessageModel().getData();\n const messagesToRemove: unknown[] = [];\n\n for (const item of this.activePlugins) {\n if (this.activeModel) {\n const targetPath = `/${item.path.replace(/^\\//, \"\")}`;\n const matched = (existingMessages as { getTarget: () => string, getMessageProcessor: () => { getId: () => string } }[]).filter(msg =>\n msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.activeModel!.getId()\n );\n messagesToRemove.push(...matched);\n }\n if (typeof item.plugin.destroy === \"function\") {\n item.plugin.destroy();\n }\n }\n\n if (messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n\n this.activePlugins = [];\n }\n}\n"],"mappings":"4KAAA,MAQSA,EAAeC,EAAA,yBACfC,EAAcC,EAAA,wBAIdC,EAAMC,EAAA,gBACNC,EAAsBC,EAAA,0BAcxB,MAAMC,EAEDC,gBAA0C,KAG1CC,cAAqD,GAc7CC,WAAsB,KAG/BC,0BAAqC,MAG5BC,kBAA6B,MAO7CC,YAAYC,EAAoB,KAAMF,EAA6B,OAC/DG,KAAKL,WAAaI,EAClBC,KAAKH,kBAAoBA,CAC7B,CAaOI,MAAMC,EAAiBC,EAA2BC,EAAoB,OAAQC,EAAuBC,EAAwBC,GAChIP,KAAKP,gBAAkB,IAAIT,EAAgBkB,GAC3CF,KAAKN,cAAgB,GACrBM,KAAKQ,YAAcL,EACnBH,KAAKM,cAAgBA,EACrBN,KAAKO,SAAW,CAACE,EAAkBC,EAAmBC,EAAuBC,KACzE,GAAIZ,KAAKP,iBAAmBiB,EAAU,CAClCV,KAAKP,gBAAgBoB,YAAYH,EAAUD,EAC/C,CACA,GAAIF,EAAU,CACVA,EAASE,EAASC,EAAUC,EAAcC,EAC9C,GAGJ,IAEI,GAAItB,EAAuBwB,aAAaZ,GAAS,CAC7Cd,EAAO2B,KAAK,sHAChB,CAEA,MAAMC,EAAiBd,EAAOc,iBAAmBd,EAAOe,OAAS,QAAU,QAAU,QACrF,MAAMC,EAAgBhC,EAAeiC,cAAcC,UAAUJ,GAE7D,OAAOE,EAAcG,OAAOnB,EAAQE,EAAWJ,KAAMK,EACzD,CAAE,MAAOiB,GAC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AAO,MAChD,MAAMgB,EAAWL,EAAuGM,OAAO9C,GAC3HA,EAAI+C,cAAgBH,GAAc5C,EAAIgD,uBAAyBhD,EAAIgD,sBAAsBC,UAAYxE,KAAKQ,YAAagE,SAE3HN,EAAiB5B,QAAQ8B,EAC7B,CACA,UAAWpB,EAAKhB,OAAO4B,UAAY,WAAY,CAC3CZ,EAAKhB,OAAO4B,SAChB,CACJ,CAEA,GAAIM,EAAiBO,OAAS,EAAG,CAC7BZ,EAAea,eAAeR,EAClC,CAEAlE,KAAKN,cAAgB,EACzB,EACH,IAAAiF,EAAA,CAAAC,WAAA,MAAAD,EAAAnF,SAAA,OAAAmF,CAAA","ignoreList":[]}
@@ -38,6 +38,9 @@ export class Engine {
38
38
 
39
39
  private activeModel?: sap.ui.model.Model;
40
40
 
41
+ /** Reference to the GeneratorHost that instantiated this engine, for retrieving global definitions. */
42
+ public host?: unknown;
43
+
41
44
  /** Callback to notify the host that an internal field changed. */
42
45
  public onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void;
43
46
 
@@ -116,8 +119,10 @@ export class Engine {
116
119
  public generateField(fieldMeta: IPropertyMetadata, bindingPath: string, modelName: string, isTemplate: boolean = false): Control {
117
120
  try {
118
121
  const plugin = PluginRegistry.getInstance().getPlugin(fieldMeta.type || "string", fieldMeta.ui?.widget);
119
- plugin.setEditable(this.isEditable);
120
-
122
+ if (typeof plugin.setEditable === "function") {
123
+ plugin.setEditable(this.isEditable);
124
+ }
125
+
121
126
  if (typeof plugin.setUseMessageManager === "function") {
122
127
  plugin.setUseMessageManager(this.useMessageManager);
123
128
  }
@@ -126,7 +131,7 @@ export class Engine {
126
131
  this.activePlugins.push({ plugin, path: bindingPath });
127
132
  }
128
133
  const scopeId = isTemplate ? undefined : this.engineScopeId;
129
- const control = plugin.render(fieldMeta, bindingPath, modelName, scopeId, this.onChange);
134
+ const control = plugin.render(fieldMeta, bindingPath, modelName, scopeId, this.onChange, this.activeModel);
130
135
 
131
136
  if (this.conditionEngine) {
132
137
  this.conditionEngine.registerPlugin(bindingPath, plugin);
@@ -179,7 +184,7 @@ export class Engine {
179
184
  if (applyVisualState && typeof item.plugin.setVisualValidationState === "function") {
180
185
  item.plugin.setVisualValidationState(result.isValid, result.errorMessage);
181
186
  }
182
-
187
+
183
188
  if (!result.isValid) {
184
189
  // Ensure the path is bound to the error so GeneratorHost knows where to target it
185
190
  result.fieldKey = result.fieldKey || item.path.replace(/^\//, "");
@@ -222,13 +227,13 @@ export class Engine {
222
227
  // ------------------------------------------------------------------------
223
228
  const messageManager = Messaging;
224
229
  const existingMessages = messageManager.getMessageModel().getData();
225
- const messagesToRemove: sap.ui.core.message.Message[] = [];
230
+ const messagesToRemove: unknown[] = [];
226
231
 
227
232
  for (const item of this.activePlugins) {
228
233
  if (this.activeModel) {
229
234
  const targetPath = `/${item.path.replace(/^\//, "")}`;
230
- const matched = existingMessages.filter((msg: sap.ui.core.message.Message) =>
231
- msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.activeModel.getId()
235
+ const matched = (existingMessages as { getTarget: () => string, getMessageProcessor: () => { getId: () => string } }[]).filter(msg =>
236
+ msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.activeModel!.getId()
232
237
  );
233
238
  messagesToRemove.push(...matched);
234
239
  }
@@ -22,11 +22,15 @@ sap.ui.define(["../utils/Logger"], function (___utils_Logger) {
22
22
  this.registerPluginPath("boolean", undefined, "nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin");
23
23
  this.registerPluginPath("array", undefined, "nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin");
24
24
  this.registerPluginPath("object", undefined, "nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin");
25
+ this.registerPluginPath("string", "default", "nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin");
26
+ this.registerPluginPath("object", "dictionary", "nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin");
27
+ this.registerPluginPath("object", "reference", "nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin");
25
28
 
26
29
  // Widget Overrides
27
30
  this.registerPluginPath("string", "time", "nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin");
28
31
  this.registerPluginPath("string", "datetime", "nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin");
29
32
  this.registerPluginPath("boolean", "switch", "nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin");
33
+ this.registerPluginPath("number", "step", "nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin");
30
34
  this.registerPluginPath("string", "select", "nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin");
31
35
  this.registerPluginPath("string", "textArea", "nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin");
32
36
  this.registerPluginPath("string", "codeEditor", "nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin");
@@ -1 +1 @@
1
- {"version":3,"file":"PluginRegistry-dbg.js","names":["Logger","___utils_Logger","PluginRegistry","fieldIndex","actionIndex","layoutIndex","activePromises","constructor","registerPluginPath","undefined","registerLayoutPath","getInstance","instance","type","widgetName","path","key","registerActionPath","actionName","strategy","getFieldPath","Error","getLayoutPath","getPathsToLoad","schema","pathsToLoad","Set","layoutStrategy","add","scanProperties","props","prop","ui","widget","e","msg","message","error","properties","items","preloadDependencies","promises","Array","from","map","Promise","resolve","reject","sap","require","Module","err","all","extractConstructor","default","keys","Object","getPlugin","PluginClass","getLayout","LayoutClass","__exports","__esModule"],"sources":["PluginRegistry.ts"],"sourcesContent":["/**\n * @file PluginRegistry.ts\n * @description Centralized hub for mapping UI5 controls to SAP schema data types.\n * Enforces the Registry Pattern to decouple the core engine from specific UI5 control implementations.\n * NOW WITH UNIVERSAL LAZY LOADING.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { FieldType, ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\n\nexport class PluginRegistry {\n private static instance: PluginRegistry;\n \n private fieldIndex: Record<string, string> = {};\n private actionIndex: Record<string, string> = {};\n private layoutIndex: Record<string, string> = {};\n \n private activePromises: Record<string, Promise<unknown>> = {};\n\n private constructor() {\n // Core Mappings\n this.registerPluginPath(\"string\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin\");\n this.registerPluginPath(\"number\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin\");\n this.registerPluginPath(\"integer\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin\");\n this.registerPluginPath(\"date\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin\");\n this.registerPluginPath(\"boolean\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin\");\n this.registerPluginPath(\"array\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin\");\n this.registerPluginPath(\"object\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin\");\n\n // Widget Overrides\n this.registerPluginPath(\"string\", \"time\", \"nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin\");\n this.registerPluginPath(\"string\", \"datetime\", \"nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin\");\n this.registerPluginPath(\"boolean\", \"switch\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin\");\n this.registerPluginPath(\"string\", \"select\", \"nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin\");\n this.registerPluginPath(\"string\", \"textArea\", \"nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin\");\n this.registerPluginPath(\"string\", \"codeEditor\", \"nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin\");\n \n // Phase 1 Mappings\n this.registerPluginPath(\"string\", \"fileUploader\", \"nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin\");\n this.registerPluginPath(\"array\", \"multiSelect\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin\");\n this.registerPluginPath(\"array\", \"multiInput\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin\");\n this.registerPluginPath(\"number\", \"slider\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin\");\n this.registerPluginPath(\"number\", \"rating\", \"nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin\");\n this.registerPluginPath(\"string\", \"messageStrip\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin\");\n\n // Phase 5 Mappings (Hardware)\n this.registerPluginPath(\"string\", \"camera\", \"nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin\");\n this.registerPluginPath(\"string\", \"signature\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin\");\n this.registerPluginPath(\"object\", \"location\", \"nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin\");\n this.registerPluginPath(\"string\", \"scanner\", \"nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin\");\n this.registerPluginPath(\"string\", \"voiceInput\", \"nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin\");\n this.registerPluginPath(\"string\", \"richText\", \"nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin\");\n\n // Actions & Datasources\n this.registerPluginPath(\"string\", \"urlButton\", \"nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin\");\n this.registerPluginPath(\"string\", \"submitButton\", \"nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin\");\n this.registerPluginPath(\"string\", \"odataSelect\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin\");\n this.registerPluginPath(\"string\", \"remoteDropdown\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin\");\n this.registerPluginPath(\"string\", \"liveSearch\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin\");\n this.registerPluginPath(\"string\", \"remoteValueHelp\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin\");\n\n // Layouts\n this.registerLayoutPath(\"form\", \"nz/co/siliconst/ui5/metaui/layouts/FormLayout\");\n this.registerLayoutPath(\"table\", \"nz/co/siliconst/ui5/metaui/layouts/TableLayout\");\n this.registerLayoutPath(\"wizard\", \"nz/co/siliconst/ui5/metaui/layouts/WizardLayout\");\n this.registerLayoutPath(\"compact\", \"nz/co/siliconst/ui5/metaui/layouts/CompactLayout\");\n }\n\n public static getInstance(): PluginRegistry {\n if (!PluginRegistry.instance) {\n PluginRegistry.instance = new PluginRegistry();\n }\n return PluginRegistry.instance;\n }\n\n public registerPluginPath(type: FieldType, widgetName: string | undefined, path: string): void {\n const key = widgetName ? `${type}:${widgetName}` : type;\n this.fieldIndex[key] = path;\n }\n\n public registerActionPath(actionName: string, path: string): void {\n this.actionIndex[actionName] = path;\n }\n\n public registerLayoutPath(strategy: string, path: string): void {\n this.layoutIndex[strategy] = path;\n }\n\n private getFieldPath(type: FieldType, widgetName?: string): string {\n let path;\n if (widgetName) {\n path = this.fieldIndex[`${type}:${widgetName}`];\n }\n if (!path) {\n path = this.fieldIndex[type];\n }\n if (!path) {\n throw new Error(`No plugin path mapped for FieldType: ${type} (widget: ${widgetName})`);\n }\n return path;\n }\n\n private getLayoutPath(strategy: string): string {\n const path = this.layoutIndex[strategy];\n if (!path) {\n throw new Error(`No layout path mapped for strategy: ${strategy}`);\n }\n return path;\n }\n\n /**\n * Statically traverses the schema structure to identify all required plugins\n * and layouts without actually instantiating them.\n * \n * @param {ISchema} schema The root JSON schema payload to traverse\n * @returns {Set<string>} A distinct set of UI5 module paths required to render the schema\n */\n public getPathsToLoad(schema: ISchema): Set<string> {\n const pathsToLoad = new Set<string>();\n \n // 1. Gather layout strategy\n const strategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n pathsToLoad.add(this.getLayoutPath(strategy));\n\n // 2. Recursively gather field plugins\n const scanProperties = (props: Record<string, IPropertyMetadata>) => {\n for (const key in props) {\n const prop = props[key];\n try {\n pathsToLoad.add(this.getFieldPath(prop.type || \"string\", prop.ui?.widget));\n } catch (e) {\n const msg = `[MetaUI LazyLoad] Could not find mapped plugin for field ${key}: ${(e as Error).message}`;\n Logger.error(msg);\n throw new Error(msg);\n }\n if (prop.properties) scanProperties(prop.properties);\n if (prop.items && prop.items.properties) scanProperties(prop.items.properties);\n if (prop.items && prop.items.type) {\n try {\n pathsToLoad.add(this.getFieldPath(prop.items.type, prop.items.ui?.widget));\n } catch (e) {\n const msg = `[MetaUI LazyLoad] Could not find mapped plugin for array item type ${prop.items.type}: ${(e as Error).message}`;\n Logger.error(msg);\n throw new Error(msg);\n }\n }\n }\n };\n\n if (schema.properties) {\n scanProperties(schema.properties);\n } else if (schema.items && schema.items.properties) {\n scanProperties(schema.items.properties);\n }\n\n return pathsToLoad;\n }\n\n /**\n * Defers the generation of the UI until all required UI5 modules have been\n * downloaded asynchronously. Maintains a cache of active promises to prevent\n * redundant network requests for the same module.\n * \n * @param {ISchema} schema The root JSON schema payload to parse\n * @returns {Promise<void>} Resolves when all dependencies are securely in the UI5 require cache\n */\n public async preloadDependencies(schema: ISchema): Promise<void> {\n const pathsToLoad = this.getPathsToLoad(schema);\n\n // 3. Batch execute sap.ui.require via Promises\n const promises = Array.from(pathsToLoad).map(path => {\n if (!this.activePromises[path]) {\n this.activePromises[path] = new Promise((resolve, reject) => {\n sap.ui.require([path], \n (Module: unknown) => resolve(Module), \n (err: unknown) => {\n Logger.error(`Failed to lazy load module: ${path}`);\n // CRITICAL: Delete from cache so future attempts can retry the network request\n delete this.activePromises[path];\n reject(err);\n }\n );\n });\n }\n return this.activePromises[path];\n });\n\n await Promise.all(promises);\n }\n\n /**\n * Extracts a valid constructor from a dynamically required module.\n */\n private extractConstructor(Module: unknown): new () => IPlugin | ILayoutManager | null {\n if (!Module) return null;\n if (typeof Module === \"function\") return Module as any;\n if ((Module as any).default && typeof (Module as any).default === \"function\") return (Module as any).default;\n \n // Handle namespace exports (e.g. { FormLayout: class... })\n const keys = Object.keys(Module as object);\n for (const key of keys) {\n if (typeof (Module as any)[key] === \"function\") {\n return (Module as any)[key];\n }\n }\n return null;\n }\n\n /**\n * Instantiates the requested plugin for the given field type.\n */\n public getPlugin(type: FieldType, widgetName?: string): IPlugin {\n const path = this.getFieldPath(type, widgetName);\n const Module = sap.ui.require(path);\n const PluginClass = this.extractConstructor(Module);\n \n if (!PluginClass) {\n throw new Error(`[MetaUI Plugin Instantiation] Plugin ${path} was not preloaded or has no constructor!`);\n }\n \n return new PluginClass();\n }\n\n /**\n * Instantiates the requested layout manager for the given strategy.\n */\n public getLayout(strategy: string): ILayoutManager {\n const path = this.getLayoutPath(strategy);\n const Module = sap.ui.require(path);\n const LayoutClass = this.extractConstructor(Module);\n \n if (!LayoutClass) {\n throw new Error(`[MetaUI Layout Instantiation] Layout ${path} was not preloaded or has no constructor!`);\n }\n \n return new LayoutClass();\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;AACA;AACA;EALA,MAUSA,MAAM,GAAAC,eAAA;EAGR,MAAMC,cAAc,CAAC;IAGhBC,UAAU,GAA2B,CAAC,CAAC;IACvCC,WAAW,GAA2B,CAAC,CAAC;IACxCC,WAAW,GAA2B,CAAC,CAAC;IAExCC,cAAc,GAAqC,CAAC,CAAC;IAErDC,WAAWA,CAAA,EAAG;MAClB;MACA,IAAI,CAACC,kBAAkB,CAAC,QAAQ,EAAEC,SAAS,EAAE,0DAA0D,CAAC;MACxG,IAAI,CAACD,kBAAkB,CAAC,QAAQ,EAAEC,SAAS,EAAE,0DAA0D,CAAC;MACxG,IAAI,CAACD,kBAAkB,CAAC,SAAS,EAAEC,SAAS,EAAE,0DAA0D,CAAC;MACzG,IAAI,CAACD,k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,CAACU,WAAW,EAAE;QACd,MAAM,IAAIvC,KAAK,CAAC,wCAAwCN,IAAI,2CAA2C,CAAC;MAC5G;MAEA,OAAO,IAAI6C,WAAW,CAAC,CAAC;IAC5B;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA3D,cAAA,GAAAA,cAAA;EAAA,OAAA2D,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"PluginRegistry-dbg.js","names":["Logger","___utils_Logger","PluginRegistry","fieldIndex","actionIndex","layoutIndex","activePromises","constructor","registerPluginPath","undefined","registerLayoutPath","getInstance","instance","type","widgetName","path","key","registerActionPath","actionName","strategy","getFieldPath","Error","getLayoutPath","getPathsToLoad","schema","pathsToLoad","Set","layoutStrategy","add","scanProperties","props","prop","ui","widget","e","msg","message","error","properties","items","preloadDependencies","promises","Array","from","map","Promise","resolve","reject","sap","require","Module","err","all","extractConstructor","default","keys","Object","getPlugin","PluginClass","getLayout","LayoutClass","__exports","__esModule"],"sources":["PluginRegistry.ts"],"sourcesContent":["/**\n * @file PluginRegistry.ts\n * @description Centralized hub for mapping UI5 controls to SAP schema data types.\n * Enforces the Registry Pattern to decouple the core engine from specific UI5 control implementations.\n * NOW WITH UNIVERSAL LAZY LOADING.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { FieldType, ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\n\nexport class PluginRegistry {\n private static instance: PluginRegistry;\n \n private fieldIndex: Record<string, string> = {};\n private actionIndex: Record<string, string> = {};\n private layoutIndex: Record<string, string> = {};\n \n private activePromises: Record<string, Promise<unknown>> = {};\n\n private constructor() {\n // Core Mappings\n this.registerPluginPath(\"string\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin\");\n this.registerPluginPath(\"number\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin\");\n this.registerPluginPath(\"integer\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin\");\n this.registerPluginPath(\"date\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin\");\n this.registerPluginPath(\"boolean\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin\");\n this.registerPluginPath(\"array\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin\");\n this.registerPluginPath(\"object\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin\");\n this.registerPluginPath(\"string\", \"default\", \"nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin\");\n this.registerPluginPath(\"object\", \"dictionary\", \"nz/co/siliconst/ui5/metaui/plugins/controls/DictionaryMapPlugin\");\n this.registerPluginPath(\"object\", \"reference\", \"nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin\");\n\n // Widget Overrides\n this.registerPluginPath(\"string\", \"time\", \"nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin\");\n this.registerPluginPath(\"string\", \"datetime\", \"nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin\");\n this.registerPluginPath(\"boolean\", \"switch\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin\");\n this.registerPluginPath(\"number\", \"step\", \"nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin\");\n this.registerPluginPath(\"string\", \"select\", \"nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin\");\n this.registerPluginPath(\"string\", \"textArea\", \"nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin\");\n this.registerPluginPath(\"string\", \"codeEditor\", \"nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin\");\n \n // Phase 1 Mappings\n this.registerPluginPath(\"string\", \"fileUploader\", \"nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin\");\n this.registerPluginPath(\"array\", \"multiSelect\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin\");\n this.registerPluginPath(\"array\", \"multiInput\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin\");\n this.registerPluginPath(\"number\", \"slider\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin\");\n this.registerPluginPath(\"number\", \"rating\", \"nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin\");\n this.registerPluginPath(\"string\", \"messageStrip\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin\");\n\n // Phase 5 Mappings (Hardware)\n this.registerPluginPath(\"string\", \"camera\", \"nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin\");\n this.registerPluginPath(\"string\", \"signature\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin\");\n this.registerPluginPath(\"object\", \"location\", \"nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin\");\n this.registerPluginPath(\"string\", \"scanner\", \"nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin\");\n this.registerPluginPath(\"string\", \"voiceInput\", \"nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin\");\n this.registerPluginPath(\"string\", \"richText\", \"nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin\");\n\n // Actions & Datasources\n this.registerPluginPath(\"string\", \"urlButton\", \"nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin\");\n this.registerPluginPath(\"string\", \"submitButton\", \"nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin\");\n this.registerPluginPath(\"string\", \"odataSelect\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin\");\n this.registerPluginPath(\"string\", \"remoteDropdown\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin\");\n this.registerPluginPath(\"string\", \"liveSearch\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin\");\n this.registerPluginPath(\"string\", \"remoteValueHelp\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin\");\n\n // Layouts\n this.registerLayoutPath(\"form\", \"nz/co/siliconst/ui5/metaui/layouts/FormLayout\");\n this.registerLayoutPath(\"table\", \"nz/co/siliconst/ui5/metaui/layouts/TableLayout\");\n this.registerLayoutPath(\"wizard\", \"nz/co/siliconst/ui5/metaui/layouts/WizardLayout\");\n this.registerLayoutPath(\"compact\", \"nz/co/siliconst/ui5/metaui/layouts/CompactLayout\");\n }\n\n public static getInstance(): PluginRegistry {\n if (!PluginRegistry.instance) {\n PluginRegistry.instance = new PluginRegistry();\n }\n return PluginRegistry.instance;\n }\n\n public registerPluginPath(type: FieldType, widgetName: string | undefined, path: string): void {\n const key = widgetName ? `${type}:${widgetName}` : type;\n this.fieldIndex[key] = path;\n }\n\n public registerActionPath(actionName: string, path: string): void {\n this.actionIndex[actionName] = path;\n }\n\n public registerLayoutPath(strategy: string, path: string): void {\n this.layoutIndex[strategy] = path;\n }\n\n private getFieldPath(type: FieldType, widgetName?: string): string {\n let path;\n if (widgetName) {\n path = this.fieldIndex[`${type}:${widgetName}`];\n }\n if (!path) {\n path = this.fieldIndex[type];\n }\n if (!path) {\n throw new Error(`No plugin path mapped for FieldType: ${type} (widget: ${widgetName})`);\n }\n return path;\n }\n\n private getLayoutPath(strategy: string): string {\n const path = this.layoutIndex[strategy];\n if (!path) {\n throw new Error(`No layout path mapped for strategy: ${strategy}`);\n }\n return path;\n }\n\n /**\n * Statically traverses the schema structure to identify all required plugins\n * and layouts without actually instantiating them.\n * \n * @param {ISchema} schema The root JSON schema payload to traverse\n * @returns {Set<string>} A distinct set of UI5 module paths required to render the schema\n */\n public getPathsToLoad(schema: ISchema): Set<string> {\n const pathsToLoad = new Set<string>();\n \n // 1. Gather layout strategy\n const strategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n pathsToLoad.add(this.getLayoutPath(strategy));\n\n // 2. Recursively gather field plugins\n const scanProperties = (props: Record<string, IPropertyMetadata>) => {\n for (const key in props) {\n const prop = props[key];\n try {\n pathsToLoad.add(this.getFieldPath(prop.type || \"string\", prop.ui?.widget));\n } catch (e) {\n const msg = `[MetaUI LazyLoad] Could not find mapped plugin for field ${key}: ${(e as Error).message}`;\n Logger.error(msg);\n throw new Error(msg);\n }\n if (prop.properties) scanProperties(prop.properties);\n if (prop.items && prop.items.properties) scanProperties(prop.items.properties);\n if (prop.items && prop.items.type) {\n try {\n pathsToLoad.add(this.getFieldPath(prop.items.type, prop.items.ui?.widget));\n } catch (e) {\n const msg = `[MetaUI LazyLoad] Could not find mapped plugin for array item type ${prop.items.type}: ${(e as Error).message}`;\n Logger.error(msg);\n throw new Error(msg);\n }\n }\n }\n };\n\n if (schema.properties) {\n scanProperties(schema.properties);\n } else if (schema.items && schema.items.properties) {\n scanProperties(schema.items.properties);\n }\n\n return pathsToLoad;\n }\n\n /**\n * Defers the generation of the UI until all required UI5 modules have been\n * downloaded asynchronously. Maintains a cache of active promises to prevent\n * redundant network requests for the same module.\n * \n * @param {ISchema} schema The root JSON schema payload to parse\n * @returns {Promise<void>} Resolves when all dependencies are securely in the UI5 require cache\n */\n public async preloadDependencies(schema: ISchema): Promise<void> {\n const pathsToLoad = this.getPathsToLoad(schema);\n\n // 3. Batch execute sap.ui.require via Promises\n const promises = Array.from(pathsToLoad).map(path => {\n if (!this.activePromises[path]) {\n this.activePromises[path] = new Promise((resolve, reject) => {\n sap.ui.require([path], \n (Module: unknown) => resolve(Module), \n (err: unknown) => {\n Logger.error(`Failed to lazy load module: ${path}`);\n // CRITICAL: Delete from cache so future attempts can retry the network request\n delete this.activePromises[path];\n reject(err);\n }\n );\n });\n }\n return this.activePromises[path];\n });\n\n await Promise.all(promises);\n }\n\n /**\n * Extracts a valid constructor from a dynamically required module.\n */\n private extractConstructor(Module: unknown): new () => IPlugin | ILayoutManager | null {\n if (!Module) return null;\n if (typeof Module === \"function\") return Module as any;\n if ((Module as any).default && typeof (Module as any).default === \"function\") return (Module as any).default;\n \n // Handle namespace exports (e.g. { FormLayout: class... })\n const keys = Object.keys(Module as object);\n for (const key of keys) {\n if (typeof (Module as any)[key] === \"function\") {\n return (Module as any)[key];\n }\n }\n return null;\n }\n\n /**\n * Instantiates the requested plugin for the given field type.\n */\n public getPlugin(type: FieldType, widgetName?: string): IPlugin {\n const path = this.getFieldPath(type, widgetName);\n const Module = sap.ui.require(path);\n const PluginClass = this.extractConstructor(Module);\n \n if (!PluginClass) {\n throw new Error(`[MetaUI Plugin Instantiation] Plugin ${path} was not preloaded or has no constructor!`);\n }\n \n return new PluginClass();\n }\n\n /**\n * Instantiates the requested layout manager for the given strategy.\n */\n public getLayout(strategy: string): ILayoutManager {\n const path = this.getLayoutPath(strategy);\n const Module = sap.ui.require(path);\n const LayoutClass = this.extractConstructor(Module);\n \n if (!LayoutClass) {\n throw new Error(`[MetaUI Layout Instantiation] Layout ${path} was not preloaded or has no constructor!`);\n }\n \n return new LayoutClass();\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;AACA;AACA;EALA,MAUSA,MAAM,GAAAC,eAAA;EAGR,MAAMC,cAAc,CAAC;IAGhBC,UAAU,GAA2B,CAAC,CAAC;IACvCC,WAAW,GAA2B,CAAC,CAAC;IACxCC,WAAW,GAA2B,CAAC,CAAC;IAExCC,cAAc,GAAqC,CAAC,CAAC;IAErDC,WAAWA,CAAA,EAAG;MAClB;MACA,IAAI,CAACC,kBAAkB,CAAC,QAAQ,EAAEC,SAAS,EAAE,0DAA0D,CAAC;MACxG,IAAI,CAACD,kBAAkB,CAAC,QAAQ,EAAEC,SAAS,EAAE,0DAA0D,CAAC;MACxG,IAAI,CAACD,kBAAkB,CAAC,SAAS,EAAEC,SAAS,EAAE,0DAA0D,CAAC;MACzG,IAAI,CAACD,kBAAkB,CAAC,MAAM,EAAEC,SAAS,EAAE,wDAAwD,CA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ACxC,QAAgB,EAAkB;MAC/C,MAAMJ,IAAI,GAAG,IAAI,CAACO,aAAa,CAACH,QAAQ,CAAC;MACzC,MAAM+B,MAAM,GAAGF,GAAG,CAAChB,EAAE,CAACiB,OAAO,CAAClC,IAAI,CAAC;MACnC,MAAM6C,WAAW,GAAG,IAAI,CAACP,kBAAkB,CAACH,MAAM,CAAC;MAEnD,IAAI,CAACU,WAAW,EAAE;QACd,MAAM,IAAIvC,KAAK,CAAC,wCAAwCN,IAAI,2CAA2C,CAAC;MAC5G;MAEA,OAAO,IAAI6C,WAAW,CAAC,CAAC;IAC5B;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA3D,cAAA,GAAAA,cAAA;EAAA,OAAA2D,SAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"PluginRegistry.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,gDAAgD,CAAC;IAChE;;;;;OAKG;IAEH,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IACxE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAqB,MAAM,+CAA+C,CAAC;IACtG,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;IAItF,MAAa,cAAc;QACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAiB;QAExC,OAAO,CAAC,UAAU,CAA8B;QAChD,OAAO,CAAC,WAAW,CAA8B;QACjD,OAAO,CAAC,WAAW,CAA8B;QAEjD,OAAO,CAAC,cAAc,CAAwC;QAE9D,OAAO;eAiDO,WAAW,IAAI,cAAc;QAOpC,kBAAkB,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;QAKvF,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EA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