@siliconst/metaui 1.4.21 → 1.4.34

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 (338) hide show
  1. package/package.json +1 -1
  2. package/src/nz/co/siliconst/ui5/metaui/constants/MetaUIConstants-dbg.js +51 -0
  3. package/src/nz/co/siliconst/ui5/metaui/constants/MetaUIConstants-dbg.js.map +1 -0
  4. package/src/nz/co/siliconst/ui5/metaui/constants/MetaUIConstants.d.ts +41 -0
  5. package/src/nz/co/siliconst/ui5/metaui/constants/MetaUIConstants.d.ts.map +1 -0
  6. package/src/nz/co/siliconst/ui5/metaui/constants/MetaUIConstants.js +2 -0
  7. package/src/nz/co/siliconst/ui5/metaui/constants/MetaUIConstants.js.map +1 -0
  8. package/src/nz/co/siliconst/ui5/metaui/constants/MetaUIConstants.ts +44 -0
  9. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl-dbg.js.map +1 -1
  10. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl.js.map +1 -1
  11. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl.ts +1 -1
  12. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer-dbg.js.map +1 -1
  13. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer.d.ts.map +1 -1
  14. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer.js.map +1 -1
  15. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer.ts +2 -1
  16. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl-dbg.js +2 -2
  17. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl-dbg.js.map +1 -1
  18. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.js +1 -1
  19. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.js.map +1 -1
  20. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.ts +3 -3
  21. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +5 -1
  22. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js.map +1 -1
  23. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts +6 -2
  24. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +1 -1
  25. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js +1 -1
  26. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js.map +1 -1
  27. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts +10 -9
  28. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl-dbg.js +0 -9
  29. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl-dbg.js.map +1 -1
  30. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.d.ts +0 -9
  31. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.d.ts.map +1 -1
  32. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.js +1 -1
  33. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.js.map +1 -1
  34. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.ts +3 -9
  35. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl-dbg.js +0 -11
  36. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl-dbg.js.map +1 -1
  37. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.d.ts +0 -11
  38. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.d.ts.map +1 -1
  39. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.js +1 -1
  40. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.js.map +1 -1
  41. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.ts +2 -9
  42. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl-dbg.js +2 -7
  43. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl-dbg.js.map +1 -1
  44. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.d.ts +0 -5
  45. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.d.ts.map +1 -1
  46. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.js +1 -1
  47. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.js.map +1 -1
  48. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.ts +3 -7
  49. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl-dbg.js +1 -6
  50. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl-dbg.js.map +1 -1
  51. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.d.ts +0 -5
  52. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.d.ts.map +1 -1
  53. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.js +1 -1
  54. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.js.map +1 -1
  55. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.ts +9 -12
  56. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +51 -12
  57. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js.map +1 -1
  58. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts +13 -0
  59. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts.map +1 -1
  60. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js +1 -1
  61. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js.map +1 -1
  62. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.ts +53 -14
  63. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js +2 -2
  64. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js.map +1 -1
  65. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts +1 -1
  66. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts.map +1 -1
  67. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js +1 -1
  68. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js.map +1 -1
  69. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.ts +3 -3
  70. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate-dbg.js.map +1 -1
  71. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts +1 -1
  72. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts.map +1 -1
  73. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.js.map +1 -1
  74. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.ts +8 -7
  75. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js.map +1 -1
  76. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts +1 -1
  77. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts.map +1 -1
  78. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js.map +1 -1
  79. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts +3 -3
  80. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js.map +1 -1
  81. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.js.map +1 -1
  82. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.ts +4 -4
  83. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +3 -4
  84. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js.map +1 -1
  85. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts +1 -1
  86. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts.map +1 -1
  87. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js +1 -1
  88. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js.map +1 -1
  89. package/src/nz/co/siliconst/ui5/metaui/core/Engine.ts +6 -7
  90. package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator-dbg.js +84 -0
  91. package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator-dbg.js.map +1 -0
  92. package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator.d.ts +16 -0
  93. package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator.d.ts.map +1 -0
  94. package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator.js +2 -0
  95. package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator.js.map +1 -0
  96. package/src/nz/co/siliconst/ui5/metaui/core/LayoutMutator.ts +80 -0
  97. package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer-dbg.js +137 -0
  98. package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer-dbg.js.map +1 -0
  99. package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer.d.ts +24 -0
  100. package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer.d.ts.map +1 -0
  101. package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer.js +2 -0
  102. package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer.js.map +1 -0
  103. package/src/nz/co/siliconst/ui5/metaui/core/LayoutScorer.ts +141 -0
  104. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +26 -0
  105. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js.map +1 -1
  106. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts +2 -0
  107. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts.map +1 -1
  108. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js +1 -1
  109. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js.map +1 -1
  110. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts +29 -1
  111. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +1 -1
  112. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -1
  113. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +4 -4
  114. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
  115. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js +1 -1
  116. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
  117. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +11 -11
  118. package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js.map +1 -1
  119. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js.map +1 -1
  120. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.ts +1 -1
  121. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema-dbg.js.map +1 -1
  122. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts +4 -1
  123. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts.map +1 -1
  124. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts +5 -1
  125. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js +5 -5
  126. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js.map +1 -1
  127. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts.map +1 -1
  128. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js +1 -1
  129. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js.map +1 -1
  130. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.ts +4 -4
  131. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js +7 -5
  132. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js.map +1 -1
  133. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.d.ts.map +1 -1
  134. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js +1 -1
  135. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js.map +1 -1
  136. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.ts +11 -7
  137. package/src/nz/co/siliconst/ui5/metaui/library-preload.js +40 -37
  138. package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
  139. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory-dbg.js.map +1 -1
  140. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.d.ts +1 -1
  141. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.d.ts.map +1 -1
  142. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.js.map +1 -1
  143. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiParserFactory.ts +1 -1
  144. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver-dbg.js.map +1 -1
  145. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.d.ts +1 -1
  146. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.d.ts.map +1 -1
  147. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.js.map +1 -1
  148. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiRefResolver.ts +1 -1
  149. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper-dbg.js.map +1 -1
  150. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.d.ts +1 -1
  151. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.d.ts.map +1 -1
  152. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.js.map +1 -1
  153. package/src/nz/co/siliconst/ui5/metaui/openapi/OpenApiUIMapper.ts +1 -1
  154. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine-dbg.js +2 -2
  155. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine-dbg.js.map +1 -1
  156. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.js.map +1 -1
  157. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/OpenApiHeuristicEngine.ts +2 -2
  158. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic-dbg.js.map +1 -1
  159. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.d.ts +1 -1
  160. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.d.ts.map +1 -1
  161. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.js.map +1 -1
  162. package/src/nz/co/siliconst/ui5/metaui/openapi/heuristics/plugins/ProtobufVariantHeuristic.ts +3 -3
  163. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser-dbg.js.map +1 -1
  164. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.d.ts +1 -1
  165. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.d.ts.map +1 -1
  166. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.js.map +1 -1
  167. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi2Parser.ts +1 -1
  168. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser-dbg.js.map +1 -1
  169. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.d.ts +1 -1
  170. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.d.ts.map +1 -1
  171. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.js.map +1 -1
  172. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApi3Parser.ts +1 -1
  173. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper-dbg.js +1 -1
  174. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper-dbg.js.map +1 -1
  175. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.d.ts +4 -4
  176. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.d.ts.map +1 -1
  177. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.js.map +1 -1
  178. package/src/nz/co/siliconst/ui5/metaui/openapi/parsers/OpenApiPropertyMapper.ts +19 -19
  179. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin-dbg.js.map +1 -1
  180. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.d.ts.map +1 -1
  181. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.js.map +1 -1
  182. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.ts +2 -1
  183. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js +18 -15
  184. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js.map +1 -1
  185. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.d.ts.map +1 -1
  186. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js +1 -1
  187. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js.map +1 -1
  188. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts +18 -18
  189. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +1 -1
  190. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js.map +1 -1
  191. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js +1 -1
  192. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js.map +1 -1
  193. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +2 -2
  194. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js.map +1 -1
  195. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts +1 -6
  196. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts.map +1 -1
  197. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js.map +1 -1
  198. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +2 -2
  199. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
  200. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
  201. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +1 -1
  202. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +2 -2
  203. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
  204. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js +1 -1
  205. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
  206. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +2 -2
  207. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +4 -4
  208. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js.map +1 -1
  209. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js +1 -1
  210. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
  211. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +4 -4
  212. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +1 -1
  213. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
  214. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
  215. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
  216. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +2 -2
  217. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +1 -1
  218. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
  219. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
  220. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
  221. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +2 -2
  222. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
  223. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
  224. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +1 -1
  225. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin-dbg.js +1 -1
  226. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin-dbg.js.map +1 -1
  227. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.js +1 -1
  228. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.js.map +1 -1
  229. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/EmailPlugin.ts +1 -1
  230. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +1 -1
  231. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
  232. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
  233. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
  234. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +2 -2
  235. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +2 -2
  236. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
  237. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js +1 -1
  238. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
  239. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +2 -2
  240. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin-dbg.js +1 -1
  241. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin-dbg.js.map +1 -1
  242. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.js +1 -1
  243. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.js.map +1 -1
  244. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/LinkPlugin.ts +1 -1
  245. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js +1 -1
  246. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js.map +1 -1
  247. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js +1 -1
  248. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js.map +1 -1
  249. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts +3 -3
  250. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +3 -3
  251. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
  252. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
  253. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
  254. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +4 -4
  255. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js +5 -4
  256. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js.map +1 -1
  257. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.d.ts.map +1 -1
  258. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js +1 -1
  259. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js.map +1 -1
  260. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.ts +7 -6
  261. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin-dbg.js +1 -1
  262. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin-dbg.js.map +1 -1
  263. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.js +1 -1
  264. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.js.map +1 -1
  265. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/PasswordPlugin.ts +1 -1
  266. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +1 -1
  267. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
  268. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
  269. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
  270. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +2 -2
  271. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin-dbg.js +3 -2
  272. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin-dbg.js.map +1 -1
  273. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.d.ts.map +1 -1
  274. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.js +1 -1
  275. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.js.map +1 -1
  276. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ReferencePlugin.ts +3 -2
  277. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +2 -2
  278. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
  279. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js +1 -1
  280. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
  281. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +2 -2
  282. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +2 -2
  283. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
  284. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js +1 -1
  285. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
  286. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +2 -2
  287. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +1 -1
  288. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
  289. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
  290. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
  291. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +1 -1
  292. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin-dbg.js +1 -1
  293. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin-dbg.js.map +1 -1
  294. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.js +1 -1
  295. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.js.map +1 -1
  296. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.ts +2 -2
  297. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +1 -1
  298. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
  299. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js +1 -1
  300. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
  301. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +1 -1
  302. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +2 -2
  303. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
  304. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js +1 -1
  305. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
  306. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +2 -2
  307. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +1 -1
  308. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
  309. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
  310. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
  311. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +1 -1
  312. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +2 -2
  313. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
  314. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js +1 -1
  315. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
  316. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +2 -2
  317. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js.map +1 -1
  318. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.d.ts.map +1 -1
  319. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js.map +1 -1
  320. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.ts +109 -108
  321. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin-dbg.js.map +1 -1
  322. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.d.ts.map +1 -1
  323. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.js.map +1 -1
  324. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.ts +64 -63
  325. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin-dbg.js +1 -1
  326. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin-dbg.js.map +1 -1
  327. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.d.ts +1 -1
  328. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.d.ts.map +1 -1
  329. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.js.map +1 -1
  330. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.ts +118 -117
  331. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js.map +1 -1
  332. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.d.ts.map +1 -1
  333. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js.map +1 -1
  334. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.ts +105 -104
  335. package/src/nz/co/siliconst/ui5/metaui/utils/Logger-dbg.js.map +1 -1
  336. package/src/nz/co/siliconst/ui5/metaui/utils/Logger.d.ts.map +1 -1
  337. package/src/nz/co/siliconst/ui5/metaui/utils/Logger.js.map +1 -1
  338. package/src/nz/co/siliconst/ui5/metaui/utils/Logger.ts +1 -1
@@ -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","pluginRegistry","this","getInstance","build","schema","model","modelName","onSubmit","engineScopeId","onChange","activeModel","isValid","fieldKey","errorMessage","controlId","handleEvent","ensureLayout","warn","layoutStrategy","type","layoutManager","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 /** The injected PluginRegistry instance */\n public readonly pluginRegistry: PluginRegistry;\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 * @param pluginRegistry Optional injected plugin registry. Defaults to singleton.\n */\n constructor(editable: boolean = true, useMessageManager: boolean = false, pluginRegistry?: PluginRegistry) {\n this.isEditable = editable;\n this.useMessageManager = useMessageManager;\n this.pluginRegistry = pluginRegistry || PluginRegistry.getInstance();\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 = this.pluginRegistry.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 = this.pluginRegistry.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 = this.pluginRegistry.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,MAW7CC,YAAYC,EAAoB,KAAMF,EAA6B,MAAOG,GACtEC,KAAKN,WAAaI,EAClBE,KAAKJ,kBAAoBA,EACzBI,KAAKD,eAAiBA,GAAkBd,EAAegB,aAC3D,CAaOC,MAAMC,EAAiBC,EAA2BC,EAAoB,OAAQC,EAAuBC,EAAwBC,GAChIR,KAAKR,gBAAkB,IAAIT,EAAgBoB,GAC3CH,KAAKP,cAAgB,GACrBO,KAAKS,YAAcL,EACnBJ,KAAKO,cAAgBA,EACrBP,KAAKQ,SAAW,CAACE,EAAkBC,EAAmBC,EAAuBC,KACzE,GAAIb,KAAKR,iBAAmBmB,EAAU,CAClCX,KAAKR,gBAAgBsB,YAAYH,EAAUD,EAC/C,CACA,GAAIF,EAA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UACH,GAAI5D,KAAKR,gBAAiB,CACtBQ,KAAKR,gBAAgBoE,UACrB5D,KAAKR,gBAAkB,IAC3B,CAMA,MAAMqE,EAAiBC,EACvB,MAAMC,EAAmBF,EAAeG,kBAAkBC,UAC1D,MAAMC,EAA8B,GAEpC,IAAK,MAAMlB,KAAQhD,KAAKP,cAAe,CACnC,GAAIO,KAAKS,YAAa,CAClB,MAAM0D,EAAa,IAAInB,EAAKT,KAAKa,QAAQ,MAAO,MAChD,MAAMgB,EAAWL,EAAuGM,OAAO9C,GAC3HA,EAAI+C,cAAgBH,GAAc5C,EAAIgD,uBAAyBhD,EAAIgD,sBAAsBC,UAAYxE,KAAKS,YAAa+D,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,KAAKP,cAAgB,EACzB,EACH,IAAAkF,EAAA,CAAAC,WAAA,MAAAD,EAAApF,SAAA,OAAAoF,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","pluginRegistry","this","getInstance","build","schema","model","modelName","onSubmit","engineScopeId","onChange","activeModel","isValid","fieldKey","errorMessage","controlId","handleEvent","layoutStrategy","type","layoutManager","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","ensureLayout","warn","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?: any;\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 /** The injected PluginRegistry instance */\n public readonly pluginRegistry: PluginRegistry;\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 * @param pluginRegistry Optional injected plugin registry. Defaults to singleton.\n */\n constructor(editable: boolean = true, useMessageManager: boolean = false, pluginRegistry?: PluginRegistry) {\n this.isEditable = editable;\n this.useMessageManager = useMessageManager;\n this.pluginRegistry = pluginRegistry || PluginRegistry.getInstance();\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: any, 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 const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = this.pluginRegistry.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 = this.pluginRegistry.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 if (DefaultLayoutGenerator.ensureLayout(schema)) {\n Logger.warn(`[MetaUI Engine] Missing 'uiLayout' array in sub-schema for ${bindingPath}. Synthesized a default layout mapping.`);\n }\n\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = this.pluginRegistry.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,MAW7CC,YAAYC,EAAoB,KAAMF,EAA6B,MAAOG,GACtEC,KAAKN,WAAaI,EAClBE,KAAKJ,kBAAoBA,EACzBI,KAAKD,eAAiBA,GAAkBd,EAAegB,aAC3D,CAaOC,MAAMC,EAAiBC,EAAYC,EAAoB,OAAQC,EAAuBC,EAAwBC,GACjHR,KAAKR,gBAAkB,IAAIT,EAAgBoB,GAC3CH,KAAKP,cAAgB,GACrBO,KAAKS,YAAcL,EACnBJ,KAAKO,cAAgBA,EACrBP,KAAKQ,SAAW,CAACE,EAAkBC,EAAmBC,EAAuBC,KACzE,GAAIb,KAAKR,iBAAmBmB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kB,GAAaI,EAAEtB,OAAS,IAAIkB,KAClF,OAAOE,EAAQA,EAAM3B,OAASS,SAClC,CAKOqB,UACH,GAAI5D,KAAKR,gBAAiB,CACtBQ,KAAKR,gBAAgBoE,UACrB5D,KAAKR,gBAAkB,IAC3B,CAMA,MAAMqE,EAAiBC,EACvB,MAAMC,EAAmBF,EAAeG,kBAAkBC,UAC1D,MAAMC,EAA8B,GAEpC,IAAK,MAAMlB,KAAQhD,KAAKP,cAAe,CACnC,GAAIO,KAAKS,YAAa,CAClB,MAAM0D,EAAa,IAAInB,EAAKX,KAAKe,QAAQ,MAAO,MAChD,MAAMgB,EAAWL,EAAuGM,OAAOhD,GAC3HA,EAAIiD,cAAgBH,GAAc9C,EAAIkD,uBAAyBlD,EAAIkD,sBAAsBC,UAAYxE,KAAKS,YAAa+D,SAE3HN,EAAiB9B,QAAQgC,EAC7B,CACA,UAAWpB,EAAKlB,OAAO8B,UAAY,WAAY,CAC3CZ,EAAKlB,OAAO8B,SAChB,CACJ,CAEA,GAAIM,EAAiBO,OAAS,EAAG,CAC7BZ,EAAea,eAAeR,EAClC,CAEAlE,KAAKP,cAAgB,EACzB,EACH,IAAAkF,EAAA,CAAAC,WAAA,MAAAD,EAAApF,SAAA,OAAAoF,CAAA","ignoreList":[]}
@@ -36,7 +36,7 @@ export class Engine {
36
36
  /** Deterministic scope ID injected by the host control to prevent clone collisions. */
37
37
  public engineScopeId?: string;
38
38
 
39
- private activeModel?: sap.ui.model.Model;
39
+ private activeModel?: any;
40
40
 
41
41
  /** Reference to the GeneratorHost that instantiated this engine, for retrieving global definitions. */
42
42
  public host?: unknown;
@@ -79,7 +79,7 @@ export class Engine {
79
79
  * @param onChange Callback fired when field values change.
80
80
  * @returns The generated root UI5 Control container.
81
81
  */
82
- 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 {
82
+ public build(schema: ISchema, model: any, modelName: string = "meta", onSubmit?: () => void, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control {
83
83
  this.conditionEngine = new ConditionEngine(schema);
84
84
  this.activePlugins = [];
85
85
  this.activeModel = model;
@@ -94,11 +94,6 @@ export class Engine {
94
94
  };
95
95
 
96
96
  try {
97
- // Intercept and synthesize a default layout if the developer/backend failed to provide one
98
- if (DefaultLayoutGenerator.ensureLayout(schema)) {
99
- Logger.warn("[MetaUI Engine] Missing 'uiLayout' array in schema. Synthesized a default layout mapping to prevent a blank render.");
100
- }
101
-
102
97
  const layoutStrategy = schema.layoutStrategy || (schema.type === "array" ? "table" : "form");
103
98
  const layoutManager = this.pluginRegistry.getLayout(layoutStrategy);
104
99
 
@@ -163,6 +158,10 @@ export class Engine {
163
158
  */
164
159
  public generateLayout(schema: ISchema, modelName: string, bindingPath?: string): Control {
165
160
  try {
161
+ if (DefaultLayoutGenerator.ensureLayout(schema)) {
162
+ Logger.warn(`[MetaUI Engine] Missing 'uiLayout' array in sub-schema for ${bindingPath}. Synthesized a default layout mapping.`);
163
+ }
164
+
166
165
  const layoutStrategy = schema.layoutStrategy || (schema.type === "array" ? "table" : "form");
167
166
  const layoutManager = this.pluginRegistry.getLayout(layoutStrategy);
168
167
  return layoutManager.render(schema, modelName, this, undefined, bindingPath);
@@ -0,0 +1,84 @@
1
+ sap.ui.define(["./SchemaNormalizer", "../constants/MetaUIConstants"], function (___SchemaNormalizer, ___constants_MetaUIConstants) {
2
+ "use strict";
3
+
4
+ /**
5
+ * @file LayoutMutator.ts
6
+ * @description Intercepts the generated schema before rendering to dynamically mutate the UI layout based on inline rendering rules.
7
+ */
8
+ const SchemaNormalizer = ___SchemaNormalizer["SchemaNormalizer"];
9
+ const RENDER_MODE = ___constants_MetaUIConstants["RENDER_MODE"];
10
+ const SCHEMA_TYPE = ___constants_MetaUIConstants["SCHEMA_TYPE"];
11
+ class LayoutMutator {
12
+ /**
13
+ * Mutates the `uiLayout` array to expand nested inline objects into native Groups.
14
+ * @param schema The normalized root schema.
15
+ */
16
+ static apply(schema) {
17
+ if (!schema || !schema.uiLayout || !Array.isArray(schema.uiLayout)) {
18
+ return; // No layout to mutate
19
+ }
20
+ schema.uiLayout = this.expandElements(schema.uiLayout, schema);
21
+ }
22
+ static expandElements(elements, rootSchema) {
23
+ const expanded = [];
24
+ for (const element of elements) {
25
+ if (element.type === "Group") {
26
+ // Recursively expand group elements
27
+ if (element.elements) {
28
+ element.elements = this.expandElements(element.elements, rootSchema);
29
+ }
30
+ expanded.push(element);
31
+ } else if (element.type === "Control") {
32
+ if (!element.scope) {
33
+ expanded.push(element);
34
+ continue;
35
+ }
36
+ // Resolve the schema to see if this control points to an inline object
37
+ try {
38
+ const {
39
+ meta,
40
+ bindingPath
41
+ } = SchemaNormalizer.resolveScope(rootSchema, element.scope);
42
+ const hasExplicitWidget = !!meta?.ui?.widget;
43
+ const isInlineObject = meta?.type === SCHEMA_TYPE.OBJECT && meta.ui?.renderMode === RENDER_MODE.INLINE && !hasExplicitWidget;
44
+ if (isInlineObject && meta.properties) {
45
+ // Transform this Control into a Group containing its properties
46
+ const newGroup = {
47
+ type: "Group",
48
+ label: meta.ui?.label || bindingPath.split("/").pop(),
49
+ elements: []
50
+ };
51
+
52
+ // Add all child properties as controls
53
+ for (const childKey of Object.keys(meta.properties)) {
54
+ newGroup.elements.push({
55
+ type: "Control",
56
+ scope: `${element.scope}/properties/${childKey}`
57
+ });
58
+ }
59
+
60
+ // Recursively expand this new group in case it contains further inline objects
61
+ newGroup.elements = this.expandElements(newGroup.elements, rootSchema);
62
+ expanded.push(newGroup);
63
+ } else {
64
+ // Scalar control, keep as is
65
+ expanded.push(element);
66
+ }
67
+ } catch (e) {
68
+ // Scope not found, keep element to let normal error handling report it
69
+ expanded.push(element);
70
+ }
71
+ } else {
72
+ expanded.push(element);
73
+ }
74
+ }
75
+ return expanded;
76
+ }
77
+ }
78
+ var __exports = {
79
+ __esModule: true
80
+ };
81
+ __exports.LayoutMutator = LayoutMutator;
82
+ return __exports;
83
+ });
84
+ //# sourceMappingURL=LayoutMutator-dbg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutMutator-dbg.js","names":["SchemaNormalizer","___SchemaNormalizer","RENDER_MODE","___constants_MetaUIConstants","SCHEMA_TYPE","LayoutMutator","apply","schema","uiLayout","Array","isArray","expandElements","elements","rootSchema","expanded","element","type","push","scope","meta","bindingPath","resolveScope","hasExplicitWidget","ui","widget","isInlineObject","OBJECT","renderMode","INLINE","properties","newGroup","label","split","pop","childKey","Object","keys","e","__exports","__esModule"],"sources":["LayoutMutator.ts"],"sourcesContent":["/**\n * @file LayoutMutator.ts\n * @description Intercepts the generated schema before rendering to dynamically mutate the UI layout based on inline rendering rules.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\nimport { SchemaNormalizer } from \"./SchemaNormalizer\";\nimport { RENDER_MODE, SCHEMA_TYPE } from \"../constants/MetaUIConstants\";\n\nexport class LayoutMutator {\n /**\n * Mutates the `uiLayout` array to expand nested inline objects into native Groups.\n * @param schema The normalized root schema.\n */\n public static apply(schema: ISchema): void {\n if (!schema || !schema.uiLayout || !Array.isArray(schema.uiLayout)) {\n return; // No layout to mutate\n }\n\n schema.uiLayout = this.expandElements(schema.uiLayout, schema);\n }\n\n private static expandElements(elements: ILayoutElement[], rootSchema: ISchema): ILayoutElement[] {\n const expanded: ILayoutElement[] = [];\n\n for (const element of elements) {\n if (element.type === \"Group\") {\n // Recursively expand group elements\n if (element.elements) {\n element.elements = this.expandElements(element.elements, rootSchema);\n }\n expanded.push(element);\n } else if (element.type === \"Control\") {\n if (!element.scope) {\n expanded.push(element);\n continue;\n }\n // Resolve the schema to see if this control points to an inline object\n try {\n const { meta, bindingPath } = SchemaNormalizer.resolveScope(rootSchema, element.scope);\n \n const hasExplicitWidget = !!meta?.ui?.widget;\n const isInlineObject = meta?.type === SCHEMA_TYPE.OBJECT && meta.ui?.renderMode === RENDER_MODE.INLINE && !hasExplicitWidget;\n\n if (isInlineObject && meta.properties) {\n // Transform this Control into a Group containing its properties\n const newGroup: ILayoutElement = {\n type: \"Group\",\n label: meta.ui?.label || bindingPath.split(\"/\").pop(),\n elements: []\n };\n\n // Add all child properties as controls\n for (const childKey of Object.keys(meta.properties)) {\n newGroup.elements!.push({\n type: \"Control\",\n scope: `${element.scope}/properties/${childKey}`\n });\n }\n\n // Recursively expand this new group in case it contains further inline objects\n newGroup.elements = this.expandElements(newGroup.elements!, rootSchema);\n \n expanded.push(newGroup);\n } else {\n // Scalar control, keep as is\n expanded.push(element);\n }\n } catch (e) {\n // Scope not found, keep element to let normal error handling report it\n expanded.push(element);\n }\n } else {\n expanded.push(element);\n }\n }\n\n return expanded;\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAMSA,gBAAgB,GAAAC,mBAAA;EAAA,MAChBC,WAAW,GAAAC,4BAAA;EAAA,MAAEC,WAAW,GAAAD,4BAAA;EAE1B,MAAME,aAAa,CAAC;IACvB;AACJ;AACA;AACA;IACI,OAAcC,KAAKA,CAACC,MAAe,EAAQ;MACvC,IAAI,CAACA,MAAM,IAAI,CAACA,MAAM,CAACC,QAAQ,IAAI,CAACC,KAAK,CAACC,OAAO,CAACH,MAAM,CAACC,QAAQ,CAAC,EAAE;QAChE,OAAO,CAAC;MACZ;MAEAD,MAAM,CAACC,QAAQ,GAAG,IAAI,CAACG,cAAc,CAACJ,MAAM,CAACC,QAAQ,EAAED,MAAM,CAAC;IAClE;IAEA,OAAeI,cAAcA,CAACC,QAA0B,EAAEC,UAAmB,EAAoB;MAC7F,MAAMC,QAA0B,GAAG,EAAE;MAErC,KAAK,MAAMC,OAAO,IAAIH,QAAQ,EAAE;QAC5B,IAAIG,OAAO,CAACC,IAAI,KAAK,OAAO,EAAE;UAC1B;UACA,IAAID,OAAO,CAACH,QAAQ,EAAE;YAClBG,OAAO,CAACH,QAAQ,GAAG,IAAI,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CAAClB,QAAQ,EAAGC,UAAU,CAAC;cAEvEC,QAAQ,CAACG,IAAI,CAACa,QAAQ,CAAC;YAC3B,CAAC,MAAM;cACH;cACAhB,QAAQ,CAACG,IAAI,CAACF,OAAO,CAAC;YAC1B;UACJ,CAAC,CAAC,OAAOsB,CAAC,EAAE;YACR;YACAvB,QAAQ,CAACG,IAAI,CAACF,OAAO,CAAC;UAC1B;QACJ,CAAC,MAAM;UACHD,QAAQ,CAACG,IAAI,CAACF,OAAO,CAAC;QAC1B;MACJ;MAEA,OAAOD,QAAQ;IACnB;EACJ;EAAC,IAAAwB,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAjC,aAAA,GAAAA,aAAA;EAAA,OAAAiC,SAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,16 @@
1
+ declare module "nz/co/siliconst/ui5/metaui/core/LayoutMutator" {
2
+ /**
3
+ * @file LayoutMutator.ts
4
+ * @description Intercepts the generated schema before rendering to dynamically mutate the UI layout based on inline rendering rules.
5
+ */
6
+ import { ISchema } from "nz/co/siliconst/ui5/metaui/interfaces/ISchema";
7
+ export class LayoutMutator {
8
+ /**
9
+ * Mutates the `uiLayout` array to expand nested inline objects into native Groups.
10
+ * @param schema The normalized root schema.
11
+ */
12
+ static apply(schema: ISchema): void;
13
+ private static expandElements;
14
+ }
15
+ }
16
+ //# sourceMappingURL=LayoutMutator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutMutator.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/LayoutMutator.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,+CAA+C,CAAC;IAC/D;;;OAGG;IAEH,OAAO,EAAE,OAAO,EAAkB,MAAM,+CAA+C,CAAC;IAIxF,MAAa,aAAa;QACtB;;;WAGG;eACW,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;QAQ1C,OAAO,CAAC,MAAM,CAAC,cAAc;KAyDhC;CAEA"}
@@ -0,0 +1,2 @@
1
+ sap.ui.define(["./SchemaNormalizer","../constants/MetaUIConstants"],function(e,t){"use strict";const s=e["SchemaNormalizer"];const o=t["RENDER_MODE"];const n=t["SCHEMA_TYPE"];class p{static apply(e){if(!e||!e.uiLayout||!Array.isArray(e.uiLayout)){return}e.uiLayout=this.expandElements(e.uiLayout,e)}static expandElements(e,t){const p=[];for(const r of e){if(r.type==="Group"){if(r.elements){r.elements=this.expandElements(r.elements,t)}p.push(r)}else if(r.type==="Control"){if(!r.scope){p.push(r);continue}try{const{meta:e,bindingPath:i}=s.resolveScope(t,r.scope);const u=!!e?.ui?.widget;const a=e?.type===n.OBJECT&&e.ui?.renderMode===o.INLINE&&!u;if(a&&e.properties){const s={type:"Group",label:e.ui?.label||i.split("/").pop(),elements:[]};for(const t of Object.keys(e.properties)){s.elements.push({type:"Control",scope:`${r.scope}/properties/${t}`})}s.elements=this.expandElements(s.elements,t);p.push(s)}else{p.push(r)}}catch(e){p.push(r)}}else{p.push(r)}}return p}}var r={__esModule:true};r.LayoutMutator=p;return r});
2
+ //# sourceMappingURL=LayoutMutator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutMutator.js","names":["SchemaNormalizer","___SchemaNormalizer","RENDER_MODE","___constants_MetaUIConstants","SCHEMA_TYPE","LayoutMutator","apply","schema","uiLayout","Array","isArray","this","expandElements","elements","rootSchema","expanded","element","type","push","scope","meta","bindingPath","resolveScope","hasExplicitWidget","ui","widget","isInlineObject","OBJECT","renderMode","INLINE","properties","newGroup","label","split","pop","childKey","Object","keys","e","__exports","__esModule"],"sources":["LayoutMutator.ts"],"sourcesContent":["/**\n * @file LayoutMutator.ts\n * @description Intercepts the generated schema before rendering to dynamically mutate the UI layout based on inline rendering rules.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\nimport { SchemaNormalizer } from \"./SchemaNormalizer\";\nimport { RENDER_MODE, SCHEMA_TYPE } from \"../constants/MetaUIConstants\";\n\nexport class LayoutMutator {\n /**\n * Mutates the `uiLayout` array to expand nested inline objects into native Groups.\n * @param schema The normalized root schema.\n */\n public static apply(schema: ISchema): void {\n if (!schema || !schema.uiLayout || !Array.isArray(schema.uiLayout)) {\n return; // No layout to mutate\n }\n\n schema.uiLayout = this.expandElements(schema.uiLayout, schema);\n }\n\n private static expandElements(elements: ILayoutElement[], rootSchema: ISchema): ILayoutElement[] {\n const expanded: ILayoutElement[] = [];\n\n for (const element of elements) {\n if (element.type === \"Group\") {\n // Recursively expand group elements\n if (element.elements) {\n element.elements = this.expandElements(element.elements, rootSchema);\n }\n expanded.push(element);\n } else if (element.type === \"Control\") {\n if (!element.scope) {\n expanded.push(element);\n continue;\n }\n // Resolve the schema to see if this control points to an inline object\n try {\n const { meta, bindingPath } = SchemaNormalizer.resolveScope(rootSchema, element.scope);\n \n const hasExplicitWidget = !!meta?.ui?.widget;\n const isInlineObject = meta?.type === SCHEMA_TYPE.OBJECT && meta.ui?.renderMode === RENDER_MODE.INLINE && !hasExplicitWidget;\n\n if (isInlineObject && meta.properties) {\n // Transform this Control into a Group containing its properties\n const newGroup: ILayoutElement = {\n type: \"Group\",\n label: meta.ui?.label || bindingPath.split(\"/\").pop(),\n elements: []\n };\n\n // Add all child properties as controls\n for (const childKey of Object.keys(meta.properties)) {\n newGroup.elements!.push({\n type: \"Control\",\n scope: `${element.scope}/properties/${childKey}`\n });\n }\n\n // Recursively expand this new group in case it contains further inline objects\n newGroup.elements = this.expandElements(newGroup.elements!, rootSchema);\n \n expanded.push(newGroup);\n } else {\n // Scalar control, keep as is\n expanded.push(element);\n }\n } catch (e) {\n // Scope not found, keep element to let normal error handling report it\n expanded.push(element);\n }\n } else {\n expanded.push(element);\n }\n }\n\n return expanded;\n }\n}\n"],"mappings":"+FAAA,MAMSA,EAAgBC,EAAA,0BAChBC,EAAWC,EAAA,qBAAEC,EAAWD,EAAA,eAE1B,MAAME,EAKT,YAAcC,CAAMC,GAChB,IAAKA,IAAWA,EAAOC,WAA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
1
+ /**
2
+ * @file LayoutMutator.ts
3
+ * @description Intercepts the generated schema before rendering to dynamically mutate the UI layout based on inline rendering rules.
4
+ */
5
+
6
+ import { ISchema, ILayoutElement } from "../interfaces/ISchema";
7
+ import { SchemaNormalizer } from "./SchemaNormalizer";
8
+ import { RENDER_MODE, SCHEMA_TYPE } from "../constants/MetaUIConstants";
9
+
10
+ export class LayoutMutator {
11
+ /**
12
+ * Mutates the `uiLayout` array to expand nested inline objects into native Groups.
13
+ * @param schema The normalized root schema.
14
+ */
15
+ public static apply(schema: ISchema): void {
16
+ if (!schema || !schema.uiLayout || !Array.isArray(schema.uiLayout)) {
17
+ return; // No layout to mutate
18
+ }
19
+
20
+ schema.uiLayout = this.expandElements(schema.uiLayout, schema);
21
+ }
22
+
23
+ private static expandElements(elements: ILayoutElement[], rootSchema: ISchema): ILayoutElement[] {
24
+ const expanded: ILayoutElement[] = [];
25
+
26
+ for (const element of elements) {
27
+ if (element.type === "Group") {
28
+ // Recursively expand group elements
29
+ if (element.elements) {
30
+ element.elements = this.expandElements(element.elements, rootSchema);
31
+ }
32
+ expanded.push(element);
33
+ } else if (element.type === "Control") {
34
+ if (!element.scope) {
35
+ expanded.push(element);
36
+ continue;
37
+ }
38
+ // Resolve the schema to see if this control points to an inline object
39
+ try {
40
+ const { meta, bindingPath } = SchemaNormalizer.resolveScope(rootSchema, element.scope);
41
+
42
+ const hasExplicitWidget = !!meta?.ui?.widget;
43
+ const isInlineObject = meta?.type === SCHEMA_TYPE.OBJECT && meta.ui?.renderMode === RENDER_MODE.INLINE && !hasExplicitWidget;
44
+
45
+ if (isInlineObject && meta.properties) {
46
+ // Transform this Control into a Group containing its properties
47
+ const newGroup: ILayoutElement = {
48
+ type: "Group",
49
+ label: meta.ui?.label || bindingPath.split("/").pop(),
50
+ elements: []
51
+ };
52
+
53
+ // Add all child properties as controls
54
+ for (const childKey of Object.keys(meta.properties)) {
55
+ newGroup.elements!.push({
56
+ type: "Control",
57
+ scope: `${element.scope}/properties/${childKey}`
58
+ });
59
+ }
60
+
61
+ // Recursively expand this new group in case it contains further inline objects
62
+ newGroup.elements = this.expandElements(newGroup.elements!, rootSchema);
63
+
64
+ expanded.push(newGroup);
65
+ } else {
66
+ // Scalar control, keep as is
67
+ expanded.push(element);
68
+ }
69
+ } catch (e) {
70
+ // Scope not found, keep element to let normal error handling report it
71
+ expanded.push(element);
72
+ }
73
+ } else {
74
+ expanded.push(element);
75
+ }
76
+ }
77
+
78
+ return expanded;
79
+ }
80
+ }
@@ -0,0 +1,137 @@
1
+ sap.ui.define(["./PluginRegistry", "../utils/Logger", "../constants/MetaUIConstants"], function (___PluginRegistry, ___utils_Logger, ___constants_MetaUIConstants) {
2
+ "use strict";
3
+
4
+ /**
5
+ * @file LayoutScorer.ts
6
+ * @description Core utility that calculates the nested footprint score of schemas
7
+ * to determine if they should be rendered inline or overflowed into a dialog button.
8
+ */
9
+ const PluginRegistry = ___PluginRegistry["PluginRegistry"];
10
+ const Logger = ___utils_Logger["Logger"];
11
+ const RENDER_MODE = ___constants_MetaUIConstants["RENDER_MODE"];
12
+ const SCHEMA_TYPE = ___constants_MetaUIConstants["SCHEMA_TYPE"];
13
+ const OPENAPI_PREFIX = ___constants_MetaUIConstants["OPENAPI_PREFIX"];
14
+ const WIDGET_TYPE = ___constants_MetaUIConstants["WIDGET_TYPE"];
15
+ class LayoutScorer {
16
+ /**
17
+ * Recursively computes scores and annotates the schema with `renderMode`.
18
+ *
19
+ * @param schema The normalized schema root.
20
+ * @param budget The remaining layout budget (e.g., 50).
21
+ */
22
+ static apply(schema, budget, schemaDefinitions) {
23
+ if (!schema || budget <= 0) return; // 0 budget means default fallback (no inline budget logic).
24
+
25
+ const visited = new WeakSet();
26
+ const activeRefs = new Set();
27
+
28
+ // We only score the root properties (not the root object itself).
29
+ if (schema.properties) {
30
+ for (const key in schema.properties) {
31
+ const prop = schema.properties[key];
32
+ if (prop.type === SCHEMA_TYPE.OBJECT || prop.type === SCHEMA_TYPE.ARRAY || prop.$ref) {
33
+ this._scoreNode(prop, budget, visited, activeRefs, key, schemaDefinitions);
34
+ }
35
+ }
36
+ }
37
+ }
38
+
39
+ /**
40
+ * Traverses a node, computing its total footprint.
41
+ * If the score > budget, forces `renderMode = "dialog"`.
42
+ * If the score <= budget, forces `renderMode = "inline"`.
43
+ */
44
+ static _scoreNode(node, budget, visited, activeRefs, path, schemaDefinitions) {
45
+ if (!node || typeof node !== SCHEMA_TYPE.OBJECT) return 0;
46
+ if (visited.has(node)) {
47
+ Logger.warn(`[MetaUI LayoutScorer] Circular reference detected at '${path}'. Forcing dialog mode to prevent crash.`, "", "LayoutScorer");
48
+ node.ui = node.ui || {};
49
+ node.ui.renderMode = RENDER_MODE.DIALOG;
50
+ node.ui.layoutBudget = budget;
51
+ return 1; // A dialog button is just 1 unit
52
+ }
53
+ visited.add(node);
54
+ if (node.$ref && schemaDefinitions) {
55
+ let key = node.$ref;
56
+ if (key.startsWith(OPENAPI_PREFIX.DEFINITIONS)) key = key.substring(OPENAPI_PREFIX.DEFINITIONS.length);else if (key.startsWith(OPENAPI_PREFIX.COMPONENTS_SCHEMAS)) key = key.substring(OPENAPI_PREFIX.COMPONENTS_SCHEMAS.length);
57
+ if (activeRefs.has(key)) {
58
+ Logger.warn(`[MetaUI LayoutScorer] Circular OpenAPI $ref detected at '${path}' for '${key}'. Forcing dialog mode to prevent crash.`, "", "LayoutScorer");
59
+ node.ui = node.ui || {};
60
+ node.ui.renderMode = RENDER_MODE.DIALOG;
61
+ return 1;
62
+ }
63
+ const resolvedOriginal = schemaDefinitions[key];
64
+ if (resolvedOriginal) {
65
+ activeRefs.add(key);
66
+
67
+ // Deep clone it BEFORE scoring so we don't mutate the global dictionary
68
+ const resolved = JSON.parse(JSON.stringify(resolvedOriginal));
69
+ const resolvedScore = this._scoreNode(resolved, budget, visited, activeRefs, path, schemaDefinitions);
70
+ activeRefs.delete(key);
71
+ node.ui = node.ui || {};
72
+ node.ui.layoutBudget = budget;
73
+ if (resolvedScore <= budget) {
74
+ // Merge it permanently in the layout!
75
+ Object.assign(node, resolved);
76
+ delete node.$ref;
77
+ if (node.ui?.widget === WIDGET_TYPE.REFERENCE) delete node.ui.widget;
78
+ node.ui.renderMode = RENDER_MODE.INLINE;
79
+ return resolvedScore;
80
+ } else {
81
+ node.ui.renderMode = RENDER_MODE.DIALOG;
82
+ return 1;
83
+ }
84
+ }
85
+ }
86
+ if (node.type === SCHEMA_TYPE.ARRAY) {
87
+ let arrayScore = PluginRegistry.getInstance().getPluginScore(SCHEMA_TYPE.ARRAY, node.ui?.widget);
88
+
89
+ // Traverse array items!
90
+ if (node.items) {
91
+ const itemsSchema = node.items;
92
+ if (itemsSchema.type === SCHEMA_TYPE.OBJECT || itemsSchema.type === SCHEMA_TYPE.ARRAY || itemsSchema.$ref) {
93
+ arrayScore += this._scoreNode(itemsSchema, budget, visited, activeRefs, `${path}/items`, schemaDefinitions);
94
+ }
95
+ }
96
+ node.ui = node.ui || {};
97
+ node.ui.layoutBudget = budget;
98
+ if (arrayScore <= budget) {
99
+ node.ui.renderMode = RENDER_MODE.INLINE;
100
+ return arrayScore;
101
+ } else {
102
+ node.ui.renderMode = RENDER_MODE.DIALOG;
103
+ return 1;
104
+ }
105
+ }
106
+ let totalScore = 0;
107
+ if (node.properties) {
108
+ for (const key in node.properties) {
109
+ const child = node.properties[key];
110
+ if (child.type === SCHEMA_TYPE.OBJECT || child.type === SCHEMA_TYPE.ARRAY || child.$ref) {
111
+ totalScore += this._scoreNode(child, budget, visited, activeRefs, `${path}/${key}`, schemaDefinitions);
112
+ } else {
113
+ totalScore += PluginRegistry.getInstance().getPluginScore(child.type || SCHEMA_TYPE.STRING, child.ui?.widget);
114
+ }
115
+ }
116
+ } else {
117
+ // An open dictionary (additionalProperties) is scored as a single table
118
+ totalScore += PluginRegistry.getInstance().getPluginScore(SCHEMA_TYPE.OBJECT, node.ui?.widget); // e.g. dictionaryMap
119
+ }
120
+ node.ui = node.ui || {};
121
+ node.ui.layoutBudget = budget;
122
+ if (totalScore <= budget) {
123
+ node.ui.renderMode = RENDER_MODE.INLINE;
124
+ return totalScore;
125
+ } else {
126
+ node.ui.renderMode = RENDER_MODE.DIALOG;
127
+ return 1; // It collapsed into an "Edit Details" button
128
+ }
129
+ }
130
+ }
131
+ var __exports = {
132
+ __esModule: true
133
+ };
134
+ __exports.LayoutScorer = LayoutScorer;
135
+ return __exports;
136
+ });
137
+ //# sourceMappingURL=LayoutScorer-dbg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutScorer-dbg.js","names":["PluginRegistry","___PluginRegistry","Logger","___utils_Logger","RENDER_MODE","___constants_MetaUIConstants","SCHEMA_TYPE","OPENAPI_PREFIX","WIDGET_TYPE","LayoutScorer","apply","schema","budget","schemaDefinitions","visited","WeakSet","activeRefs","Set","properties","key","prop","type","OBJECT","ARRAY","$ref","_scoreNode","node","path","has","warn","ui","renderMode","DIALOG","layoutBudget","add","startsWith","DEFINITIONS","substring","length","COMPONENTS_SCHEMAS","resolvedOriginal","resolved","JSON","parse","stringify","resolvedScore","delete","Object","assign","widget","REFERENCE","INLINE","arrayScore","getInstance","getPluginScore","items","itemsSchema","totalScore","child","STRING","__exports","__esModule"],"sources":["LayoutScorer.ts"],"sourcesContent":["/**\n * @file LayoutScorer.ts\n * @description Core utility that calculates the nested footprint score of schemas \n * to determine if they should be rendered inline or overflowed into a dialog button.\n */\n\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { PluginRegistry } from \"./PluginRegistry\";\nimport { Logger } from \"../utils/Logger\";\nimport { RENDER_MODE, SCHEMA_TYPE, OPENAPI_PREFIX, WIDGET_TYPE } from \"../constants/MetaUIConstants\";\n\nexport class LayoutScorer {\n /**\n * Recursively computes scores and annotates the schema with `renderMode`.\n * \n * @param schema The normalized schema root.\n * @param budget The remaining layout budget (e.g., 50).\n */\n public static apply(schema: ISchema | null, budget: number, schemaDefinitions?: Record<string, ISchema>): void {\n if (!schema || budget <= 0) return; // 0 budget means default fallback (no inline budget logic).\n\n const visited = new WeakSet<object>();\n const activeRefs = new Set<string>();\n\n // We only score the root properties (not the root object itself).\n if (schema.properties) {\n for (const key in schema.properties) {\n const prop = schema.properties[key];\n if (prop.type === SCHEMA_TYPE.OBJECT || prop.type === SCHEMA_TYPE.ARRAY || prop.$ref) {\n this._scoreNode(prop, budget, visited, activeRefs, key, schemaDefinitions);\n }\n }\n }\n }\n\n /**\n * Traverses a node, computing its total footprint.\n * If the score > budget, forces `renderMode = \"dialog\"`.\n * If the score <= budget, forces `renderMode = \"inline\"`.\n */\n private static _scoreNode(node: IPropertyMetadata, budget: number, visited: WeakSet<object>, activeRefs: Set<string>, path: string, schemaDefinitions?: Record<string, ISchema>): number {\n if (!node || typeof node !== SCHEMA_TYPE.OBJECT) return 0;\n\n if (visited.has(node)) {\n Logger.warn(`[MetaUI LayoutScorer] Circular reference detected at '${path}'. Forcing dialog mode to prevent crash.`, \"\", \"LayoutScorer\");\n node.ui = node.ui || {};\n node.ui.renderMode = RENDER_MODE.DIALOG;\n node.ui.layoutBudget = budget;\n return 1; // A dialog button is just 1 unit\n }\n visited.add(node);\n\n if (node.$ref && schemaDefinitions) {\n let key = node.$ref;\n if (key.startsWith(OPENAPI_PREFIX.DEFINITIONS)) key = key.substring(OPENAPI_PREFIX.DEFINITIONS.length);\n else if (key.startsWith(OPENAPI_PREFIX.COMPONENTS_SCHEMAS)) key = key.substring(OPENAPI_PREFIX.COMPONENTS_SCHEMAS.length);\n\n if (activeRefs.has(key)) {\n Logger.warn(`[MetaUI LayoutScorer] Circular OpenAPI $ref detected at '${path}' for '${key}'. Forcing dialog mode to prevent crash.`, \"\", \"LayoutScorer\");\n node.ui = node.ui || {};\n node.ui.renderMode = RENDER_MODE.DIALOG;\n return 1;\n }\n\n const resolvedOriginal = schemaDefinitions[key];\n if (resolvedOriginal) {\n activeRefs.add(key);\n \n // Deep clone it BEFORE scoring so we don't mutate the global dictionary\n const resolved = JSON.parse(JSON.stringify(resolvedOriginal));\n \n const resolvedScore = this._scoreNode(resolved, budget, visited, activeRefs, path, schemaDefinitions);\n activeRefs.delete(key);\n \n node.ui = node.ui || {};\n node.ui.layoutBudget = budget;\n if (resolvedScore <= budget) {\n // Merge it permanently in the layout!\n Object.assign(node, resolved);\n delete node.$ref;\n if (node.ui?.widget === WIDGET_TYPE.REFERENCE) delete node.ui.widget;\n \n node.ui.renderMode = RENDER_MODE.INLINE;\n return resolvedScore;\n } else {\n node.ui.renderMode = RENDER_MODE.DIALOG;\n return 1;\n }\n }\n }\n\n if (node.type === SCHEMA_TYPE.ARRAY) {\n let arrayScore = PluginRegistry.getInstance().getPluginScore(SCHEMA_TYPE.ARRAY, node.ui?.widget);\n \n // Traverse array items!\n if (node.items) {\n const itemsSchema = node.items as ISchema;\n if (itemsSchema.type === SCHEMA_TYPE.OBJECT || itemsSchema.type === SCHEMA_TYPE.ARRAY || itemsSchema.$ref) {\n arrayScore += this._scoreNode(itemsSchema, budget, visited, activeRefs, `${path}/items`, schemaDefinitions);\n }\n }\n\n node.ui = node.ui || {};\n node.ui.layoutBudget = budget;\n if (arrayScore <= budget) {\n node.ui.renderMode = RENDER_MODE.INLINE;\n return arrayScore;\n } else {\n node.ui.renderMode = RENDER_MODE.DIALOG;\n return 1;\n }\n }\n\n let totalScore = 0;\n\n if (node.properties) {\n for (const key in node.properties) {\n const child = node.properties[key] as IPropertyMetadata;\n if (child.type === SCHEMA_TYPE.OBJECT || child.type === SCHEMA_TYPE.ARRAY || child.$ref) {\n totalScore += this._scoreNode(child, budget, visited, activeRefs, `${path}/${key}`, schemaDefinitions);\n } else {\n totalScore += PluginRegistry.getInstance().getPluginScore(child.type || SCHEMA_TYPE.STRING, child.ui?.widget);\n }\n }\n } else {\n // An open dictionary (additionalProperties) is scored as a single table\n totalScore += PluginRegistry.getInstance().getPluginScore(SCHEMA_TYPE.OBJECT, node.ui?.widget); // e.g. dictionaryMap\n }\n\n node.ui = node.ui || {};\n node.ui.layoutBudget = budget;\n \n if (totalScore <= budget) {\n node.ui.renderMode = RENDER_MODE.INLINE;\n return totalScore;\n } else {\n node.ui.renderMode = RENDER_MODE.DIALOG;\n return 1; // It collapsed into an \"Edit Details\" button\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;AACA;EAJA,MAOSA,cAAc,GAAAC,iBAAA;EAAA,MACdC,MAAM,GAAAC,eAAA;EAAA,MACNC,WAAW,GAAAC,4BAAA;EAAA,MAAEC,WAAW,GAAAD,4BAAA;EAAA,MAAEE,cAAc,GAAAF,4BAAA;EAAA,MAAEG,WAAW,GAAAH,4BAAA;EAEvD,MAAMI,YAAY,CAAC;IACtB;AACJ;AACA;AACA;AACA;AACA;IACI,OAAcC,KAAKA,CAACC,MAAsB,EAAEC,MAAc,EAAEC,iBAA2C,EAAQ;MAC3G,IAAI,CAACF,MAAM,IAAIC,MAAM,IAAI,CAAC,EAAE,OAAO,CAAC;;MAEpC,MAAME,OAAO,GAAG,IAAIC,OAAO,CAAS,CAAC;MACrC,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAS,CAAC;;MAEpC;MACA,IAAIN,MAAM,CAACO,UAAU,EAAE;QACnB,KAAK,MAAMC,GAAG,IAAIR,MAAM,CAACO,UAAU,EAAE;UACjC,MAAME,IAAI,GAAGT,MAAM,CAACO,UAAU,CAACC,GAAG,CAAC;UACnC,IAAIC,IAAI,CAACC,IAAI,KAAKf,WAAW,CAACgB,MAAM,IAAIF,IAAI,CAACC,IAAI,KAAKf,WAAW,CAACiB,KAAK,IAAIH,IAAI,CAACI,IAAI,EAAE;YAClF,IAAI,CAACC,UAAU,CAACL,IAAI,EAAER,MAAM,EAAEE,OAAO,EAAEE,UAAU,EAAEG,GAAG,EAAEN,iBAAiB,CAAC;UAC9E;QACJ;MACJ;IACJ;;IAEA;AACJ;AACA;AACA;AACA;IACI,OAAeY,UAAUA,CAACC,IAAuB,EAAEd,MAAc,EAAEE,OAAwB,EAAEE,UAAuB,EAAEW,IAAY,EA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IAAI,IAAIR,GAAG,EAAE,EAAEN,iBAAiB,CAAC;UAC1G,CAAC,MAAM;YACH4C,UAAU,IAAIzD,cAAc,CAACqD,WAAW,CAAC,CAAC,CAACC,cAAc,CAACI,KAAK,CAACrC,IAAI,IAAIf,WAAW,CAACqD,MAAM,EAAED,KAAK,CAAC5B,EAAE,EAAEmB,MAAM,CAAC;UACjH;QACJ;MACJ,CAAC,MAAM;QACH;QACAQ,UAAU,IAAIzD,cAAc,CAACqD,WAAW,CAAC,CAAC,CAACC,cAAc,CAAChD,WAAW,CAACgB,MAAM,EAAEI,IAAI,CAACI,EAAE,EAAEmB,MAAM,CAAC,CAAC,CAAC;MACpG;MAEAvB,IAAI,CAACI,EAAE,GAAGJ,IAAI,CAACI,EAAE,IAAI,CAAC,CAAC;MACvBJ,IAAI,CAACI,EAAE,CAACG,YAAY,GAAGrB,MAAM;MAE7B,IAAI6C,UAAU,IAAI7C,MAAM,EAAE;QACtBc,IAAI,CAACI,EAAE,CAACC,UAAU,GAAG3B,WAAW,CAAC+C,MAAM;QACvC,OAAOM,UAAU;MACrB,CAAC,MAAM;QACH/B,IAAI,CAACI,EAAE,CAACC,UAAU,GAAG3B,WAAW,CAAC4B,MAAM;QACvC,OAAO,CAAC,CAAC,CAAC;MACd;IACJ;EACJ;EAAC,IAAA4B,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAnD,YAAA,GAAAA,YAAA;EAAA,OAAAmD,SAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ declare module "nz/co/siliconst/ui5/metaui/core/LayoutScorer" {
2
+ /**
3
+ * @file LayoutScorer.ts
4
+ * @description Core utility that calculates the nested footprint score of schemas
5
+ * to determine if they should be rendered inline or overflowed into a dialog button.
6
+ */
7
+ import { ISchema } from "nz/co/siliconst/ui5/metaui/interfaces/ISchema";
8
+ export class LayoutScorer {
9
+ /**
10
+ * Recursively computes scores and annotates the schema with `renderMode`.
11
+ *
12
+ * @param schema The normalized schema root.
13
+ * @param budget The remaining layout budget (e.g., 50).
14
+ */
15
+ static apply(schema: ISchema | null, budget: number, schemaDefinitions?: Record<string, ISchema>): void;
16
+ /**
17
+ * Traverses a node, computing its total footprint.
18
+ * If the score > budget, forces `renderMode = "dialog"`.
19
+ * If the score <= budget, forces `renderMode = "inline"`.
20
+ */
21
+ private static _scoreNode;
22
+ }
23
+ }
24
+ //# sourceMappingURL=LayoutScorer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutScorer.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/LayoutScorer.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,8CAA8C,CAAC;IAC9D;;;;OAIG;IAEH,OAAO,EAAE,OAAO,EAAqB,MAAM,+CAA+C,CAAC;IAK3F,MAAa,YAAY;QACrB;;;;;WAKG;eACW,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;QAiB9G;;;;WAIG;QACH,OAAO,CAAC,MAAM,CAAC,UAAU;KAoG5B;CAEA"}
@@ -0,0 +1,2 @@
1
+ sap.ui.define(["./PluginRegistry","../utils/Logger","../constants/MetaUIConstants"],function(e,t,r){"use strict";const i=e["PluginRegistry"];const o=t["Logger"];const s=r["RENDER_MODE"];const n=r["SCHEMA_TYPE"];const u=r["OPENAPI_PREFIX"];const c=r["WIDGET_TYPE"];class d{static apply(e,t,r){if(!e||t<=0)return;const i=new WeakSet;const o=new Set;if(e.properties){for(const s in e.properties){const u=e.properties[s];if(u.type===n.OBJECT||u.type===n.ARRAY||u.$ref){this._scoreNode(u,t,i,o,s,r)}}}}static _scoreNode(e,t,r,d,a,g){if(!e||typeof e!==n.OBJECT)return 0;if(r.has(e)){o.warn(`[MetaUI LayoutScorer] Circular reference detected at '${a}'. Forcing dialog mode to prevent crash.`,"","LayoutScorer");e.ui=e.ui||{};e.ui.renderMode=s.DIALOG;e.ui.layoutBudget=t;return 1}r.add(e);if(e.$ref&&g){let i=e.$ref;if(i.startsWith(u.DEFINITIONS))i=i.substring(u.DEFINITIONS.length);else if(i.startsWith(u.COMPONENTS_SCHEMAS))i=i.substring(u.COMPONENTS_SCHEMAS.length);if(d.has(i)){o.warn(`[MetaUI LayoutScorer] Circular OpenAPI $ref detected at '${a}' for '${i}'. Forcing dialog mode to prevent crash.`,"","LayoutScorer");e.ui=e.ui||{};e.ui.renderMode=s.DIALOG;return 1}const n=g[i];if(n){d.add(i);const o=JSON.parse(JSON.stringify(n));const u=this._scoreNode(o,t,r,d,a,g);d.delete(i);e.ui=e.ui||{};e.ui.layoutBudget=t;if(u<=t){Object.assign(e,o);delete e.$ref;if(e.ui?.widget===c.REFERENCE)delete e.ui.widget;e.ui.renderMode=s.INLINE;return u}else{e.ui.renderMode=s.DIALOG;return 1}}}if(e.type===n.ARRAY){let o=i.getInstance().getPluginScore(n.ARRAY,e.ui?.widget);if(e.items){const i=e.items;if(i.type===n.OBJECT||i.type===n.ARRAY||i.$ref){o+=this._scoreNode(i,t,r,d,`${a}/items`,g)}}e.ui=e.ui||{};e.ui.layoutBudget=t;if(o<=t){e.ui.renderMode=s.INLINE;return o}else{e.ui.renderMode=s.DIALOG;return 1}}let f=0;if(e.properties){for(const o in e.properties){const s=e.properties[o];if(s.type===n.OBJECT||s.type===n.ARRAY||s.$ref){f+=this._scoreNode(s,t,r,d,`${a}/${o}`,g)}else{f+=i.getInstance().getPluginScore(s.type||n.STRING,s.ui?.widget)}}}else{f+=i.getInstance().getPluginScore(n.OBJECT,e.ui?.widget)}e.ui=e.ui||{};e.ui.layoutBudget=t;if(f<=t){e.ui.renderMode=s.INLINE;return f}else{e.ui.renderMode=s.DIALOG;return 1}}}var a={__esModule:true};a.LayoutScorer=d;return a});
2
+ //# sourceMappingURL=LayoutScorer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutScorer.js","names":["PluginRegistry","___PluginRegistry","Logger","___utils_Logger","RENDER_MODE","___constants_MetaUIConstants","SCHEMA_TYPE","OPENAPI_PREFIX","WIDGET_TYPE","LayoutScorer","apply","schema","budget","schemaDefinitions","visited","WeakSet","activeRefs","Set","properties","key","prop","type","OBJECT","ARRAY","$ref","this","_scoreNode","node","path","has","warn","ui","renderMode","DIALOG","layoutBudget","add","startsWith","DEFINITIONS","substring","length","COMPONENTS_SCHEMAS","resolvedOriginal","resolved","JSON","parse","stringify","resolvedScore","delete","Object","assign","widget","REFERENCE","INLINE","arrayScore","getInstance","getPluginScore","items","itemsSchema","totalScore","child","STRING","__exports","__esModule"],"sources":["LayoutScorer.ts"],"sourcesContent":["/**\n * @file LayoutScorer.ts\n * @description Core utility that calculates the nested footprint score of schemas \n * to determine if they should be rendered inline or overflowed into a dialog button.\n */\n\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { PluginRegistry } from \"./PluginRegistry\";\nimport { Logger } from \"../utils/Logger\";\nimport { RENDER_MODE, SCHEMA_TYPE, OPENAPI_PREFIX, WIDGET_TYPE } from \"../constants/MetaUIConstants\";\n\nexport class LayoutScorer {\n /**\n * Recursively computes scores and annotates the schema with `renderMode`.\n * \n * @param schema The normalized schema root.\n * @param budget The remaining layout budget (e.g., 50).\n */\n public static apply(schema: ISchema | null, budget: number, schemaDefinitions?: Record<string, ISchema>): void {\n if (!schema || budget <= 0) return; // 0 budget means default fallback (no inline budget logic).\n\n const visited = new WeakSet<object>();\n const activeRefs = new Set<string>();\n\n // We only score the root properties (not the root object itself).\n if (schema.properties) {\n for (const key in schema.properties) {\n const prop = schema.properties[key];\n if (prop.type === SCHEMA_TYPE.OBJECT || prop.type === SCHEMA_TYPE.ARRAY || prop.$ref) {\n this._scoreNode(prop, budget, visited, activeRefs, key, schemaDefinitions);\n }\n }\n }\n }\n\n /**\n * Traverses a node, computing its total footprint.\n * If the score > budget, forces `renderMode = \"dialog\"`.\n * If the score <= budget, forces `renderMode = \"inline\"`.\n */\n private static _scoreNode(node: IPropertyMetadata, budget: number, visited: WeakSet<object>, activeRefs: Set<string>, path: string, schemaDefinitions?: Record<string, ISchema>): number {\n if (!node || typeof node !== SCHEMA_TYPE.OBJECT) return 0;\n\n if (visited.has(node)) {\n Logger.warn(`[MetaUI LayoutScorer] Circular reference detected at '${path}'. Forcing dialog mode to prevent crash.`, \"\", \"LayoutScorer\");\n node.ui = node.ui || {};\n node.ui.renderMode = RENDER_MODE.DIALOG;\n node.ui.layoutBudget = budget;\n return 1; // A dialog button is just 1 unit\n }\n visited.add(node);\n\n if (node.$ref && schemaDefinitions) {\n let key = node.$ref;\n if (key.startsWith(OPENAPI_PREFIX.DEFINITIONS)) key = key.substring(OPENAPI_PREFIX.DEFINITIONS.length);\n else if (key.startsWith(OPENAPI_PREFIX.COMPONENTS_SCHEMAS)) key = key.substring(OPENAPI_PREFIX.COMPONENTS_SCHEMAS.length);\n\n if (activeRefs.has(key)) {\n Logger.warn(`[MetaUI LayoutScorer] Circular OpenAPI $ref detected at '${path}' for '${key}'. Forcing dialog mode to prevent crash.`, \"\", \"LayoutScorer\");\n node.ui = node.ui || {};\n node.ui.renderMode = RENDER_MODE.DIALOG;\n return 1;\n }\n\n const resolvedOriginal = schemaDefinitions[key];\n if (resolvedOriginal) {\n activeRefs.add(key);\n \n // Deep clone it BEFORE scoring so we don't mutate the global dictionary\n const resolved = JSON.parse(JSON.stringify(resolvedOriginal));\n \n const resolvedScore = this._scoreNode(resolved, budget, visited, activeRefs, path, schemaDefinitions);\n activeRefs.delete(key);\n \n node.ui = node.ui || {};\n node.ui.layoutBudget = budget;\n if (resolvedScore <= budget) {\n // Merge it permanently in the layout!\n Object.assign(node, resolved);\n delete node.$ref;\n if (node.ui?.widget === WIDGET_TYPE.REFERENCE) delete node.ui.widget;\n \n node.ui.renderMode = RENDER_MODE.INLINE;\n return resolvedScore;\n } else {\n node.ui.renderMode = RENDER_MODE.DIALOG;\n return 1;\n }\n }\n }\n\n if (node.type === SCHEMA_TYPE.ARRAY) {\n let arrayScore = PluginRegistry.getInstance().getPluginScore(SCHEMA_TYPE.ARRAY, node.ui?.widget);\n \n // Traverse array items!\n if (node.items) {\n const itemsSchema = node.items as ISchema;\n if (itemsSchema.type === SCHEMA_TYPE.OBJECT || itemsSchema.type === SCHEMA_TYPE.ARRAY || itemsSchema.$ref) {\n arrayScore += this._scoreNode(itemsSchema, budget, visited, activeRefs, `${path}/items`, schemaDefinitions);\n }\n }\n\n node.ui = node.ui || {};\n node.ui.layoutBudget = budget;\n if (arrayScore <= budget) {\n node.ui.renderMode = RENDER_MODE.INLINE;\n return arrayScore;\n } else {\n node.ui.renderMode = RENDER_MODE.DIALOG;\n return 1;\n }\n }\n\n let totalScore = 0;\n\n if (node.properties) {\n for (const key in node.properties) {\n const child = node.properties[key] as IPropertyMetadata;\n if (child.type === SCHEMA_TYPE.OBJECT || child.type === SCHEMA_TYPE.ARRAY || child.$ref) {\n totalScore += this._scoreNode(child, budget, visited, activeRefs, `${path}/${key}`, schemaDefinitions);\n } else {\n totalScore += PluginRegistry.getInstance().getPluginScore(child.type || SCHEMA_TYPE.STRING, child.ui?.widget);\n }\n }\n } else {\n // An open dictionary (additionalProperties) is scored as a single table\n totalScore += PluginRegistry.getInstance().getPluginScore(SCHEMA_TYPE.OBJECT, node.ui?.widget); // e.g. dictionaryMap\n }\n\n node.ui = node.ui || {};\n node.ui.layoutBudget = budget;\n \n if (totalScore <= budget) {\n node.ui.renderMode = RENDER_MODE.INLINE;\n return totalScore;\n } else {\n node.ui.renderMode = RENDER_MODE.DIALOG;\n return 1; // It collapsed into an \"Edit Details\" button\n }\n }\n}\n"],"mappings":"iHAAA,MAOSA,EAAcC,EAAA,wBACdC,EAAMC,EAAA,gBACNC,EAAWC,EAAA,qBAAEC,EAAWD,EAAA,qBAAEE,EAAcF,EAAA,wBAAEG,EAAWH,EAAA,eAEvD,MAAMI,EAOT,YAAcC,CAAMC,EAAwBC,EA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