@siliconst/metaui 1.4.6 → 1.4.7

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 (276) hide show
  1. package/package.json +1 -1
  2. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl-dbg.js +13 -0
  3. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl-dbg.js.map +1 -1
  4. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.d.ts +10 -0
  5. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.d.ts.map +1 -1
  6. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.js.map +1 -1
  7. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.ts +10 -0
  8. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +47 -4
  9. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js.map +1 -1
  10. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts +47 -4
  11. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +1 -1
  12. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js.map +1 -1
  13. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts +48 -4
  14. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl-dbg.js +32 -1
  15. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl-dbg.js.map +1 -1
  16. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.d.ts +7 -0
  17. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.d.ts.map +1 -1
  18. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.js +1 -1
  19. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.js.map +1 -1
  20. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.ts +11 -1
  21. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl-dbg.js +20 -0
  22. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl-dbg.js.map +1 -1
  23. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.d.ts +12 -0
  24. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.d.ts.map +1 -1
  25. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.js +1 -1
  26. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.js.map +1 -1
  27. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.ts +21 -0
  28. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl-dbg.js +9 -0
  29. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl-dbg.js.map +1 -1
  30. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.d.ts +7 -0
  31. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.d.ts.map +1 -1
  32. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.js.map +1 -1
  33. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.ts +7 -0
  34. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl-dbg.js +13 -0
  35. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl-dbg.js.map +1 -1
  36. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.d.ts +10 -0
  37. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.d.ts.map +1 -1
  38. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.js.map +1 -1
  39. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.ts +10 -0
  40. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +41 -5
  41. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js.map +1 -1
  42. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts +16 -4
  43. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts.map +1 -1
  44. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js +1 -1
  45. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js.map +1 -1
  46. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.ts +44 -4
  47. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js +5 -0
  48. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js.map +1 -1
  49. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts +4 -0
  50. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts.map +1 -1
  51. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js.map +1 -1
  52. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.ts +4 -0
  53. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js +4 -0
  54. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js.map +1 -1
  55. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts +4 -0
  56. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts.map +1 -1
  57. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js.map +1 -1
  58. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts +4 -0
  59. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js +4 -0
  60. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js.map +1 -1
  61. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts +4 -0
  62. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts.map +1 -1
  63. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js.map +1 -1
  64. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts +4 -0
  65. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js +45 -12
  66. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js.map +1 -1
  67. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.d.ts +6 -0
  68. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.d.ts.map +1 -1
  69. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js +1 -1
  70. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js.map +1 -1
  71. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts +25 -12
  72. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +25 -12
  73. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js.map +1 -1
  74. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts +5 -5
  75. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts.map +1 -1
  76. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js +1 -1
  77. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js.map +1 -1
  78. package/src/nz/co/siliconst/ui5/metaui/core/Engine.ts +34 -27
  79. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager-dbg.js +17 -3
  80. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager-dbg.js.map +1 -1
  81. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.d.ts +4 -0
  82. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.d.ts.map +1 -1
  83. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.js +1 -1
  84. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.js.map +1 -1
  85. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.ts +13 -3
  86. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +158 -106
  87. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js.map +1 -1
  88. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts +25 -26
  89. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts.map +1 -1
  90. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js +1 -1
  91. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js.map +1 -1
  92. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts +176 -113
  93. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +26 -0
  94. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -1
  95. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +22 -0
  96. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
  97. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
  98. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +22 -0
  99. package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js +6 -0
  100. package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js.map +1 -1
  101. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts +5 -0
  102. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts.map +1 -1
  103. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js.map +1 -1
  104. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.ts +5 -0
  105. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout-dbg.js +10 -0
  106. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout-dbg.js.map +1 -1
  107. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.d.ts +9 -0
  108. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.d.ts.map +1 -1
  109. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.js.map +1 -1
  110. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.ts +9 -0
  111. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js +10 -0
  112. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js.map +1 -1
  113. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts +9 -0
  114. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts.map +1 -1
  115. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js.map +1 -1
  116. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.ts +9 -0
  117. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout-dbg.js +9 -0
  118. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout-dbg.js.map +1 -1
  119. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.d.ts +8 -0
  120. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.d.ts.map +1 -1
  121. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.js.map +1 -1
  122. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.ts +8 -0
  123. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js +2 -32
  124. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -1
  125. package/src/nz/co/siliconst/ui5/metaui/library-preload.js +9 -10
  126. package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
  127. package/src/nz/co/siliconst/ui5/metaui/library.d.ts +0 -6
  128. package/src/nz/co/siliconst/ui5/metaui/library.d.ts.map +1 -1
  129. package/src/nz/co/siliconst/ui5/metaui/library.js +1 -1
  130. package/src/nz/co/siliconst/ui5/metaui/library.js.map +1 -1
  131. package/src/nz/co/siliconst/ui5/metaui/library.ts +0 -33
  132. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js +18 -0
  133. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js.map +1 -1
  134. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.d.ts +16 -0
  135. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.d.ts.map +1 -1
  136. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js.map +1 -1
  137. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts +16 -0
  138. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +19 -0
  139. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js.map +1 -1
  140. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.d.ts +17 -0
  141. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.d.ts.map +1 -1
  142. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js.map +1 -1
  143. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +17 -0
  144. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +1 -0
  145. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
  146. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.d.ts.map +1 -1
  147. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js +1 -1
  148. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
  149. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +2 -0
  150. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +19 -0
  151. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
  152. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.d.ts +17 -0
  153. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.d.ts.map +1 -1
  154. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
  155. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +17 -0
  156. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +29 -0
  157. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js.map +1 -1
  158. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.d.ts +25 -0
  159. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.d.ts.map +1 -1
  160. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
  161. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +25 -0
  162. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +19 -0
  163. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
  164. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.d.ts +17 -0
  165. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.d.ts.map +1 -1
  166. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
  167. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +17 -0
  168. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +19 -0
  169. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
  170. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.d.ts +17 -0
  171. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.d.ts.map +1 -1
  172. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
  173. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +17 -0
  174. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +2 -0
  175. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
  176. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.d.ts +2 -0
  177. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.d.ts.map +1 -1
  178. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
  179. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +2 -0
  180. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +19 -0
  181. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
  182. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.d.ts +17 -0
  183. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.d.ts.map +1 -1
  184. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
  185. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +17 -0
  186. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +19 -0
  187. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
  188. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.d.ts +17 -0
  189. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.d.ts.map +1 -1
  190. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
  191. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +17 -0
  192. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js +18 -0
  193. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js.map +1 -1
  194. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.d.ts +16 -0
  195. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.d.ts.map +1 -1
  196. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.js.map +1 -1
  197. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.ts +16 -0
  198. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +19 -0
  199. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js.map +1 -1
  200. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.d.ts +17 -0
  201. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.d.ts.map +1 -1
  202. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js.map +1 -1
  203. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +17 -0
  204. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +19 -0
  205. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
  206. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.d.ts +17 -0
  207. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.d.ts.map +1 -1
  208. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
  209. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +17 -0
  210. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js +23 -0
  211. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js.map +1 -1
  212. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.d.ts +20 -0
  213. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.d.ts.map +1 -1
  214. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js.map +1 -1
  215. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.ts +20 -0
  216. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +19 -0
  217. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
  218. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.d.ts +17 -0
  219. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.d.ts.map +1 -1
  220. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
  221. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +17 -0
  222. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +19 -0
  223. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
  224. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.d.ts +17 -0
  225. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.d.ts.map +1 -1
  226. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
  227. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +17 -0
  228. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +19 -0
  229. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
  230. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.d.ts +17 -0
  231. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.d.ts.map +1 -1
  232. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
  233. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +17 -0
  234. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +19 -0
  235. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
  236. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.d.ts +17 -0
  237. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.d.ts.map +1 -1
  238. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
  239. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +17 -0
  240. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +2 -0
  241. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
  242. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.d.ts +2 -0
  243. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.d.ts.map +1 -1
  244. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
  245. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +2 -0
  246. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +19 -0
  247. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js.map +1 -1
  248. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.d.ts +17 -0
  249. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.d.ts.map +1 -1
  250. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js.map +1 -1
  251. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +17 -0
  252. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +19 -0
  253. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
  254. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.d.ts +17 -0
  255. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.d.ts.map +1 -1
  256. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
  257. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +17 -0
  258. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +19 -0
  259. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
  260. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.d.ts +17 -0
  261. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.d.ts.map +1 -1
  262. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
  263. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +17 -0
  264. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +19 -0
  265. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
  266. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.d.ts +17 -0
  267. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.d.ts.map +1 -1
  268. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
  269. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +17 -0
  270. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry-dbg.js +0 -32
  271. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry-dbg.js.map +0 -1
  272. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.d.ts +0 -16
  273. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.d.ts.map +0 -1
  274. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.js +0 -2
  275. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.js.map +0 -1
  276. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.ts +0 -26
@@ -1 +1 @@
1
- {"version":3,"file":"DataSyncDelegate.js","names":["Logger","_____utils_Logger","SchemaNormalizer","_____core_SchemaNormalizer","DataSyncDelegate","_lastPushedPayloadJson","_lastPushedPayloadObj","_lastReceivedInputObj","constructor","host","this","pushToBindings","payload","payloadStr","JSON","stringify","deepEqual","parse","setProperty","handleInputDataHotSwap","propertyName","value","suppressInvalidate","incomingObj","e","setBaseProperty","getProperty","debug","extend","stateManager","getStateManager","invalidate","getModel","setData","getParsedSchema","newInferredSchema","inferSchemaFromData","parsedSchema","tearDownGeneratedLayout","msg","message","error","sap","ui","require","MessageBox","__exports","__esModule"],"sources":["DataSyncDelegate.ts"],"sourcesContent":["import deepEqual from \"sap/base/util/deepEqual\";\nimport extend from \"sap/base/util/extend\";\nimport { Logger } from \"../../../utils/Logger\";\nimport { SchemaNormalizer } from \"../../../core/SchemaNormalizer\";\nimport PropertyBinding from \"sap/ui/model/PropertyBinding\";\nimport { StateManager } from \"../../../core/StateManager\";\n\nexport interface IHostDataSync {\n getProperty(name: string): unknown;\n setProperty(name: string, value: unknown, suppressInvalidate?: boolean): any;\n setBaseProperty(name: string, value: unknown, suppressInvalidate?: boolean): any;\n getBinding(name: string): any;\n invalidate(): void;\n getStateManager(): StateManager | null;\n getParsedSchema?(): Record<string, unknown> | null;\n tearDownGeneratedLayout(): void;\n}\n\n/**\n * Handles two-way data sync, JSON parsing, loop-breaking, and inference structural diffs.\n */\nexport class DataSyncDelegate {\n private host: IHostDataSync;\n private _lastPushedPayloadJson: string | null = null;\n private _lastPushedPayloadObj: Record<string, unknown> | null = null;\n private _lastReceivedInputObj: Record<string, unknown> | null = null;\n\n constructor(host: IHostDataSync) {\n this.host = host;\n }\n\n /**\n * Natively forces the UI5 framework to push updated properties back up to any bound ViewModels.\n */\n public pushToBindings(payload: Record<string, unknown>): void {\n const payloadStr = JSON.stringify(payload, null, 2);\n\n // Cache exact payload output to catch echoes on the inbound side\n this._lastPushedPayloadJson = payloadStr;\n this._lastPushedPayloadObj = deepEqual({}, payload) ? null : JSON.parse(JSON.stringify(payload)); // Safe clone\n\n this.host.setProperty(\"data\", payload, true);\n this.host.setProperty(\"dataJson\", payloadStr, true);\n }\n\n /**\n * Intercepts and parses live updates to the data payload from two-way Fiori bindings.\n */\n public handleInputDataHotSwap(propertyName: string, value: unknown, suppressInvalidate?: boolean): void {\n let incomingObj: Record<string, unknown> | null = null;\n\n if (typeof value === \"string\") {\n try {\n incomingObj = JSON.parse(value) as Record<string, unknown>;\n } catch (e) {\n this.host.setBaseProperty(propertyName, value, true);\n return;\n }\n } else {\n incomingObj = value as Record<string, unknown>;\n }\n\n if (incomingObj === null) {\n this.host.setBaseProperty(propertyName, value, true);\n return;\n }\n\n // Loop Breaker 1: Stale Data Injection\n if (this._lastReceivedInputObj && deepEqual(incomingObj, this._lastReceivedInputObj)) {\n if (this.host.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI]\", `Dropped stale data injection for ${propertyName}`, \"DataSyncDelegate\");\n }\n this.host.setBaseProperty(propertyName, value, suppressInvalidate);\n return;\n }\n\n // Loop Breaker 2: Two-Way Data Echoes\n if (this._lastPushedPayloadObj && deepEqual(incomingObj, this._lastPushedPayloadObj)) {\n if (this.host.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI]\", `Dropped echo for ${propertyName}`, \"DataSyncDelegate\");\n }\n this.host.setBaseProperty(propertyName, value, suppressInvalidate);\n return;\n }\n\n this._lastReceivedInputObj = extend(true, {}, incomingObj) as Record<string, unknown>;\n\n if (this.host.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI]\", `Accepted external injection for ${propertyName}`, \"DataSyncDelegate\");\n }\n\n this.host.setBaseProperty(propertyName, value, true);\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n this.host.invalidate();\n return;\n }\n\n try {\n stateManager.getModel().setData(incomingObj, false);\n\n if (!this.host.getProperty(\"schemaDefinition\") && typeof this.host.getParsedSchema === \"function\") {\n const newInferredSchema = SchemaNormalizer.inferSchemaFromData(incomingObj);\n const parsedSchema = this.host.getParsedSchema();\n if (!deepEqual(newInferredSchema, parsedSchema)) {\n this.host.tearDownGeneratedLayout();\n this.host.invalidate();\n }\n }\n } catch (e) {\n const msg = `Failed to hot-swap ${propertyName}: ` + (e as Error).message;\n Logger.error(\"[MetaUI]\", msg, \"DataSyncDelegate\");\n if (this.host.getProperty(\"debugMode\")) {\n sap.ui.require([\"sap/m/MessageBox\"], (MessageBox: unknown) => (MessageBox as Record<string, Function>).error(msg));\n }\n }\n }\n}\n"],"mappings":"+JAESA,EAAMC,EAAA,gBACNC,EAAgBC,EAAA,oBAkBlB,MAAMC,EAEDC,uBAAwC,KACxCC,sBAAwD,KACxDC,sBAAwD,KAEhEC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAKOE,eAAeC,GAClB,MAAMC,EAAaC,KAAKC,UAAUH,EAAS,KAAM,GAGjDF,KAAKL,uBAAyBQ,EAC9BH,KAAKJ,sBAAwBU,EAAU,CAAC,EAAGJ,GAAW,KAAOE,KAAKG,MAAMH,KAAKC,UAAUH,IAEvFF,KAAKD,KAAKS,YAAY,OAAQN,EAAS,MACvCF,KAAKD,KAAKS,YAAY,WAAYL,EAAY,KAClD,CAKOM,uBAAuBC,EAAsBC,EAAgBC,GAChE,IAAIC,EAA8C,KAElD,UAAWF,IAAU,SAAU,CAC3B,IACIE,EAAcT,KAAKG,MAAMI,EAC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,EAAM,sBAAsBnB,MAAoBI,EAAYgB,QAClExC,EAAOyC,MAAM,WAAYF,EAAK,oBAC9B,GAAI7B,KAAKD,KAAKiB,YAAY,aAAc,CACpCgB,IAAIC,GAAGC,QAAQ,CAAC,oBAAsBC,GAAyBA,EAAwCJ,MAAMF,GACjH,CACJ,CACJ,EACH,IAAAO,EAAA,CAAAC,WAAA,MAAAD,EAAA1C,mBAAA,OAAA0C,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"DataSyncDelegate.js","names":["Logger","_____utils_Logger","SchemaNormalizer","_____core_SchemaNormalizer","DataSyncDelegate","_lastPushedPayloadJson","_lastPushedPayloadObj","_lastReceivedInputObj","constructor","host","this","pushToBindings","payload","payloadStr","JSON","stringify","deepEqual","parse","setProperty","handleInputDataHotSwap","propertyName","value","suppressInvalidate","incomingObj","e","setBaseProperty","getProperty","debug","extend","stateManager","getStateManager","invalidate","getModel","setData","getParsedSchema","newInferredSchema","inferSchemaFromData","parsedSchema","tearDownGeneratedLayout","msg","message","error","sap","ui","require","MessageBox","__exports","__esModule"],"sources":["DataSyncDelegate.ts"],"sourcesContent":["import deepEqual from \"sap/base/util/deepEqual\";\nimport extend from \"sap/base/util/extend\";\nimport { Logger } from \"../../../utils/Logger\";\nimport { SchemaNormalizer } from \"../../../core/SchemaNormalizer\";\nimport PropertyBinding from \"sap/ui/model/PropertyBinding\";\nimport { StateManager } from \"../../../core/StateManager\";\n\nexport interface IHostDataSync {\n getProperty(name: string): unknown;\n setProperty(name: string, value: unknown, suppressInvalidate?: boolean): any;\n setBaseProperty(name: string, value: unknown, suppressInvalidate?: boolean): any;\n getBinding(name: string): any;\n invalidate(): void;\n getStateManager(): StateManager | null;\n getParsedSchema?(): Record<string, unknown> | null;\n tearDownGeneratedLayout(): void;\n}\n\n/**\n * Handles two-way data sync, JSON parsing, loop-breaking, and inference structural diffs.\n */\nexport class DataSyncDelegate {\n private host: IHostDataSync;\n private _lastPushedPayloadJson: string | null = null;\n private _lastPushedPayloadObj: Record<string, unknown> | null = null;\n private _lastReceivedInputObj: Record<string, unknown> | null = null;\n\n /**\n * Initializes a new DataSyncDelegate to handle data payload binding extraction.\n * @param host The parent host interface containing properties.\n */\n constructor(host: IHostDataSync) {\n this.host = host;\n }\n\n /**\n * Natively forces the UI5 framework to push updated properties back up to any bound ViewModels.\n */\n public pushToBindings(payload: Record<string, unknown>): void {\n const payloadStr = JSON.stringify(payload, null, 2);\n\n // Cache exact payload output to catch echoes on the inbound side\n this._lastPushedPayloadJson = payloadStr;\n this._lastPushedPayloadObj = deepEqual({}, payload) ? null : JSON.parse(JSON.stringify(payload)); // Safe clone\n\n this.host.setProperty(\"data\", payload, true);\n this.host.setProperty(\"dataJson\", payloadStr, true);\n }\n\n /**\n * Intercepts and parses live updates to the data payload from two-way Fiori bindings.\n */\n public handleInputDataHotSwap(propertyName: string, value: unknown, suppressInvalidate?: boolean): void {\n let incomingObj: Record<string, unknown> | null = null;\n\n if (typeof value === \"string\") {\n try {\n incomingObj = JSON.parse(value) as Record<string, unknown>;\n } catch (e) {\n this.host.setBaseProperty(propertyName, value, true);\n return;\n }\n } else {\n incomingObj = value as Record<string, unknown>;\n }\n\n if (incomingObj === null) {\n this.host.setBaseProperty(propertyName, value, true);\n return;\n }\n\n // Loop Breaker 1: Stale Data Injection\n if (this._lastReceivedInputObj && deepEqual(incomingObj, this._lastReceivedInputObj)) {\n if (this.host.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI]\", `Dropped stale data injection for ${propertyName}`, \"DataSyncDelegate\");\n }\n this.host.setBaseProperty(propertyName, value, suppressInvalidate);\n return;\n }\n\n // Loop Breaker 2: Two-Way Data Echoes\n if (this._lastPushedPayloadObj && deepEqual(incomingObj, this._lastPushedPayloadObj)) {\n if (this.host.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI]\", `Dropped echo for ${propertyName}`, \"DataSyncDelegate\");\n }\n this.host.setBaseProperty(propertyName, value, suppressInvalidate);\n return;\n }\n\n this._lastReceivedInputObj = extend(true, {}, incomingObj) as Record<string, unknown>;\n\n if (this.host.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI]\", `Accepted external injection for ${propertyName}`, \"DataSyncDelegate\");\n }\n\n this.host.setBaseProperty(propertyName, value, true);\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n this.host.invalidate();\n return;\n }\n\n try {\n stateManager.getModel().setData(incomingObj, false);\n\n if (!this.host.getProperty(\"schemaDefinition\") && typeof this.host.getParsedSchema === \"function\") {\n const newInferredSchema = SchemaNormalizer.inferSchemaFromData(incomingObj);\n const parsedSchema = this.host.getParsedSchema();\n if (!deepEqual(newInferredSchema, parsedSchema)) {\n this.host.tearDownGeneratedLayout();\n this.host.invalidate();\n }\n }\n } catch (e) {\n const msg = `Failed to hot-swap ${propertyName}: ` + (e as Error).message;\n Logger.error(\"[MetaUI]\", msg, \"DataSyncDelegate\");\n if (this.host.getProperty(\"debugMode\")) {\n sap.ui.require([\"sap/m/MessageBox\"], (MessageBox: unknown) => (MessageBox as Record<string, Function>).error(msg));\n }\n }\n }\n}\n"],"mappings":"+JAESA,EAAMC,EAAA,gBACNC,EAAgBC,EAAA,oBAkBlB,MAAMC,EAEDC,uBAAwC,KACxCC,sBAAwD,KACxDC,sBAAwD,KAMhEC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAKOE,eAAeC,GAClB,MAAMC,EAAaC,KAAKC,UAAUH,EAAS,KAAM,GAGjDF,KAAKL,uBAAyBQ,EAC9BH,KAAKJ,sBAAwBU,EAAU,CAAC,EAAGJ,GAAW,KAAOE,KAAKG,MAAMH,KAAKC,UAAUH,IAEvFF,KAAKD,KAAKS,YAAY,OAAQN,EAAS,MACvCF,KAAKD,KAAKS,YAAY,WAAYL,EAAY,KAClD,CAKOM,uBAAuBC,EAAsBC,EAAgBC,GAChE,IAAIC,EAA8C,KAElD,UAAWF,IAAU,SAAU,CAC3B,IACIE,EAAcT,KAAKG,MAAMI,EAC7B,CAAE,MAAOG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B,MAAoBI,EAAYgB,QAClExC,EAAOyC,MAAM,WAAYF,EAAK,oBAC9B,GAAI7B,KAAKD,KAAKiB,YAAY,aAAc,CACpCgB,IAAIC,GAAGC,QAAQ,CAAC,oBAAsBC,GAAyBA,EAAwCJ,MAAMF,GACjH,CACJ,CACJ,EACH,IAAAO,EAAA,CAAAC,WAAA,MAAAD,EAAA1C,mBAAA,OAAA0C,CAAA","ignoreList":[]}
@@ -25,6 +25,10 @@ export class DataSyncDelegate {
25
25
  private _lastPushedPayloadObj: Record<string, unknown> | null = null;
26
26
  private _lastReceivedInputObj: Record<string, unknown> | null = null;
27
27
 
28
+ /**
29
+ * Initializes a new DataSyncDelegate to handle data payload binding extraction.
30
+ * @param host The parent host interface containing properties.
31
+ */
28
32
  constructor(host: IHostDataSync) {
29
33
  this.host = host;
30
34
  }
@@ -6,6 +6,10 @@ sap.ui.define(["sap/m/Dialog", "sap/m/Button", "../../../utils/Logger"], functio
6
6
  * Extracts all popup and dialog generation logic from the Host control.
7
7
  */
8
8
  class DialogDelegate {
9
+ /**
10
+ * Initializes a new DialogDelegate to handle dialog-based rendering.
11
+ * @param host The parent DynamicHost or GeneratorHost control.
12
+ */
9
13
  constructor(host) {
10
14
  this.host = host;
11
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DialogDelegate-dbg.js","names":["Logger","_____utils_Logger","DialogDelegate","constructor","host","openInDialog","title","submitButtonText","isGenerated","generate","dialog","Dialog","contentWidth","content","beginButton","Button","text","type","press","success","triggerSubmit","close","err","error","message","fireEvent","fieldPath","endButton","afterClose","destroy","open","__exports","__esModule"],"sources":["DialogDelegate.ts"],"sourcesContent":["import Dialog from \"sap/m/Dialog\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../../utils/Logger\";\n\nexport interface IHostDialog {\n generate(): void;\n triggerSubmit(): boolean;\n fireEvent(eventName: string, parameters?: any): void;\n}\n\n/**\n * Extracts all popup and dialog generation logic from the Host control.\n */\nexport class DialogDelegate {\n private host: IHostDialog & Control;\n\n constructor(host: IHostDialog & Control) {\n this.host = host;\n }\n\n /**\n * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.\n * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.\n */\n public openInDialog(title: string = \"Form\", submitButtonText: string = \"OK\", isGenerated: boolean): void {\n if (!isGenerated) {\n this.host.generate();\n }\n\n const dialog = new Dialog({\n title: title,\n contentWidth: \"800px\",\n content: [this.host], // Mount host inside the dialog\n beginButton: new Button({\n text: submitButtonText,\n type: \"Emphasized\",\n press: () => {\n try {\n const success = this.host.triggerSubmit();\n if (success) {\n dialog.close();\n }\n } catch (err) {\n Logger.error(\"[MetaUI] Catastrophic error during validation/submit pipeline\", (err as Error).message, \"DialogDelegate\");\n this.host.fireEvent(\"validationError\", { fieldPath: \"root\", message: (err as Error).message });\n }\n }\n }),\n endButton: new Button({\n text: \"Cancel\",\n press: () => {\n this.host.fireEvent(\"cancel\");\n dialog.close();\n }\n }),\n afterClose: () => {\n dialog.destroy();\n }\n });\n\n dialog.open();\n }\n}\n"],"mappings":";;;QAGSA,MAAM,GAAAC,iBAAA;EAQf;AACA;AACA;EACO,MAAMC,cAAc,CAAC;IAGxBC,WAAWA,CAACC,IAA2B,EAAE;MACrC,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;AACA;IACWC,YAAYA,CAACC,KAAa,GAAG,MAAM,EAAEC,gBAAwB,GAAG,IAAI,EAAEC,WAAoB,EAAQ;MACrG,IAAI,CAACA,WAAW,EAAE;QACd,IAAI,CAACJ,IAAI,CAACK,QAAQ,CAAC,CAAC;MACxB;MAEA,MAAMC,MAAM,GAAG,IAAIC,MAAM,CAAC;QACtBL,KAAK,EAAEA,KAAK;QACZM,YAAY,EAAE,OAAO;QACrBC,OAAO,EAAE,CAAC,IAAI,CAACT,IAAI,CAAC;QAAE;QACtBU,WAAW,EAAE,IAAIC,MAAM,CAAC;UACpBC,IAAI,EAAET,gBAAgB;UACtBU,IAAI,EAAE,YAAY;UAClBC,KAAK,EAAEA,CAAA,KAAM;YACT,IAAI;cACA,MAAMC,OAAO,GAAG,IAAI,CAACf,IAAI,CAACgB,aAAa,CAAC,CAAC;cACzC,IAAID,OAAO,EAAE;gBACTT,MAAM,CAACW,KAAK,CAAC,CAAC;cAClB;YACJ,CAAC,CAAC,OAAOC,GAAG,EAAE;cACVtB,MAAM,CAACuB,KAAK,CAAC,+DAA+D,EAAGD,GAAG,CAAWE,OAAO,EAAE,gBAAgB,CAAC;cACvH,IAAI,CAACpB,IAAI,CAACqB,SAAS,CAAC,iBAAiB,EAAE;gBAAEC,SAAS,EAAE,MAAM;gBAAEF,OAAO,EAAGF,GAAG,CAAWE;cAAQ,CAAC,CAAC;YAClG;UACJ;QACJ,CAAC,CAAC;QACFG,SAAS,EAAE,IAAIZ,MAAM,CAAC;UAClBC,IAAI,EAAE,QAAQ;UACdE,KAAK,EAAEA,CAAA,KAAM;YACT,IAAI,CAACd,IAAI,CAACqB,SAAS,CAAC,QAAQ,CAAC;YAC7Bf,MAAM,CAACW,KAAK,CAAC,CAAC;UAClB;QACJ,CAAC,CAAC;QACFO,UAAU,EAAEA,CAAA,KAAM;UACdlB,MAAM,CAACmB,OAAO,CAAC,CAAC;QACpB;MACJ,CAAC,CAAC;MAEFnB,MAAM,CAACoB,IAAI,CAAC,CAAC;IACjB;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA7B,cAAA,GAAAA,cAAA;EAAA,OAAA6B,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"DialogDelegate-dbg.js","names":["Logger","_____utils_Logger","DialogDelegate","constructor","host","openInDialog","title","submitButtonText","isGenerated","generate","dialog","Dialog","contentWidth","content","beginButton","Button","text","type","press","success","triggerSubmit","close","err","error","message","fireEvent","fieldPath","endButton","afterClose","destroy","open","__exports","__esModule"],"sources":["DialogDelegate.ts"],"sourcesContent":["import Dialog from \"sap/m/Dialog\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../../utils/Logger\";\n\nexport interface IHostDialog {\n generate(): void;\n triggerSubmit(): boolean;\n fireEvent(eventName: string, parameters?: any): void;\n}\n\n/**\n * Extracts all popup and dialog generation logic from the Host control.\n */\nexport class DialogDelegate {\n private host: IHostDialog & Control;\n\n /**\n * Initializes a new DialogDelegate to handle dialog-based rendering.\n * @param host The parent DynamicHost or GeneratorHost control.\n */\n constructor(host: IHostDialog & Control) {\n this.host = host;\n }\n\n /**\n * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.\n * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.\n */\n public openInDialog(title: string = \"Form\", submitButtonText: string = \"OK\", isGenerated: boolean): void {\n if (!isGenerated) {\n this.host.generate();\n }\n\n const dialog = new Dialog({\n title: title,\n contentWidth: \"800px\",\n content: [this.host], // Mount host inside the dialog\n beginButton: new Button({\n text: submitButtonText,\n type: \"Emphasized\",\n press: () => {\n try {\n const success = this.host.triggerSubmit();\n if (success) {\n dialog.close();\n }\n } catch (err) {\n Logger.error(\"[MetaUI] Catastrophic error during validation/submit pipeline\", (err as Error).message, \"DialogDelegate\");\n this.host.fireEvent(\"validationError\", { fieldPath: \"root\", message: (err as Error).message });\n }\n }\n }),\n endButton: new Button({\n text: \"Cancel\",\n press: () => {\n this.host.fireEvent(\"cancel\");\n dialog.close();\n }\n }),\n afterClose: () => {\n dialog.destroy();\n }\n });\n\n dialog.open();\n }\n}\n"],"mappings":";;;QAGSA,MAAM,GAAAC,iBAAA;EAQf;AACA;AACA;EACO,MAAMC,cAAc,CAAC;IAGxB;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,IAA2B,EAAE;MACrC,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;AACA;IACWC,YAAYA,CAACC,KAAa,GAAG,MAAM,EAAEC,gBAAwB,GAAG,IAAI,EAA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AAA7B,cAAA,GAAAA,cAAA;EAAA,OAAA6B,SAAA;AAAA","ignoreList":[]}
@@ -10,6 +10,10 @@ declare module "nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegat
10
10
  */
11
11
  export class DialogDelegate {
12
12
  private host;
13
+ /**
14
+ * Initializes a new DialogDelegate to handle dialog-based rendering.
15
+ * @param host The parent DynamicHost or GeneratorHost control.
16
+ */
13
17
  constructor(host: IHostDialog & Control);
14
18
  /**
15
19
  * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.
@@ -1 +1 @@
1
- {"version":3,"file":"DialogDelegate.d.ts","sourceRoot":"../../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,mEAAmE,CAAC;IAGnF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAG1C,UAAiB,WAAW;QACxB,QAAQ,IAAI,IAAI,CAAC;QACjB,aAAa,IAAI,OAAO,CAAC;QACzB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;KACxD;IAED;;OAEG;IACH,MAAa,cAAc;QACvB,OAAO,CAAC,IAAI,CAAwB;oBAExB,IAAI,EAAE,WAAW,GAAG,OAAO;QAIvC;;;WAGG;QACI,YAAY,CAAC,KAAK,EAAE,MAAe,EAAE,gBAAgB,EAAE,MAAa,EAAE,WAAW,EAAE,OAAO,GAAG,IAAI;KAsC3G;CAEA"}
1
+ {"version":3,"file":"DialogDelegate.d.ts","sourceRoot":"../../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,mEAAmE,CAAC;IAGnF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAG1C,UAAiB,WAAW;QACxB,QAAQ,IAAI,IAAI,CAAC;QACjB,aAAa,IAAI,OAAO,CAAC;QACzB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;KACxD;IAED;;OAEG;IACH,MAAa,cAAc;QACvB,OAAO,CAAC,IAAI,CAAwB;QAEpC;;;WAGG;oBACS,IAAI,EAAE,WAAW,GAAG,OAAO;QAIvC;;;WAGG;QACI,YAAY,CAAC,KAAK,EAAE,MAAe,EAAE,gBAAgB,EAAE,MAAa,EAAE,WAAW,EAAE,OAAO,GAAG,IAAI;KAsC3G;CAEA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogDelegate.js","names":["Logger","_____utils_Logger","DialogDelegate","constructor","host","this","openInDialog","title","submitButtonText","isGenerated","generate","dialog","Dialog","contentWidth","content","beginButton","Button","text","type","press","success","triggerSubmit","close","err","error","message","fireEvent","fieldPath","endButton","afterClose","destroy","open","__exports","__esModule"],"sources":["DialogDelegate.ts"],"sourcesContent":["import Dialog from \"sap/m/Dialog\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../../utils/Logger\";\n\nexport interface IHostDialog {\n generate(): void;\n triggerSubmit(): boolean;\n fireEvent(eventName: string, parameters?: any): void;\n}\n\n/**\n * Extracts all popup and dialog generation logic from the Host control.\n */\nexport class DialogDelegate {\n private host: IHostDialog & Control;\n\n constructor(host: IHostDialog & Control) {\n this.host = host;\n }\n\n /**\n * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.\n * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.\n */\n public openInDialog(title: string = \"Form\", submitButtonText: string = \"OK\", isGenerated: boolean): void {\n if (!isGenerated) {\n this.host.generate();\n }\n\n const dialog = new Dialog({\n title: title,\n contentWidth: \"800px\",\n content: [this.host], // Mount host inside the dialog\n beginButton: new Button({\n text: submitButtonText,\n type: \"Emphasized\",\n press: () => {\n try {\n const success = this.host.triggerSubmit();\n if (success) {\n dialog.close();\n }\n } catch (err) {\n Logger.error(\"[MetaUI] Catastrophic error during validation/submit pipeline\", (err as Error).message, \"DialogDelegate\");\n this.host.fireEvent(\"validationError\", { fieldPath: \"root\", message: (err as Error).message });\n }\n }\n }),\n endButton: new Button({\n text: \"Cancel\",\n press: () => {\n this.host.fireEvent(\"cancel\");\n dialog.close();\n }\n }),\n afterClose: () => {\n dialog.destroy();\n }\n });\n\n dialog.open();\n }\n}\n"],"mappings":"yGAGSA,EAAMC,EAAA,UAWR,MAAMC,EAGTC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAMOE,aAAaC,EAAgB,OAAQC,EAA2B,KAAMC,GACzE,IAAKA,EAAa,CACdJ,KAAKD,KAAKM,UACd,CAEA,MAAMC,EAAS,IAAIC,EAAO,CACtBL,MAAOA,EACPM,aAAc,QACdC,QAAS,CAACT,KAAKD,MACfW,YAAa,IAAIC,EAAO,CACpBC,KAAMT,EACNU,KAAM,aACNC,MAAOA,KACH,IACI,MAAMC,EAAUf,KAAKD,KAAKiB,gBAC1B,GAAID,EAAS,CACTT,EAAOW,OACX,CACJ,CAAE,MAAOC,GACLvB,EAAOwB,MAAM,gEAAkED,EAAcE,QAAS,kBACtGpB,KAAKD,KAAKsB,UAAU,kBAAmB,CAAEC,UAAW,OAAQF,QAAUF,EAAcE,SACxF,KAGRG,UAAW,IAAIZ,EAAO,CAClBC,KAAM,SACNE,MAAOA,KACHd,KAAKD,KAAKsB,UAAU,UACpBf,EAAOW,WAGfO,WAAYA,KACRlB,EAAOmB,aAIfnB,EAAOoB,MACX,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAA9B,iBAAA,OAAA8B,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"DialogDelegate.js","names":["Logger","_____utils_Logger","DialogDelegate","constructor","host","this","openInDialog","title","submitButtonText","isGenerated","generate","dialog","Dialog","contentWidth","content","beginButton","Button","text","type","press","success","triggerSubmit","close","err","error","message","fireEvent","fieldPath","endButton","afterClose","destroy","open","__exports","__esModule"],"sources":["DialogDelegate.ts"],"sourcesContent":["import Dialog from \"sap/m/Dialog\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../../utils/Logger\";\n\nexport interface IHostDialog {\n generate(): void;\n triggerSubmit(): boolean;\n fireEvent(eventName: string, parameters?: any): void;\n}\n\n/**\n * Extracts all popup and dialog generation logic from the Host control.\n */\nexport class DialogDelegate {\n private host: IHostDialog & Control;\n\n /**\n * Initializes a new DialogDelegate to handle dialog-based rendering.\n * @param host The parent DynamicHost or GeneratorHost control.\n */\n constructor(host: IHostDialog & Control) {\n this.host = host;\n }\n\n /**\n * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.\n * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.\n */\n public openInDialog(title: string = \"Form\", submitButtonText: string = \"OK\", isGenerated: boolean): void {\n if (!isGenerated) {\n this.host.generate();\n }\n\n const dialog = new Dialog({\n title: title,\n contentWidth: \"800px\",\n content: [this.host], // Mount host inside the dialog\n beginButton: new Button({\n text: submitButtonText,\n type: \"Emphasized\",\n press: () => {\n try {\n const success = this.host.triggerSubmit();\n if (success) {\n dialog.close();\n }\n } catch (err) {\n Logger.error(\"[MetaUI] Catastrophic error during validation/submit pipeline\", (err as Error).message, \"DialogDelegate\");\n this.host.fireEvent(\"validationError\", { fieldPath: \"root\", message: (err as Error).message });\n }\n }\n }),\n endButton: new Button({\n text: \"Cancel\",\n press: () => {\n this.host.fireEvent(\"cancel\");\n dialog.close();\n }\n }),\n afterClose: () => {\n dialog.destroy();\n }\n });\n\n dialog.open();\n }\n}\n"],"mappings":"yGAGSA,EAAMC,EAAA,UAWR,MAAMC,EAOTC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAMOE,aAAaC,EAAgB,OAAQC,EAA2B,KAAMC,GACzE,IAAKA,EAAa,CACdJ,KAAKD,KAAKM,UACd,CAEA,MAAMC,EAAS,IAAIC,EAAO,CACtBL,MAAOA,EACPM,aAAc,QACdC,QAAS,CAACT,KAAKD,MACfW,YAAa,IAAIC,EAAO,CACpBC,KAAMT,EACNU,KAAM,aACNC,MAAOA,KACH,IACI,MAAMC,EAAUf,KAAKD,KAAKiB,gBAC1B,GAAID,EAAS,CACTT,EAAOW,OACX,CACJ,CAAE,MAAOC,GACLvB,EAAOwB,MAAM,gEAAkED,EAAcE,QAAS,kBACtGpB,KAAKD,KAAKsB,UAAU,kBAAmB,CAAEC,UAAW,OAAQF,QAAUF,EAAcE,SACxF,KAGRG,UAAW,IAAIZ,EAAO,CAClBC,KAAM,SACNE,MAAOA,KACHd,KAAKD,KAAKsB,UAAU,UACpBf,EAAOW,WAGfO,WAAYA,KACRlB,EAAOmB,aAIfnB,EAAOoB,MACX,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAA9B,iBAAA,OAAA8B,CAAA","ignoreList":[]}
@@ -15,6 +15,10 @@ export interface IHostDialog {
15
15
  export class DialogDelegate {
16
16
  private host: IHostDialog & Control;
17
17
 
18
+ /**
19
+ * Initializes a new DialogDelegate to handle dialog-based rendering.
20
+ * @param host The parent DynamicHost or GeneratorHost control.
21
+ */
18
22
  constructor(host: IHostDialog & Control) {
19
23
  this.host = host;
20
24
  }
@@ -6,6 +6,10 @@ sap.ui.define(["sap/m/MessagePage", "sap/ui/core/Messaging", "../../../utils/Log
6
6
  * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.
7
7
  */
8
8
  class ValidationDelegate {
9
+ /**
10
+ * Initializes the ValidationDelegate for registering controls to the global MessageManager.
11
+ * @param host The parent host interface.
12
+ */
9
13
  constructor(host) {
10
14
  this.host = host;
11
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationDelegate-dbg.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","registerObject","control","getProperty","Messaging","unregisterObject","removeAllMessages","pushMessage","path","text","targetPath","replace","displayText","warn","sap","ui","require","MessageClass","messageManager","stateManager","getStateManager","addMessages","message","type","target","processor","getModel","addCustomError","fieldPath","useMessageManager","clearCustomError","messages","getMessageModel","getData","messageToRemove","find","m","getTarget","getMessageProcessor","getId","removeMessages","mountCrashBoundary","error","errorPage","MessagePage","description","icon","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import MessagePage from \"sap/m/MessagePage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: any, suppressInvalidate?: boolean): any;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n */\n public registerObject(control: Control): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.registerObject(control, true); // true = recurse all children\n }\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.unregisterObject(control);\n }\n }\n\n /**\n * Clears all messages from the global MessageManager.\n */\n public removeAllMessages(): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.removeAllMessages();\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\")) {\n sap.ui.require([\"sap/ui/core/message/Message\"], (MessageClass: any) => {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new MessageClass({\n message: displayText,\n type: \"Error\" as unknown,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n });\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n */\n public addCustomError(fieldPath: string, message: string): void {\n const useMessageManager = this.host.getProperty(\"useMessageManager\") as boolean;\n const stateManager = this.host.getStateManager();\n if (useMessageManager && stateManager) {\n sap.ui.require([\"sap/ui/core/message/Message\"], (MessageClass: any) => {\n const messageManager = Messaging;\n messageManager.addMessages(new MessageClass({\n message: message,\n type: \"Error\" as unknown,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel()\n }));\n });\n }\n }\n\n /**\n * Reverts a custom error state on a field.\n */\n public clearCustomError(fieldPath: string): void {\n const useMessageManager = this.host.getProperty(\"useMessageManager\") as boolean;\n const stateManager = this.host.getStateManager();\n if (useMessageManager && stateManager) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n\n const messageToRemove = messages.find((m: any) =>\n m.getTarget() === target && m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messageToRemove) {\n messageManager.removeMessages(messageToRemove);\n }\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new MessagePage({\n text: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\",\n icon: \"sap-icon://error\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":";;;QAISA,MAAM,GAAAC,iBAAA;EASf;AACA;AACA;EACO,MAAMC,kBAAkB,CAAC;IAG5BC,WAAWA,CAACC,IAAqB,EAAE;MAC/B,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;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C,OAAO,CAAC,CAAC;QAC3D,MAAMT,MAAM,GAAG,IAAII,SAAS,CAACjB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE;QAEjD,MAAMuB,eAAe,GAAGH,QAAQ,CAACI,IAAI,CAAEC,CAAM,IACzCA,CAAC,CAACC,SAAS,CAAC,CAAC,KAAKb,MAAM,IAAIY,CAAC,CAACE,mBAAmB,CAAC,CAAC,IAAIF,CAAC,CAACE,mBAAmB,CAAC,CAAC,CAACC,KAAK,CAAC,CAAC,KAAKpB,YAAY,CAACO,QAAQ,CAAC,CAAC,CAACa,KAAK,CAAC,CAC7H,CAAC;QACD,IAAIL,eAAe,EAAE;UACjBhB,cAAc,CAACsB,cAAc,CAACN,eAAe,CAAC;QAClD;MACJ;IACJ;;IAEA;AACJ;AACA;IACWO,kBAAkBA,CAACC,KAAY,EAAQ;MAC1C9C,MAAM,CAAC8C,KAAK,CAAC,wEAAwE,EAAEA,KAAK,CAACpB,OAAO,EAAE,oBAAoB,CAAC;MAE3H,MAAMqB,SAAS,GAAG,IAAIC,WAAW,CAAC;QAC9BnC,IAAI,EAAE,sBAAsB;QAC5BoC,WAAW,EAAE,+FAA+F;QAC5GC,IAAI,EAAE;MACV,CAAC,CAAC;MAEF,IAAI,CAAC9C,IAAI,CAAC+C,cAAc,CAAC,UAAU,EAAEJ,SAAS,CAAC;IACnD;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAlD,kBAAA,GAAAA,kBAAA;EAAA,OAAAkD,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"ValidationDelegate-dbg.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","registerObject","control","getProperty","Messaging","unregisterObject","removeAllMessages","pushMessage","path","text","targetPath","replace","displayText","warn","sap","ui","require","MessageClass","messageManager","stateManager","getStateManager","addMessages","message","type","target","processor","getModel","addCustomError","fieldPath","useMessageManager","clearCustomError","messages","getMessageModel","getData","messageToRemove","find","m","getTarget","getMessageProcessor","getId","removeMessages","mountCrashBoundary","error","errorPage","MessagePage","description","icon","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import MessagePage from \"sap/m/MessagePage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: any, suppressInvalidate?: boolean): any;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n /**\n * Initializes the ValidationDelegate for registering controls to the global MessageManager.\n * @param host The parent host interface.\n */\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n */\n public registerObject(control: Control): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.registerObject(control, true); // true = recurse all children\n }\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.unregisterObject(control);\n }\n }\n\n /**\n * Clears all messages from the global MessageManager.\n */\n public removeAllMessages(): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.removeAllMessages();\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\")) {\n sap.ui.require([\"sap/ui/core/message/Message\"], (MessageClass: any) => {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new MessageClass({\n message: displayText,\n type: \"Error\" as unknown,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n });\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n */\n public addCustomError(fieldPath: string, message: string): void {\n const useMessageManager = this.host.getProperty(\"useMessageManager\") as boolean;\n const stateManager = this.host.getStateManager();\n if (useMessageManager && stateManager) {\n sap.ui.require([\"sap/ui/core/message/Message\"], (MessageClass: any) => {\n const messageManager = Messaging;\n messageManager.addMessages(new MessageClass({\n message: message,\n type: \"Error\" as unknown,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel()\n }));\n });\n }\n }\n\n /**\n * Reverts a custom error state on a field.\n */\n public clearCustomError(fieldPath: string): void {\n const useMessageManager = this.host.getProperty(\"useMessageManager\") as boolean;\n const stateManager = this.host.getStateManager();\n if (useMessageManager && stateManager) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n\n const messageToRemove = messages.find((m: any) =>\n m.getTarget() === target && m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messageToRemove) {\n messageManager.removeMessages(messageToRemove);\n }\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new MessagePage({\n text: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\",\n icon: \"sap-icon://error\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":";;;QAISA,MAAM,GAAAC,iBAAA;EASf;AACA;AACA;EACO,MAAMC,kBAAkB,CAAC;IAG5B;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,IAAqB,EAAE;MAC/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,MAAM2B,QAAQ,GAAGb,cAAc,CAACc,eAAe,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;QAC3D,MAAMT,MAAM,GAAG,IAAII,SAAS,CAACjB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE;QAEjD,MAAMuB,eAAe,GAAGH,QAAQ,CAACI,IAAI,CAAEC,CAAM,IACzCA,CAAC,CAACC,SAAS,CAAC,CAAC,KAAKb,MAAM,IAAIY,CAAC,CAACE,mBAAmB,CAAC,CAAC,IAAIF,CAAC,CAACE,mBAAmB,CAAC,CAAC,CAACC,KAAK,CAAC,CAAC,KAAKpB,YAAY,CAACO,QAAQ,CAAC,CAAC,CAACa,KAAK,CAAC,CAC7H,CAAC;QACD,IAAIL,eAAe,EAAE;UACjBhB,cAAc,CAACsB,cAAc,CAACN,eAAe,CAAC;QAClD;MACJ;IACJ;;IAEA;AACJ;AACA;IACWO,kBAAkBA,CAACC,KAAY,EAAQ;MAC1C9C,MAAM,CAAC8C,KAAK,CAAC,wEAAwE,EAAEA,KAAK,CAACpB,OAAO,EAAE,oBAAoB,CAAC;MAE3H,MAAMqB,SAAS,GAAG,IAAIC,WAAW,CAAC;QAC9BnC,IAAI,EAAE,sBAAsB;QAC5BoC,WAAW,EAAE,+FAA+F;QAC5GC,IAAI,EAAE;MACV,CAAC,CAAC;MAEF,IAAI,CAAC9C,IAAI,CAAC+C,cAAc,CAAC,UAAU,EAAEJ,SAAS,CAAC;IACnD;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAlD,kBAAA,GAAAA,kBAAA;EAAA,OAAAkD,SAAA;AAAA","ignoreList":[]}
@@ -11,6 +11,10 @@ declare module "nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDel
11
11
  */
12
12
  export class ValidationDelegate {
13
13
  private host;
14
+ /**
15
+ * Initializes the ValidationDelegate for registering controls to the global MessageManager.
16
+ * @param host The parent host interface.
17
+ */
14
18
  constructor(host: IHostValidation);
15
19
  /**
16
20
  * Registers a control and all its children with the global MessageManager.
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationDelegate.d.ts","sourceRoot":"../../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,uEAAuE,CAAC;IAGvF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;IAI5E,UAAiB,eAAe;QAC5B,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QACnC,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,kBAAkB,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;QACxF,eAAe,IAAI,YAAY,GAAG,IAAI,CAAC;KAC1C;IAED;;OAEG;IACH,MAAa,kBAAkB;QAC3B,OAAO,CAAC,IAAI,CAAkB;oBAElB,IAAI,EAAE,eAAe;QAIjC;;WAEG;QACI,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;QAM7C;;WAEG;QACI,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;QAM/C;;WAEG;QACI,iBAAiB,IAAI,IAAI;QAMhC;;WAEG;QACI,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;QAwBpD;;WAEG;QACI,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;QAgB/D;;WAEG;QACI,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;QAiBhD;;WAEG;QACI,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;KAWhD;CAEA"}
1
+ {"version":3,"file":"ValidationDelegate.d.ts","sourceRoot":"../../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,uEAAuE,CAAC;IAGvF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;IAI5E,UAAiB,eAAe;QAC5B,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QACnC,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,kBAAkB,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;QACxF,eAAe,IAAI,YAAY,GAAG,IAAI,CAAC;KAC1C;IAED;;OAEG;IACH,MAAa,kBAAkB;QAC3B,OAAO,CAAC,IAAI,CAAkB;QAE9B;;;WAGG;oBACS,IAAI,EAAE,eAAe;QAIjC;;WAEG;QACI,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;QAM7C;;WAEG;QACI,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;QAM/C;;WAEG;QACI,iBAAiB,IAAI,IAAI;QAMhC;;WAEG;QACI,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;QAwBpD;;WAEG;QACI,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;QAgB/D;;WAEG;QACI,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;QAiBhD;;WAEG;QACI,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;KAWhD;CAEA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationDelegate.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","this","registerObject","control","getProperty","Messaging","unregisterObject","removeAllMessages","pushMessage","path","text","targetPath","replace","displayText","warn","sap","ui","require","MessageClass","messageManager","stateManager","getStateManager","addMessages","message","type","target","processor","getModel","addCustomError","fieldPath","useMessageManager","clearCustomError","messages","getMessageModel","getData","messageToRemove","find","m","getTarget","getMessageProcessor","getId","removeMessages","mountCrashBoundary","error","errorPage","MessagePage","description","icon","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import MessagePage from \"sap/m/MessagePage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: any, suppressInvalidate?: boolean): any;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n */\n public registerObject(control: Control): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.registerObject(control, true); // true = recurse all children\n }\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.unregisterObject(control);\n }\n }\n\n /**\n * Clears all messages from the global MessageManager.\n */\n public removeAllMessages(): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.removeAllMessages();\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\")) {\n sap.ui.require([\"sap/ui/core/message/Message\"], (MessageClass: any) => {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new MessageClass({\n message: displayText,\n type: \"Error\" as unknown,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n });\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n */\n public addCustomError(fieldPath: string, message: string): void {\n const useMessageManager = this.host.getProperty(\"useMessageManager\") as boolean;\n const stateManager = this.host.getStateManager();\n if (useMessageManager && stateManager) {\n sap.ui.require([\"sap/ui/core/message/Message\"], (MessageClass: any) => {\n const messageManager = Messaging;\n messageManager.addMessages(new MessageClass({\n message: message,\n type: \"Error\" as unknown,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel()\n }));\n });\n }\n }\n\n /**\n * Reverts a custom error state on a field.\n */\n public clearCustomError(fieldPath: string): void {\n const useMessageManager = this.host.getProperty(\"useMessageManager\") as boolean;\n const stateManager = this.host.getStateManager();\n if (useMessageManager && stateManager) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n\n const messageToRemove = messages.find((m: any) =>\n m.getTarget() === target && m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messageToRemove) {\n messageManager.removeMessages(messageToRemove);\n }\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new MessagePage({\n text: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\",\n icon: \"sap-icon://error\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":"uHAISA,EAAMC,EAAA,UAYR,MAAMC,EAGTC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAKOE,eAAeC,GAClB,GAAIF,KAAKD,KAAKI,YAAY,qBAAsB,CAC5CC,EAAUH,eAAeC,EAAS,KACtC,CACJ,CAKOG,iBAAiBH,GACpB,GAAIF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EAASI,KAAMC,GACnCA,EAAEC,cAAgBb,GAAUY,EAAEE,uBAAyBF,EAAEE,sBAAsBC,UAAYpB,EAAaO,WAAWa,SAEvH,GAAIL,EAAiB,CACjBhB,EAAesB,eAAeN,EAClC,CACJ,CACJ,CAKOO,mBAAmBC,GACtB/C,EAAO+C,MAAM,yEAA0EA,EAAMpB,QAAS,sBAEtG,MAAMqB,EAAY,IAAIC,EAAY,CAC9BnC,KAAM,uBACNoC,YAAa,gGACbC,KAAM,qBAGV9C,KAAKD,KAAKgD,eAAe,WAAYJ,EACzC,EACH,IAAAK,EAAA,CAAAC,WAAA,MAAAD,EAAAnD,qBAAA,OAAAmD,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"ValidationDelegate.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","this","registerObject","control","getProperty","Messaging","unregisterObject","removeAllMessages","pushMessage","path","text","targetPath","replace","displayText","warn","sap","ui","require","MessageClass","messageManager","stateManager","getStateManager","addMessages","message","type","target","processor","getModel","addCustomError","fieldPath","useMessageManager","clearCustomError","messages","getMessageModel","getData","messageToRemove","find","m","getTarget","getMessageProcessor","getId","removeMessages","mountCrashBoundary","error","errorPage","MessagePage","description","icon","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import MessagePage from \"sap/m/MessagePage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: any, suppressInvalidate?: boolean): any;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n /**\n * Initializes the ValidationDelegate for registering controls to the global MessageManager.\n * @param host The parent host interface.\n */\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n */\n public registerObject(control: Control): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.registerObject(control, true); // true = recurse all children\n }\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.unregisterObject(control);\n }\n }\n\n /**\n * Clears all messages from the global MessageManager.\n */\n public removeAllMessages(): void {\n if (this.host.getProperty(\"useMessageManager\")) {\n Messaging.removeAllMessages();\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\")) {\n sap.ui.require([\"sap/ui/core/message/Message\"], (MessageClass: any) => {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new MessageClass({\n message: displayText,\n type: \"Error\" as unknown,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n });\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n */\n public addCustomError(fieldPath: string, message: string): void {\n const useMessageManager = this.host.getProperty(\"useMessageManager\") as boolean;\n const stateManager = this.host.getStateManager();\n if (useMessageManager && stateManager) {\n sap.ui.require([\"sap/ui/core/message/Message\"], (MessageClass: any) => {\n const messageManager = Messaging;\n messageManager.addMessages(new MessageClass({\n message: message,\n type: \"Error\" as unknown,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel()\n }));\n });\n }\n }\n\n /**\n * Reverts a custom error state on a field.\n */\n public clearCustomError(fieldPath: string): void {\n const useMessageManager = this.host.getProperty(\"useMessageManager\") as boolean;\n const stateManager = this.host.getStateManager();\n if (useMessageManager && stateManager) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n\n const messageToRemove = messages.find((m: any) =>\n m.getTarget() === target && m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messageToRemove) {\n messageManager.removeMessages(messageToRemove);\n }\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new MessagePage({\n text: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\",\n icon: \"sap-icon://error\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":"uHAISA,EAAMC,EAAA,UAYR,MAAMC,EAOTC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAKOE,eAAeC,GAClB,GAAIF,KAAKD,KAAKI,YAAY,qBAAsB,CAC5CC,EAAUH,eAAeC,EAAS,KACtC,CACJ,CAKOG,iBAAiBH,GACpB,GAAIF,KAAKD,KAAKI,YAAY,qBAAsB,CAC5CC,EAAUC,iBAAiBH,EAC/B,CACJ,CAKOI,oBACH,GAAIN,KAAKD,KAAKI,YAAY,qBAAsB,CAC5CC,EAAUE,mBACd,CACJ,CAKOC,YAAYC,EAAcC,GAC7B,MAAMC,EAAaF,EAAO,IAAIA,EAAKG,QAAQ,MAAO,MAAQ,GAC1D,MAAMC,EAAcJ,EAAO,UAAUA,OAAUC,IAASA,EAExD,GAAID,EAAM,CACNb,EAAOkB,KAAK,6BAA6BD,IAC7C,KAAO,CACHjB,EAAOkB,KAAK,sCAAsCJ,IACtD,CAEA,GAAIT,KAAKD,KAAKI,YAAY,qBAAsB,CAC5CW,IAAIC,GAAGC,QAAQ,CAAC,+BAAiCC,IAC7C,MA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ationDelegate {
18
18
  private host: IHostValidation;
19
19
 
20
+ /**
21
+ * Initializes the ValidationDelegate for registering controls to the global MessageManager.
22
+ * @param host The parent host interface.
23
+ */
20
24
  constructor(host: IHostValidation) {
21
25
  this.host = host;
22
26
  }
@@ -1,6 +1,23 @@
1
1
  sap.ui.define([], function () {
2
2
  "use strict";
3
3
 
4
+ function __ui5_require_async(path) {
5
+ return new Promise(function (resolve, reject) {
6
+ sap.ui.require([path], function (module) {
7
+ if (!(module && module.__esModule)) {
8
+ module = module === null || !(typeof module === "object" && path.endsWith("/library")) ? {
9
+ default: module
10
+ } : module;
11
+ Object.defineProperty(module, "__esModule", {
12
+ value: true
13
+ });
14
+ }
15
+ resolve(module);
16
+ }, function (err) {
17
+ reject(err);
18
+ });
19
+ });
20
+ }
4
21
  /**
5
22
  * @file DefaultLayoutGenerator.ts
6
23
  * @description Automatically synthesizes a default UI layout for schemas that lack an explicit mapping.
@@ -48,21 +65,37 @@ sap.ui.define([], function () {
48
65
  }
49
66
  return true;
50
67
  }
68
+
69
+ /**
70
+ * Recursively traverses property metadata to synthesize generic Group and Control layout definitions.
71
+ * @param props The properties object from the schema.
72
+ * @param basePath The absolute JSON scope path to prefix bindings.
73
+ * @returns An array of generated layout element descriptors.
74
+ */
51
75
  static generateElementsFromProperties(props, basePath) {
52
76
  const elements = [];
53
77
  for (const key of Object.keys(props)) {
54
- const prop = props[key];
55
- const currentPath = `${basePath}/${key}`;
56
- if (prop.type === "object" && prop.properties) {
57
- elements.push({
58
- type: "Group",
59
- label: prop.ui?.label || key,
60
- elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)
61
- });
62
- } else {
63
- elements.push({
64
- type: "Control",
65
- scope: currentPath
78
+ try {
79
+ const prop = props[key];
80
+ const currentPath = `${basePath}/${key}`;
81
+ if (prop.type === "object" && prop.properties) {
82
+ elements.push({
83
+ type: "Group",
84
+ label: prop.ui?.label || key,
85
+ elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)
86
+ });
87
+ } else {
88
+ elements.push({
89
+ type: "Control",
90
+ scope: currentPath
91
+ });
92
+ }
93
+ } catch (error) {
94
+ // If a single synthesized property fails, swallow it to prevent the entire synthesized form from crashing.
95
+ __ui5_require_async("../utils/Logger").then(({
96
+ Logger
97
+ }) => {
98
+ Logger.error(`[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}'`, error.message);
66
99
  });
67
100
  }
68
101
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultLayoutGenerator-dbg.js","names":["DefaultLayoutGenerator","ensureLayout","schema","uiLayout","Array","isArray","length","type","props","items","properties","Object","keys","elements","generateElementsFromProperties","filter","e","label","title","basePath","key","prop","currentPath","push","ui","scope","__exports","__esModule"],"sources":["DefaultLayoutGenerator.ts"],"sourcesContent":["/**\n * @file DefaultLayoutGenerator.ts\n * @description Automatically synthesizes a default UI layout for schemas that lack an explicit mapping.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\n\n/**\n * Encapsulates the logic to dynamically build a safe, default layout orchestration\n * when the developer or backend fails to provide an explicit `uiLayout`.\n * \n * By elevating this into a dedicated utility, we avoid polluting layout engines\n * (like FormLayout or TableLayout) with structural inference responsibilities.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class DefaultLayoutGenerator {\n /**\n * Inspects a schema. If it has properties but no `uiLayout`, it synthesizes a default.\n * @param schema The ISchema dictionary.\n * @returns boolean True if a layout was synthesized, false if it already existed or was empty.\n */\n public static ensureLayout(schema: ISchema): boolean {\n // If it already has a valid array, do nothing\n if (schema.uiLayout && Array.isArray(schema.uiLayout) && schema.uiLayout.length > 0) {\n return false;\n }\n\n const isArray = schema.type === \"array\";\n const props = isArray ? schema.items?.properties : schema.properties;\n\n if (!props || Object.keys(props).length === 0) {\n return false; // Nothing to map\n }\n\n const elements = this.generateElementsFromProperties(props, \"#/properties\");\n\n if (isArray) {\n // Table layouts expect an array of flat Controls at the root uiLayout\n // For tables, we flatten the deep elements or just render the root level\n // To keep it safe, we'll just use the flat elements for tables\n schema.uiLayout = elements.filter(e => e.type === \"Control\");\n } else {\n // Form layouts expect a grouped structure\n schema.uiLayout = [\n {\n type: \"Group\",\n label: schema.title,\n elements: elements\n }\n ];\n }\n\n return true;\n }\n\n private static generateElementsFromProperties(props: any, basePath: string): ILayoutElement[] {\n const elements: ILayoutElement[] = [];\n for (const key of Object.keys(props)) {\n const prop = props[key];\n const currentPath = `${basePath}/${key}`;\n\n if (prop.type === \"object\" && prop.properties) {\n elements.push({\n type: \"Group\",\n label: prop.ui?.label || key,\n elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)\n });\n } else {\n elements.push({\n type: \"Control\",\n scope: currentPath\n });\n }\n }\n return elements;\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;;EAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,sBAAsB,CAAC;IAChC;AACJ;AACA;AACA;AACA;IACI,OAAcC,YAAYA,CAACC,MAAe,EAAW;MACjD;MACA,IAAIA,MAAM,CAACC,QAAQ,IAAIC,KAAK,CAACC,OAAO,CAACH,MAAM,CAACC,QAAQ,CAAC,IAAID,MAAM,CAACC,QAAQ,CAACG,MAAM,GAAG,CAAC,EAAE;QACjF,OAAO,KAAK;MAChB;MAEA,MAAMD,OAAO,GAAGH,MAAM,CAACK,IAAI,KAAK,OAAO;MACvC,MAAMC,KAAK,GAAGH,OAAO,GAAGH,MAAM,CAACO,KAAK,EAAEC,UAAU,GAAGR,MAAM,CAACQ,UAAU;MAEpE,IAAI,CAACF,KAAK,IAAIG,MAAM,CAACC,IAAI,CAACJ,KAAK,CAAC,CAACF,MAAM,KAAK,CAAC,EAAE;QAC3C,OAAO,KAAK,CAAC,CAAC;MAClB;MAEA,MAAMO,QAAQ,GAAG,IAAI,CAACC,8BAA8B,CAACN,KAAK,EAAE,cAAc,CAAC;MAE3E,IAAIH,OAAO,EAAE;QACT;QACA;QACA;QACAH,MAAM,CAACC,QAAQ,GAAGU,QAAQ,CAACE,MAAM,CAACC,CAAC,IAAIA,CAAC,CAACT,IAAI,KAAK,SAAS,CAAC;MAChE,CAAC,MAAM;QACH;QACAL,MAAM,CAACC,QAAQ,GAAG,CACd;UACII,IAAI,EAAE,OAAO;UACbU,KAAK,EAAEf,MAAM,CAACgB,KAAK;UACnBL,QAAQ,EAAEA;QACd,CAAC,CACJ;MACL;MAEA,OAAO,IAAI;IACf;IAEA,OAAeC,8BAA8BA,CAACN,KAAU,EAAEW,QAAgB,EAAoB;MAC1F,MAAMN,QAA0B,GAAG,EAAE;MACrC,KAAK,MAAMO,GAAG,IAAIT,MAAM,CAACC,IAAI,CAACJ,KAAK,CAAC,EAAE;QAClC,MAAMa,IAAI,GAAGb,KAAK,CAACY,GAAG,CAAC;QACvB,MAAME,WAAW,GAAG,GAAGH,QAAQ,IAAIC,GAAG,EAAE;QAExC,IAAIC,IAAI,CAACd,IAAI,KAAK,QAAQ,IAAIc,IAAI,CAACX,UAAU,EAAE;UAC3CG,QAAQ,CAACU,IAAI,CAAC;YACVhB,IAAI,EAAE,OAAO;YACbU,KAAK,EAAEI,IAAI,CAACG,EAAE,EAAEP,KAAK,IAAIG,GAAG;YAC5BP,QAAQ,EAAE,IAAI,CAACC,8BAA8B,CAACO,IAAI,CAACX,UAAU,EAAE,GAAGY,WAAW,aAAa;UAC9F,CAAC,CAAC;QACN,CAAC,MAAM;UACHT,QAAQ,CAACU,IAAI,CAAC;YACVhB,IAAI,EAAE,SAAS;YACfkB,KAAK,EAAEH;UACX,CAAC,CAAC;QACN;MACJ;MACA,OAAOT,QAAQ;IACnB;EACJ;EAAC,IAAAa,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA1B,sBAAA,GAAAA,sBAAA;EAAA,OAAA0B,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"DefaultLayoutGenerator-dbg.js","names":["DefaultLayoutGenerator","ensureLayout","schema","uiLayout","Array","isArray","length","type","props","items","properties","Object","keys","elements","generateElementsFromProperties","filter","e","label","title","basePath","key","prop","currentPath","push","ui","scope","error","__ui5_require_async","then","Logger","message","__exports","__esModule"],"sources":["DefaultLayoutGenerator.ts"],"sourcesContent":["/**\n * @file DefaultLayoutGenerator.ts\n * @description Automatically synthesizes a default UI layout for schemas that lack an explicit mapping.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\n\n/**\n * Encapsulates the logic to dynamically build a safe, default layout orchestration\n * when the developer or backend fails to provide an explicit `uiLayout`.\n * \n * By elevating this into a dedicated utility, we avoid polluting layout engines\n * (like FormLayout or TableLayout) with structural inference responsibilities.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class DefaultLayoutGenerator {\n /**\n * Inspects a schema. If it has properties but no `uiLayout`, it synthesizes a default.\n * @param schema The ISchema dictionary.\n * @returns boolean True if a layout was synthesized, false if it already existed or was empty.\n */\n public static ensureLayout(schema: ISchema): boolean {\n // If it already has a valid array, do nothing\n if (schema.uiLayout && Array.isArray(schema.uiLayout) && schema.uiLayout.length > 0) {\n return false;\n }\n\n const isArray = schema.type === \"array\";\n const props = isArray ? schema.items?.properties : schema.properties;\n\n if (!props || Object.keys(props).length === 0) {\n return false; // Nothing to map\n }\n\n const elements = this.generateElementsFromProperties(props, \"#/properties\");\n\n if (isArray) {\n // Table layouts expect an array of flat Controls at the root uiLayout\n // For tables, we flatten the deep elements or just render the root level\n // To keep it safe, we'll just use the flat elements for tables\n schema.uiLayout = elements.filter(e => e.type === \"Control\");\n } else {\n // Form layouts expect a grouped structure\n schema.uiLayout = [\n {\n type: \"Group\",\n label: schema.title,\n elements: elements\n }\n ];\n }\n\n return true;\n }\n\n /**\n * Recursively traverses property metadata to synthesize generic Group and Control layout definitions.\n * @param props The properties object from the schema.\n * @param basePath The absolute JSON scope path to prefix bindings.\n * @returns An array of generated layout element descriptors.\n */\n private static generateElementsFromProperties(props: any, basePath: string): ILayoutElement[] {\n const elements: ILayoutElement[] = [];\n for (const key of Object.keys(props)) {\n try {\n const prop = props[key];\n const currentPath = `${basePath}/${key}`;\n\n if (prop.type === \"object\" && prop.properties) {\n elements.push({\n type: \"Group\",\n label: prop.ui?.label || key,\n elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)\n });\n } else {\n elements.push({\n type: \"Control\",\n scope: currentPath\n });\n }\n } catch (error) {\n // If a single synthesized property fails, swallow it to prevent the entire synthesized form from crashing.\n import(\"../utils/Logger\").then(({ Logger }) => {\n Logger.error(`[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}'`, (error as Error).message);\n });\n }\n }\n return elements;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAAA;AACA;AACA;AACA;;EAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,sBAAsB,CAAC;IAChC;AACJ;AACA;AACA;AACA;IACI,OAAcC,YAAYA,CAACC,MAAe,EAAW;MACjD;MACA,IAAIA,MAAM,CAACC,QAAQ,IAAIC,KAAK,CAACC,OAAO,CAACH,MAAM,CAACC,QAAQ,CAAC,IAAID,MAAM,CAACC,QAAQ,CAACG,MAAM,GAAG,CAAC,EAAE;QACjF,OAAO,KAAK;MAChB;MAEA,MAAMD,OAAO,GAAGH,MAAM,CAACK,IAAI,KAAK,OAAO;MACvC,MAAMC,KAAK,GAAGH,OAAO,GAAGH,MAAM,CAACO,KAAK,EAAEC,UAAU,GAAGR,MAAM,CAACQ,UAAU;MAEpE,IAAI,CAACF,KAAK,IAAIG,MAAM,CAACC,IAAI,CAACJ,KAAK,CAAC,CAACF,MAAM,KAAK,CAAC,EAAE;QAC3C,OAAO,KAAK,CAAC,CAAC;MAClB;MAEA,MAAMO,QAAQ,GAAG,IAAI,CAACC,8BAA8B,CAACN,KAAK,EAAE,cAAc,CAAC;MAE3E,IAAIH,OAAO,EAAE;QACT;QACA;QACA;QACAH,MAAM,CAACC,QAAQ,GAAGU,QAAQ,CAACE,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ACA,OAAOjB,QAAQ;IACnB;EACJ;EAAC,IAAAkB,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA/B,sBAAA,GAAAA,sBAAA;EAAA,OAAA+B,SAAA;AAAA","ignoreList":[]}
@@ -21,6 +21,12 @@ declare module "nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator" {
21
21
  * @returns boolean True if a layout was synthesized, false if it already existed or was empty.
22
22
  */
23
23
  static ensureLayout(schema: ISchema): boolean;
24
+ /**
25
+ * Recursively traverses property metadata to synthesize generic Group and Control layout definitions.
26
+ * @param props The properties object from the schema.
27
+ * @param basePath The absolute JSON scope path to prefix bindings.
28
+ * @returns An array of generated layout element descriptors.
29
+ */
24
30
  private static generateElementsFromProperties;
25
31
  }
26
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultLayoutGenerator.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,wDAAwD,CAAC;IACxE;;;OAGG;IAEH,OAAO,EAAE,OAAO,EAAkB,MAAM,+CAA+C,CAAC;IAExF;;;;;;;;;OASG;IACH,MAAa,sBAAsB;QAC/B;;;;WAIG;eACW,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO;QAkCpD,OAAO,CAAC,MAAM,CAAC,8BAA8B;KAqBhD;CAEA"}
1
+ {"version":3,"file":"DefaultLayoutGenerator.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,wDAAwD,CAAC;IACxE;;;OAGG;IAEH,OAAO,EAAE,OAAO,EAAkB,MAAM,+CAA+C,CAAC;IAExF;;;;;;;;;OASG;IACH,MAAa,sBAAsB;QAC/B;;;;WAIG;eACW,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO;QAkCpD;;;;;WAKG;QACH,OAAO,CAAC,MAAM,CAAC,8BAA8B;KA4BhD;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define([],function(){"use strict";class e{static ensureLayout(e){if(e.uiLayout&&Array.isArray(e.uiLayout)&&e.uiLayout.length>0){return false}const t=e.type==="array";const r=t?e.items?.properties:e.properties;if(!r||Object.keys(r).length===0){return false}const s=this.generateElementsFromProperties(r,"#/properties");if(t){e.uiLayout=s.filter(e=>e.type==="Control")}else{e.uiLayout=[{type:"Group",label:e.title,elements:s}]}return true}static generateElementsFromProperties(e,t){const r=[];for(const s of Object.keys(e)){const o=e[s];const i=`${t}/${s}`;if(o.type==="object"&&o.properties){r.push({type:"Group",label:o.ui?.label||s,elements:this.generateElementsFromProperties(o.properties,`${i}/properties`)})}else{r.push({type:"Control",scope:i})}}return r}}var t={__esModule:true};t.DefaultLayoutGenerator=e;return t});
1
+ sap.ui.define([],function(){"use strict";function e(e){return new Promise(function(t,r){sap.ui.require([e],function(r){if(!(r&&r.__esModule)){r=r===null||!(typeof r==="object"&&e.endsWith("/library"))?{default:r}:r;Object.defineProperty(r,"__esModule",{value:true})}t(r)},function(e){r(e)})})}class t{static ensureLayout(e){if(e.uiLayout&&Array.isArray(e.uiLayout)&&e.uiLayout.length>0){return false}const t=e.type==="array";const r=t?e.items?.properties:e.properties;if(!r||Object.keys(r).length===0){return false}const o=this.generateElementsFromProperties(r,"#/properties");if(t){e.uiLayout=o.filter(e=>e.type==="Control")}else{e.uiLayout=[{type:"Group",label:e.title,elements:o}]}return true}static generateElementsFromProperties(t,r){const o=[];for(const s of Object.keys(t)){try{const e=t[s];const u=`${r}/${s}`;if(e.type==="object"&&e.properties){o.push({type:"Group",label:e.ui?.label||s,elements:this.generateElementsFromProperties(e.properties,`${u}/properties`)})}else{o.push({type:"Control",scope:u})}}catch(t){e("../utils/Logger").then(({Logger:e})=>{e.error(`[MetaUI] DefaultLayoutGenerator failed to synthesize property '${s}'`,t.message)})}}return o}}var r={__esModule:true};r.DefaultLayoutGenerator=t;return r});
2
2
  //# sourceMappingURL=DefaultLayoutGenerator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultLayoutGenerator.js","names":["DefaultLayoutGenerator","ensureLayout","schema","uiLayout","Array","isArray","length","type","props","items","properties","Object","keys","elements","this","generateElementsFromProperties","filter","e","label","title","basePath","key","prop","currentPath","push","ui","scope","__exports","__esModule"],"sources":["DefaultLayoutGenerator.ts"],"sourcesContent":["/**\n * @file DefaultLayoutGenerator.ts\n * @description Automatically synthesizes a default UI layout for schemas that lack an explicit mapping.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\n\n/**\n * Encapsulates the logic to dynamically build a safe, default layout orchestration\n * when the developer or backend fails to provide an explicit `uiLayout`.\n * \n * By elevating this into a dedicated utility, we avoid polluting layout engines\n * (like FormLayout or TableLayout) with structural inference responsibilities.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class DefaultLayoutGenerator {\n /**\n * Inspects a schema. If it has properties but no `uiLayout`, it synthesizes a default.\n * @param schema The ISchema dictionary.\n * @returns boolean True if a layout was synthesized, false if it already existed or was empty.\n */\n public static ensureLayout(schema: ISchema): boolean {\n // If it already has a valid array, do nothing\n if (schema.uiLayout && Array.isArray(schema.uiLayout) && schema.uiLayout.length > 0) {\n return false;\n }\n\n const isArray = schema.type === \"array\";\n const props = isArray ? schema.items?.properties : schema.properties;\n\n if (!props || Object.keys(props).length === 0) {\n return false; // Nothing to map\n }\n\n const elements = this.generateElementsFromProperties(props, \"#/properties\");\n\n if (isArray) {\n // Table layouts expect an array of flat Controls at the root uiLayout\n // For tables, we flatten the deep elements or just render the root level\n // To keep it safe, we'll just use the flat elements for tables\n schema.uiLayout = elements.filter(e => e.type === \"Control\");\n } else {\n // Form layouts expect a grouped structure\n schema.uiLayout = [\n {\n type: \"Group\",\n label: schema.title,\n elements: elements\n }\n ];\n }\n\n return true;\n }\n\n private static generateElementsFromProperties(props: any, basePath: string): ILayoutElement[] {\n const elements: ILayoutElement[] = [];\n for (const key of Object.keys(props)) {\n const prop = props[key];\n const currentPath = `${basePath}/${key}`;\n\n if (prop.type === \"object\" && prop.properties) {\n elements.push({\n type: \"Group\",\n label: prop.ui?.label || key,\n elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)\n });\n } else {\n elements.push({\n type: \"Control\",\n scope: currentPath\n });\n }\n }\n return elements;\n }\n}\n"],"mappings":"yCAiBO,MAAMA,EAMT,mBAAcC,CAAaC,GAEvB,GAAIA,EAAOC,UAAYC,MAAMC,QAAQH,EAAOC,WAAaD,EAAOC,SAASG,OAAS,EAAG,CACjF,OAAO,KACX,CAEA,MAAMD,EAAUH,EAAOK,OAAS,QAChC,MAAMC,EAAQH,EAAUH,EAAOO,OAAOC,WAAaR,EAAOQ,WAE1D,IAAKF,GAASG,OAAOC,KAAKJ,GAAOF,SAAW,EAAG,CAC3C,OAAO,KACX,CAEA,MAAMO,EAAWC,KAAKC,+BAA+BP,EAAO,gBAE5D,GAAIH,EAAS,CAITH,EAAOC,SAAWU,EAASG,OAAOC,GAAKA,EAAEV,OAAS,UACtD,KAAO,CAEHL,EAAOC,SAAW,CACd,CACII,KAAM,QACNW,MAAOhB,EAAOiB,MACdN,SAAUA,GAGtB,CAEA,OAAO,IACX,CAEA,qCAAeE,CAA+BP,EAAYY,GACtD,MAAMP,EAA6B,GACnC,IAAK,MAAMQ,KAAOV,OAAOC,KAAKJ,GAAQ,CAClC,MAAMc,EAAOd,EAAMa,GACnB,MAAME,EAAc,GAAGH,KAAYC,IAEnC,GAAIC,EAAKf,OAAS,UAAYe,EAAKZ,WAAY,CAC3CG,EAASW,KAAK,CACVjB,KAAM,QACNW,MAAOI,EAAKG,IAAIP,OAASG,EACzBR,SAAUC,KAAKC,+BAA+BO,EAAKZ,WAAY,GAAGa,iBAE1E,KAAO,CACHV,EAASW,KAAK,CACVjB,KAAM,UACNmB,MAAOH,GAEf,CACJ,CACA,OAAOV,CACX,EACH,IAAAc,EAAA,CAAAC,WAAA,MAAAD,EAAA3B,yBAAA,OAAA2B,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"DefaultLayoutGenerator.js","names":["DefaultLayoutGenerator","ensureLayout","schema","uiLayout","Array","isArray","length","type","props","items","properties","Object","keys","elements","this","generateElementsFromProperties","filter","e","label","title","basePath","key","prop","currentPath","push","ui","scope","error","__ui5_require_async","then","Logger","message","__exports","__esModule"],"sources":["DefaultLayoutGenerator.ts"],"sourcesContent":["/**\n * @file DefaultLayoutGenerator.ts\n * @description Automatically synthesizes a default UI layout for schemas that lack an explicit mapping.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\n\n/**\n * Encapsulates the logic to dynamically build a safe, default layout orchestration\n * when the developer or backend fails to provide an explicit `uiLayout`.\n * \n * By elevating this into a dedicated utility, we avoid polluting layout engines\n * (like FormLayout or TableLayout) with structural inference responsibilities.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class DefaultLayoutGenerator {\n /**\n * Inspects a schema. If it has properties but no `uiLayout`, it synthesizes a default.\n * @param schema The ISchema dictionary.\n * @returns boolean True if a layout was synthesized, false if it already existed or was empty.\n */\n public static ensureLayout(schema: ISchema): boolean {\n // If it already has a valid array, do nothing\n if (schema.uiLayout && Array.isArray(schema.uiLayout) && schema.uiLayout.length > 0) {\n return false;\n }\n\n const isArray = schema.type === \"array\";\n const props = isArray ? schema.items?.properties : schema.properties;\n\n if (!props || Object.keys(props).length === 0) {\n return false; // Nothing to map\n }\n\n const elements = this.generateElementsFromProperties(props, \"#/properties\");\n\n if (isArray) {\n // Table layouts expect an array of flat Controls at the root uiLayout\n // For tables, we flatten the deep elements or just render the root level\n // To keep it safe, we'll just use the flat elements for tables\n schema.uiLayout = elements.filter(e => e.type === \"Control\");\n } else {\n // Form layouts expect a grouped structure\n schema.uiLayout = [\n {\n type: \"Group\",\n label: schema.title,\n elements: elements\n }\n ];\n }\n\n return true;\n }\n\n /**\n * Recursively traverses property metadata to synthesize generic Group and Control layout definitions.\n * @param props The properties object from the schema.\n * @param basePath The absolute JSON scope path to prefix bindings.\n * @returns An array of generated layout element descriptors.\n */\n private static generateElementsFromProperties(props: any, basePath: string): ILayoutElement[] {\n const elements: ILayoutElement[] = [];\n for (const key of Object.keys(props)) {\n try {\n const prop = props[key];\n const currentPath = `${basePath}/${key}`;\n\n if (prop.type === \"object\" && prop.properties) {\n elements.push({\n type: \"Group\",\n label: prop.ui?.label || key,\n elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)\n });\n } else {\n elements.push({\n type: \"Control\",\n scope: currentPath\n });\n }\n } catch (error) {\n // If a single synthesized property fails, swallow it to prevent the entire synthesized form from crashing.\n import(\"../utils/Logger\").then(({ Logger }) => {\n Logger.error(`[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}'`, (error as Error).message);\n });\n }\n }\n return elements;\n }\n}\n"],"mappings":"qSAiBO,MAAMA,EAMT,mBAAcC,CAAaC,GAEvB,GAAIA,EAAOC,UAAYC,MAAMC,QAAQH,EAAOC,WAAaD,EAAOC,SAASG,OAAS,EAAG,CACjF,OAAO,KACX,CAEA,MAAMD,EAAUH,EAAOK,OAAS,QAChC,MAAMC,EAAQH,EAAUH,EAAOO,OAAOC,WAAaR,EAAOQ,WAE1D,IAAKF,GAASG,OAAOC,KAAKJ,GAAOF,SAAW,EAAG,CAC3C,OAAO,KACX,CAEA,MAAMO,EAAWC,KAAKC,+BAA+BP,EAAO,gBAE5D,GAAIH,EAAS,CAITH,EAAOC,SAAWU,EAASG,OAAOC,GAAKA,EAAEV,OAAS,UACtD,KAAO,CAEHL,EAAOC,SAAW,CACd,CACII,KAAM,QACNW,MAAOhB,EAAOiB,MACdN,SAAUA,GAGtB,CAEA,OAAO,IACX,CAQA,qCAAeE,CAA+BP,EAAYY,GACtD,MAAMP,EAA6B,GACnC,IAAK,MAAMQ,KAAOV,OAAOC,KAAKJ,GAAQ,CAClC,IACI,MAAMc,EAAOd,EAAMa,GACnB,MAAME,EAAc,GAAGH,KAAYC,IAEnC,GAAIC,EAAKf,OAAS,UAAYe,EAAKZ,WAAY,CAC3CG,EAASW,KAAK,CACVjB,KAAM,QACNW,MAAOI,EAAKG,IAAIP,OAASG,EACzBR,SAAUC,KAAKC,+BAA+BO,EAAKZ,WAAY,GAAGa,iBAE1E,KAAO,CACHV,EAASW,KAAK,CACVjB,KAAM,UACNmB,MAAOH,GAEf,CACJ,CAAE,MAAOI,GAELC,EAAO,mBAAmBC,KAAK,EAAGC,aAC9BA,EAAOH,MAAM,kEAAkEN,KAASM,EAAgBI,UAEhH,CACJ,CACA,OAAOlB,CACX,EACH,IAAAmB,EAAA,CAAAC,WAAA,MAAAD,EAAAhC,yBAAA,OAAAgC,CAAA","ignoreList":[]}
@@ -55,22 +55,35 @@ export class DefaultLayoutGenerator {
55
55
  return true;
56
56
  }
57
57
 
58
+ /**
59
+ * Recursively traverses property metadata to synthesize generic Group and Control layout definitions.
60
+ * @param props The properties object from the schema.
61
+ * @param basePath The absolute JSON scope path to prefix bindings.
62
+ * @returns An array of generated layout element descriptors.
63
+ */
58
64
  private static generateElementsFromProperties(props: any, basePath: string): ILayoutElement[] {
59
65
  const elements: ILayoutElement[] = [];
60
66
  for (const key of Object.keys(props)) {
61
- const prop = props[key];
62
- const currentPath = `${basePath}/${key}`;
67
+ try {
68
+ const prop = props[key];
69
+ const currentPath = `${basePath}/${key}`;
63
70
 
64
- if (prop.type === "object" && prop.properties) {
65
- elements.push({
66
- type: "Group",
67
- label: prop.ui?.label || key,
68
- elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)
69
- });
70
- } else {
71
- elements.push({
72
- type: "Control",
73
- scope: currentPath
71
+ if (prop.type === "object" && prop.properties) {
72
+ elements.push({
73
+ type: "Group",
74
+ label: prop.ui?.label || key,
75
+ elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)
76
+ });
77
+ } else {
78
+ elements.push({
79
+ type: "Control",
80
+ scope: currentPath
81
+ });
82
+ }
83
+ } catch (error) {
84
+ // If a single synthesized property fails, swallow it to prevent the entire synthesized form from crashing.
85
+ import("../utils/Logger").then(({ Logger }) => {
86
+ Logger.error(`[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}'`, (error as Error).message);
74
87
  });
75
88
  }
76
89
  }
@@ -12,7 +12,7 @@ sap.ui.define(["./ConditionEngine", "./PluginRegistry", "sap/m/Text", "../utils/
12
12
  /**
13
13
  * The Engine is responsible for translating a normalized schema into a physical UI5 layout.
14
14
  * It delegates layout generation to the configured `LayoutManager` and field generation to the `PluginRegistry`.
15
- * It is NOT a God Class; it strictly routes execution flow and tracks active plugins for validation.
15
+ * It strictly routes execution flow and tracks active plugins for validation.
16
16
  * It embodies the "Plugin-First Philosophy" by routing all complex field and layout rendering
17
17
  * through discrete, decoupled plugins rather than handling native overrides.
18
18
  *
@@ -20,8 +20,6 @@ sap.ui.define(["./ConditionEngine", "./PluginRegistry", "sap/m/Text", "../utils/
20
20
  * @public
21
21
  */
22
22
  class Engine {
23
- /** Global registry of all available layout strategies (e.g. Form, Table, Wizard). */
24
-
25
23
  /** Handles dynamic conditional logic across the active form. */
26
24
  conditionEngine = null;
27
25
 
@@ -32,6 +30,11 @@ sap.ui.define(["./ConditionEngine", "./PluginRegistry", "sap/m/Text", "../utils/
32
30
 
33
31
  /** Tracks whether the entire engine is running in Editable mode. */
34
32
  isEditable = true;
33
+
34
+ /**
35
+ * Initializes a new Engine instance.
36
+ * @param editable Whether the engine should render form fields as editable or read-only.
37
+ */
35
38
  constructor(editable = true) {
36
39
  this.isEditable = editable;
37
40
  }
@@ -66,7 +69,7 @@ sap.ui.define(["./ConditionEngine", "./PluginRegistry", "sap/m/Text", "../utils/
66
69
  Logger.warn("[MetaUI Engine] Missing 'uiLayout' array in schema. Synthesized a default layout mapping to prevent a blank render.");
67
70
  }
68
71
  const layoutStrategy = schema.layoutStrategy || (schema.type === "array" ? "table" : "form");
69
- const layoutManager = Engine.layoutRegistry.getStrict(layoutStrategy);
72
+ const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);
70
73
  return layoutManager.render(schema, modelName, this, onSubmit);
71
74
  } catch (error) {
72
75
  const msg = error.message;
@@ -125,7 +128,7 @@ sap.ui.define(["./ConditionEngine", "./PluginRegistry", "sap/m/Text", "../utils/
125
128
  generateLayout(schema, modelName, bindingPath) {
126
129
  try {
127
130
  const layoutStrategy = schema.layoutStrategy || (schema.type === "array" ? "table" : "form");
128
- const layoutManager = Engine.layoutRegistry.getStrict(layoutStrategy);
131
+ const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);
129
132
  return layoutManager.render(schema, modelName, this, undefined, bindingPath);
130
133
  } catch (error) {
131
134
  const msg = error.message;
@@ -145,13 +148,23 @@ sap.ui.define(["./ConditionEngine", "./PluginRegistry", "sap/m/Text", "../utils/
145
148
  validateAll() {
146
149
  const errors = [];
147
150
  for (const item of this.activePlugins) {
148
- const result = item.plugin.validate();
149
- if (!result.isValid) {
150
- // Ensure the path is bound to the error so GeneratorHost knows where to target it
151
- result.fieldKey = result.fieldKey || item.path.replace(/^\//, "");
152
- errors.push(result);
153
- // Add console log to find which plugin fails silently
154
- Logger.error("[MetaUI Validation] Plugin failed validation silently:", item.path || item.plugin.constructor.name);
151
+ try {
152
+ const result = item.plugin.validate();
153
+ if (!result.isValid) {
154
+ // Ensure the path is bound to the error so GeneratorHost knows where to target it
155
+ result.fieldKey = result.fieldKey || item.path.replace(/^\//, "");
156
+ errors.push(result);
157
+ // Add console log to find which plugin fails silently
158
+ Logger.error("[MetaUI Validation] Plugin failed validation silently:", item.path || item.plugin.constructor.name);
159
+ }
160
+ } catch (error) {
161
+ const msg = error.message;
162
+ Logger.error(`[MetaUI Validation] Exception during plugin validation at path ${item.path}`, msg);
163
+ errors.push({
164
+ isValid: false,
165
+ errorMessage: `Validation crashed: ${msg}`,
166
+ fieldKey: item.path.replace(/^\//, "")
167
+ });
155
168
  }
156
169
  }
157
170
  return errors;