@siliconst/metaui 1.4.9 → 1.4.13

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 (307) hide show
  1. package/README.md +4 -178
  2. package/package.json +1 -1
  3. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +56 -8
  4. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js.map +1 -1
  5. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts +27 -3
  6. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +1 -1
  7. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js +1 -1
  8. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js.map +1 -1
  9. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts +52 -9
  10. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +132 -18
  11. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js.map +1 -1
  12. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts +14 -9
  13. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts.map +1 -1
  14. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js +1 -1
  15. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js.map +1 -1
  16. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.ts +117 -18
  17. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js +1 -3
  18. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js.map +1 -1
  19. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts.map +1 -1
  20. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js +1 -1
  21. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js.map +1 -1
  22. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.ts +1 -3
  23. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js +9 -6
  24. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js.map +1 -1
  25. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts +1 -1
  26. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts.map +1 -1
  27. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js +1 -1
  28. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js.map +1 -1
  29. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts +9 -6
  30. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js +56 -49
  31. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js.map +1 -1
  32. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts +9 -4
  33. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts.map +1 -1
  34. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js +1 -1
  35. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js.map +1 -1
  36. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts +67 -50
  37. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js +0 -2
  38. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js.map +1 -1
  39. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.d.ts +0 -2
  40. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.d.ts.map +1 -1
  41. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.js.map +1 -1
  42. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.ts +0 -3
  43. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js +4 -6
  44. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js.map +1 -1
  45. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js +1 -1
  46. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js.map +1 -1
  47. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts +4 -4
  48. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +36 -9
  49. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js.map +1 -1
  50. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts +18 -2
  51. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts.map +1 -1
  52. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js +1 -1
  53. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js.map +1 -1
  54. package/src/nz/co/siliconst/ui5/metaui/core/Engine.ts +39 -5
  55. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +19 -2
  56. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js.map +1 -1
  57. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts +9 -0
  58. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts.map +1 -1
  59. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js +1 -1
  60. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js.map +1 -1
  61. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts +21 -7
  62. package/src/nz/co/siliconst/ui5/metaui/core/Registry-dbg.js +3 -1
  63. package/src/nz/co/siliconst/ui5/metaui/core/Registry-dbg.js.map +1 -1
  64. package/src/nz/co/siliconst/ui5/metaui/core/Registry.d.ts.map +1 -1
  65. package/src/nz/co/siliconst/ui5/metaui/core/Registry.js +1 -1
  66. package/src/nz/co/siliconst/ui5/metaui/core/Registry.js.map +1 -1
  67. package/src/nz/co/siliconst/ui5/metaui/core/Registry.ts +3 -1
  68. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +54 -34
  69. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -1
  70. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +3 -1
  71. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
  72. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js +1 -1
  73. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
  74. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +55 -34
  75. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator-dbg.js +7 -6
  76. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator-dbg.js.map +1 -1
  77. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.d.ts.map +1 -1
  78. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.js +1 -1
  79. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.js.map +1 -1
  80. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.ts +7 -6
  81. package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js +40 -11
  82. package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js.map +1 -1
  83. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts +6 -1
  84. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts.map +1 -1
  85. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js +1 -1
  86. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js.map +1 -1
  87. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.ts +39 -13
  88. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin-dbg.js.map +1 -1
  89. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts +13 -0
  90. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts.map +1 -1
  91. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts +15 -0
  92. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema-dbg.js.map +1 -1
  93. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts +1 -0
  94. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts.map +1 -1
  95. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts +1 -0
  96. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js +10 -0
  97. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js.map +1 -1
  98. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.d.ts.map +1 -1
  99. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js +1 -1
  100. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js.map +1 -1
  101. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.ts +10 -0
  102. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js +1 -1
  103. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -1
  104. package/src/nz/co/siliconst/ui5/metaui/library-preload.js +44 -43
  105. package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
  106. package/src/nz/co/siliconst/ui5/metaui/library.d.ts +1 -0
  107. package/src/nz/co/siliconst/ui5/metaui/library.d.ts.map +1 -1
  108. package/src/nz/co/siliconst/ui5/metaui/library.js +1 -1
  109. package/src/nz/co/siliconst/ui5/metaui/library.js.map +1 -1
  110. package/src/nz/co/siliconst/ui5/metaui/library.ts +1 -0
  111. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js +6 -0
  112. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js.map +1 -1
  113. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.d.ts.map +1 -1
  114. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js +1 -1
  115. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js.map +1 -1
  116. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts +6 -0
  117. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +2 -2
  118. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js.map +1 -1
  119. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js +1 -1
  120. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js.map +1 -1
  121. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +2 -2
  122. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js +77 -1
  123. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js.map +1 -1
  124. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts +17 -0
  125. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts.map +1 -1
  126. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js +1 -1
  127. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js.map +1 -1
  128. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +67 -7
  129. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +1 -1
  130. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
  131. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js +1 -1
  132. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
  133. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +1 -1
  134. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +1 -1
  135. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
  136. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js +1 -1
  137. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
  138. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +1 -1
  139. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +10 -3
  140. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js.map +1 -1
  141. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.d.ts.map +1 -1
  142. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js +1 -1
  143. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
  144. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +10 -3
  145. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +1 -1
  146. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
  147. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
  148. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
  149. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +1 -1
  150. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +1 -1
  151. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
  152. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
  153. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
  154. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +1 -1
  155. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +1 -1
  156. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
  157. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js +1 -1
  158. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
  159. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +1 -1
  160. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +1 -1
  161. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
  162. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
  163. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
  164. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +1 -1
  165. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +1 -1
  166. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
  167. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js +1 -1
  168. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
  169. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +1 -1
  170. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js +130 -0
  171. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js.map +1 -0
  172. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts +39 -0
  173. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts.map +1 -0
  174. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js +2 -0
  175. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js.map +1 -0
  176. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts +127 -0
  177. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +1 -1
  178. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js.map +1 -1
  179. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js +1 -1
  180. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js.map +1 -1
  181. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +1 -1
  182. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +2 -2
  183. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
  184. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
  185. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
  186. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +2 -2
  187. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js +6 -0
  188. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js.map +1 -1
  189. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.d.ts.map +1 -1
  190. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js +1 -1
  191. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js.map +1 -1
  192. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.ts +6 -0
  193. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +1 -1
  194. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
  195. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
  196. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
  197. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +1 -1
  198. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +1 -1
  199. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
  200. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js +1 -1
  201. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
  202. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +1 -1
  203. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +1 -1
  204. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
  205. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js +1 -1
  206. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
  207. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +1 -1
  208. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +1 -1
  209. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
  210. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
  211. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
  212. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +1 -1
  213. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +1 -1
  214. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
  215. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js +1 -1
  216. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
  217. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +1 -1
  218. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +1 -1
  219. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js.map +1 -1
  220. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js +1 -1
  221. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js.map +1 -1
  222. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +1 -1
  223. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +40 -4
  224. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
  225. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.d.ts +4 -0
  226. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.d.ts.map +1 -1
  227. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js +1 -1
  228. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
  229. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +41 -3
  230. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +1 -1
  231. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
  232. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
  233. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
  234. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +1 -1
  235. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +1 -1
  236. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
  237. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js +1 -1
  238. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
  239. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +1 -1
  240. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js.map +1 -1
  241. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js.map +1 -1
  242. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.ts +1 -1
  243. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js.map +1 -1
  244. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js.map +1 -1
  245. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.ts +1 -1
  246. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin-dbg.js.map +1 -1
  247. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.d.ts +1 -1
  248. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.d.ts.map +1 -1
  249. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.js.map +1 -1
  250. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.ts +2 -2
  251. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin-dbg.js.map +1 -1
  252. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.d.ts +1 -1
  253. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.d.ts.map +1 -1
  254. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.js.map +1 -1
  255. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.ts +1 -1
  256. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin-dbg.js +1 -1
  257. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin-dbg.js.map +1 -1
  258. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.d.ts +1 -1
  259. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.d.ts.map +1 -1
  260. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.js +1 -1
  261. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.js.map +1 -1
  262. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.ts +2 -2
  263. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin-dbg.js +1 -1
  264. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin-dbg.js.map +1 -1
  265. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.d.ts +1 -1
  266. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.d.ts.map +1 -1
  267. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.js +1 -1
  268. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.js.map +1 -1
  269. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.ts +2 -2
  270. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin-dbg.js +1 -1
  271. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin-dbg.js.map +1 -1
  272. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.d.ts +1 -1
  273. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.d.ts.map +1 -1
  274. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.js +1 -1
  275. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.js.map +1 -1
  276. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.ts +3 -3
  277. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin-dbg.js.map +1 -1
  278. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.d.ts +1 -1
  279. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.d.ts.map +1 -1
  280. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.js.map +1 -1
  281. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.ts +1 -1
  282. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin-dbg.js.map +1 -1
  283. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.d.ts +1 -1
  284. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.d.ts.map +1 -1
  285. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.js.map +1 -1
  286. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.ts +1 -1
  287. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin-dbg.js +2 -2
  288. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin-dbg.js.map +1 -1
  289. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.d.ts +1 -1
  290. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.d.ts.map +1 -1
  291. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.js +1 -1
  292. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.js.map +1 -1
  293. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.ts +4 -4
  294. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin-dbg.js +3 -2
  295. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin-dbg.js.map +1 -1
  296. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.d.ts +1 -1
  297. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.d.ts.map +1 -1
  298. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.js +1 -1
  299. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.js.map +1 -1
  300. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.ts +4 -3
  301. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin-dbg.js +3 -1
  302. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin-dbg.js.map +1 -1
  303. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.d.ts +1 -1
  304. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.d.ts.map +1 -1
  305. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.js +1 -1
  306. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.js.map +1 -1
  307. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.ts +4 -3
package/README.md CHANGED
@@ -5,190 +5,17 @@
5
5
  ## MetaUI vs. Fiori Elements
6
6
  It is important to note that MetaUI is **not** an attempt to replace SAP Fiori Elements. Fiori Elements is a robust framework for building UIs driven by static OData CDS annotations.
7
7
 
8
- MetaUI is designed for use cases where **CDS annotations are unavailable, impossible, or too rigid.**
9
- - **Highly Dynamic**: MetaUI parses standard JSON Schemas at runtime, allowing you to generate completely dynamic layouts based on user roles, remote APIs, or NoSQL databases where the schema isn't known until execution.
10
- - **Backend Agnostic**: Because it relies on universal JSON rather than OData metadata, MetaUI can be plugged into virtually any tech stack (Node.js, Firebase, GraphQL, REST).
11
-
12
- ## 🚀 Key Features
13
-
14
- Built for strict UI5 architecture adherence, MetaUI enforces modularity through a Plugin-based design and explicitly avoids inline DOM manipulation.
15
-
16
- - **100% Schema Inference**: Bind raw JSON to the new `DynamicHost` and the engine will instantly infer the metadata, schema, and layout on the fly.
17
- - **Hybrid / Partial Schema Inference**: Supports the standard JSON-Schema `additionalProperties: true` directive. Provide a minimal "Partial Schema" to override specific UI elements (e.g. converting a string into a dropdown), and the engine will recursively deep-merge it with an automatically inferred schema generated from the rest of your data payload.
18
- - **Strict Array Routing**: Pure contract-based routing strictly separates sub-layouts (arrays of objects) from inline field plugins (primitive arrays), enabling flawless complex nested rendering without hacky edge cases.
19
- - **True Two-Way Sync**: Safely double-bind `data` and `data` to the exact same UI5 model property. Built-in `deepEqual` loop-breakers catch UI5 data echoes, perfectly preserving user cursor focus during live model swaps.
8
+ MetaUI is designed for highly dynamic use cases where CDS annotations are unavailable, impossible, or too rigid. By relying on universal JSON, MetaUI provides a flexible alternative for scenarios that demand on-the-fly layout generation.
20
9
 
21
10
  ✨ **[Play with the Live Interactive Demo Here!](https://SiliconStreetDev1.github.io/MetaUI/index.html)** ✨
22
11
 
23
12
  ---
24
13
 
25
- ## 📚 Technical Documentation
26
-
27
- For detailed information regarding the JSON Schema properties, `ui.*` orchestrations, and recursive nested arrays, consult the payload formats specification:
28
-
29
- - [MetaUI Documentation Wiki](docs/wiki/Home.md)
30
- - [Payload Formats & Directives](docs/payload_formats.md)
31
- - [Fiori Integration Guide](docs/fiori_integration.md)
32
- - [Custom Plugin Authorship Guide](docs/plugin_authorship.md)
33
-
34
- ---
35
-
36
- ## 🏗 Architecture & Design Tenets
37
-
38
- 1. **JSON-Schema Core:** MetaUI parses standard recursive JSON Schema `properties` blocks (`Record<string, IPropertyMetadata>`).
39
- 2. **Implicit Layout Orchestration:** The `Engine` determines standard Layouts based on payload shape. Root `object` types map to `FormLayout` clusters. Root `array` types map to `TableLayout` instances. Nested arrays trigger recursive drill-down dialogs.
40
- 3. **ConditionEngine Compilation:** Cross-context visibility rules (e.g., `"$root.status === 'DRAFT'"`) are transpiled into native UI5 Expression Bindings to utilize native reactivity.
41
- 4. **Universal Plugin Architecture:** The `PluginRegistry` isolates control instantiation. Core layout managers delegate to registered implementations of `IPlugin`. Plugins are rigorously segregated into:
42
- - `plugins/controls/`: Visual UI components (e.g., String, Date).
43
- - `plugins/validators/`: Custom business logic constraints.
44
- - `plugins/formatters/`: Data transformation utilities.
45
- - `plugins/actions/`: Button and execution handlers.
46
- - `plugins/datasources/`: Remote value help providers.
47
-
48
- ---
49
-
50
- ## 🚀 Quick Start (Sandbox)
51
-
52
- The repository contains an internal UI5 sandbox for testing the engine's inference logic.
53
-
54
- ```bash
55
- # Install dependencies
56
- npm install
57
-
58
- # Run the UI5 development server (Sandbox application)
59
- npm run start
60
- ```
61
- The test suite will boot at `http://localhost:8080/index.html`.
62
-
63
- ---
64
-
65
- ## 🛠 Integration
66
-
67
- ### Installation
68
-
69
- Import the compiled library namespace into your UI5 project.
70
-
71
- ```javascript
72
- sap.ui.require(["nz/co/siliconst/ui5/metaui/controls/DynamicHost"], function (DynamicHost) {
73
- const host = new DynamicHost({
74
- // The Schema Definition
75
- schemaDefinition: {
76
- type: "object",
77
- uiLayout: [
78
- {
79
- type: "Group",
80
- label: "User Settings",
81
- elements: [
82
- { type: "Control", scope: "#/properties/Username" },
83
- { type: "Control", scope: "#/properties/IsActive" }
84
- ]
85
- }
86
- ],
87
- properties: {
88
- Username: { type: "string", ui: { label: "User Name" } },
89
- IsActive: { type: "boolean", ui: { label: "Active", widget: "switch" } }
90
- }
91
- },
92
- // The Data Payload
93
- data: {
94
- "FirstName": "John",
95
- "LastName": "Doe"
96
- },
97
- });
98
-
99
- // Option A: Render inside an existing container
100
- myVBox.addItem(host);
101
-
102
- // Option B: Mount as an isolated Dialog
103
- host.openInDialog("User Configuration", "OK");
104
-
105
- // Capture the extracted JSON payload on submit
106
- host.attachSubmit(function(oEvent) {
107
- const payload = oEvent.getParameter("payload");
108
- console.log(payload);
109
- });
110
- });
111
- ```
112
-
113
- ### Declarative XML Binding
114
-
115
- The `DynamicHost` fully supports declarative XML instantiation in traditional UI5 views:
116
-
117
- ```xml
118
- <mvc:View
119
- xmlns:mvc="sap.ui.core.mvc"
120
- xmlns:meta="nz.co.siliconst.ui5.metaui.controls">
121
-
122
- <meta:DynamicHost
123
- id="dynamicFormHost"
124
- schemaDefinition="{backend>/SchemaDefinition}"
125
- data="{backend>/PayloadData}"
126
- useMessageManager="true"
127
- submit=".onMetaFormSubmit" />
128
-
129
- </mvc:View>
130
- ```
131
-
132
- ### Validation
133
-
134
- MetaUI supports client-side validation based on JSON Schema constraints natively.
135
-
136
- #### Mandatory Fields
137
- Adding `"required": true` to any property in the schema will enforce input validation prior to the `submit` event being fired.
138
-
139
- ### Custom Validation Exits (`beforeSubmit`)
140
- For business logic requiring custom checks (e.g., async validation), the `DynamicHost` provides a `beforeSubmit` event.
141
-
142
- ```javascript
143
- onBeforeSubmit: function(oEvent) {
144
- const payload = oEvent.getParameter("payload");
145
- const preventDefault = oEvent.getParameter("preventDefault");
146
- const addError = oEvent.getParameter("addError");
147
-
148
- if (payload.CustomerName === "Reserved") {
149
- addError("CustomerName", "This customer name is reserved.");
150
- preventDefault();
151
- }
152
- }
153
- ```
154
-
155
- ### Asynchronous Field Validation (`fieldChange`)
156
- For real-time validation (like checking if a username is taken), listen to the `fieldChange` event. You can lock the form using `setBusy(true)`, perform your async check, and imperatively paint the field red using `addCustomError()` if the check fails.
157
-
158
- ```javascript
159
- onFieldChange: function(oEvent) {
160
- const fieldPath = oEvent.getParameter("fieldPath");
161
- const value = oEvent.getParameter("value");
162
- const host = oEvent.getSource();
163
-
164
- if (fieldPath === "Username") {
165
- host.setBusy(true); // Lock the UI5 form
166
-
167
- myBackendService.checkUsername(value).then((isTaken) => {
168
- if (isTaken) {
169
- host.addCustomError("Username", "This username is taken.");
170
- } else {
171
- host.clearCustomError("Username");
172
- }
173
- }).finally(() => {
174
- host.setBusy(false); // Unlock
175
- });
176
- }
177
- }
178
- ```
179
-
180
- ### Fiori Message Manager Integration
181
- By default, validation errors are shown locally. To aggregate validation errors into the global UI5 Message Popover, enable `useMessageManager` on the `DynamicHost`:
182
-
183
- ```xml
184
- <meta:DynamicHost
185
- schemaDefinition="{/mySchema}"
186
- useMessageManager="true"
187
- beforeSubmit=".onBeforeSubmit"
188
- submit=".onSubmit" />
189
- ```
14
+ ## 📚 Documentation
190
15
 
16
+ All comprehensive documentation regarding JSON Schema properties, `ui.*` orchestrations, plugins, and Fiori integrations has been moved to our Wiki.
191
17
 
18
+ Please refer to the **[MetaUI Documentation Wiki](docs/wiki/Home.md)** for full implementation details, API references, and integration guides.
192
19
 
193
20
  ---
194
21
 
@@ -200,4 +27,3 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
200
27
 
201
28
  > [!WARNING]
202
29
  > **Disclaimer**: This software is provided "as is", without warranty of any kind, express or implied. Use of this project in production environments is at your own risk. The authors shall not be liable for any damages or issues arising from its usage.
203
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siliconst/metaui",
3
- "version": "1.4.9",
3
+ "version": "1.4.13",
4
4
  "description": "Dynamic Metadata UI5 Engine",
5
5
  "author": "SiliconStreetDev1",
6
6
  "license": "MIT",
@@ -19,9 +19,7 @@ sap.ui.define(["sap/ui/core/Control", "./host/GeneratorHost", "../utils/Logger",
19
19
  const DynamicHost = Control.extend("nz.co.siliconst.ui5.metaui.controls.DynamicHost", {
20
20
  constructor: function constructor() {
21
21
  Control.prototype.constructor.apply(this, arguments);
22
- this._innerHost = null;
23
22
  this.odataDelegate = null;
24
- this._initializedInner = false;
25
23
  /**
26
24
  * Internal reference to the generated inner host instance.
27
25
  * @private
@@ -159,6 +157,16 @@ sap.ui.define(["sap/ui/core/Control", "./host/GeneratorHost", "../utils/Logger",
159
157
  type: "string"
160
158
  }
161
159
  }
160
+ },
161
+ error: {
162
+ parameters: {
163
+ message: {
164
+ type: "string"
165
+ },
166
+ exception: {
167
+ type: "object"
168
+ }
169
+ }
162
170
  }
163
171
  }
164
172
  },
@@ -169,6 +177,16 @@ sap.ui.define(["sap/ui/core/Control", "./host/GeneratorHost", "../utils/Logger",
169
177
  */
170
178
  initODataDelegate: function _initODataDelegate() {
171
179
  if (!this.odataDelegate) {
180
+ // Guard: If the user explicitly bound dataJson, do not steal the context.
181
+ if (this.getBindingInfo("dataJson")) {
182
+ return;
183
+ }
184
+
185
+ // Guard: If the user explicitly bound 'data' to a specific property path, do not steal the context.
186
+ const dataBinding = this.getBindingInfo("data");
187
+ if (dataBinding && dataBinding.path && dataBinding.path !== "") {
188
+ return;
189
+ }
172
190
  const oContext = this.getBindingContext("odata") || this.getBindingContext();
173
191
  if (oContext) {
174
192
  Logger.debug("[MetaUI DynamicHost]", `Context found for delegate initialization: ${oContext.getPath()}`, "DynamicHost");
@@ -229,7 +247,10 @@ sap.ui.define(["sap/ui/core/Control", "./host/GeneratorHost", "../utils/Logger",
229
247
  const schema = this.getProperty("schemaDefinition");
230
248
  const dataJson = this.getProperty("dataJson");
231
249
  const data = this.getProperty("data");
232
- const hasSchema = !!schema;
250
+ let hasSchema = !!schema;
251
+ if (hasSchema && typeof schema === "object" && Object.keys(schema).length === 0) {
252
+ hasSchema = false; // Treat empty object as no schema
253
+ }
233
254
  const hasData = !!dataJson || !!data;
234
255
  Logger.debug("[MetaUI DynamicHost]", `Evaluating boot. hasSchema: ${hasSchema}, hasData: ${hasData}`, "DynamicHost");
235
256
 
@@ -267,9 +288,12 @@ sap.ui.define(["sap/ui/core/Control", "./host/GeneratorHost", "../utils/Logger",
267
288
  if (eventName === "submit" || eventName === "fieldChange") {
268
289
  const params = oEvent.getParameters();
269
290
  if (params.payload) {
270
- Control.prototype.setProperty.call(this, "data", params.payload, true);
271
- const str = params.payloadJson || JSON.stringify(params.payload, null, 2);
272
- Control.prototype.setProperty.call(this, "dataJson", str, true);
291
+ const isLive = this.getProperty("liveUpdate") === true;
292
+ if (eventName === "submit" || isLive) {
293
+ Control.prototype.setProperty.call(this, "data", params.payload, true);
294
+ const str = params.payloadJson || JSON.stringify(params.payload, null, 2);
295
+ Control.prototype.setProperty.call(this, "dataJson", str, true);
296
+ }
273
297
  }
274
298
  if (eventName === "fieldChange" && this.odataDelegate) {
275
299
  this.odataDelegate.handleFieldChange(params.fieldPath, params.value);
@@ -310,12 +334,14 @@ sap.ui.define(["sap/ui/core/Control", "./host/GeneratorHost", "../utils/Logger",
310
334
  * @param {string} [title="Form"] The title of the dialog
311
335
  * @param {string} [submitButtonText="OK"] The text for the primary action button
312
336
  * @param {string} [cancelButtonText="Cancel"] The text for the cancel button
337
+ * @param {string} [dialogWidth="800px"] The width of the dialog
338
+ * @param {sap.ui.core.Control} [parentView] The parent view to attach the dialog to for model inheritance.
313
339
  */
314
- openInDialog: function _openInDialog(title, submitButtonText, cancelButtonText) {
340
+ openInDialog: function _openInDialog(title, submitButtonText, cancelButtonText, dialogWidth, parentView) {
315
341
  if (!this._innerHost) {
316
342
  this.onBeforeRendering(); // Force init if they bypassed UI5 rendering
317
343
  }
318
- this._innerHost?.openInDialog(title, submitButtonText, cancelButtonText);
344
+ this._innerHost?.openInDialog(title, submitButtonText, cancelButtonText, dialogWidth, parentView);
319
345
  },
320
346
  /**
321
347
  * Proxies submission triggering down to the instantiated generator host.
@@ -329,6 +355,28 @@ sap.ui.define(["sap/ui/core/Control", "./host/GeneratorHost", "../utils/Logger",
329
355
  }
330
356
  return this._innerHost.triggerSubmit();
331
357
  },
358
+ /**
359
+ * Injects a custom error message onto a specific field.
360
+ * Useful for injecting custom backend validation errors.
361
+ *
362
+ * @param {string} fieldPath The schema key path to target.
363
+ * @param {string} message The custom error message to display.
364
+ */
365
+ addCustomError: function _addCustomError(fieldPath, message) {
366
+ if (this._innerHost && typeof this._innerHost.addCustomError === "function") {
367
+ this._innerHost.addCustomError(fieldPath, message);
368
+ }
369
+ },
370
+ /**
371
+ * Clears a custom error message from a specific field.
372
+ *
373
+ * @param {string} fieldPath The schema key path to target.
374
+ */
375
+ clearCustomError: function _clearCustomError(fieldPath) {
376
+ if (this._innerHost && typeof this._innerHost.clearCustomError === "function") {
377
+ this._innerHost.clearCustomError(fieldPath);
378
+ }
379
+ },
332
380
  /**
333
381
  * Overrides standard UI5 getProperty to transparently pull extracted data from the inner host.
334
382
  * Ensures that querying the DynamicHost facade for `data` always yields the freshest payload.
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicHost-dbg.js","names":["GeneratorHost","_interopRequireDefault","__GeneratorHost","Logger","___utils_Logger","ODataDelegate","___host_delegates_ODataDelegate","DynamicHost","Control","extend","constructor","prototype","apply","arguments","_innerHost","odataDelegate","_initializedInner","renderer","apiVersion","render","rm","control","openStart","style","openEnd","content","getAggregation","renderControl","close","metadata","properties","schemaDefinition","type","defaultValue","data","bindable","dataJson","liveUpdate","isValid","useMessageManager","modelName","debugMode","editable","aggregations","_content","multiple","visibility","events","beforeSubmit","parameters","payload","addError","preventDefault","submit","payloadJson","cancel","fieldChange","fieldPath","value","validationStateChanged","validationError","message","validationSuccess","initODataDelegate","_initODataDelegate","oContext","getBindingContext","debug","getPath","requestObject","syncToEngine","Object","keys","setBindingContext","_setBindingContext","sModelName","Control.prototype.setBindingContext.call","bindElement","_bindElement","vPath","mParameters","Control.prototype.bindElement.call","model","undefined","oBinding","getElementBinding","attachChange","onBeforeRendering","_onBeforeRendering","schema","getProperty","hasSchema","hasData","props","getMetadata","getProperties","propName","val","Control.prototype.getProperty.call","setProperty","setAggregation","getEvents","eventName","attachEvent","oEvent","params","getParameters","Control.prototype.setProperty.call","str","JSON","stringify","handleFieldChange","fireEvent","_setProperty","propertyName","suppressInvalidate","openInDialog","_openInDialog","title","submitButtonText","cancelButtonText","triggerSubmit","_triggerSubmit","_getProperty"],"sources":["DynamicHost.ts"],"sourcesContent":["import Control from \"sap/ui/core/Control\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport GeneratorHost from \"./host/GeneratorHost\";\nimport { Logger } from \"../utils/Logger\";\nimport { ODataDelegate } from \"./host/delegates/ODataDelegate\";\nimport ODataV4Context from \"sap/ui/model/odata/v4/Context\";\n\n/**\n * A transparent wrapper control (Facade) that automatically chooses between Explicit Schema Mode \n * and Inference Mode based on the presence of a 'schemaDefinition'.\n * \n * This maintains total architectural separation of the modes without forcing developers to \n * use different XML tags.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nexport default class DynamicHost extends Control {\n private _innerHost: GeneratorHost | null = null;\n private odataDelegate: ODataDelegate | null = null;\n private _initializedInner: boolean = false;\n\n static readonly metadata = {\n properties: {\n schemaDefinition: { type: \"any\", defaultValue: null },\n data: { type: \"object\", defaultValue: null, bindable: \"bindable\" },\n dataJson: { type: \"string\", defaultValue: null, bindable: \"bindable\" },\n liveUpdate: { type: \"boolean\", defaultValue: false },\n isValid: { type: \"boolean\", defaultValue: true },\n useMessageManager: { type: \"boolean\", defaultValue: false },\n modelName: { type: \"string\", defaultValue: \"meta\" },\n debugMode: { type: \"boolean\", defaultValue: false },\n editable: { type: \"boolean\", defaultValue: true }\n },\n aggregations: {\n _content: { type: \"sap.ui.core.Control\", multiple: false, visibility: \"hidden\" }\n },\n events: {\n beforeSubmit: {\n parameters: {\n payload: { type: \"object\" },\n addError: { type: \"function\" },\n preventDefault: { type: \"function\" }\n }\n },\n submit: {\n parameters: {\n payload: { type: \"object\" },\n payloadJson: { type: \"string\" }\n }\n },\n cancel: {},\n fieldChange: {\n parameters: {\n fieldPath: { type: \"string\" },\n value: { type: \"any\" },\n payload: { type: \"object\" },\n isValid: { type: \"boolean\" }\n }\n },\n validationStateChanged: { parameters: { isValid: { type: \"boolean\" } } },\n validationError: { parameters: { fieldPath: { type: \"string\" }, message: { type: \"string\" } } },\n validationSuccess: { parameters: { fieldPath: { type: \"string\" } } }\n }\n };\n\n static renderer = {\n apiVersion: 2,\n render(rm: RenderManager, control: DynamicHost) {\n rm.openStart(\"div\", control);\n rm.style(\"width\", \"100%\");\n rm.style(\"height\", \"100%\");\n rm.openEnd();\n\n const content = control.getAggregation(\"_content\") as Control;\n if (content) {\n rm.renderControl(content);\n }\n\n rm.close(\"div\");\n }\n };\n\n /**\n * Internal reference to the generated inner host instance.\n * @private\n */\n private _innerHost: GeneratorHost | null = null;\n \n /**\n * Flag indicating if the inner host has been initialized.\n * @private\n */\n private _initializedInner: boolean = false;\n\n /**\n * Initializes the OData Delegate if an OData context is detected.\n * This allows DynamicHost to seamlessly synchronize metadata and properties from an OData model.\n * @private\n */\n private initODataDelegate(): void {\n if (!this.odataDelegate) {\n const oContext = this.getBindingContext(\"odata\") || this.getBindingContext();\n if (oContext) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context found for delegate initialization: ${oContext.getPath()}`, \"DynamicHost\");\n if (oContext && (oContext as ODataV4Context).requestObject && typeof (oContext as ODataV4Context).requestObject === \"function\") {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context supports requestObject/getObject. Instantiating ODataDelegate.`, \"DynamicHost\");\n this.odataDelegate = new ODataDelegate(this, oContext as ODataV4Context);\n this.odataDelegate.syncToEngine();\n } else {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context does NOT support requestObject/getObject! Keys: ${Object.keys(oContext)}`, \"DynamicHost\");\n }\n }\n }\n }\n\n /**\n * Standard UI5 method override.\n * Sets the binding context for the control and attempts to initialize the OData delegate\n * if the context points to an OData model.\n * \n * @param {sap.ui.model.Context | null | undefined} oContext The binding context object\n * @param {string} [sModelName] Optional model name\n * @returns {this} The control instance for chaining\n */\n public setBindingContext(oContext: sap.ui.model.Context | null | undefined, sModelName?: string): this {\n super.setBindingContext(oContext, sModelName);\n this.initODataDelegate();\n return this;\n }\n\n /**\n * Standard UI5 method override.\n * Binds the element to the given path and attaches a change listener to re-evaluate\n * the OData delegate when the element binding resolves.\n * \n * @param {string | Record<string, unknown>} vPath The binding path or configuration object\n * @param {object} [mParameters] Optional mapping parameters\n * @returns {this} Reference to this instance for chaining\n */\n public bindElement(vPath: string | Record<string, unknown>, mParameters?: object): this {\n super.bindElement(vPath, mParameters);\n const sModelName = typeof vPath === \"object\" ? vPath.model : undefined;\n const oBinding = this.getElementBinding(sModelName);\n if (oBinding) {\n oBinding.attachChange(() => {\n this.initODataDelegate();\n });\n }\n return this;\n }\n\n /**\n * Standard UI5 Lifecycle Hook.\n * Evaluates the initial properties and spawns the GeneratorHost.\n * It handles the complex lifecycle task of copying all bindings, raw properties, and event listeners \n * down to the inner host perfectly transparently.\n */\n public onBeforeRendering(): void {\n Logger.debug(\"[MetaUI DynamicHost]\", `onBeforeRendering called. _initializedInner: ${this._initializedInner}`, \"DynamicHost\");\n\n this.initODataDelegate();\n\n if (!this._initializedInner) {\n const schema = this.getProperty(\"schemaDefinition\");\n const dataJson = this.getProperty(\"dataJson\");\n const data = this.getProperty(\"data\");\n\n const hasSchema = !!schema;\n const hasData = !!dataJson || !!data;\n\n Logger.debug(\"[MetaUI DynamicHost]\", `Evaluating boot. hasSchema: ${hasSchema}, hasData: ${hasData}`, \"DynamicHost\");\n\n // Only boot if we have either a schema or some data to infer from\n if (hasSchema || hasData) {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Booting inner host. hasSchema: ${hasSchema}, hasData: ${hasData}`, \"DynamicHost\");\n }\n // The architectural Facade router logic:\n // We've simplified this! We no longer use HostFactory or separate subclasses.\n // GeneratorHost is fully capable of inferring the schema if none is provided.\n this._innerHost = new GeneratorHost();\n\n // 1. Forward all static values to the spawned host BEFORE mounting.\n // Since we no longer use bindProperty, it's perfectly safe to set raw properties before mounting.\n const props = this.getMetadata().getProperties();\n for (const propName in props) {\n const val = super.getProperty(propName);\n if (val !== null && val !== undefined) {\n this._innerHost.setProperty(propName, val);\n }\n }\n\n // 2. Mount so it inherits models and triggers lifecycle.\n this.setAggregation(\"_content\", this._innerHost);\n\n // 3. Forward all event subscriptions.\n // By proxying the events upwards, the developer can subscribe to `<meta:DynamicHost submit=\"...\">` \n // and perfectly receive the inner host's submission event.\n const events = this.getMetadata().getEvents();\n for (const eventName in events) {\n this._innerHost.attachEvent(eventName, (oEvent: sap.ui.base.Event) => {\n // Natively push updated payload out to any bound Fiori Element properties.\n // Using super.setProperty prevents an infinite loop back down to _innerHost.\n if (eventName === \"submit\" || eventName === \"fieldChange\") {\n const params = oEvent.getParameters();\n if (params.payload) {\n super.setProperty(\"data\", params.payload, true);\n\n const str = params.payloadJson || JSON.stringify(params.payload, null, 2);\n super.setProperty(\"dataJson\", str, true);\n }\n if (eventName === \"fieldChange\" && this.odataDelegate) {\n this.odataDelegate.handleFieldChange(params.fieldPath, params.value);\n }\n }\n this.fireEvent(eventName, oEvent.getParameters());\n });\n }\n\n this._initializedInner = true;\n }\n }\n }\n\n /**\n * Overrides standard UI5 setProperty to act as a transparent proxy.\n * When a property is updated on the wrapper (either programmatically or via a binding update),\n * it instantly mirrors that value down to the inner instantiated host.\n */\n public setProperty(propertyName: string, value: unknown, suppressInvalidate?: boolean): this {\n if (propertyName === \"data\" || propertyName === \"dataJson\" || propertyName === \"schemaDefinition\") {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Wrapper received setProperty: ${propertyName}`, \"DynamicHost\");\n }\n }\n super.setProperty(propertyName, value, suppressInvalidate);\n if (this._innerHost) {\n this._innerHost.setProperty(propertyName, value, suppressInvalidate);\n } else if (propertyName === \"data\" || propertyName === \"dataJson\" || propertyName === \"schemaDefinition\") {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `_innerHost not yet initialized when ${propertyName} was set. Booting will happen on next render.`, \"DynamicHost\");\n }\n }\n return this;\n }\n\n\n\n\n\n /**\n * Programmatic API support. Routes dialog commands down to the spawned inner host.\n * If the inner host has not booted yet, it forces initialization immediately.\n * \n * @param {string} [title=\"Form\"] The title of the dialog\n * @param {string} [submitButtonText=\"OK\"] The text for the primary action button\n * @param {string} [cancelButtonText=\"Cancel\"] The text for the cancel button\n */\n public openInDialog(title?: string, submitButtonText?: string, cancelButtonText?: string): void {\n if (!this._innerHost) {\n this.onBeforeRendering(); // Force init if they bypassed UI5 rendering\n }\n this._innerHost?.openInDialog(title, submitButtonText, cancelButtonText);\n }\n\n /**\n * Proxies submission triggering down to the instantiated generator host.\n * Evaluates the internal Engine validation suite and returns true if structurally sound.\n * \n * @returns {boolean} True if the internal payload passes schema validation, false otherwise.\n */\n public triggerSubmit(): boolean {\n if (!this._innerHost) {\n return false;\n }\n return this._innerHost.triggerSubmit();\n }\n\n /**\n * Overrides standard UI5 getProperty to transparently pull extracted data from the inner host.\n * Ensures that querying the DynamicHost facade for `data` always yields the freshest payload.\n * \n * @param {string} propertyName The name of the property to retrieve\n * @returns {unknown} The property value\n */\n public getProperty(propertyName: string): unknown {\n if (propertyName === \"outputData\") {\n propertyName = \"data\"; // Forward deprecated outputData to data\n }\n if (this._innerHost && (propertyName === \"data\" || propertyName === \"dataJson\")) {\n return this._innerHost.getProperty(propertyName);\n }\n return super.getProperty(propertyName);\n }\n}\n"],"mappings":";;;;;;QAEOA,aAAa,GAAAC,sBAAA,CAAAC,eAAA;EAAA,MACXC,MAAM,GAAAC,eAAA;EAAA,MACNC,aAAa,GAAAC,+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AW,CAAC,WAAW,CAAC,EAAE;UAC/BvF,MAAM,CAACgE,KAAK,CAAC,sBAAsB,EAAE,uCAAuC+C,YAAY,+CAA+C,EAAE,aAAa,CAAC;QAC3J;MACJ;MACA,OAAO,IAAI;IACf,CAAC;IAMD;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;IACWE,YAAY,WAAAC,cAACC,KAAc,EAAEC,gBAAyB,EAAEC,gBAAyB,EAAQ;MAC5F,IAAI,CAAC,IAAI,CAAC1G,UAAU,EAAE;QAClB,IAAI,CAACyE,iBAAiB,CAAC,CAAC,CAAC,CAAC;MAC9B;MACA,IAAI,CAACzE,UAAU,EAAEsG,YAAY,CAACE,KAAK,EAAEC,gBAAgB,EAAEC,gBAAgB,CAAC;IAC5E,CAAC;IAED;AACJ;AACA;AACA;AACA;AACA;IACWC,aAAa,WAAAC,eAAA,EAAY;MAC5B,IAAI,CAAC,IAAI,CAAC5G,UAAU,EAAE;QAClB,OAAO,KAAK;MAChB;MACA,OAAO,IAAI,CAACA,UAAU,CAAC2G,aAAa,CAAC,CAAC;IAC1C,CAAC;IAED;AACJ;AACA;AACA;AACA;AACA;AACA;IACW/B,WAAW,WAAAiC,aAACT,YAAoB,EAAW;MAC9C,IAAIA,YAAY,KAAK,YAAY,EAAE;QAC/BA,YAAY,GAAG,MAAM,CAAC,CAAC;MAC3B;MACA,IAAI,IAAI,CAACpG,UAAU,KAAKoG,YAAY,KAAK,MAAM,IAAIA,YAAY,KAAK,UAAU,CAAC,EAAE;QAC7E,OAAO,IAAI,CAACpG,UAAU,CAAC4E,WAAW,CAACwB,YAAY,CAAC;MACpD;MACA,OAAAhB,kCAAA,OAAyBgB,YAAY;IACzC;EAAC;EAAA,OArRgB3G,WAAW;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"DynamicHost-dbg.js","names":["GeneratorHost","_interopRequireDefault","__GeneratorHost","Logger","___utils_Logger","ODataDelegate","___host_delegates_ODataDelegate","DynamicHost","Control","extend","constructor","prototype","apply","arguments","odataDelegate","_innerHost","_initializedInner","renderer","apiVersion","render","rm","control","openStart","style","openEnd","content","getAggregation","renderControl","close","metadata","properties","schemaDefinition","type","defaultValue","data","bindable","dataJson","liveUpdate","isValid","useMessageManager","modelName","debugMode","editable","aggregations","_content","multiple","visibility","events","beforeSubmit","parameters","payload","addError","preventDefault","submit","payloadJson","cancel","fieldChange","fieldPath","value","validationStateChanged","validationError","message","validationSuccess","error","exception","initODataDelegate","_initODataDelegate","getBindingInfo","dataBinding","path","oContext","getBindingContext","debug","getPath","requestObject","syncToEngine","Object","keys","setBindingContext","_setBindingContext","sModelName","Control.prototype.setBindingContext.call","bindElement","_bindElement","vPath","mParameters","Control.prototype.bindElement.call","model","undefined","oBinding","getElementBinding","attachChange","onBeforeRendering","_onBeforeRendering","schema","getProperty","hasSchema","length","hasData","props","getMetadata","getProperties","propName","val","Control.prototype.getProperty.call","setProperty","setAggregation","getEvents","eventName","attachEvent","oEvent","params","getParameters","isLive","Control.prototype.setProperty.call","str","JSON","stringify","handleFieldChange","fireEvent","_setProperty","propertyName","suppressInvalidate","openInDialog","_openInDialog","title","submitButtonText","cancelButtonText","dialogWidth","parentView","triggerSubmit","_triggerSubmit","addCustomError","_addCustomError","clearCustomError","_clearCustomError","_getProperty"],"sources":["DynamicHost.ts"],"sourcesContent":["import Control from \"sap/ui/core/Control\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport GeneratorHost from \"./host/GeneratorHost\";\nimport { Logger } from \"../utils/Logger\";\nimport { ODataDelegate } from \"./host/delegates/ODataDelegate\";\nimport ODataV4Context from \"sap/ui/model/odata/v4/Context\";\n\n/**\n * A transparent wrapper control (Facade) that automatically chooses between Explicit Schema Mode \n * and Inference Mode based on the presence of a 'schemaDefinition'.\n * \n * This maintains total architectural separation of the modes without forcing developers to \n * use different XML tags.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nexport default class DynamicHost extends Control {\n private odataDelegate: ODataDelegate | null = null;\n\n static readonly metadata = {\n properties: {\n schemaDefinition: { type: \"any\", defaultValue: null },\n data: { type: \"object\", defaultValue: null, bindable: \"bindable\" },\n dataJson: { type: \"string\", defaultValue: null, bindable: \"bindable\" },\n liveUpdate: { type: \"boolean\", defaultValue: false },\n isValid: { type: \"boolean\", defaultValue: true },\n useMessageManager: { type: \"boolean\", defaultValue: false },\n modelName: { type: \"string\", defaultValue: \"meta\" },\n debugMode: { type: \"boolean\", defaultValue: false },\n editable: { type: \"boolean\", defaultValue: true }\n },\n aggregations: {\n _content: { type: \"sap.ui.core.Control\", multiple: false, visibility: \"hidden\" }\n },\n events: {\n beforeSubmit: {\n parameters: {\n payload: { type: \"object\" },\n addError: { type: \"function\" },\n preventDefault: { type: \"function\" }\n }\n },\n submit: {\n parameters: {\n payload: { type: \"object\" },\n payloadJson: { type: \"string\" }\n }\n },\n cancel: {},\n fieldChange: {\n parameters: {\n fieldPath: { type: \"string\" },\n value: { type: \"any\" },\n payload: { type: \"object\" },\n isValid: { type: \"boolean\" }\n }\n },\n validationStateChanged: { parameters: { isValid: { type: \"boolean\" } } },\n validationError: { parameters: { fieldPath: { type: \"string\" }, message: { type: \"string\" } } },\n validationSuccess: { parameters: { fieldPath: { type: \"string\" } } },\n error: { parameters: { message: { type: \"string\" }, exception: { type: \"object\" } } }\n }\n };\n\n static renderer = {\n apiVersion: 2,\n render(rm: RenderManager, control: DynamicHost) {\n rm.openStart(\"div\", control);\n rm.style(\"width\", \"100%\");\n rm.style(\"height\", \"100%\");\n rm.openEnd();\n\n const content = control.getAggregation(\"_content\") as Control;\n if (content) {\n rm.renderControl(content);\n }\n\n rm.close(\"div\");\n }\n };\n\n /**\n * Internal reference to the generated inner host instance.\n * @private\n */\n private _innerHost: GeneratorHost | null = null;\n \n /**\n * Flag indicating if the inner host has been initialized.\n * @private\n */\n private _initializedInner: boolean = false;\n\n /**\n * Initializes the OData Delegate if an OData context is detected.\n * This allows DynamicHost to seamlessly synchronize metadata and properties from an OData model.\n * @private\n */\n private initODataDelegate(): void {\n if (!this.odataDelegate) {\n // Guard: If the user explicitly bound dataJson, do not steal the context.\n if (this.getBindingInfo(\"dataJson\")) {\n return;\n }\n\n // Guard: If the user explicitly bound 'data' to a specific property path, do not steal the context.\n const dataBinding = this.getBindingInfo(\"data\") as any;\n if (dataBinding && dataBinding.path && dataBinding.path !== \"\") {\n return;\n }\n\n const oContext = this.getBindingContext(\"odata\") || this.getBindingContext();\n if (oContext) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context found for delegate initialization: ${oContext.getPath()}`, \"DynamicHost\");\n if (oContext && (oContext as ODataV4Context).requestObject && typeof (oContext as ODataV4Context).requestObject === \"function\") {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context supports requestObject/getObject. Instantiating ODataDelegate.`, \"DynamicHost\");\n this.odataDelegate = new ODataDelegate(this, oContext as ODataV4Context);\n this.odataDelegate.syncToEngine();\n } else {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context does NOT support requestObject/getObject! Keys: ${Object.keys(oContext)}`, \"DynamicHost\");\n }\n }\n }\n }\n\n /**\n * Standard UI5 method override.\n * Sets the binding context for the control and attempts to initialize the OData delegate\n * if the context points to an OData model.\n * \n * @param {sap.ui.model.Context | null | undefined} oContext The binding context object\n * @param {string} [sModelName] Optional model name\n * @returns {this} The control instance for chaining\n */\n public setBindingContext(oContext: sap.ui.model.Context | null | undefined, sModelName?: string): this {\n super.setBindingContext(oContext, sModelName);\n this.initODataDelegate();\n return this;\n }\n\n /**\n * Standard UI5 method override.\n * Binds the element to the given path and attaches a change listener to re-evaluate\n * the OData delegate when the element binding resolves.\n * \n * @param {string | Record<string, unknown>} vPath The binding path or configuration object\n * @param {object} [mParameters] Optional mapping parameters\n * @returns {this} Reference to this instance for chaining\n */\n public bindElement(vPath: string | Record<string, unknown>, mParameters?: object): this {\n super.bindElement(vPath, mParameters);\n const sModelName = typeof vPath === \"object\" ? vPath.model : undefined;\n const oBinding = this.getElementBinding(sModelName);\n if (oBinding) {\n oBinding.attachChange(() => {\n this.initODataDelegate();\n });\n }\n return this;\n }\n\n /**\n * Standard UI5 Lifecycle Hook.\n * Evaluates the initial properties and spawns the GeneratorHost.\n * It handles the complex lifecycle task of copying all bindings, raw properties, and event listeners \n * down to the inner host perfectly transparently.\n */\n public onBeforeRendering(): void {\n Logger.debug(\"[MetaUI DynamicHost]\", `onBeforeRendering called. _initializedInner: ${this._initializedInner}`, \"DynamicHost\");\n\n this.initODataDelegate();\n\n if (!this._initializedInner) {\n const schema = this.getProperty(\"schemaDefinition\");\n const dataJson = this.getProperty(\"dataJson\");\n const data = this.getProperty(\"data\");\n\n let hasSchema = !!schema;\n if (hasSchema && typeof schema === \"object\" && Object.keys(schema).length === 0) {\n hasSchema = false; // Treat empty object as no schema\n }\n \n const hasData = !!dataJson || !!data;\n\n Logger.debug(\"[MetaUI DynamicHost]\", `Evaluating boot. hasSchema: ${hasSchema}, hasData: ${hasData}`, \"DynamicHost\");\n\n // Only boot if we have either a schema or some data to infer from\n if (hasSchema || hasData) {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Booting inner host. hasSchema: ${hasSchema}, hasData: ${hasData}`, \"DynamicHost\");\n }\n // The architectural Facade router logic:\n // We've simplified this! We no longer use HostFactory or separate subclasses.\n // GeneratorHost is fully capable of inferring the schema if none is provided.\n this._innerHost = new GeneratorHost();\n\n // 1. Forward all static values to the spawned host BEFORE mounting.\n // Since we no longer use bindProperty, it's perfectly safe to set raw properties before mounting.\n const props = this.getMetadata().getProperties();\n for (const propName in props) {\n const val = super.getProperty(propName);\n if (val !== null && val !== undefined) {\n this._innerHost.setProperty(propName, val);\n }\n }\n\n // 2. Mount so it inherits models and triggers lifecycle.\n this.setAggregation(\"_content\", this._innerHost);\n\n // 3. Forward all event subscriptions.\n // By proxying the events upwards, the developer can subscribe to `<meta:DynamicHost submit=\"...\">` \n // and perfectly receive the inner host's submission event.\n const events = this.getMetadata().getEvents();\n for (const eventName in events) {\n this._innerHost.attachEvent(eventName, (oEvent: sap.ui.base.Event) => {\n // Natively push updated payload out to any bound Fiori Element properties.\n // Using super.setProperty prevents an infinite loop back down to _innerHost.\n if (eventName === \"submit\" || eventName === \"fieldChange\") {\n const params = oEvent.getParameters();\n if (params.payload) {\n const isLive = this.getProperty(\"liveUpdate\") === true;\n if (eventName === \"submit\" || isLive) {\n super.setProperty(\"data\", params.payload, true);\n\n const str = params.payloadJson || JSON.stringify(params.payload, null, 2);\n super.setProperty(\"dataJson\", str, true);\n }\n }\n if (eventName === \"fieldChange\" && this.odataDelegate) {\n this.odataDelegate.handleFieldChange(params.fieldPath, params.value);\n }\n }\n this.fireEvent(eventName, oEvent.getParameters());\n });\n }\n\n this._initializedInner = true;\n }\n }\n }\n\n /**\n * Overrides standard UI5 setProperty to act as a transparent proxy.\n * When a property is updated on the wrapper (either programmatically or via a binding update),\n * it instantly mirrors that value down to the inner instantiated host.\n */\n public setProperty(propertyName: string, value: unknown, suppressInvalidate?: boolean): this {\n if (propertyName === \"data\" || propertyName === \"dataJson\" || propertyName === \"schemaDefinition\") {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Wrapper received setProperty: ${propertyName}`, \"DynamicHost\");\n }\n }\n super.setProperty(propertyName, value, suppressInvalidate);\n if (this._innerHost) {\n this._innerHost.setProperty(propertyName, value, suppressInvalidate);\n } else if (propertyName === \"data\" || propertyName === \"dataJson\" || propertyName === \"schemaDefinition\") {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `_innerHost not yet initialized when ${propertyName} was set. Booting will happen on next render.`, \"DynamicHost\");\n }\n }\n return this;\n }\n\n\n\n\n\n /**\n * Programmatic API support. Routes dialog commands down to the spawned inner host.\n * If the inner host has not booted yet, it forces initialization immediately.\n * \n * @param {string} [title=\"Form\"] The title of the dialog\n * @param {string} [submitButtonText=\"OK\"] The text for the primary action button\n * @param {string} [cancelButtonText=\"Cancel\"] The text for the cancel button\n * @param {string} [dialogWidth=\"800px\"] The width of the dialog\n * @param {sap.ui.core.Control} [parentView] The parent view to attach the dialog to for model inheritance.\n */\n public openInDialog(title?: string, submitButtonText?: string, cancelButtonText?: string, dialogWidth?: string, parentView?: Control): void {\n if (!this._innerHost) {\n this.onBeforeRendering(); // Force init if they bypassed UI5 rendering\n }\n this._innerHost?.openInDialog(title, submitButtonText, cancelButtonText, dialogWidth, parentView);\n }\n\n /**\n * Proxies submission triggering down to the instantiated generator host.\n * Evaluates the internal Engine validation suite and returns true if structurally sound.\n * \n * @returns {boolean} True if the internal payload passes schema validation, false otherwise.\n */\n public triggerSubmit(): boolean {\n if (!this._innerHost) {\n return false;\n }\n return this._innerHost.triggerSubmit();\n }\n\n /**\n * Injects a custom error message onto a specific field.\n * Useful for injecting custom backend validation errors.\n * \n * @param {string} fieldPath The schema key path to target.\n * @param {string} message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this._innerHost && typeof (this._innerHost as any).addCustomError === \"function\") {\n (this._innerHost as any).addCustomError(fieldPath, message);\n }\n }\n\n /**\n * Clears a custom error message from a specific field.\n * \n * @param {string} fieldPath The schema key path to target.\n */\n public clearCustomError(fieldPath: string): void {\n if (this._innerHost && typeof (this._innerHost as any).clearCustomError === \"function\") {\n (this._innerHost as any).clearCustomError(fieldPath);\n }\n }\n\n /**\n * Overrides standard UI5 getProperty to transparently pull extracted data from the inner host.\n * Ensures that querying the DynamicHost facade for `data` always yields the freshest payload.\n * \n * @param {string} propertyName The name of the property to retrieve\n * @returns {unknown} The property value\n */\n public getProperty(propertyName: string): unknown {\n if (propertyName === \"outputData\") {\n propertyName = \"data\"; // Forward deprecated outputData to data\n }\n if (this._innerHost && (propertyName === \"data\" || propertyName === \"dataJson\")) {\n return this._innerHost.getProperty(propertyName);\n }\n return super.getProperty(propertyName);\n }\n}\n"],"mappings":";;;;;;QAEOA,aAAa,GAAAC,sBAAA,CAAAC,eAAA;EAAA,MACXC,MAAM,GAAAC,eAAA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ACJ;AACA;AACA;AACA;AACA;IACWC,aAAa,WAAAC,eAAA,EAAY;MAC5B,IAAI,CAAC,IAAI,CAACpH,UAAU,EAAE;QAClB,OAAO,KAAK;MAChB;MACA,OAAO,IAAI,CAACA,UAAU,CAACmH,aAAa,CAAC,CAAC;IAC1C,CAAC;IAED;AACJ;AACA;AACA;AACA;AACA;AACA;IACWE,cAAc,WAAAC,gBAAC5E,SAAiB,EAAEI,OAAe,EAAQ;MAC5D,IAAI,IAAI,CAAC9C,UAAU,IAAI,OAAQ,IAAI,CAACA,UAAU,CAASqH,cAAc,KAAK,UAAU,EAAE;QACjF,IAAI,CAACrH,UAAU,CAASqH,cAAc,CAAC3E,SAAS,EAAEI,OAAO,CAAC;MAC/D;IACJ,CAAC;IAED;AACJ;AACA;AACA;AACA;IACWyE,gBAAgB,WAAAC,kBAAC9E,SAAiB,EAAQ;MAC7C,IAAI,IAAI,CAAC1C,UAAU,IAAI,OAAQ,IAAI,CAACA,UAAU,CAASuH,gBAAgB,KAAK,UAAU,EAAE;QACnF,IAAI,CAACvH,UAAU,CAASuH,gBAAgB,CAAC7E,SAAS,CAAC;MACxD;IACJ,CAAC;IAED;AACJ;AACA;AACA;AACA;AACA;AACA;IACWsC,WAAW,WAAAyC,aAACf,YAAoB,EAAW;MAC9C,IAAIA,YAAY,KAAK,YAAY,EAAE;QAC/BA,YAAY,GAAG,MAAM,CAAC,CAAC;MAC3B;MACA,IAAI,IAAI,CAAC1G,UAAU,KAAK0G,YAAY,KAAK,MAAM,IAAIA,YAAY,KAAK,UAAU,CAAC,EAAE;QAC7E,OAAO,IAAI,CAAC1G,UAAU,CAACgF,WAAW,CAAC0B,YAAY,CAAC;MACpD;MACA,OAAAjB,kCAAA,OAAyBiB,YAAY;IACzC;EAAC;EAAA,OAhUgBlH,WAAW;AAAA","ignoreList":[]}
@@ -11,9 +11,7 @@ declare module "nz/co/siliconst/ui5/metaui/controls/DynamicHost" {
11
11
  * @namespace nz.co.siliconst.ui5.metaui.controls
12
12
  */
13
13
  export default class DynamicHost extends Control {
14
- private _innerHost;
15
14
  private odataDelegate;
16
- private _initializedInner;
17
15
  static readonly metadata: {
18
16
  properties: {
19
17
  schemaDefinition: {
@@ -127,6 +125,16 @@ declare module "nz/co/siliconst/ui5/metaui/controls/DynamicHost" {
127
125
  };
128
126
  };
129
127
  };
128
+ error: {
129
+ parameters: {
130
+ message: {
131
+ type: string;
132
+ };
133
+ exception: {
134
+ type: string;
135
+ };
136
+ };
137
+ };
130
138
  };
131
139
  };
132
140
  static renderer: {
@@ -189,8 +197,10 @@ declare module "nz/co/siliconst/ui5/metaui/controls/DynamicHost" {
189
197
  * @param {string} [title="Form"] The title of the dialog
190
198
  * @param {string} [submitButtonText="OK"] The text for the primary action button
191
199
  * @param {string} [cancelButtonText="Cancel"] The text for the cancel button
200
+ * @param {string} [dialogWidth="800px"] The width of the dialog
201
+ * @param {sap.ui.core.Control} [parentView] The parent view to attach the dialog to for model inheritance.
192
202
  */
193
- openInDialog(title?: string, submitButtonText?: string, cancelButtonText?: string): void;
203
+ openInDialog(title?: string, submitButtonText?: string, cancelButtonText?: string, dialogWidth?: string, parentView?: Control): void;
194
204
  /**
195
205
  * Proxies submission triggering down to the instantiated generator host.
196
206
  * Evaluates the internal Engine validation suite and returns true if structurally sound.
@@ -198,6 +208,20 @@ declare module "nz/co/siliconst/ui5/metaui/controls/DynamicHost" {
198
208
  * @returns {boolean} True if the internal payload passes schema validation, false otherwise.
199
209
  */
200
210
  triggerSubmit(): boolean;
211
+ /**
212
+ * Injects a custom error message onto a specific field.
213
+ * Useful for injecting custom backend validation errors.
214
+ *
215
+ * @param {string} fieldPath The schema key path to target.
216
+ * @param {string} message The custom error message to display.
217
+ */
218
+ addCustomError(fieldPath: string, message: string): void;
219
+ /**
220
+ * Clears a custom error message from a specific field.
221
+ *
222
+ * @param {string} fieldPath The schema key path to target.
223
+ */
224
+ clearCustomError(fieldPath: string): void;
201
225
  /**
202
226
  * Overrides standard UI5 getProperty to transparently pull extracted data from the inner host.
203
227
  * Ensures that querying the DynamicHost facade for `data` always yields the freshest payload.
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicHost.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,iDAAiD,CAAC;IACjE,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAC1C,OAAO,aAAa,MAAM,2BAA2B,CAAC;IAMtD;;;;;;;;OAQG;IACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;QAC5C,OAAO,CAAC,UAAU,CAA8B;QAChD,OAAO,CAAC,aAAa,CAA8B;QACnD,OAAO,CAAC,iBAAiB,CAAkB;QAE3C,MAAM,CAAC,QAAQ,CAAC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA0CtB;QAEF,MAAM,CAAC,QAAQ;;uBAEA,aAAa,WAAW,WAAW;UAahD;QAEF;;;WAGG;QACH,OAAO,CAAC,UAAU,CAA8B;QAEhD;;;WAGG;QACH,OAAO,CAAC,iBAAiB,CAAkB;QAE3C;;;;WAIG;QACH,OAAO,CAAC,iBAAiB;QAgBzB;;;;;;;;WAQG;QACI,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,GAAG,SAAS,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI;QAMtG;;;;;;;;WAQG;QACI,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI;QAYvF;;;;;WAKG;QACI,iBAAiB,IAAI,IAAI;QAmEhC;;;;WAIG;QACI,WAAW,CAAC,YAAY,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;;WAQG;QACI,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI;QAYvF;;;;;WAKG;QACI,iBAAiB,IAAI,IAAI;QA0EhC;;;;WAIG;QACI,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,OAAO,GAAG,IAAI;QAqB5F;;;;;;;;;WASG;QACI,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI;QAO3I;;;;;WAKG;QACI,aAAa,IAAI,OAAO;QAO/B;;;;;;WAMG;QACI,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;QAM/D;;;;WAIG;QACI,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;QAMhD;;;;;;WAMG;QACI,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;KASpD;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["sap/ui/core/Control","./host/GeneratorHost","../utils/Logger","./host/delegates/ODataDelegate"],function(t,e,n,i){"use strict";function a(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const o=a(e);const s=n["Logger"];const r=i["ODataDelegate"];const l=t.extend("nz.co.siliconst.ui5.metaui.controls.DynamicHost",{constructor:function e(){t.prototype.constructor.apply(this,arguments);this._innerHost=null;this.odataDelegate=null;this._initializedInner=false;this._innerHost=null;this._initializedInner=false},renderer:{apiVersion:2,render(t,e){t.openStart("div",e);t.style("width","100%");t.style("height","100%");t.openEnd();const n=e.getAggregation("_content");if(n){t.renderControl(n)}t.close("div")}},metadata:{properties:{schemaDefinition:{type:"any",defaultValue:null},data:{type:"object",defaultValue:null,bindable:"bindable"},dataJson:{type:"string",defaultValue:null,bindable:"bindable"},liveUpdate:{type:"boolean",defaultValue:false},isValid:{type:"boolean",defaultValue:true},useMessageManager:{type:"boolean",defaultValue:false},modelName:{type:"string",defaultValue:"meta"},debugMode:{type:"boolean",defaultValue:false},editable:{type:"boolean",defaultValue:true}},aggregations:{_content:{type:"sap.ui.core.Control",multiple:false,visibility:"hidden"}},events:{beforeSubmit:{parameters:{payload:{type:"object"},addError:{type:"function"},preventDefault:{type:"function"}}},submit:{parameters:{payload:{type:"object"},payloadJson:{type:"string"}}},cancel:{},fieldChange:{parameters:{fieldPath:{type:"string"},value:{type:"any"},payload:{type:"object"},isValid:{type:"boolean"}}},validationStateChanged:{parameters:{isValid:{type:"boolean"}}},validationError:{parameters:{fieldPath:{type:"string"},message:{type:"string"}}},validationSuccess:{parameters:{fieldPath:{type:"string"}}}}},initODataDelegate:function t(){if(!this.odataDelegate){const t=this.getBindingContext("odata")||this.getBindingContext();if(t){s.debug("[MetaUI DynamicHost]",`Context found for delegate initialization: ${t.getPath()}`,"DynamicHost");if(t&&t.requestObject&&typeof t.requestObject==="function"){s.debug("[MetaUI DynamicHost]",`Context supports requestObject/getObject. Instantiating ODataDelegate.`,"DynamicHost");this.odataDelegate=new r(this,t);this.odataDelegate.syncToEngine()}else{s.debug("[MetaUI DynamicHost]",`Context does NOT support requestObject/getObject! Keys: ${Object.keys(t)}`,"DynamicHost")}}}},setBindingContext:function e(n,i){t.prototype.setBindingContext.call(this,n,i);this.initODataDelegate();return this},bindElement:function e(n,i){t.prototype.bindElement.call(this,n,i);const a=typeof n==="object"?n.model:undefined;const o=this.getElementBinding(a);if(o){o.attachChange(()=>{this.initODataDelegate()})}return this},onBeforeRendering:function e(){s.debug("[MetaUI DynamicHost]",`onBeforeRendering called. _initializedInner: ${this._initializedInner}`,"DynamicHost");this.initODataDelegate();if(!this._initializedInner){const e=this.getProperty("schemaDefinition");const n=this.getProperty("dataJson");const i=this.getProperty("data");const a=!!e;const r=!!n||!!i;s.debug("[MetaUI DynamicHost]",`Evaluating boot. hasSchema: ${a}, hasData: ${r}`,"DynamicHost");if(a||r){if(this.getProperty("debugMode")){s.debug("[MetaUI DynamicHost]",`Booting inner host. hasSchema: ${a}, hasData: ${r}`,"DynamicHost")}this._innerHost=new o;const e=this.getMetadata().getProperties();for(const n in e){const e=t.prototype.getProperty.call(this,n);if(e!==null&&e!==undefined){this._innerHost.setProperty(n,e)}}this.setAggregation("_content",this._innerHost);const n=this.getMetadata().getEvents();for(const e in n){this._innerHost.attachEvent(e,n=>{if(e==="submit"||e==="fieldChange"){const i=n.getParameters();if(i.payload){t.prototype.setProperty.call(this,"data",i.payload,true);const e=i.payloadJson||JSON.stringify(i.payload,null,2);t.prototype.setProperty.call(this,"dataJson",e,true)}if(e==="fieldChange"&&this.odataDelegate){this.odataDelegate.handleFieldChange(i.fieldPath,i.value)}}this.fireEvent(e,n.getParameters())})}this._initializedInner=true}}},setProperty:function e(n,i,a){if(n==="data"||n==="dataJson"||n==="schemaDefinition"){if(this.getProperty("debugMode")){s.debug("[MetaUI DynamicHost]",`Wrapper received setProperty: ${n}`,"DynamicHost")}}t.prototype.setProperty.call(this,n,i,a);if(this._innerHost){this._innerHost.setProperty(n,i,a)}else if(n==="data"||n==="dataJson"||n==="schemaDefinition"){if(this.getProperty("debugMode")){s.debug("[MetaUI DynamicHost]",`_innerHost not yet initialized when ${n} was set. Booting will happen on next render.`,"DynamicHost")}}return this},openInDialog:function t(e,n,i){if(!this._innerHost){this.onBeforeRendering()}this._innerHost?.openInDialog(e,n,i)},triggerSubmit:function t(){if(!this._innerHost){return false}return this._innerHost.triggerSubmit()},getProperty:function e(n){if(n==="outputData"){n="data"}if(this._innerHost&&(n==="data"||n==="dataJson")){return this._innerHost.getProperty(n)}return t.prototype.getProperty.call(this,n)}});return l});
1
+ sap.ui.define(["sap/ui/core/Control","./host/GeneratorHost","../utils/Logger","./host/delegates/ODataDelegate"],function(t,e,n,i){"use strict";function a(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const o=a(e);const s=n["Logger"];const r=i["ODataDelegate"];const l=t.extend("nz.co.siliconst.ui5.metaui.controls.DynamicHost",{constructor:function e(){t.prototype.constructor.apply(this,arguments);this.odataDelegate=null;this._innerHost=null;this._initializedInner=false},renderer:{apiVersion:2,render(t,e){t.openStart("div",e);t.style("width","100%");t.style("height","100%");t.openEnd();const n=e.getAggregation("_content");if(n){t.renderControl(n)}t.close("div")}},metadata:{properties:{schemaDefinition:{type:"any",defaultValue:null},data:{type:"object",defaultValue:null,bindable:"bindable"},dataJson:{type:"string",defaultValue:null,bindable:"bindable"},liveUpdate:{type:"boolean",defaultValue:false},isValid:{type:"boolean",defaultValue:true},useMessageManager:{type:"boolean",defaultValue:false},modelName:{type:"string",defaultValue:"meta"},debugMode:{type:"boolean",defaultValue:false},editable:{type:"boolean",defaultValue:true}},aggregations:{_content:{type:"sap.ui.core.Control",multiple:false,visibility:"hidden"}},events:{beforeSubmit:{parameters:{payload:{type:"object"},addError:{type:"function"},preventDefault:{type:"function"}}},submit:{parameters:{payload:{type:"object"},payloadJson:{type:"string"}}},cancel:{},fieldChange:{parameters:{fieldPath:{type:"string"},value:{type:"any"},payload:{type:"object"},isValid:{type:"boolean"}}},validationStateChanged:{parameters:{isValid:{type:"boolean"}}},validationError:{parameters:{fieldPath:{type:"string"},message:{type:"string"}}},validationSuccess:{parameters:{fieldPath:{type:"string"}}},error:{parameters:{message:{type:"string"},exception:{type:"object"}}}}},initODataDelegate:function t(){if(!this.odataDelegate){if(this.getBindingInfo("dataJson")){return}const t=this.getBindingInfo("data");if(t&&t.path&&t.path!==""){return}const e=this.getBindingContext("odata")||this.getBindingContext();if(e){s.debug("[MetaUI DynamicHost]",`Context found for delegate initialization: ${e.getPath()}`,"DynamicHost");if(e&&e.requestObject&&typeof e.requestObject==="function"){s.debug("[MetaUI DynamicHost]",`Context supports requestObject/getObject. Instantiating ODataDelegate.`,"DynamicHost");this.odataDelegate=new r(this,e);this.odataDelegate.syncToEngine()}else{s.debug("[MetaUI DynamicHost]",`Context does NOT support requestObject/getObject! Keys: ${Object.keys(e)}`,"DynamicHost")}}}},setBindingContext:function e(n,i){t.prototype.setBindingContext.call(this,n,i);this.initODataDelegate();return this},bindElement:function e(n,i){t.prototype.bindElement.call(this,n,i);const a=typeof n==="object"?n.model:undefined;const o=this.getElementBinding(a);if(o){o.attachChange(()=>{this.initODataDelegate()})}return this},onBeforeRendering:function e(){s.debug("[MetaUI DynamicHost]",`onBeforeRendering called. _initializedInner: ${this._initializedInner}`,"DynamicHost");this.initODataDelegate();if(!this._initializedInner){const e=this.getProperty("schemaDefinition");const n=this.getProperty("dataJson");const i=this.getProperty("data");let a=!!e;if(a&&typeof e==="object"&&Object.keys(e).length===0){a=false}const r=!!n||!!i;s.debug("[MetaUI DynamicHost]",`Evaluating boot. hasSchema: ${a}, hasData: ${r}`,"DynamicHost");if(a||r){if(this.getProperty("debugMode")){s.debug("[MetaUI DynamicHost]",`Booting inner host. hasSchema: ${a}, hasData: ${r}`,"DynamicHost")}this._innerHost=new o;const e=this.getMetadata().getProperties();for(const n in e){const e=t.prototype.getProperty.call(this,n);if(e!==null&&e!==undefined){this._innerHost.setProperty(n,e)}}this.setAggregation("_content",this._innerHost);const n=this.getMetadata().getEvents();for(const e in n){this._innerHost.attachEvent(e,n=>{if(e==="submit"||e==="fieldChange"){const i=n.getParameters();if(i.payload){const n=this.getProperty("liveUpdate")===true;if(e==="submit"||n){t.prototype.setProperty.call(this,"data",i.payload,true);const e=i.payloadJson||JSON.stringify(i.payload,null,2);t.prototype.setProperty.call(this,"dataJson",e,true)}}if(e==="fieldChange"&&this.odataDelegate){this.odataDelegate.handleFieldChange(i.fieldPath,i.value)}}this.fireEvent(e,n.getParameters())})}this._initializedInner=true}}},setProperty:function e(n,i,a){if(n==="data"||n==="dataJson"||n==="schemaDefinition"){if(this.getProperty("debugMode")){s.debug("[MetaUI DynamicHost]",`Wrapper received setProperty: ${n}`,"DynamicHost")}}t.prototype.setProperty.call(this,n,i,a);if(this._innerHost){this._innerHost.setProperty(n,i,a)}else if(n==="data"||n==="dataJson"||n==="schemaDefinition"){if(this.getProperty("debugMode")){s.debug("[MetaUI DynamicHost]",`_innerHost not yet initialized when ${n} was set. Booting will happen on next render.`,"DynamicHost")}}return this},openInDialog:function t(e,n,i,a,o){if(!this._innerHost){this.onBeforeRendering()}this._innerHost?.openInDialog(e,n,i,a,o)},triggerSubmit:function t(){if(!this._innerHost){return false}return this._innerHost.triggerSubmit()},addCustomError:function t(e,n){if(this._innerHost&&typeof this._innerHost.addCustomError==="function"){this._innerHost.addCustomError(e,n)}},clearCustomError:function t(e){if(this._innerHost&&typeof this._innerHost.clearCustomError==="function"){this._innerHost.clearCustomError(e)}},getProperty:function e(n){if(n==="outputData"){n="data"}if(this._innerHost&&(n==="data"||n==="dataJson")){return this._innerHost.getProperty(n)}return t.prototype.getProperty.call(this,n)}});return l});
2
2
  //# sourceMappingURL=DynamicHost.js.map