@siliconst/metaui 1.4.10 → 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 (287) 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 +46 -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 +41 -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 +34 -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 +16 -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 +36 -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/library-dbg.js +1 -1
  97. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -1
  98. package/src/nz/co/siliconst/ui5/metaui/library-preload.js +41 -40
  99. package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
  100. package/src/nz/co/siliconst/ui5/metaui/library.d.ts +1 -0
  101. package/src/nz/co/siliconst/ui5/metaui/library.d.ts.map +1 -1
  102. package/src/nz/co/siliconst/ui5/metaui/library.js +1 -1
  103. package/src/nz/co/siliconst/ui5/metaui/library.js.map +1 -1
  104. package/src/nz/co/siliconst/ui5/metaui/library.ts +1 -0
  105. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +2 -2
  106. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js.map +1 -1
  107. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js +1 -1
  108. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js.map +1 -1
  109. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +2 -2
  110. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js +77 -1
  111. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js.map +1 -1
  112. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts +17 -0
  113. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts.map +1 -1
  114. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js +1 -1
  115. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js.map +1 -1
  116. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +67 -7
  117. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +1 -1
  118. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
  119. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js +1 -1
  120. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
  121. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +1 -1
  122. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +1 -1
  123. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
  124. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js +1 -1
  125. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
  126. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +1 -1
  127. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +5 -1
  128. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js.map +1 -1
  129. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.d.ts.map +1 -1
  130. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js +1 -1
  131. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
  132. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +5 -1
  133. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +1 -1
  134. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
  135. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
  136. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
  137. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +1 -1
  138. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +1 -1
  139. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
  140. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
  141. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
  142. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +1 -1
  143. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +1 -1
  144. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
  145. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js +1 -1
  146. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
  147. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +1 -1
  148. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +1 -1
  149. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
  150. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
  151. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
  152. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +1 -1
  153. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +1 -1
  154. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
  155. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js +1 -1
  156. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
  157. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +1 -1
  158. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js +130 -0
  159. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js.map +1 -0
  160. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts +39 -0
  161. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts.map +1 -0
  162. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js +2 -0
  163. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js.map +1 -0
  164. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts +127 -0
  165. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +1 -1
  166. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js.map +1 -1
  167. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js +1 -1
  168. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js.map +1 -1
  169. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +1 -1
  170. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +2 -2
  171. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
  172. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
  173. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
  174. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +2 -2
  175. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +1 -1
  176. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
  177. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
  178. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
  179. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +1 -1
  180. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +1 -1
  181. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
  182. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js +1 -1
  183. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
  184. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +1 -1
  185. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +1 -1
  186. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
  187. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js +1 -1
  188. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
  189. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +1 -1
  190. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +1 -1
  191. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
  192. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
  193. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
  194. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +1 -1
  195. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +1 -1
  196. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
  197. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js +1 -1
  198. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
  199. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +1 -1
  200. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +1 -1
  201. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js.map +1 -1
  202. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js +1 -1
  203. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js.map +1 -1
  204. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +1 -1
  205. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +1 -1
  206. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
  207. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js +1 -1
  208. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
  209. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +1 -1
  210. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +1 -1
  211. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
  212. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
  213. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
  214. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +1 -1
  215. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +1 -1
  216. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
  217. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js +1 -1
  218. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
  219. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +1 -1
  220. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js.map +1 -1
  221. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js.map +1 -1
  222. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.ts +1 -1
  223. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js.map +1 -1
  224. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js.map +1 -1
  225. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.ts +1 -1
  226. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin-dbg.js.map +1 -1
  227. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.d.ts +1 -1
  228. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.d.ts.map +1 -1
  229. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.js.map +1 -1
  230. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.ts +2 -2
  231. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin-dbg.js.map +1 -1
  232. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.d.ts +1 -1
  233. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.d.ts.map +1 -1
  234. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.js.map +1 -1
  235. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.ts +1 -1
  236. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin-dbg.js +1 -1
  237. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin-dbg.js.map +1 -1
  238. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.d.ts +1 -1
  239. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.d.ts.map +1 -1
  240. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.js +1 -1
  241. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.js.map +1 -1
  242. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.ts +2 -2
  243. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin-dbg.js +1 -1
  244. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin-dbg.js.map +1 -1
  245. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.d.ts +1 -1
  246. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.d.ts.map +1 -1
  247. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.js +1 -1
  248. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.js.map +1 -1
  249. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.ts +2 -2
  250. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin-dbg.js +1 -1
  251. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin-dbg.js.map +1 -1
  252. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.d.ts +1 -1
  253. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.d.ts.map +1 -1
  254. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.js +1 -1
  255. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.js.map +1 -1
  256. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.ts +3 -3
  257. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin-dbg.js.map +1 -1
  258. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.d.ts +1 -1
  259. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.d.ts.map +1 -1
  260. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.js.map +1 -1
  261. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.ts +1 -1
  262. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin-dbg.js.map +1 -1
  263. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.d.ts +1 -1
  264. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.d.ts.map +1 -1
  265. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.js.map +1 -1
  266. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.ts +1 -1
  267. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin-dbg.js +2 -2
  268. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin-dbg.js.map +1 -1
  269. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.d.ts +1 -1
  270. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.d.ts.map +1 -1
  271. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.js +1 -1
  272. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.js.map +1 -1
  273. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.ts +4 -4
  274. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin-dbg.js +3 -2
  275. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin-dbg.js.map +1 -1
  276. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.d.ts +1 -1
  277. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.d.ts.map +1 -1
  278. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.js +1 -1
  279. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.js.map +1 -1
  280. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.ts +4 -3
  281. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin-dbg.js +3 -1
  282. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin-dbg.js.map +1 -1
  283. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.d.ts +1 -1
  284. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.d.ts.map +1 -1
  285. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.js +1 -1
  286. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.js.map +1 -1
  287. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.ts +4 -3
@@ -1,4 +1,4 @@
1
- sap.ui.define(["sap/m/MessagePage", "sap/ui/core/Messaging", "../../../utils/Logger", "sap/ui/core/library"], function (MessagePage, Messaging, _____utils_Logger, coreLibrary) {
1
+ sap.ui.define(["sap/m/IllustratedMessage", "sap/ui/core/Messaging", "../../../utils/Logger", "sap/ui/core/message/Message", "sap/ui/core/library"], function (IllustratedMessage, Messaging, _____utils_Logger, Message, coreLibrary) {
2
2
  "use strict";
3
3
 
4
4
  const Logger = _____utils_Logger["Logger"];
@@ -16,28 +16,28 @@ sap.ui.define(["sap/m/MessagePage", "sap/ui/core/Messaging", "../../../utils/Log
16
16
 
17
17
  /**
18
18
  * Registers a control and all its children with the global MessageManager.
19
+ * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages
20
+ * on every keystroke. MetaUI handles valueState manually via plugins).
19
21
  */
20
22
  registerObject(control) {
21
- if (this.host.getProperty("useMessageManager")) {
22
- Messaging.registerObject(control, true); // true = recurse all children
23
- }
23
+ // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages
24
24
  }
25
25
 
26
26
  /**
27
27
  * Unregisters a control from the global MessageManager.
28
28
  */
29
29
  unregisterObject(control) {
30
- if (this.host.getProperty("useMessageManager")) {
31
- Messaging.unregisterObject(control);
32
- }
30
+ // Do nothing
33
31
  }
34
-
35
- /**
36
- * Clears all messages from the global MessageManager.
37
- */
38
32
  removeAllMessages() {
39
- if (this.host.getProperty("useMessageManager")) {
40
- Messaging.removeAllMessages();
33
+ const stateManager = this.host.getStateManager();
34
+ if (stateManager && this.host.getProperty("useMessageManager")) {
35
+ const messageManager = Messaging;
36
+ const messages = messageManager.getMessageModel().getData();
37
+ const messagesToRemove = messages.filter(m => m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId());
38
+ if (messagesToRemove && messagesToRemove.length > 0) {
39
+ messageManager.removeMessages(messagesToRemove);
40
+ }
41
41
  }
42
42
  }
43
43
 
@@ -52,53 +52,61 @@ sap.ui.define(["sap/m/MessagePage", "sap/ui/core/Messaging", "../../../utils/Log
52
52
  } else {
53
53
  Logger.warn(`[MetaUI Validation Error] Global - ${text}`);
54
54
  }
55
- if (this.host.getProperty("useMessageManager")) {
56
- sap.ui.require(["sap/ui/core/message/Message"], MessageClass => {
57
- const messageManager = Messaging;
58
- const stateManager = this.host.getStateManager();
59
- messageManager.addMessages(new MessageClass({
60
- message: displayText,
61
- type: coreLibrary.MessageType.Error,
62
- target: targetPath,
63
- processor: stateManager?.getModel()
64
- }));
65
- });
55
+ if (this.host.getProperty("useMessageManager") === true) {
56
+ const messageManager = Messaging;
57
+ const stateManager = this.host.getStateManager();
58
+ messageManager.addMessages(new Message({
59
+ message: displayText,
60
+ type: coreLibrary.MessageType.Error,
61
+ target: targetPath,
62
+ processor: stateManager?.getModel()
63
+ }));
66
64
  }
67
65
  }
68
66
 
69
67
  /**
70
68
  * Imperatively invalidates a field and highlights it with an error message.
69
+ * Uses a specific 'CustomError' code to distinguish it from internal schema validations.
70
+ *
71
+ * @param fieldPath The internal JSON path of the field to highlight.
72
+ * @param message The custom error message to display.
71
73
  */
72
74
  addCustomError(fieldPath, message) {
73
- const useMessageManager = this.host.getProperty("useMessageManager");
75
+ if (this.host.getProperty("useMessageManager") !== true) {
76
+ return;
77
+ }
74
78
  const stateManager = this.host.getStateManager();
75
- if (useMessageManager && stateManager) {
76
- sap.ui.require(["sap/ui/core/message/Message"], MessageClass => {
77
- const messageManager = Messaging;
78
- messageManager.addMessages(new MessageClass({
79
- message: message,
80
- type: coreLibrary.MessageType.Error,
81
- target: `/${fieldPath.replace(/^\//, "")}`,
82
- processor: stateManager.getModel()
83
- }));
84
- });
79
+ if (!stateManager) {
80
+ return;
85
81
  }
82
+ Messaging.addMessages(new Message({
83
+ message: message,
84
+ type: coreLibrary.MessageType.Error,
85
+ target: `/${fieldPath.replace(/^\//, "")}`,
86
+ processor: stateManager.getModel(),
87
+ code: "CustomError"
88
+ }));
86
89
  }
87
90
 
88
91
  /**
89
- * Reverts a custom error state on a field.
92
+ * Reverts a custom error state on a field, safely ignoring native schema validations.
93
+ *
94
+ * @param fieldPath The internal JSON path of the field to clear.
90
95
  */
91
96
  clearCustomError(fieldPath) {
92
- const useMessageManager = this.host.getProperty("useMessageManager");
97
+ if (this.host.getProperty("useMessageManager") !== true) {
98
+ return;
99
+ }
93
100
  const stateManager = this.host.getStateManager();
94
- if (useMessageManager && stateManager) {
95
- const messageManager = Messaging;
96
- const messages = messageManager.getMessageModel().getData();
97
- const target = `/${fieldPath.replace(/^\//, "")}`;
98
- const messageToRemove = messages.find(m => m.getTarget() === target && m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId());
99
- if (messageToRemove) {
100
- messageManager.removeMessages(messageToRemove);
101
- }
101
+ if (!stateManager) {
102
+ return;
103
+ }
104
+ const target = `/${fieldPath.replace(/^\//, "")}`;
105
+ const processorId = stateManager.getModel().getId();
106
+ const messages = Messaging.getMessageModel().getData();
107
+ const messagesToRemove = messages.filter(m => m.getTarget() === target && m.getCode() === "CustomError" && m.getMessageProcessor()?.getId() === processorId);
108
+ if (messagesToRemove.length > 0) {
109
+ Messaging.removeMessages(messagesToRemove);
102
110
  }
103
111
  }
104
112
 
@@ -107,10 +115,9 @@ sap.ui.define(["sap/m/MessagePage", "sap/ui/core/Messaging", "../../../utils/Log
107
115
  */
108
116
  mountCrashBoundary(error) {
109
117
  Logger.error("[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.", error.message, "ValidationDelegate");
110
- const errorPage = new MessagePage({
111
- text: "UI Generation Failed",
112
- description: "The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.",
113
- icon: "sap-icon://error"
118
+ const errorPage = new IllustratedMessage({
119
+ title: "UI Generation Failed",
120
+ description: "The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs."
114
121
  });
115
122
  this.host.setAggregation("_content", errorPage);
116
123
  }
@@ -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","coreLibrary","MessageType","Error","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\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\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: typeof import(\"sap/ui/core/message/Message\").default) => {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new MessageClass({\n message: displayText,\n type: coreLibrary.MessageType.Error,\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: typeof import(\"sap/ui/core/message/Message\").default) => {\n const messageManager = Messaging;\n messageManager.addMessages(new MessageClass({\n message: message,\n type: coreLibrary.MessageType.Error,\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: sap.ui.core.message.Message) =>\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;EAUf;AACA;AACA;EACO,MAAMC,kBAAkB,CAAC;IAG5B;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,IAAqB,EAAE;MAC/B,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;IACWC,cAAcA,CAACC,OAAgB,EAAQ;MAC1C,IAAI,IAAI,CAACF,IAAI,CAACG,WAAW,CAAC,mBAAmB,CAAC,EAAE;QAC5CC,SAAS,CAACH,cAAc,CAACC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;MAC7C;IACJ;;IAEA;AACJ;AACA;IACWG,gBAAgBA,CAACH,OAAgB,EAAQ;MAC5C,IAAI,IAAI,CAACF,IAAI,CAACG,WAAW,CAAC,mBAAmB,CAAC,EAAE;QAC5CC,SAAS,CAACC,gBAAgB,CAACH,OAAO,CAAC;MACvC;IACJ;;IAEA;AACJ;AACA;IACWI,iBAAiBA,CAAA,EAAS;MAC7B,IAAI,IAAI,CAACN,IAAI,CAACG,WAAW,CAAC,mBAAmB,CAAC,EAAE;QAC5CC,SAAS,CAACE,iBAAiB,CAAC,CAAC;MACjC;IACJ;;IAEA;AACJ;AACA;IACWC,WAAWA,CAACC,IAAY,EAAEC,IAAY,EAAQ;MACjD,MAAMC,UAAU,GAAGF,IAAI,GAAG,IAAIA,IAAI,CAACG,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE;MAC5D,MAAMC,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tC,IAAI,EAAE,sBAAsB;QAC5BuC,WAAW,EAAE,+FAA+F;QAC5GC,IAAI,EAAE;MACV,CAAC,CAAC;MAEF,IAAI,CAACjD,IAAI,CAACkD,cAAc,CAAC,UAAU,EAAEJ,SAAS,CAAC;IACnD;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAArD,kBAAA,GAAAA,kBAAA;EAAA,OAAAqD,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"ValidationDelegate-dbg.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","registerObject","control","unregisterObject","removeAllMessages","stateManager","getStateManager","getProperty","messageManager","Messaging","messages","getMessageModel","getData","messagesToRemove","filter","m","getMessageProcessor","getId","getModel","length","removeMessages","pushMessage","path","text","targetPath","replace","displayText","warn","addMessages","Message","message","type","coreLibrary","MessageType","Error","target","processor","addCustomError","fieldPath","code","clearCustomError","processorId","getTarget","getCode","mountCrashBoundary","error","errorPage","IllustratedMessage","title","description","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import IllustratedMessage from \"sap/m/IllustratedMessage\";\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\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\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 * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages \n * on every keystroke. MetaUI handles valueState manually via plugins).\n */\n public registerObject(control: Control): void {\n // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n // Do nothing\n }\n\n public removeAllMessages(): void {\n const stateManager = this.host.getStateManager();\n if (stateManager && this.host.getProperty(\"useMessageManager\")) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>\n m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messagesToRemove && messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\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\") === true) {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new Message({\n message: displayText,\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n * Uses a specific 'CustomError' code to distinguish it from internal schema validations.\n * \n * @param fieldPath The internal JSON path of the field to highlight.\n * @param message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n Messaging.addMessages(new Message({\n message: message,\n type: coreLibrary.MessageType.Error,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel(),\n code: \"CustomError\"\n }));\n }\n\n /**\n * Reverts a custom error state on a field, safely ignoring native schema validations.\n * \n * @param fieldPath The internal JSON path of the field to clear.\n */\n public clearCustomError(fieldPath: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n const processorId = stateManager.getModel().getId();\n const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];\n\n const messagesToRemove = messages.filter(m => \n m.getTarget() === target && \n m.getCode() === \"CustomError\" &&\n m.getMessageProcessor()?.getId() === processorId\n );\n\n if (messagesToRemove.length > 0) {\n Messaging.removeMessages(messagesToRemove);\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 IllustratedMessage({\n title: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":";;;QAISA,MAAM,GAAAC,iBAAA;EAUf;AACA;AACA;EACO,MAAMC,kBAAkB,CAAC;IAG5B;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,IAAqB,EAAE;MAC/B,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;AACA;AACA;IACWC,cAAcA,CAACC,OAAgB,EAAQ;MAC1C;IAAA;;IAGJ;AACJ;AACA;IACWC,gBAAgBA,CAACD,OAAgB,EAAQ;MAC5C;IAAA;IAGGE,iBAAiBA,CAAA,EAAS;MAC7B,MAAMC,YAAY,GAAG,IAAI,CAACL,IAAI,CAACM,eAAe,CAAC,CAAC;MAChD,IAAID,YAAY,IAAI,IAAI,CAACL,IAAI,CAACO,WAAW,CAAC,mBAAmB,CAAC,EAAE;QAC5D,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vF,MAAMC,gBAAgB,GAAGH,QAAQ,CAACI,MAAM,CAACC,CAAC,IACtCA,CAAC,CAAC2B,SAAS,CAAC,CAAC,KAAKP,MAAM,IACxBpB,CAAC,CAAC4B,OAAO,CAAC,CAAC,KAAK,aAAa,IAC7B5B,CAAC,CAACC,mBAAmB,CAAC,CAAC,EAAEC,KAAK,CAAC,CAAC,KAAKwB,WACzC,CAAC;MAED,IAAI5B,gBAAgB,CAACM,MAAM,GAAG,CAAC,EAAE;QAC7BV,SAAS,CAACW,cAAc,CAACP,gBAAgB,CAAC;MAC9C;IACJ;;IAEA;AACJ;AACA;IACW+B,kBAAkBA,CAACC,KAAY,EAAQ;MAC1CjD,MAAM,CAACiD,KAAK,CAAC,wEAAwE,EAAEA,KAAK,CAACf,OAAO,EAAE,oBAAoB,CAAC;MAE3H,MAAMgB,SAAS,GAAG,IAAIC,kBAAkB,CAAC;QACrCC,KAAK,EAAE,sBAAsB;QAC7BC,WAAW,EAAE;MACjB,CAAC,CAAC;MAEF,IAAI,CAACjD,IAAI,CAACkD,cAAc,CAAC,UAAU,EAAEJ,SAAS,CAAC;IACnD;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAArD,kBAAA,GAAAA,kBAAA;EAAA,OAAAqD,SAAA;AAAA","ignoreList":[]}
@@ -18,15 +18,14 @@ declare module "nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDel
18
18
  constructor(host: IHostValidation);
19
19
  /**
20
20
  * Registers a control and all its children with the global MessageManager.
21
+ * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages
22
+ * on every keystroke. MetaUI handles valueState manually via plugins).
21
23
  */
22
24
  registerObject(control: Control): void;
23
25
  /**
24
26
  * Unregisters a control from the global MessageManager.
25
27
  */
26
28
  unregisterObject(control: Control): void;
27
- /**
28
- * Clears all messages from the global MessageManager.
29
- */
30
29
  removeAllMessages(): void;
31
30
  /**
32
31
  * Pushes a validation message to the console, and optionally to the MessageManager.
@@ -34,10 +33,16 @@ declare module "nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDel
34
33
  pushMessage(path: string, text: string): void;
35
34
  /**
36
35
  * Imperatively invalidates a field and highlights it with an error message.
36
+ * Uses a specific 'CustomError' code to distinguish it from internal schema validations.
37
+ *
38
+ * @param fieldPath The internal JSON path of the field to highlight.
39
+ * @param message The custom error message to display.
37
40
  */
38
41
  addCustomError(fieldPath: string, message: string): void;
39
42
  /**
40
- * Reverts a custom error state on a field.
43
+ * Reverts a custom error state on a field, safely ignoring native schema validations.
44
+ *
45
+ * @param fieldPath The internal JSON path of the field to clear.
41
46
  */
42
47
  clearCustomError(fieldPath: string): void;
43
48
  /**
@@ -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;IAK5E,UAAiB,eAAe;QAC5B,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QACnC,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,kBAAkB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QACzG,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
+ {"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;IAK5E,UAAiB,eAAe;QAC5B,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QACnC,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,kBAAkB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QACzG,eAAe,IAAI,YAAY,GAAG,IAAI,CAAC;KAC1C;IAED;;OAEG;IACH,MAAa,kBAAkB;QAC3B,OAAO,CAAC,IAAI,CAAkB;QAE9B;;;WAGG;oBACS,IAAI,EAAE,eAAe;QAIjC;;;;WAIG;QACI,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;QAI7C;;WAEG;QACI,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;QAIxC,iBAAiB,IAAI,IAAI;QAchC;;WAEG;QACI,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;QAsBpD;;;;;;WAMG;QACI,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;QAmB/D;;;;WAIG;QACI,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;QAyBhD;;WAEG;QACI,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;KAUhD;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["sap/m/MessagePage","sap/ui/core/Messaging","../../../utils/Logger","sap/ui/core/library"],function(e,s,t,r){"use strict";const a=t["Logger"];class o{constructor(e){this.host=e}registerObject(e){if(this.host.getProperty("useMessageManager")){s.registerObject(e,true)}}unregisterObject(e){if(this.host.getProperty("useMessageManager")){s.unregisterObject(e)}}removeAllMessages(){if(this.host.getProperty("useMessageManager")){s.removeAllMessages()}}pushMessage(e,t){const o=e?`/${e.replace(/^\//,"")}`:"";const g=e?`Field '${e}': ${t}`:t;if(e){a.warn(`[MetaUI Validation Error] ${g}`)}else{a.warn(`[MetaUI Validation Error] Global - ${t}`)}if(this.host.getProperty("useMessageManager")){sap.ui.require(["sap/ui/core/message/Message"],e=>{const t=s;const a=this.host.getStateManager();t.addMessages(new e({message:g,type:r.MessageType.Error,target:o,processor:a?.getModel()}))})}}addCustomError(e,t){const a=this.host.getProperty("useMessageManager");const o=this.host.getStateManager();if(a&&o){sap.ui.require(["sap/ui/core/message/Message"],a=>{const g=s;g.addMessages(new a({message:t,type:r.MessageType.Error,target:`/${e.replace(/^\//,"")}`,processor:o.getModel()}))})}}clearCustomError(e){const t=this.host.getProperty("useMessageManager");const r=this.host.getStateManager();if(t&&r){const t=s;const a=t.getMessageModel().getData();const o=`/${e.replace(/^\//,"")}`;const g=a.find(e=>e.getTarget()===o&&e.getMessageProcessor()&&e.getMessageProcessor().getId()===r.getModel().getId());if(g){t.removeMessages(g)}}}mountCrashBoundary(s){a.error("[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.",s.message,"ValidationDelegate");const t=new e({text:"UI Generation Failed",description:"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.",icon:"sap-icon://error"});this.host.setAggregation("_content",t)}}var g={__esModule:true};g.ValidationDelegate=o;return g});
1
+ sap.ui.define(["sap/m/IllustratedMessage","sap/ui/core/Messaging","../../../utils/Logger","sap/ui/core/message/Message","sap/ui/core/library"],function(e,t,s,r,a){"use strict";const o=s["Logger"];class g{constructor(e){this.host=e}registerObject(e){}unregisterObject(e){}removeAllMessages(){const e=this.host.getStateManager();if(e&&this.host.getProperty("useMessageManager")){const s=t;const r=s.getMessageModel().getData();const a=r.filter(t=>t.getMessageProcessor()&&t.getMessageProcessor().getId()===e.getModel().getId());if(a&&a.length>0){s.removeMessages(a)}}}pushMessage(e,s){const g=e?`/${e.replace(/^\//,"")}`:"";const n=e?`Field '${e}': ${s}`:s;if(e){o.warn(`[MetaUI Validation Error] ${n}`)}else{o.warn(`[MetaUI Validation Error] Global - ${s}`)}if(this.host.getProperty("useMessageManager")===true){const e=t;const s=this.host.getStateManager();e.addMessages(new r({message:n,type:a.MessageType.Error,target:g,processor:s?.getModel()}))}}addCustomError(e,s){if(this.host.getProperty("useMessageManager")!==true){return}const o=this.host.getStateManager();if(!o){return}t.addMessages(new r({message:s,type:a.MessageType.Error,target:`/${e.replace(/^\//,"")}`,processor:o.getModel(),code:"CustomError"}))}clearCustomError(e){if(this.host.getProperty("useMessageManager")!==true){return}const s=this.host.getStateManager();if(!s){return}const r=`/${e.replace(/^\//,"")}`;const a=s.getModel().getId();const o=t.getMessageModel().getData();const g=o.filter(e=>e.getTarget()===r&&e.getCode()==="CustomError"&&e.getMessageProcessor()?.getId()===a);if(g.length>0){t.removeMessages(g)}}mountCrashBoundary(t){o.error("[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.",t.message,"ValidationDelegate");const s=new e({title:"UI Generation Failed",description:"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs."});this.host.setAggregation("_content",s)}}var n={__esModule:true};n.ValidationDelegate=g;return n});
2
2
  //# sourceMappingURL=ValidationDelegate.js.map
@@ -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","coreLibrary","MessageType","Error","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\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\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: typeof import(\"sap/ui/core/message/Message\").default) => {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new MessageClass({\n message: displayText,\n type: coreLibrary.MessageType.Error,\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: typeof import(\"sap/ui/core/message/Message\").default) => {\n const messageManager = Messaging;\n messageManager.addMessages(new MessageClass({\n message: message,\n type: coreLibrary.MessageType.Error,\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: sap.ui.core.message.Message) =>\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":"+IAISA,EAAMC,EAAA,UAaR,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,MAAMC,EAAiBd,EACvB,MAAMe,EAAenB,KAAKD,KAAKqB,kBAC/BF,EAAeG,YAAY,IAAIJ,EAAa,CACxCK,QAASV,EACTW,KAAMC,EAAYC,YAAYC,MAC9BC,OAAQjB,EACRkB,UAAWT,GAAcU,eAGrC,CACJ,CAKOC,eAAeC,EAAmBT,GACrC,MAAMU,EAAoBhC,KAAKD,KAAKI,YAAY,qBAChD,MAAMgB,EAAenB,KAAKD,KAAKqB,kBAC/B,GAAIY,GAAqBb,EAAc,CACnCL,IAAIC,GAAGC,QAAQ,CAAC,+BAAiCC,IAC7C,MAAMC,EAAiBd,EACvBc,EAAeG,YAAY,IAAIJ,EAAa,CACxCK,QAASA,EACTC,KAAMC,EAAYC,YAAYC,MAC9BC,OAAQ,IAAII,EAAUpB,QAAQ,MAAO,MACrCiB,UAAWT,EAAaU,eAGpC,CACJ,CAKOI,iBAAiBF,GACpB,MAAMC,EAAoBhC,KAAKD,KAAKI,YAAY,qBAChD,MAAMgB,EAAenB,KAAKD,KAAKqB,kBAC/B,GAAIY,GAAqBb,EAAc,CACnC,MAAMD,EAAiBd,EACvB,MAAM8B,EAAWhB,EAAeiB,kBAAkBC,UAClD,MAAMT,EAAS,IAAII,EAAUpB,QAAQ,MAAO,MAE5C,MAAM0B,EAAkBH,EAASI,KAAMC,GACnCA,EAAEC,cAAgBb,GAAUY,EAAEE,uBAAyBF,EAAEE,sBAAsBC,UAAYvB,EAAaU,WAAWa,SAEvH,GAAIL,EAAiB,CACjBnB,EAAeyB,eAAeN,EAClC,CACJ,CACJ,CAKOO,mBAAmBC,GACtBlD,EAAOkD,MAAM,yEAA0EA,EAAMvB,QAAS,sBAEtG,MAAMwB,EAAY,IAAIC,EAAY,CAC9BtC,KAAM,uBACNuC,YAAa,gGACbC,KAAM,qBAGVjD,KAAKD,KAAKmD,eAAe,WAAYJ,EACzC,EACH,IAAAK,EAAA,CAAAC,WAAA,MAAAD,EAAAtD,qBAAA,OAAAsD,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"ValidationDelegate.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","this","registerObject","control","unregisterObject","removeAllMessages","stateManager","getStateManager","getProperty","messageManager","Messaging","messages","getMessageModel","getData","messagesToRemove","filter","m","getMessageProcessor","getId","getModel","length","removeMessages","pushMessage","path","text","targetPath","replace","displayText","warn","addMessages","Message","message","type","coreLibrary","MessageType","Error","target","processor","addCustomError","fieldPath","code","clearCustomError","processorId","getTarget","getCode","mountCrashBoundary","error","errorPage","IllustratedMessage","title","description","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import IllustratedMessage from \"sap/m/IllustratedMessage\";\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\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\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 * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages \n * on every keystroke. MetaUI handles valueState manually via plugins).\n */\n public registerObject(control: Control): void {\n // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n // Do nothing\n }\n\n public removeAllMessages(): void {\n const stateManager = this.host.getStateManager();\n if (stateManager && this.host.getProperty(\"useMessageManager\")) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>\n m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messagesToRemove && messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\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\") === true) {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new Message({\n message: displayText,\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n * Uses a specific 'CustomError' code to distinguish it from internal schema validations.\n * \n * @param fieldPath The internal JSON path of the field to highlight.\n * @param message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n Messaging.addMessages(new Message({\n message: message,\n type: coreLibrary.MessageType.Error,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel(),\n code: \"CustomError\"\n }));\n }\n\n /**\n * Reverts a custom error state on a field, safely ignoring native schema validations.\n * \n * @param fieldPath The internal JSON path of the field to clear.\n */\n public clearCustomError(fieldPath: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n const processorId = stateManager.getModel().getId();\n const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];\n\n const messagesToRemove = messages.filter(m => \n m.getTarget() === target && \n m.getCode() === \"CustomError\" &&\n m.getMessageProcessor()?.getId() === processorId\n );\n\n if (messagesToRemove.length > 0) {\n Messaging.removeMessages(messagesToRemove);\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 IllustratedMessage({\n title: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":"sLAISA,EAAMC,EAAA,UAaR,MAAMC,EAOTC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAOOE,eAAeC,GAClB,CAMGC,iBAAiBD,GACpB,CAGGE,oBACH,MAAMC,EAAeL,KAAKD,KAAKO,kBAC/B,GAAID,GAAgBL,KAAKD,KAAKQ,YAAY,qBAAsB,CAC5D,MAAMC,EAAiBC,EACvB,MAAMC,EAAWF,EAAeG,kBAAkBC,UAClD,MAAMC,EAAmBH,EAASI,OAAQC,GACtCA,EAAEC,uBAAyBD,EAAEC,sBAAsBC,UAAYZ,EAAaa,WAAWD,SAE3F,GAAIJ,GAAoBA,EAAiBM,OAAS,EAAG,CACjDX,EAAeY,eAAeP,EAClC,CACJ,CACJ,CAKOQ,YAAYC,EAAcC,GAC7B,MAAMC,EAAaF,EAAO,IAAIA,EAAKG,QAAQ,MAAO,MAAQ,GAC1D,MAAMC,EAAcJ,EAAO,UAAUA,OAAUC,IAASA,EAExD,GAAID,EAAM,CACN3B,EAAOgC,KAAK,6BAA6BD,IAC7C,KAAO,CACH/B,EAAOgC,KAAK,sCAAsCJ,IACtD,CAEA,GAAIvB,KAAKD,KAAKQ,YAAY,uBAAyB,KAAM,CACrD,MAAMC,EAAiBC,EACvB,MAAMJ,EAAeL,KAAKD,KAAKO,kBAC/BE,EAAeoB,YAAY,IAAIC,EAAQ,CACnCC,QAASJ,EACTK,KAAMC,EAAYC,YAAYC,MAC9BC,OAAQX,EACRY,UAAW/B,GAAca,aAEjC,CACJ,CASOmB,eAAeC,EAAmBR,GACrC,GAAI9B,KAAKD,KAAKQ,YAAY,uBAAyB,KAAM,CACrD,MACJ,CAEA,MAAMF,EAAeL,KAAKD,KAAKO,kBAC/B,IAAKD,EAAc,CACf,MACJ,CAEAI,EAAUmB,YAAY,IAAIC,EAAQ,CAC9BC,QAASA,EACTC,KAAMC,EAAYC,YAAYC,MAC9BC,OAAQ,IAAIG,EAAUb,QAAQ,MAAO,MACrCW,UAAW/B,EAAaa,WACxBqB,KAAM,gBAEd,CAOOC,iBAAiBF,GACpB,GAAItC,KAAKD,KAAKQ,YAAY,uBAAyB,KAAM,CACrD,MACJ,CAEA,MAAMF,EAAeL,KAAKD,KAAKO,kBAC/B,IAAKD,EAAc,CACf,MACJ,CAEA,MAAM8B,EAAS,IAAIG,EAAUb,QAAQ,MAAO,MAC5C,MAAMgB,EAAcpC,EAAaa,WAAWD,QAC5C,MAAMP,EAAWD,EAAUE,kBAAkBC,UAE7C,MAAMC,EAAmBH,EAASI,OAAOC,GACrCA,EAAE2B,cAAgBP,GAClBpB,EAAE4B,YAAc,eAChB5B,EAAEC,uBAAuBC,UAAYwB,GAGzC,GAAI5B,EAAiBM,OAAS,EAAG,CAC7BV,EAAUW,eAAeP,EAC7B,CACJ,CAKO+B,mBAAmBC,GACtBlD,EAAOkD,MAAM,yEAA0EA,EAAMf,QAAS,sBAEtG,MAAMgB,EAAY,IAAIC,EAAmB,CACrCC,MAAO,uBACPC,YAAa,kGAGjBjD,KAAKD,KAAKmD,eAAe,WAAYJ,EACzC,EACH,IAAAK,EAAA,CAAAC,WAAA,MAAAD,EAAAtD,qBAAA,OAAAsD,CAAA","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import MessagePage from "sap/m/MessagePage";
1
+ import IllustratedMessage from "sap/m/IllustratedMessage";
2
2
  import Messaging from "sap/ui/core/Messaging";
3
3
  import Control from "sap/ui/core/Control";
4
4
  import { StateManager } from "../../../core/StateManager";
@@ -28,28 +28,31 @@ export class ValidationDelegate {
28
28
 
29
29
  /**
30
30
  * Registers a control and all its children with the global MessageManager.
31
+ * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages
32
+ * on every keystroke. MetaUI handles valueState manually via plugins).
31
33
  */
32
34
  public registerObject(control: Control): void {
33
- if (this.host.getProperty("useMessageManager")) {
34
- Messaging.registerObject(control, true); // true = recurse all children
35
- }
35
+ // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages
36
36
  }
37
37
 
38
38
  /**
39
39
  * Unregisters a control from the global MessageManager.
40
40
  */
41
41
  public unregisterObject(control: Control): void {
42
- if (this.host.getProperty("useMessageManager")) {
43
- Messaging.unregisterObject(control);
44
- }
42
+ // Do nothing
45
43
  }
46
44
 
47
- /**
48
- * Clears all messages from the global MessageManager.
49
- */
50
45
  public removeAllMessages(): void {
51
- if (this.host.getProperty("useMessageManager")) {
52
- Messaging.removeAllMessages();
46
+ const stateManager = this.host.getStateManager();
47
+ if (stateManager && this.host.getProperty("useMessageManager")) {
48
+ const messageManager = Messaging;
49
+ const messages = messageManager.getMessageModel().getData();
50
+ const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>
51
+ m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()
52
+ );
53
+ if (messagesToRemove && messagesToRemove.length > 0) {
54
+ messageManager.removeMessages(messagesToRemove);
55
+ }
53
56
  }
54
57
  }
55
58
 
@@ -66,56 +69,71 @@ export class ValidationDelegate {
66
69
  Logger.warn(`[MetaUI Validation Error] Global - ${text}`);
67
70
  }
68
71
 
69
- if (this.host.getProperty("useMessageManager")) {
70
- sap.ui.require(["sap/ui/core/message/Message"], (MessageClass: typeof import("sap/ui/core/message/Message").default) => {
71
- const messageManager = Messaging;
72
- const stateManager = this.host.getStateManager();
73
- messageManager.addMessages(new MessageClass({
74
- message: displayText,
75
- type: coreLibrary.MessageType.Error,
76
- target: targetPath,
77
- processor: stateManager?.getModel()
78
- }));
79
- });
72
+ if (this.host.getProperty("useMessageManager") === true) {
73
+ const messageManager = Messaging;
74
+ const stateManager = this.host.getStateManager();
75
+ messageManager.addMessages(new Message({
76
+ message: displayText,
77
+ type: coreLibrary.MessageType.Error,
78
+ target: targetPath,
79
+ processor: stateManager?.getModel()
80
+ }));
80
81
  }
81
82
  }
82
83
 
83
84
  /**
84
85
  * Imperatively invalidates a field and highlights it with an error message.
86
+ * Uses a specific 'CustomError' code to distinguish it from internal schema validations.
87
+ *
88
+ * @param fieldPath The internal JSON path of the field to highlight.
89
+ * @param message The custom error message to display.
85
90
  */
86
91
  public addCustomError(fieldPath: string, message: string): void {
87
- const useMessageManager = this.host.getProperty("useMessageManager") as boolean;
92
+ if (this.host.getProperty("useMessageManager") !== true) {
93
+ return;
94
+ }
95
+
88
96
  const stateManager = this.host.getStateManager();
89
- if (useMessageManager && stateManager) {
90
- sap.ui.require(["sap/ui/core/message/Message"], (MessageClass: typeof import("sap/ui/core/message/Message").default) => {
91
- const messageManager = Messaging;
92
- messageManager.addMessages(new MessageClass({
93
- message: message,
94
- type: coreLibrary.MessageType.Error,
95
- target: `/${fieldPath.replace(/^\//, "")}`,
96
- processor: stateManager.getModel()
97
- }));
98
- });
97
+ if (!stateManager) {
98
+ return;
99
99
  }
100
+
101
+ Messaging.addMessages(new Message({
102
+ message: message,
103
+ type: coreLibrary.MessageType.Error,
104
+ target: `/${fieldPath.replace(/^\//, "")}`,
105
+ processor: stateManager.getModel(),
106
+ code: "CustomError"
107
+ }));
100
108
  }
101
109
 
102
110
  /**
103
- * Reverts a custom error state on a field.
111
+ * Reverts a custom error state on a field, safely ignoring native schema validations.
112
+ *
113
+ * @param fieldPath The internal JSON path of the field to clear.
104
114
  */
105
115
  public clearCustomError(fieldPath: string): void {
106
- const useMessageManager = this.host.getProperty("useMessageManager") as boolean;
116
+ if (this.host.getProperty("useMessageManager") !== true) {
117
+ return;
118
+ }
119
+
107
120
  const stateManager = this.host.getStateManager();
108
- if (useMessageManager && stateManager) {
109
- const messageManager = Messaging;
110
- const messages = messageManager.getMessageModel().getData();
111
- const target = `/${fieldPath.replace(/^\//, "")}`;
121
+ if (!stateManager) {
122
+ return;
123
+ }
112
124
 
113
- const messageToRemove = messages.find((m: sap.ui.core.message.Message) =>
114
- m.getTarget() === target && m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()
115
- );
116
- if (messageToRemove) {
117
- messageManager.removeMessages(messageToRemove);
118
- }
125
+ const target = `/${fieldPath.replace(/^\//, "")}`;
126
+ const processorId = stateManager.getModel().getId();
127
+ const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];
128
+
129
+ const messagesToRemove = messages.filter(m =>
130
+ m.getTarget() === target &&
131
+ m.getCode() === "CustomError" &&
132
+ m.getMessageProcessor()?.getId() === processorId
133
+ );
134
+
135
+ if (messagesToRemove.length > 0) {
136
+ Messaging.removeMessages(messagesToRemove);
119
137
  }
120
138
  }
121
139
 
@@ -125,10 +143,9 @@ export class ValidationDelegate {
125
143
  public mountCrashBoundary(error: Error): void {
126
144
  Logger.error("[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.", error.message, "ValidationDelegate");
127
145
 
128
- const errorPage = new MessagePage({
129
- text: "UI Generation Failed",
130
- description: "The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.",
131
- icon: "sap-icon://error"
146
+ const errorPage = new IllustratedMessage({
147
+ title: "UI Generation Failed",
148
+ description: "The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs."
132
149
  });
133
150
 
134
151
  this.host.setAggregation("_content", errorPage);
@@ -28,8 +28,6 @@ sap.ui.define(["./Registry"], function (___Registry) {
28
28
  class ConditionEngine {
29
29
  /** The active form schema being evaluated. */
30
30
 
31
- /** The cached bound event handler reference for strict garbage collection. */
32
-
33
31
  /**
34
32
  * Initializes the ConditionEngine with the active schema.
35
33
  * @param schema The current UI layout schema.
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionEngine-dbg.js","names":["Registry","___Registry","OperatorRegistry","register","a","b","ConditionEngine","constructor","schema","plugins","Map","handleEvent","fieldKey","isValid","registerPlugin","bindingPath","plugin","set","destroy","clear","__exports","__esModule"],"sources":["ConditionEngine.ts"],"sourcesContent":["/**\n * @file ConditionEngine.ts\n * @description Evaluates dynamic rules to alter the schema in real-time.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { ISchema } from \"../interfaces/ISchema\";\nimport { Registry } from \"./Registry\";\n\nexport type ConditionOperator = (a: unknown, b: unknown) => boolean;\n\nexport const OperatorRegistry = new Registry<ConditionOperator>(\"Operators\");\n\n// Register basic default operators\nOperatorRegistry.register(\"==\", (a, b) => a == b);\nOperatorRegistry.register(\"===\", (a, b) => a === b);\nOperatorRegistry.register(\"!=\", (a, b) => a != b);\nOperatorRegistry.register(\"!==\", (a, b) => a !== b);\nOperatorRegistry.register(\">\", (a, b) => a > b);\nOperatorRegistry.register(\"<\", (a, b) => a < b);\nOperatorRegistry.register(\">=\", (a, b) => a >= b);\nOperatorRegistry.register(\"<=\", (a, b) => a <= b);\n\n/**\n * Engine that listens to the EventBus and evaluates cross-field dependencies (e.g. visibleOn, enabledOn).\n * It delegates actual evaluations to the configurable `OperatorRegistry`.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class ConditionEngine {\n /** The active form schema being evaluated. */\n private schema: ISchema;\n /** The cached bound event handler reference for strict garbage collection. */\n private boundHandler: (event: IFieldChangeEvent) => void;\n\n /**\n * Initializes the ConditionEngine with the active schema.\n * @param schema The current UI layout schema.\n */\n constructor(schema: ISchema) {\n this.schema = schema;\n }\n\n\n\n /** Internal map tracking active plugins against their binding paths for real-time state updates. */\n private plugins: Map<string, IPlugin> = new Map();\n\n /**\n * Internal handler to evaluate business rules when a field is updated.\n * @param fieldKey The key of the field that was changed\n * @param isValid Whether the field is currently valid\n */\n public handleEvent(fieldKey: string, isValid: boolean): void {\n // Evaluate conditions via registered operators if a rule system is added later\n }\n\n /**\n * Registers a rendered plugin so the condition engine can push dynamic state updates to it.\n * \n * @param bindingPath The JSON path representing the field within the payload.\n * @param plugin The instantiated plugin handling the field.\n */\n public registerPlugin(bindingPath: string, plugin: IPlugin): void {\n this.plugins.set(bindingPath, plugin);\n }\n\n /**\n * Cleans up listeners to prevent mem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AG,CAAC,CAAC;;IAEjD;AACJ;AACA;AACA;AACA;IACWC,WAAWA,CAACC,QAAgB,EAAEC,OAAgB,EAAQ;MACzD;IAAA;;IAGJ;AACJ;AACA;AACA;AACA;AACA;IACWC,cAAcA,CAACC,WAAmB,EAAEC,MAAe,EAAQ;MAC9D,IAAI,CAACP,OAAO,CAACQ,GAAG,CAACF,WAAW,EAAEC,MAAM,CAAC;IACzC;;IAEA;AACJ;AACA;IACWE,OAAOA,CAAA,EAAS;MACnB,IAAI,CAACT,OAAO,CAACU,KAAK,CAAC,CAAC;IACxB;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAlB,gBAAA,GAAAA,gBAAA;EAAAkB,SAAA,CAAAd,eAAA,GAAAA,eAAA;EAAA,OAAAc,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"ConditionEngine-dbg.js","names":["Registry","___Registry","OperatorRegistry","register","a","b","ConditionEngine","constructor","schema","plugins","Map","handleEvent","fieldKey","isValid","registerPlugin","bindingPath","plugin","set","destroy","clear","__exports","__esModule"],"sources":["ConditionEngine.ts"],"sourcesContent":["/**\n * @file ConditionEngine.ts\n * @description Evaluates dynamic rules to alter the schema in real-time.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { ISchema } from \"../interfaces/ISchema\";\nimport { Registry } from \"./Registry\";\n\nexport type ConditionOperator = (a: unknown, b: unknown) => boolean;\n\nexport const OperatorRegistry = new Registry<ConditionOperator>(\"Operators\");\n\n// Register basic default operators\nOperatorRegistry.register(\"==\", (a, b) => a == b);\nOperatorRegistry.register(\"===\", (a, b) => a === b);\nOperatorRegistry.register(\"!=\", (a, b) => a != b);\nOperatorRegistry.register(\"!==\", (a, b) => a !== b);\nOperatorRegistry.register(\">\", (a, b) => a > b);\nOperatorRegistry.register(\"<\", (a, b) => a < b);\nOperatorRegistry.register(\">=\", (a, b) => a >= b);\nOperatorRegistry.register(\"<=\", (a, b) => a <= b);\n\n/**\n * Engine that listens to the EventBus and evaluates cross-field dependencies (e.g. visibleOn, enabledOn).\n * It delegates actual evaluations to the configurable `OperatorRegistry`.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class ConditionEngine {\n /** The active form schema being evaluated. */\n private schema: ISchema;\n /**\n * Initializes the ConditionEngine with the active schema.\n * @param schema The current UI layout schema.\n */\n constructor(schema: ISchema) {\n this.schema = schema;\n }\n\n\n\n /** Internal map tracking active plugins against their binding paths for real-time state updates. */\n private plugins: Map<string, IPlugin> = new Map();\n\n /**\n * Internal handler to evaluate business rules when a field is updated.\n * @param fieldKey The key of the field that was changed\n * @param isValid Whether the field is currently valid\n */\n public handleEvent(fieldKey: string, isValid: boolean): void {\n // Evaluate conditions via registered operators if a rule system is added later\n }\n\n /**\n * Registers a rendered plugin so the condition engine can push dynamic state updates to it.\n * \n * @param bindingPath The JSON path representing the field within the payload.\n * @param plugin The instantiated plugin handling the field.\n */\n public registerPlugin(bindingPath: string, plugin: IPlugin): void {\n this.plugins.set(bindingPath, plugin);\n }\n\n /**\n * Cleans up listeners to prevent memory leaks on destruction.\n */\n public destroy(): void {\n this.plugins.clear();\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAOSA,QAAQ,GAAAC,WAAA;EAIV,MAAMC,gBAAgB,GAAG,IAAIF,QAAQ,CAAoB,WAAW,CAAC;;EAE5E;EACAE,gBAAgB,CAACC,QAAQ,CAAC,IAAI,EAAE,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,IAAIC,CAAC,CAAC;EACjDH,gBAAgB,CAACC,QAAQ,CAAC,KAAK,EAAE,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,KAAKC,CAAC,CAAC;EACnDH,gBAAgB,CAACC,QAAQ,CAAC,IAAI,EAAE,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,IAAIC,CAAC,CAAC;EACjDH,gBAAgB,CAACC,QAAQ,CAAC,KAAK,EAAE,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co/siliconst/ui5/metaui/core/ConditionEngine" {
18
18
  export class ConditionEngine {
19
19
  /** The active form schema being evaluated. */
20
20
  private schema;
21
- /** The cached bound event handler reference for strict garbage collection. */
22
- private boundHandler;
23
21
  /**
24
22
  * Initializes the ConditionEngine with the active schema.
25
23
  * @param schema The current UI layout schema.
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionEngine.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,iDAAiD,CAAC;IACjE;;;OAGG;IAEH,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IACxE,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;IAEpE,KAAY,iBAAiB,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;IAE7D,MAAM,gBAAgB,6BAA+C,CAAC;IAY7E;;;;;;OAMG;IACH,MAAa,eAAe;QACxB,8CAA8C;QAC9C,OAAO,CAAC,MAAM,CAAU;QACxB,8EAA8E;QAC9E,OAAO,CAAC,YAAY,CAAqC;QAEzD;;;WAGG;oBACS,MAAM,EAAE,OAAO;QAM3B,oGAAoG;QACpG,OAAO,CAAC,OAAO,CAAmC;QAElD;;;;WAIG;QACI,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;QAI5D;;;;;WAKG;QACI,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;QAIjE;;WAEG;QACI,OAAO,IAAI,IAAI;KAGzB;CAEA"}
1
+ {"version":3,"file":"ConditionEngine.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,iDAAiD,CAAC;IACjE;;;OAGG;IAEH,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IACxE,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;IAEpE,KAAY,iBAAiB,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;IAE7D,MAAM,gBAAgB,6BAA+C,CAAC;IAY7E;;;;;;OAMG;IACH,MAAa,eAAe;QACxB,8CAA8C;QAC9C,OAAO,CAAC,MAAM,CAAU;QACxB;;;WAGG;oBACS,MAAM,EAAE,OAAO;QAM3B,oGAAoG;QACpG,OAAO,CAAC,OAAO,CAAmC;QAElD;;;;WAIG;QACI,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;QAI5D;;;;;WAKG;QACI,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;QAIjE;;WAEG;QACI,OAAO,IAAI,IAAI;KAGzB;CAEA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionEngine.js","names":["Registry","___Registry","OperatorRegistry","register","a","b","ConditionEngine","constructor","schema","this","plugins","Map","handleEvent","fieldKey","isValid","registerPlugin","bindingPath","plugin","set","destroy","clear","__exports","__esModule"],"sources":["ConditionEngine.ts"],"sourcesContent":["/**\n * @file ConditionEngine.ts\n * @description Evaluates dynamic rules to alter the schema in real-time.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { ISchema } from \"../interfaces/ISchema\";\nimport { Registry } from \"./Registry\";\n\nexport type ConditionOperator = (a: unknown, b: unknown) => boolean;\n\nexport const OperatorRegistry = new Registry<ConditionOperator>(\"Operators\");\n\n// Register basic default operators\nOperatorRegistry.register(\"==\", (a, b) => a == b);\nOperatorRegistry.register(\"===\", (a, b) => a === b);\nOperatorRegistry.register(\"!=\", (a, b) => a != b);\nOperatorRegistry.register(\"!==\", (a, b) => a !== b);\nOperatorRegistry.register(\">\", (a, b) => a > b);\nOperatorRegistry.register(\"<\", (a, b) => a < b);\nOperatorRegistry.register(\">=\", (a, b) => a >= b);\nOperatorRegistry.register(\"<=\", (a, b) => a <= b);\n\n/**\n * Engine that listens to the EventBus and evaluates cross-field dependencies (e.g. visibleOn, enabledOn).\n * It delegates actual evaluations to the configurable `OperatorRegistry`.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class ConditionEngine {\n /** The active form schema being evaluated. */\n private schema: ISchema;\n /** The cached bound event handler reference for strict garbage collection. */\n private boundHandler: (event: IFieldChangeEvent) => void;\n\n /**\n * Initializes the ConditionEngine with the active schema.\n * @param schema The current UI layout schema.\n */\n constructor(schema: ISchema) {\n this.schema = schema;\n }\n\n\n\n /** Internal map tracking active plugins against their binding paths for real-time state updates. */\n private plugins: Map<string, IPlugin> = new Map();\n\n /**\n * Internal handler to evaluate business rules when a field is updated.\n * @param fieldKey The key of the field that was changed\n * @param isValid Whether the field is currently valid\n */\n public handleEvent(fieldKey: string, isValid: boolean): void {\n // Evaluate conditions via registered operators if a rule system is added later\n }\n\n /**\n * Registers a rendered plugin so the condition engine can push dynamic state updates to it.\n * \n * @param bindingPath The JSON path representing the field within the payload.\n * @param plugin The instantiated plugin handling the field.\n */\n public registerPlugin(bindingPath: string, plugin: IPlugin): void {\n this.plugins.set(bindingPath, plugin);\n }\n\n /**\n * Cleans up listeners to prevent memory leaks on destruction.\n */\n public destroy(): void {\n this.plugins.clear();\n }\n}\n"],"mappings":"sDAAA,MAOSA,EAAQC,EAAA,YAIV,MAAMC,EAAmB,IAAIF,EAA4B,aAGhEE,EAAiBC,SAAS,KAAM,CAACC,EAAGC,IAAMD,GAAKC,GAC/CH,EAAiBC,SAAS,MAAO,CAACC,EAAGC,IAAMD,IAAMC,GACjDH,EAAiBC,SAAS,KAAM,CAACC,EAAGC,IAAMD,GAAKC,GAC/CH,EAAiBC,SAAS,MAAO,CAACC,EAAGC,IAAMD,IAAMC,GACjDH,EAAiBC,SAAS,IAAK,CAACC,EAAGC,IAAMD,EAAIC,GAC7CH,EAAiBC,SAAS,IAAK,CAACC,EAAGC,IAAMD,EAAIC,GAC7CH,EAAiBC,SAAS,KAAM,CAACC,EAAGC,IAAMD,GAAKC,GAC/CH,EAAiBC,SAAS,KAAM,CAACC,EAAGC,IAAMD,GAAKC,GASxC,MAAMC,EAUTC,YAAYC,GACRC,KAAKD,OAASA,CAClB,CAKQE,QAAgC,IAAIC,IAOrCC,YAAYC,EAAkBC,GACjC,CASGC,eAAeC,EAAqBC,GACvCR,KAAKC,QAAQQ,IAAIF,EAAaC,EAClC,CAKOE,UACHV,KAAKC,QAAQU,OACjB,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAAnB,mBAAAmB,EAAAf,kBAAA,OAAAe,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"ConditionEngine.js","names":["Registry","___Registry","OperatorRegistry","register","a","b","ConditionEngine","constructor","schema","this","plugins","Map","handleEvent","fieldKey","isValid","registerPlugin","bindingPath","plugin","set","destroy","clear","__exports","__esModule"],"sources":["ConditionEngine.ts"],"sourcesContent":["/**\n * @file ConditionEngine.ts\n * @description Evaluates dynamic rules to alter the schema in real-time.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { ISchema } from \"../interfaces/ISchema\";\nimport { Registry } from \"./Registry\";\n\nexport type ConditionOperator = (a: unknown, b: unknown) => boolean;\n\nexport const OperatorRegistry = new Registry<ConditionOperator>(\"Operators\");\n\n// Register basic default operators\nOperatorRegistry.register(\"==\", (a, b) => a == b);\nOperatorRegistry.register(\"===\", (a, b) => a === b);\nOperatorRegistry.register(\"!=\", (a, b) => a != b);\nOperatorRegistry.register(\"!==\", (a, b) => a !== b);\nOperatorRegistry.register(\">\", (a, b) => a > b);\nOperatorRegistry.register(\"<\", (a, b) => a < b);\nOperatorRegistry.register(\">=\", (a, b) => a >= b);\nOperatorRegistry.register(\"<=\", (a, b) => a <= b);\n\n/**\n * Engine that listens to the EventBus and evaluates cross-field dependencies (e.g. visibleOn, enabledOn).\n * It delegates actual evaluations to the configurable `OperatorRegistry`.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class ConditionEngine {\n /** The active form schema being evaluated. */\n private schema: ISchema;\n /**\n * Initializes the ConditionEngine with the active schema.\n * @param schema The current UI layout schema.\n */\n constructor(schema: ISchema) {\n this.schema = schema;\n }\n\n\n\n /** Internal map tracking active plugins against their binding paths for real-time state updates. */\n private plugins: Map<string, IPlugin> = new Map();\n\n /**\n * Internal handler to evaluate business rules when a field is updated.\n * @param fieldKey The key of the field that was changed\n * @param isValid Whether the field is currently valid\n */\n public handleEvent(fieldKey: string, isValid: boolean): void {\n // Evaluate conditions via registered operators if a rule system is added later\n }\n\n /**\n * Registers a rendered plugin so the condition engine can push dynamic state updates to it.\n * \n * @param bindingPath The JSON path representing the field within the payload.\n * @param plugin The instantiated plugin handling the field.\n */\n public registerPlugin(bindingPath: string, plugin: IPlugin): void {\n this.plugins.set(bindingPath, plugin);\n }\n\n /**\n * Cleans up listeners to prevent memory leaks on destruction.\n */\n public destroy(): void {\n this.plugins.clear();\n }\n}\n"],"mappings":"sDAAA,MAOSA,EAAQC,EAAA,YAIV,MAAMC,EAAmB,IAAIF,EAA4B,aAGhEE,EAAiBC,SAAS,KAAM,CAACC,EAAGC,IAAMD,GAAKC,GAC/CH,EAAiBC,SAAS,MAAO,CAACC,EAAGC,IAAMD,IAAMC,GACjDH,EAAiBC,SAAS,KAAM,CAACC,EAAGC,IAAMD,GAAKC,GAC/CH,EAAiBC,SAAS,MAAO,CAACC,EAAGC,IAAMD,IAAMC,GACjDH,EAAiBC,SAAS,IAAK,CAACC,EAAGC,IAAMD,EAAIC,GAC7CH,EAAiBC,SAAS,IAAK,CAACC,EAAGC,IAAMD,EAAIC,GAC7CH,EAAiBC,SAAS,KAAM,CAACC,EAAGC,IAAMD,GAAKC,GAC/CH,EAAiBC,SAAS,KAAM,CAACC,EAAGC,IAAMD,GAAKC,GASxC,MAAMC,EAOTC,YAAYC,GACRC,KAAKD,OAASA,CAClB,CAKQE,QAAgC,IAAIC,IAOrCC,YAAYC,EAAkBC,GACjC,CASGC,eAAeC,EAAqBC,GACvCR,KAAKC,QAAQQ,IAAIF,EAAaC,EAClC,CAKOE,UACHV,KAAKC,QAAQU,OACjB,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAAnB,mBAAAmB,EAAAf,kBAAA,OAAAe,CAAA","ignoreList":[]}
@@ -31,9 +31,6 @@ OperatorRegistry.register("<=", (a, b) => a <= b);
31
31
  export class ConditionEngine {
32
32
  /** The active form schema being evaluated. */
33
33
  private schema: ISchema;
34
- /** The cached bound event handler reference for strict garbage collection. */
35
- private boundHandler: (event: IFieldChangeEvent) => void;
36
-
37
34
  /**
38
35
  * Initializes the ConditionEngine with the active schema.
39
36
  * @param schema The current UI layout schema.
@@ -91,12 +91,10 @@ sap.ui.define([], function () {
91
91
  });
92
92
  }
93
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);
99
- });
94
+ // Do not swallow errors. A failure to synthesize a property is a critical failure.
95
+ const msg = `[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}': ${error.message}`;
96
+ __ui5_require_async("../utils/Logger").then(m => m.Logger.error(msg));
97
+ throw new Error(msg);
100
98
  }
101
99
  }
102
100
  return elements;