@siliconst/metaui 1.4.9 → 1.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/README.md +4 -178
  2. package/package.json +1 -1
  3. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +56 -8
  4. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js.map +1 -1
  5. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts +27 -3
  6. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +1 -1
  7. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js +1 -1
  8. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js.map +1 -1
  9. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts +52 -9
  10. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +132 -18
  11. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js.map +1 -1
  12. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts +14 -9
  13. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts.map +1 -1
  14. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js +1 -1
  15. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js.map +1 -1
  16. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.ts +117 -18
  17. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js +1 -3
  18. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js.map +1 -1
  19. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts.map +1 -1
  20. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js +1 -1
  21. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js.map +1 -1
  22. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.ts +1 -3
  23. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js +9 -6
  24. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js.map +1 -1
  25. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts +1 -1
  26. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts.map +1 -1
  27. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js +1 -1
  28. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js.map +1 -1
  29. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts +9 -6
  30. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js +56 -49
  31. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js.map +1 -1
  32. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts +9 -4
  33. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts.map +1 -1
  34. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js +1 -1
  35. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js.map +1 -1
  36. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts +67 -50
  37. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js +0 -2
  38. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js.map +1 -1
  39. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.d.ts +0 -2
  40. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.d.ts.map +1 -1
  41. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.js.map +1 -1
  42. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.ts +0 -3
  43. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js +4 -6
  44. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js.map +1 -1
  45. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js +1 -1
  46. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js.map +1 -1
  47. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts +4 -4
  48. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +36 -9
  49. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js.map +1 -1
  50. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts +18 -2
  51. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts.map +1 -1
  52. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js +1 -1
  53. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js.map +1 -1
  54. package/src/nz/co/siliconst/ui5/metaui/core/Engine.ts +39 -5
  55. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +19 -2
  56. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js.map +1 -1
  57. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts +9 -0
  58. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts.map +1 -1
  59. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js +1 -1
  60. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js.map +1 -1
  61. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts +21 -7
  62. package/src/nz/co/siliconst/ui5/metaui/core/Registry-dbg.js +3 -1
  63. package/src/nz/co/siliconst/ui5/metaui/core/Registry-dbg.js.map +1 -1
  64. package/src/nz/co/siliconst/ui5/metaui/core/Registry.d.ts.map +1 -1
  65. package/src/nz/co/siliconst/ui5/metaui/core/Registry.js +1 -1
  66. package/src/nz/co/siliconst/ui5/metaui/core/Registry.js.map +1 -1
  67. package/src/nz/co/siliconst/ui5/metaui/core/Registry.ts +3 -1
  68. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +54 -34
  69. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -1
  70. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +3 -1
  71. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
  72. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js +1 -1
  73. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
  74. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +55 -34
  75. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator-dbg.js +7 -6
  76. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator-dbg.js.map +1 -1
  77. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.d.ts.map +1 -1
  78. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.js +1 -1
  79. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.js.map +1 -1
  80. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.ts +7 -6
  81. package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js +40 -11
  82. package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js.map +1 -1
  83. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts +6 -1
  84. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts.map +1 -1
  85. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js +1 -1
  86. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js.map +1 -1
  87. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.ts +39 -13
  88. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin-dbg.js.map +1 -1
  89. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts +13 -0
  90. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts.map +1 -1
  91. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts +15 -0
  92. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema-dbg.js.map +1 -1
  93. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts +1 -0
  94. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts.map +1 -1
  95. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts +1 -0
  96. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js +10 -0
  97. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js.map +1 -1
  98. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.d.ts.map +1 -1
  99. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js +1 -1
  100. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js.map +1 -1
  101. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.ts +10 -0
  102. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js +1 -1
  103. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -1
  104. package/src/nz/co/siliconst/ui5/metaui/library-preload.js +44 -43
  105. package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
  106. package/src/nz/co/siliconst/ui5/metaui/library.d.ts +1 -0
  107. package/src/nz/co/siliconst/ui5/metaui/library.d.ts.map +1 -1
  108. package/src/nz/co/siliconst/ui5/metaui/library.js +1 -1
  109. package/src/nz/co/siliconst/ui5/metaui/library.js.map +1 -1
  110. package/src/nz/co/siliconst/ui5/metaui/library.ts +1 -0
  111. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js +6 -0
  112. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js.map +1 -1
  113. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.d.ts.map +1 -1
  114. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js +1 -1
  115. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js.map +1 -1
  116. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts +6 -0
  117. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +2 -2
  118. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js.map +1 -1
  119. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js +1 -1
  120. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js.map +1 -1
  121. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +2 -2
  122. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js +77 -1
  123. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js.map +1 -1
  124. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts +17 -0
  125. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts.map +1 -1
  126. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js +1 -1
  127. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js.map +1 -1
  128. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +67 -7
  129. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +1 -1
  130. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
  131. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js +1 -1
  132. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
  133. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +1 -1
  134. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +1 -1
  135. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
  136. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js +1 -1
  137. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
  138. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +1 -1
  139. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +10 -3
  140. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js.map +1 -1
  141. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.d.ts.map +1 -1
  142. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js +1 -1
  143. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
  144. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +10 -3
  145. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +1 -1
  146. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
  147. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
  148. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
  149. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +1 -1
  150. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +1 -1
  151. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
  152. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
  153. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
  154. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +1 -1
  155. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +1 -1
  156. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
  157. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js +1 -1
  158. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
  159. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +1 -1
  160. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +1 -1
  161. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
  162. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
  163. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
  164. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +1 -1
  165. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +1 -1
  166. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
  167. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js +1 -1
  168. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
  169. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +1 -1
  170. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js +130 -0
  171. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js.map +1 -0
  172. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts +39 -0
  173. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts.map +1 -0
  174. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js +2 -0
  175. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js.map +1 -0
  176. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts +127 -0
  177. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +1 -1
  178. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js.map +1 -1
  179. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js +1 -1
  180. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js.map +1 -1
  181. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +1 -1
  182. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +2 -2
  183. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
  184. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
  185. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
  186. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +2 -2
  187. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js +6 -0
  188. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js.map +1 -1
  189. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.d.ts.map +1 -1
  190. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js +1 -1
  191. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js.map +1 -1
  192. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.ts +6 -0
  193. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +1 -1
  194. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
  195. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
  196. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
  197. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +1 -1
  198. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +1 -1
  199. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
  200. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js +1 -1
  201. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
  202. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +1 -1
  203. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +1 -1
  204. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
  205. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js +1 -1
  206. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
  207. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +1 -1
  208. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +1 -1
  209. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
  210. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
  211. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
  212. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +1 -1
  213. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +1 -1
  214. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
  215. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js +1 -1
  216. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
  217. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +1 -1
  218. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +1 -1
  219. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js.map +1 -1
  220. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js +1 -1
  221. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js.map +1 -1
  222. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +1 -1
  223. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +40 -4
  224. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
  225. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.d.ts +4 -0
  226. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.d.ts.map +1 -1
  227. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js +1 -1
  228. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
  229. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +41 -3
  230. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +1 -1
  231. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
  232. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
  233. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
  234. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +1 -1
  235. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +1 -1
  236. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
  237. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js +1 -1
  238. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
  239. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +1 -1
  240. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js.map +1 -1
  241. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js.map +1 -1
  242. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.ts +1 -1
  243. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js.map +1 -1
  244. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js.map +1 -1
  245. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.ts +1 -1
  246. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin-dbg.js.map +1 -1
  247. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.d.ts +1 -1
  248. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.d.ts.map +1 -1
  249. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.js.map +1 -1
  250. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.ts +2 -2
  251. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin-dbg.js.map +1 -1
  252. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.d.ts +1 -1
  253. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.d.ts.map +1 -1
  254. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.js.map +1 -1
  255. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.ts +1 -1
  256. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin-dbg.js +1 -1
  257. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin-dbg.js.map +1 -1
  258. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.d.ts +1 -1
  259. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.d.ts.map +1 -1
  260. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.js +1 -1
  261. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.js.map +1 -1
  262. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.ts +2 -2
  263. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin-dbg.js +1 -1
  264. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin-dbg.js.map +1 -1
  265. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.d.ts +1 -1
  266. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.d.ts.map +1 -1
  267. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.js +1 -1
  268. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.js.map +1 -1
  269. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.ts +2 -2
  270. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin-dbg.js +1 -1
  271. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin-dbg.js.map +1 -1
  272. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.d.ts +1 -1
  273. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.d.ts.map +1 -1
  274. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.js +1 -1
  275. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.js.map +1 -1
  276. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.ts +3 -3
  277. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin-dbg.js.map +1 -1
  278. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.d.ts +1 -1
  279. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.d.ts.map +1 -1
  280. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.js.map +1 -1
  281. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.ts +1 -1
  282. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin-dbg.js.map +1 -1
  283. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.d.ts +1 -1
  284. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.d.ts.map +1 -1
  285. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.js.map +1 -1
  286. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.ts +1 -1
  287. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin-dbg.js +2 -2
  288. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin-dbg.js.map +1 -1
  289. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.d.ts +1 -1
  290. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.d.ts.map +1 -1
  291. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.js +1 -1
  292. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.js.map +1 -1
  293. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.ts +4 -4
  294. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin-dbg.js +3 -2
  295. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin-dbg.js.map +1 -1
  296. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.d.ts +1 -1
  297. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.d.ts.map +1 -1
  298. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.js +1 -1
  299. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.js.map +1 -1
  300. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.ts +4 -3
  301. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin-dbg.js +3 -1
  302. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin-dbg.js.map +1 -1
  303. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.d.ts +1 -1
  304. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.d.ts.map +1 -1
  305. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.js +1 -1
  306. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.js.map +1 -1
  307. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.ts +4 -3
@@ -17,15 +17,16 @@ sap.ui.define([], function () {
17
17
  if (!schema || typeof schema !== "object") {
18
18
  return ["Root schema must be an object."];
19
19
  }
20
- if (schema.type !== "object" && schema.type !== "array") {
21
- errors.push(`Root schema must have type 'object' or 'array'. Found: '${schema.type}'`);
20
+ const s = schema;
21
+ if (s.type !== "object" && s.type !== "array") {
22
+ errors.push(`Root schema must have type 'object' or 'array'. Found: '${s.type}'`);
22
23
  }
23
- if (schema.type === "object" && !schema.properties) {
24
+ if (s.type === "object" && !s.properties) {
24
25
  errors.push("Object schema is missing the 'properties' node.");
25
26
  }
26
- if (schema.properties) {
27
- for (const key of Object.keys(schema.properties)) {
28
- const prop = schema.properties[key];
27
+ if (s.properties) {
28
+ for (const key of Object.keys(s.properties)) {
29
+ const prop = s.properties[key];
29
30
  if (!prop || typeof prop !== "object") {
30
31
  errors.push(`Property '${key}' must be an object.`);
31
32
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaValidator-dbg.js","names":["SchemaValidator","validateSchemaStructure","schema","errors","type","push","properties","key","Object","keys","prop","allowedTypes","includes","join","__exports","__esModule"],"sources":["SchemaValidator.ts"],"sourcesContent":["/**\n * @file SchemaValidator.ts\n * @description Structural validation utility to catch developer errors in the JSON schema itself.\n */\n\nimport { ISchema, FieldType } from \"../interfaces/ISchema\";\n\nexport class SchemaValidator {\n /**\n * Validates a parsed JSON schema object for structural correctness.\n * @param schema The schema object to validate\n * @returns An array of error strings. Empty if no errors.\n */\n public static validateSchemaStructure(schema: unknown): string[] {\n const errors: string[] = [];\n\n if (!schema || typeof schema !== \"object\") {\n return [\"Root schema must be an object.\"];\n }\n\n if (schema.type !== \"object\" && schema.type !== \"array\") {\n errors.push(`Root schema must have type 'object' or 'array'. Found: '${schema.type}'`);\n }\n\n if (schema.type === \"object\" && !schema.properties) {\n errors.push(\"Object schema is missing the 'properties' node.\");\n }\n\n if (schema.properties) {\n for (const key of Object.keys(schema.properties)) {\n const prop = schema.properties[key];\n if (!prop || typeof prop !== \"object\") {\n errors.push(`Property '${key}' must be an object.`);\n continue;\n }\n\n if (!prop.type) {\n errors.push(`Property '${key}' is missing 'type'.`);\n } else {\n const allowedTypes: FieldType[] = [\"string\", \"number\", \"boolean\", \"date\", \"object\", \"array\"];\n if (!allowedTypes.includes(prop.type)) {\n errors.push(`Property '${key}' has invalid type '${prop.type}'. Allowed: ${allowedTypes.join(\", \")}`);\n }\n }\n\n // Removed strict check for prop.items on array properties because inference handles empty definitions\n\n }\n }\n\n return errors;\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;;EAIO,MAAMA,eAAe,CAAC;IACzB;AACJ;AACA;AACA;AACA;IACI,OAAcC,uBAAuBA,CAACC,MAAe,EAAY;MAC7D,MAAMC,MAAgB,GAAG,EAAE;MAE3B,IAAI,CAACD,MAAM,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;QACvC,OAAO,CAAC,gCAAgC,CAAC;MAC7C;MAEA,IAAIA,MAAM,CAACE,IAAI,KAAK,QAAQ,IAAIF,MAAM,CAACE,IAAI,KAAK,OAAO,EAAE;QACrDD,MAAM,CAACE,IAAI,CAAC,2DAA2DH,MAAM,CAACE,IAAI,GAAG,CAAC;MAC1F;MAEA,IAAIF,MAAM,CAACE,IAAI,KAAK,QAAQ,IAAI,CAACF,MAAM,CAACI,UAAU,EAAE;QAChDH,MAAM,CAACE,IAAI,CAAC,iDAAiD,CAAC;MAClE;MAEA,IAAIH,MAAM,CAACI,UAAU,EAAE;QACnB,KAAK,MAAMC,GAAG,IAAIC,MAAM,CAACC,IAAI,CAACP,MAAM,CAACI,UAAU,CAAC,EAAE;UAC9C,MAAMI,IAAI,GAAGR,MAAM,CAACI,UAAU,CAACC,GAAG,CAAC;UACnC,IAAI,CAACG,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;YACnCP,MAAM,CAACE,IAAI,CAAC,aAAaE,GAAG,sBAAsB,CAAC;YACnD;UACJ;UAEA,IAAI,CAACG,IAAI,CAACN,IAAI,EAAE;YACZD,MAAM,CAACE,IAAI,CAAC,aAAaE,GAAG,sBAAsB,CAAC;UACvD,CAAC,MAAM;YACH,MAAMI,YAAyB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;YAC5F,IAAI,CAACA,YAAY,CAACC,QAAQ,CAACF,IAAI,CAACN,IAAI,CAAC,EAAE;cACnCD,MAAM,CAACE,IAAI,CAAC,aAAaE,GAAG,uBAAuBG,IAAI,CAACN,IAAI,eAAeO,YAAY,CAACE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACzG;UACJ;;UAEA;QAEJ;MACJ;MAEA,OAAOV,MAAM;IACjB;EACJ;EAAC,IAAAW,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAd,eAAA,GAAAA,eAAA;EAAA,OAAAc,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"SchemaValidator-dbg.js","names":["SchemaValidator","validateSchemaStructure","schema","errors","s","type","push","properties","key","Object","keys","prop","allowedTypes","includes","join","__exports","__esModule"],"sources":["SchemaValidator.ts"],"sourcesContent":["/**\n * @file SchemaValidator.ts\n * @description Structural validation utility to catch developer errors in the JSON schema itself.\n */\n\nimport { ISchema, FieldType } from \"../interfaces/ISchema\";\n\nexport class SchemaValidator {\n /**\n * Validates a parsed JSON schema object for structural correctness.\n * @param schema The schema object to validate\n * @returns An array of error strings. Empty if no errors.\n */\n public static validateSchemaStructure(schema: unknown): string[] {\n const errors: string[] = [];\n\n if (!schema || typeof schema !== \"object\") {\n return [\"Root schema must be an object.\"];\n }\n\n const s = schema as Record<string, any>;\n if (s.type !== \"object\" && s.type !== \"array\") {\n errors.push(`Root schema must have type 'object' or 'array'. Found: '${s.type}'`);\n }\n\n if (s.type === \"object\" && !s.properties) {\n errors.push(\"Object schema is missing the 'properties' node.\");\n }\n\n if (s.properties) {\n for (const key of Object.keys(s.properties)) {\n const prop = s.properties[key];\n if (!prop || typeof prop !== \"object\") {\n errors.push(`Property '${key}' must be an object.`);\n continue;\n }\n\n if (!prop.type) {\n errors.push(`Property '${key}' is missing 'type'.`);\n } else {\n const allowedTypes: FieldType[] = [\"string\", \"number\", \"boolean\", \"date\", \"object\", \"array\"];\n if (!allowedTypes.includes(prop.type)) {\n errors.push(`Property '${key}' has invalid type '${prop.type}'. Allowed: ${allowedTypes.join(\", \")}`);\n }\n }\n\n // Removed strict check for prop.items on array properties because inference handles empty definitions\n\n }\n }\n\n return errors;\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;;EAIO,MAAMA,eAAe,CAAC;IACzB;AACJ;AACA;AACA;AACA;IACI,OAAcC,uBAAuBA,CAACC,MAAe,EAAY;MAC7D,MAAMC,MAAgB,GAAG,EAAE;MAE3B,IAAI,CAACD,MAAM,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;QACvC,OAAO,CAAC,gCAAgC,CAAC;MAC7C;MAEA,MAAME,CAAC,GAAGF,MAA6B;MACvC,IAAIE,CAAC,CAACC,IAAI,KAAK,QAAQ,IAAID,CAAC,CAACC,IAAI,KAAK,OAAO,EAAE;QAC3CF,MAAM,CAACG,IAAI,CAAC,2DAA2DF,CAAC,CAACC,IAAI,GAAG,CAAC;MACrF;MAEA,IAAID,CAAC,CAACC,IAAI,KAAK,QAAQ,IAAI,CAACD,CAAC,CAACG,UAAU,EAAE;QACtCJ,MAAM,CAACG,IAAI,CAAC,iDAAiD,CAAC;MAClE;MAEA,IAAIF,CAAC,CAACG,UAAU,EAAE;QACd,KAAK,MAAMC,GAAG,IAAIC,MAAM,CAACC,IAAI,CAACN,CAAC,CAACG,UAAU,CAAC,EAAE;UACzC,MAAMI,IAAI,GAAGP,CAAC,CAACG,UAAU,CAACC,GAAG,CAAC;UAC9B,IAAI,CAACG,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;YACnCR,MAAM,CAACG,IAAI,CAAC,aAAaE,GAAG,sBAAsB,CAAC;YACnD;UACJ;UAEA,IAAI,CAACG,IAAI,CAACN,IAAI,EAAE;YACZF,MAAM,CAACG,IAAI,CAAC,aAAaE,GAAG,sBAAsB,CAAC;UACvD,CAAC,MAAM;YACH,MAAMI,YAAyB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;YAC5F,IAAI,CAACA,YAAY,CAACC,QAAQ,CAACF,IAAI,CAACN,IAAI,CAAC,EAAE;cACnCF,MAAM,CAACG,IAAI,CAAC,aAAaE,GAAG,uBAAuBG,IAAI,CAACN,IAAI,eAAeO,YAAY,CAACE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACzG;UACJ;;UAEA;QAEJ;MACJ;MAEA,OAAOX,MAAM;IACjB;EACJ;EAAC,IAAAY,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAf,eAAA,GAAAA,eAAA;EAAA,OAAAe,SAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaValidator.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,iDAAiD,CAAC;IAQjE,MAAa,eAAe;QACxB;;;;WAIG;eACW,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE;KAuCnE;CAEA"}
1
+ {"version":3,"file":"SchemaValidator.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,iDAAiD,CAAC;IAQjE,MAAa,eAAe;QACxB;;;;WAIG;eACW,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE;KAwCnE;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define([],function(){"use strict";class e{static validateSchemaStructure(e){const t=[];if(!e||typeof e!=="object"){return["Root schema must be an object."]}if(e.type!=="object"&&e.type!=="array"){t.push(`Root schema must have type 'object' or 'array'. Found: '${e.type}'`)}if(e.type==="object"&&!e.properties){t.push("Object schema is missing the 'properties' node.")}if(e.properties){for(const o of Object.keys(e.properties)){const r=e.properties[o];if(!r||typeof r!=="object"){t.push(`Property '${o}' must be an object.`);continue}if(!r.type){t.push(`Property '${o}' is missing 'type'.`)}else{const e=["string","number","boolean","date","object","array"];if(!e.includes(r.type)){t.push(`Property '${o}' has invalid type '${r.type}'. Allowed: ${e.join(", ")}`)}}}}return t}}var t={__esModule:true};t.SchemaValidator=e;return t});
1
+ sap.ui.define([],function(){"use strict";class e{static validateSchemaStructure(e){const t=[];if(!e||typeof e!=="object"){return["Root schema must be an object."]}const o=e;if(o.type!=="object"&&o.type!=="array"){t.push(`Root schema must have type 'object' or 'array'. Found: '${o.type}'`)}if(o.type==="object"&&!o.properties){t.push("Object schema is missing the 'properties' node.")}if(o.properties){for(const e of Object.keys(o.properties)){const s=o.properties[e];if(!s||typeof s!=="object"){t.push(`Property '${e}' must be an object.`);continue}if(!s.type){t.push(`Property '${e}' is missing 'type'.`)}else{const o=["string","number","boolean","date","object","array"];if(!o.includes(s.type)){t.push(`Property '${e}' has invalid type '${s.type}'. Allowed: ${o.join(", ")}`)}}}}return t}}var t={__esModule:true};t.SchemaValidator=e;return t});
2
2
  //# sourceMappingURL=SchemaValidator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaValidator.js","names":["SchemaValidator","validateSchemaStructure","schema","errors","type","push","properties","key","Object","keys","prop","allowedTypes","includes","join","__exports","__esModule"],"sources":["SchemaValidator.ts"],"sourcesContent":["/**\n * @file SchemaValidator.ts\n * @description Structural validation utility to catch developer errors in the JSON schema itself.\n */\n\nimport { ISchema, FieldType } from \"../interfaces/ISchema\";\n\nexport class SchemaValidator {\n /**\n * Validates a parsed JSON schema object for structural correctness.\n * @param schema The schema object to validate\n * @returns An array of error strings. Empty if no errors.\n */\n public static validateSchemaStructure(schema: unknown): string[] {\n const errors: string[] = [];\n\n if (!schema || typeof schema !== \"object\") {\n return [\"Root schema must be an object.\"];\n }\n\n if (schema.type !== \"object\" && schema.type !== \"array\") {\n errors.push(`Root schema must have type 'object' or 'array'. Found: '${schema.type}'`);\n }\n\n if (schema.type === \"object\" && !schema.properties) {\n errors.push(\"Object schema is missing the 'properties' node.\");\n }\n\n if (schema.properties) {\n for (const key of Object.keys(schema.properties)) {\n const prop = schema.properties[key];\n if (!prop || typeof prop !== \"object\") {\n errors.push(`Property '${key}' must be an object.`);\n continue;\n }\n\n if (!prop.type) {\n errors.push(`Property '${key}' is missing 'type'.`);\n } else {\n const allowedTypes: FieldType[] = [\"string\", \"number\", \"boolean\", \"date\", \"object\", \"array\"];\n if (!allowedTypes.includes(prop.type)) {\n errors.push(`Property '${key}' has invalid type '${prop.type}'. Allowed: ${allowedTypes.join(\", \")}`);\n }\n }\n\n // Removed strict check for prop.items on array properties because inference handles empty definitions\n\n }\n }\n\n return errors;\n }\n}\n"],"mappings":"yCAOO,MAAMA,EAMT,8BAAcC,CAAwBC,GAClC,MAAMC,EAAmB,GAEzB,IAAKD,UAAiBA,IAAW,SAAU,CACvC,MAAO,CAAC,iCACZ,CAEA,GAAIA,EAAOE,OAAS,UAAYF,EAAOE,OAAS,QAAS,CACrDD,EAAOE,KAAK,2DAA2DH,EAAOE,QAClF,CAEA,GAAIF,EAAOE,OAAS,WAAaF,EAAOI,WAAY,CAChDH,EAAOE,KAAK,kDAChB,CAEA,GAAIH,EAAOI,WAAY,CACnB,IAAK,MAAMC,KAAOC,OAAOC,KAAKP,EAAOI,YAAa,CAC9C,MAAMI,EAAOR,EAAOI,WAAWC,GAC/B,IAAKG,UAAeA,IAAS,SAAU,CACnCP,EAAOE,KAAK,aAAaE,yBACzB,QACJ,CAEA,IAAKG,EAAKN,KAAM,CACZD,EAAOE,KAAK,aAAaE,wBAC7B,KAAO,CACH,MAAMI,EAA4B,CAAC,SAAU,SAAU,UAAW,OAAQ,SAAU,SACpF,IAAKA,EAAaC,SAASF,EAAKN,MAAO,CACnCD,EAAOE,KAAK,aAAaE,wBAA0BG,EAAKN,mBAAmBO,EAAaE,KAAK,QACjG,CACJ,CAIJ,CACJ,CAEA,OAAOV,CACX,EACH,IAAAW,EAAA,CAAAC,WAAA,MAAAD,EAAAd,kBAAA,OAAAc,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"SchemaValidator.js","names":["SchemaValidator","validateSchemaStructure","schema","errors","s","type","push","properties","key","Object","keys","prop","allowedTypes","includes","join","__exports","__esModule"],"sources":["SchemaValidator.ts"],"sourcesContent":["/**\n * @file SchemaValidator.ts\n * @description Structural validation utility to catch developer errors in the JSON schema itself.\n */\n\nimport { ISchema, FieldType } from \"../interfaces/ISchema\";\n\nexport class SchemaValidator {\n /**\n * Validates a parsed JSON schema object for structural correctness.\n * @param schema The schema object to validate\n * @returns An array of error strings. Empty if no errors.\n */\n public static validateSchemaStructure(schema: unknown): string[] {\n const errors: string[] = [];\n\n if (!schema || typeof schema !== \"object\") {\n return [\"Root schema must be an object.\"];\n }\n\n const s = schema as Record<string, any>;\n if (s.type !== \"object\" && s.type !== \"array\") {\n errors.push(`Root schema must have type 'object' or 'array'. Found: '${s.type}'`);\n }\n\n if (s.type === \"object\" && !s.properties) {\n errors.push(\"Object schema is missing the 'properties' node.\");\n }\n\n if (s.properties) {\n for (const key of Object.keys(s.properties)) {\n const prop = s.properties[key];\n if (!prop || typeof prop !== \"object\") {\n errors.push(`Property '${key}' must be an object.`);\n continue;\n }\n\n if (!prop.type) {\n errors.push(`Property '${key}' is missing 'type'.`);\n } else {\n const allowedTypes: FieldType[] = [\"string\", \"number\", \"boolean\", \"date\", \"object\", \"array\"];\n if (!allowedTypes.includes(prop.type)) {\n errors.push(`Property '${key}' has invalid type '${prop.type}'. Allowed: ${allowedTypes.join(\", \")}`);\n }\n }\n\n // Removed strict check for prop.items on array properties because inference handles empty definitions\n\n }\n }\n\n return errors;\n }\n}\n"],"mappings":"yCAOO,MAAMA,EAMT,8BAAcC,CAAwBC,GAClC,MAAMC,EAAmB,GAEzB,IAAKD,UAAiBA,IAAW,SAAU,CACvC,MAAO,CAAC,iCACZ,CAEA,MAAME,EAAIF,EACV,GAAIE,EAAEC,OAAS,UAAYD,EAAEC,OAAS,QAAS,CAC3CF,EAAOG,KAAK,2DAA2DF,EAAEC,QAC7E,CAEA,GAAID,EAAEC,OAAS,WAAaD,EAAEG,WAAY,CACtCJ,EAAOG,KAAK,kDAChB,CAEA,GAAIF,EAAEG,WAAY,CACd,IAAK,MAAMC,KAAOC,OAAOC,KAAKN,EAAEG,YAAa,CACzC,MAAMI,EAAOP,EAAEG,WAAWC,GAC1B,IAAKG,UAAeA,IAAS,SAAU,CACnCR,EAAOG,KAAK,aAAaE,yBACzB,QACJ,CAEA,IAAKG,EAAKN,KAAM,CACZF,EAAOG,KAAK,aAAaE,wBAC7B,KAAO,CACH,MAAMI,EAA4B,CAAC,SAAU,SAAU,UAAW,OAAQ,SAAU,SACpF,IAAKA,EAAaC,SAASF,EAAKN,MAAO,CACnCF,EAAOG,KAAK,aAAaE,wBAA0BG,EAAKN,mBAAmBO,EAAaE,KAAK,QACjG,CACJ,CAIJ,CACJ,CAEA,OAAOX,CACX,EACH,IAAAY,EAAA,CAAAC,WAAA,MAAAD,EAAAf,kBAAA,OAAAe,CAAA","ignoreList":[]}
@@ -18,17 +18,18 @@ export class SchemaValidator {
18
18
  return ["Root schema must be an object."];
19
19
  }
20
20
 
21
- if (schema.type !== "object" && schema.type !== "array") {
22
- errors.push(`Root schema must have type 'object' or 'array'. Found: '${schema.type}'`);
21
+ const s = schema as Record<string, any>;
22
+ if (s.type !== "object" && s.type !== "array") {
23
+ errors.push(`Root schema must have type 'object' or 'array'. Found: '${s.type}'`);
23
24
  }
24
25
 
25
- if (schema.type === "object" && !schema.properties) {
26
+ if (s.type === "object" && !s.properties) {
26
27
  errors.push("Object schema is missing the 'properties' node.");
27
28
  }
28
29
 
29
- if (schema.properties) {
30
- for (const key of Object.keys(schema.properties)) {
31
- const prop = schema.properties[key];
30
+ if (s.properties) {
31
+ for (const key of Object.keys(s.properties)) {
32
+ const prop = s.properties[key];
32
33
  if (!prop || typeof prop !== "object") {
33
34
  errors.push(`Property '${key}' must be an object.`);
34
35
  continue;
@@ -6,8 +6,11 @@ sap.ui.define(["sap/ui/model/json/JSONModel", "./PipelineManager", "sap/ui/core/
6
6
  * Manages the isolated internal data payload for the MetaUI engine.
7
7
  */
8
8
  class StateManager {
9
+ schema = null;
10
+ _useMessageManager = false;
11
+
9
12
  /**
10
- * Initializes the state manager with an optional initial payload.
13
+ * Initializes the state manager with an authentic SAPUI5 JSONModel.
11
14
  * @param initialData The initial JSON payload to populate the fields.
12
15
  * @param schema The normalized schema for live validation.
13
16
  * @param modelName The UI5 model alias used for isolation.
@@ -30,6 +33,13 @@ sap.ui.define(["sap/ui/model/json/JSONModel", "./PipelineManager", "sap/ui/core/
30
33
  };
31
34
  }
32
35
 
36
+ /**
37
+ * Updates the flag indicating whether this manager should push validation errors directly to the global MessageManager.
38
+ */
39
+ setUseMessageManager(use) {
40
+ this._useMessageManager = use;
41
+ }
42
+
33
43
  /**
34
44
  * Validates a specific path against the schema and updates the MessageManager.
35
45
  */
@@ -40,13 +50,15 @@ sap.ui.define(["sap/ui/model/json/JSONModel", "./PipelineManager", "sap/ui/core/
40
50
  const targetPath = sPath.startsWith("/") ? sPath : `/${sPath}`; // Pure UI5: target MUST be absolute path
41
51
 
42
52
  // 1. Remove existing messages (strictly for THIS model instance)
43
- const existingMessages = messageManager.getMessageModel().getData();
44
- const messagesToRemove = existingMessages.filter(msg => {
45
- const isMatch = msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.model.getId();
46
- return isMatch;
47
- });
48
- if (messagesToRemove.length > 0) {
49
- messageManager.removeMessages(messagesToRemove);
53
+ if (this._useMessageManager) {
54
+ const existingMessages = messageManager.getMessageModel().getData();
55
+ const messagesToRemove = existingMessages.filter(msg => {
56
+ const isMatch = msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.model.getId();
57
+ return isMatch;
58
+ });
59
+ if (messagesToRemove.length > 0) {
60
+ messageManager.removeMessages(messagesToRemove);
61
+ }
50
62
  }
51
63
  if (!metadata) return;
52
64
 
@@ -58,10 +70,27 @@ sap.ui.define(["sap/ui/model/json/JSONModel", "./PipelineManager", "sap/ui/core/
58
70
  }
59
71
  if (metadata.type === "string" && metadata.maxLength) {
60
72
  validatorsToRun.push("maxLength");
61
- argsMap["maxLength"] = {
62
- max: metadata.maxLength
73
+ argsMap["maxLength"] = metadata.maxLength;
74
+ }
75
+ if (metadata.minLength) {
76
+ validatorsToRun.push("minLength");
77
+ argsMap["minLength"] = metadata.minLength;
78
+ }
79
+ if (metadata.pattern) {
80
+ validatorsToRun.push("pattern");
81
+ argsMap["pattern"] = metadata.pattern;
82
+ }
83
+ if (metadata.minimum !== undefined || metadata.maximum !== undefined) {
84
+ validatorsToRun.push("range");
85
+ argsMap["range"] = {
86
+ min: metadata.minimum,
87
+ max: metadata.maximum
63
88
  };
64
89
  }
90
+ const format = metadata.ui?.format;
91
+ if (format === "email" || format === "url" || format === "iban") {
92
+ validatorsToRun.push(format);
93
+ }
65
94
  if (metadata.ui?.validators) {
66
95
  for (const v of metadata.ui.validators) {
67
96
  if (typeof v === "string") {
@@ -76,7 +105,7 @@ sap.ui.define(["sap/ui/model/json/JSONModel", "./PipelineManager", "sap/ui/core/
76
105
  }
77
106
  if (validatorsToRun.length > 0) {
78
107
  const validationResult = GlobalPipeline.executeValidation(value, validatorsToRun, argsMap);
79
- if (!validationResult.isValid) {
108
+ if (!validationResult.isValid && this._useMessageManager) {
80
109
  const newMsg = new Message({
81
110
  message: validationResult.errorMessage || "Invalid value.",
82
111
  type: coreLibrary.MessageType.Error,
@@ -1 +1 @@
1
- {"version":3,"file":"StateManager-dbg.js","names":["GlobalPipeline","___PipelineManager","StateManager","constructor","initialData","schema","modelName","activeModelName","safeData","JSON","parse","stringify","model","JSONModel","setDefaultBindingMode","originalSetProperty","setProperty","bind","sPath","oValue","oContext","bAsyncUpdate","result","validatePath","value","fieldKey","replace","metadata","findMetadataForPath","messageManager","Messaging","targetPath","startsWith","existingMessages","getMessageModel","getData","messagesToRemove","filter","msg","isMatch","getTarget","getMessageProcessor","getId","length","removeMessages","validatorsToRun","argsMap","required","push","type","maxLength","max","ui","validators","v","name","args","undefined","validationResult","executeValidation","isValid","newMsg","Message","message","errorMessage","coreLibrary","MessageType","Error","target","processor","addMessages","path","properties","getModel","bindControl","control","property","bindingPath","bindProperty","extractPayload","data","destroy","__exports","__esModule"],"sources":["StateManager.ts"],"sourcesContent":["/**\n * @file StateManager.ts\n * @description Isolated internal state management. Decouples the MetaUI engine from external host models.\n */\n\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport ManagedObject from \"sap/ui/base/ManagedObject\";\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { GlobalPipeline } from \"./PipelineManager\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\nimport Core from \"sap/ui/core/Core\";\nimport Messaging from \"sap/ui/core/Messaging\";\n\n\n/**\n * Manages the isolated internal data payload for the MetaUI engine.\n */\nexport class StateManager {\n private model: JSONModel;\n private activeModelName: string;\n private schema: ISchema;\n\n /**\n * Initializes the state manager with an optional initial payload.\n * @param initialData The initial JSON payload to populate the fields.\n * @param schema The normalized schema for live validation.\n * @param modelName The UI5 model alias used for isolation.\n */\n constructor(initialData: Record<string, unknown> = {}, schema: ISchema, modelName: string = \"meta\") {\n this.activeModelName = modelName;\n this.schema = schema;\n \n // Deep copy to ensure no reference leakage from the host application\n const safeData = JSON.parse(JSON.stringify(initialData));\n this.model = new JSONModel(safeData);\n this.model.setDefaultBindingMode(\"TwoWay\");\n\n // Centralized Model-Level Validation Interceptor\n const originalSetProperty = this.model.setProperty.bind(this.model);\n this.model.setProperty = (sPath: string, oValue: unknown, oContext?: unknown, bAsyncUpdate?: boolean) => {\n const result = originalSetProperty(sPath, oValue, oContext, bAsyncUpdate);\n this.validatePath(sPath, oValue);\n return result;\n };\n }\n\n /**\n * Validates a specific path against the schema and updates the MessageManager.\n */\n private validatePath(sPath: string, value: unknown): void {\n const fieldKey = sPath.replace(/^\\//, \"\");\n const metadata = this.findMetadataForPath(fieldKey);\n \n const messageManager = Messaging;\n const targetPath = sPath.startsWith(\"/\") ? sPath : `/${sPath}`; // Pure UI5: target MUST be absolute path\n \n // 1. Remove existing messages (strictly for THIS model instance)\n const existingMessages = messageManager.getMessageModel().getData();\n const messagesToRemove = existingMessages.filter((msg: sap.ui.core.message.Message) => {\n const isMatch = msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.model.getId();\n return isMatch;\n });\n \n \n if (messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n\n if (!metadata) return;\n\n // 2. Run GlobalPipeline\n const validatorsToRun: string[] = [];\n const argsMap: Record<string, unknown> = {};\n\n if (metadata.required) {\n validatorsToRun.push(\"required\");\n }\n if (metadata.type === \"string\" && metadata.maxLength) {\n validatorsToRun.push(\"maxLength\");\n argsMap[\"maxLength\"] = { max: metadata.maxLength };\n }\n if (metadata.ui?.validators) {\n for (const v of metadata.ui.validators) {\n if (typeof v === \"string\") {\n validatorsToRun.push(v);\n } else if (v && v.name) {\n validatorsToRun.push(v.name);\n if (v.args !== undefined) {\n argsMap[v.name] = v.args;\n }\n }\n }\n }\n\n if (validatorsToRun.length > 0) {\n const validationResult = GlobalPipeline.executeValidation(value, validatorsToRun, argsMap);\n if (!validationResult.isValid) {\n const newMsg = new Message({\n message: validationResult.errorMessage || \"Invalid value.\",\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: this.model\n });\n messageManager.addMessages(newMsg);\n }\n }\n }\n\n /**\n * Resolves the schema metadata for a given internal binding path.\n * @param path The flat binding path representing the field.\n * @returns The associated IPropertyMetadata, or undefined if not mapped.\n */\n private findMetadataForPath(path: string): IPropertyMetadata | undefined {\n if (!this.schema || !this.schema.properties) return undefined;\n // Basic single-level support for now. Nested object resolution would split by '.' or '/'\n return this.schema.properties[path];\n }\n\n\n\n /**\n * Retrieves the isolated JSONModel instance to attach to the root GeneratorHost control.\n * @returns The internal JSONModel.\n */\n public getModel(): JSONModel {\n return this.model;\n }\n\n /**\n * Binds a generated UI control property to a path in the internal model.\n * @param control The target UI5 Control.\n * @param property The UI5 property name (e.g., 'value').\n * @param bindingPath The exact path in the JSON payload.\n */\n public bindControl(control: ManagedObject, property: string, bindingPath: string): void {\n control.bindProperty(property, {\n path: bindingPath,\n model: \"meta\" // Assumes the model is bound to the root container with the name 'meta'\n });\n }\n\n /**\n * Extracts the flat JavaScript object representing the current state of the UI.\n * @returns A serialized record of the data payload, free of UI5 wrappers.\n */\n public extractPayload(): Record<string, unknown> {\n // Create a deep copy to prevent accidental mutations by the host\n const data = this.model.getData();\n return JSON.parse(JSON.stringify(data));\n }\n\n /**\n * Cleans up internal state and natively destroys the UI5 JSONModel to prevent memory leaks.\n */\n public destroy(): void {\n \n if (this.model) {\n this.model.destroy();\n }\n }\n}\n"],"mappings":";;;QAQSA,cAAc,GAAAC,kBAAA;EAOvB;AACA;AACA;EACO,MAAMC,YAAY,CAAC;IAKtB;AACJ;AACA;AACA;AACA;AACA;IACIC,WAAWA,CAACC,WAAoC,GAAG,CAAC,CAAC,EAAEC,MAAe,EAAEC,SAAiB,GAAG,MAAM,EAAE;MAChG,IAAI,CAACC,eAAe,GAAGD,SAAS;MAChC,IAAI,CAACD,MAAM,GAAGA,MAAM;;MAEpB;MACA,MAAMG,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,SAAS,CAACP,WAAW,CAAC,CAAC;MACxD,IAAI,CAACQ,KAAK,GAAG,IAAIC,SAA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EAAAD,SAAA,CAAAhF,YAAA,GAAAA,YAAA;EAAA,OAAAgF,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"StateManager-dbg.js","names":["GlobalPipeline","___PipelineManager","StateManager","schema","_useMessageManager","constructor","initialData","modelName","activeModelName","safeData","JSON","parse","stringify","model","JSONModel","setDefaultBindingMode","originalSetProperty","setProperty","bind","sPath","oValue","oContext","bAsyncUpdate","result","validatePath","setUseMessageManager","use","value","fieldKey","replace","metadata","findMetadataForPath","messageManager","Messaging","targetPath","startsWith","existingMessages","getMessageModel","getData","messagesToRemove","filter","msg","isMatch","getTarget","getMessageProcessor","getId","length","removeMessages","validatorsToRun","argsMap","required","push","type","maxLength","minLength","pattern","minimum","undefined","maximum","min","max","format","ui","validators","v","name","args","validationResult","executeValidation","isValid","newMsg","Message","message","errorMessage","coreLibrary","MessageType","Error","target","processor","addMessages","path","properties","getModel","bindControl","control","property","bindingPath","bindProperty","extractPayload","data","destroy","__exports","__esModule"],"sources":["StateManager.ts"],"sourcesContent":["/**\n * @file StateManager.ts\n * @description Isolated internal state management. Decouples the MetaUI engine from external host models.\n */\n\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport ManagedObject from \"sap/ui/base/ManagedObject\";\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { GlobalPipeline } from \"./PipelineManager\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\nimport Core from \"sap/ui/core/Core\";\nimport Messaging from \"sap/ui/core/Messaging\";\n\n\n/**\n * Manages the isolated internal data payload for the MetaUI engine.\n */\nexport class StateManager {\n private model: JSONModel;\n private activeModelName: string;\n private schema: ISchema | null = null;\n private _useMessageManager: boolean = false;\n\n /**\n * Initializes the state manager with an authentic SAPUI5 JSONModel.\n * @param initialData The initial JSON payload to populate the fields.\n * @param schema The normalized schema for live validation.\n * @param modelName The UI5 model alias used for isolation.\n */\n constructor(initialData: Record<string, unknown> = {}, schema: ISchema, modelName: string = \"meta\") {\n this.activeModelName = modelName;\n this.schema = schema;\n \n // Deep copy to ensure no reference leakage from the host application\n const safeData = JSON.parse(JSON.stringify(initialData));\n this.model = new JSONModel(safeData);\n this.model.setDefaultBindingMode(\"TwoWay\");\n\n // Centralized Model-Level Validation Interceptor\n const originalSetProperty = this.model.setProperty.bind(this.model);\n this.model.setProperty = (sPath: string, oValue: unknown, oContext?: unknown, bAsyncUpdate?: boolean) => {\n const result = originalSetProperty(sPath, oValue, oContext, bAsyncUpdate);\n this.validatePath(sPath, oValue);\n return result;\n };\n }\n\n /**\n * Updates the flag indicating whether this manager should push validation errors directly to the global MessageManager.\n */\n public setUseMessageManager(use: boolean): void {\n this._useMessageManager = use;\n }\n\n /**\n * Validates a specific path against the schema and updates the MessageManager.\n */\n private validatePath(sPath: string, value: unknown): void {\n const fieldKey = sPath.replace(/^\\//, \"\");\n const metadata = this.findMetadataForPath(fieldKey);\n \n const messageManager = Messaging;\n const targetPath = sPath.startsWith(\"/\") ? sPath : `/${sPath}`; // Pure UI5: target MUST be absolute path\n \n // 1. Remove existing messages (strictly for THIS model instance)\n if (this._useMessageManager) {\n const existingMessages = messageManager.getMessageModel().getData();\n const messagesToRemove = existingMessages.filter((msg: sap.ui.core.message.Message) => {\n const isMatch = msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.model.getId();\n return isMatch;\n });\n \n if (messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n }\n\n if (!metadata) return;\n\n // 2. Run GlobalPipeline\n const validatorsToRun: string[] = [];\n const argsMap: Record<string, unknown> = {};\n\n if (metadata.required) {\n validatorsToRun.push(\"required\");\n }\n if (metadata.type === \"string\" && metadata.maxLength) {\n validatorsToRun.push(\"maxLength\");\n argsMap[\"maxLength\"] = metadata.maxLength;\n }\n if (metadata.minLength) {\n validatorsToRun.push(\"minLength\");\n argsMap[\"minLength\"] = metadata.minLength;\n }\n if (metadata.pattern) {\n validatorsToRun.push(\"pattern\");\n argsMap[\"pattern\"] = metadata.pattern;\n }\n if (metadata.minimum !== undefined || metadata.maximum !== undefined) {\n validatorsToRun.push(\"range\");\n argsMap[\"range\"] = { min: metadata.minimum, max: metadata.maximum };\n }\n \n const format = metadata.ui?.format;\n if (format === \"email\" || format === \"url\" || format === \"iban\") {\n validatorsToRun.push(format);\n }\n if (metadata.ui?.validators) {\n for (const v of metadata.ui.validators) {\n if (typeof v === \"string\") {\n validatorsToRun.push(v);\n } else if (v && v.name) {\n validatorsToRun.push(v.name);\n if (v.args !== undefined) {\n argsMap[v.name] = v.args;\n }\n }\n }\n }\n\n if (validatorsToRun.length > 0) {\n const validationResult = GlobalPipeline.executeValidation(value, validatorsToRun, argsMap);\n if (!validationResult.isValid && this._useMessageManager) {\n const newMsg = new Message({\n message: validationResult.errorMessage || \"Invalid value.\",\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: this.model\n });\n messageManager.addMessages(newMsg);\n }\n }\n }\n\n /**\n * Resolves the schema metadata for a given internal binding path.\n * @param path The flat binding path representing the field.\n * @returns The associated IPropertyMetadata, or undefined if not mapped.\n */\n private findMetadataForPath(path: string): IPropertyMetadata | undefined {\n if (!this.schema || !this.schema.properties) return undefined;\n // Basic single-level support for now. Nested object resolution would split by '.' or '/'\n return this.schema.properties[path];\n }\n\n\n\n /**\n * Retrieves the isolated JSONModel instance to attach to the root GeneratorHost control.\n * @returns The internal JSONModel.\n */\n public getModel(): JSONModel {\n return this.model;\n }\n\n /**\n * Binds a generated UI control property to a path in the internal model.\n * @param control The target UI5 Control.\n * @param property The UI5 property name (e.g., 'value').\n * @param bindingPath The exact path in the JSON payload.\n */\n public bindControl(control: ManagedObject, property: string, bindingPath: string): void {\n control.bindProperty(property, {\n path: bindingPath,\n model: \"meta\" // Assumes the model is bound to the root container with the name 'meta'\n });\n }\n\n /**\n * Extracts the flat JavaScript object representing the current state of the UI.\n * @returns A serialized record of the data payload, free of UI5 wrappers.\n */\n public extractPayload(): Record<string, unknown> {\n // Create a deep copy to prevent accidental mutations by the host\n const data = this.model.getData();\n return JSON.parse(JSON.stringify(data));\n }\n\n /**\n * Cleans up internal state and natively destroys the UI5 JSONModel to prevent memory leaks.\n */\n public destroy(): void {\n \n if (this.model) {\n this.model.destroy();\n }\n }\n}\n"],"mappings":";;;QAQSA,cAAc,GAAAC,kBAAA;EAOvB;AACA;AACA;EACO,MAAMC,YAAY,CAAC;IAGdC,MAAM,GAAmB,IAAI;IAC7BC,kBAAkB,GAAY,KAAK;;IAE3C;AACJ;AACA;AACA;AACA;AACA;IACIC,WAAWA,CAACC,WAAoC,GAAG,CAAC,CAAC,EAAEH,MAAe,EAAEI,SAAiB,GAAG,MAAM,EAAE;MAChG,IAAI,CAACC,eAAe,GAAGD,SAAS;MAChC,IAAI,CAACJ,MAAM,GAAGA,MAAM;;MAEpB;MACA,MAAMM,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,SAAS,CAACN,WAAW,CAAC,CAAC;MACxD,IAAI,CAACO,KAAK,GAAG,IAAIC,SAAS,CAACL,QAAQ,CAAC;MACpC,IAAI,CAACI,KAAK,CAACE,qBAAqB,CAAC,QAAQ,CAAC;;MAE1C;MACA,MAAMC,mBAAmB,GAAG,IAAI,CAACH,KAAK,CAACI,WAAW,CAACC,IAAI,CAAC,IAAI,CAACL,KAAK,CAAC;MACnE,IAAI,CAACA,KAAK,CAACI,WAAW,GAAG,CAACE,KAAa,EAAEC,MAAe,EAAEC,QAAkB,EAAEC,YAAsB,KAAK;QACrG,MAAMC,MAAM,GAAGP,mBAAmB,CAACG,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,YAAY,CAAC;QACzE,IAAI,CAACE,YAAY,CAACL,KAAK,EAAEC,MAAM,CAAC;QAChC,OAAOG,MAAM;MACjB,CAAC;IACL;;IAEA;AACJ;AACA;IACWE,oBAAoBA,CAACC,GAAY,EAAQ;MAC5C,IAAI,CAACtB,kBAAkB,GAAGsB,GAA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AAcA,CAAA,EAA4B;MAC7C;MACA,MAAMC,IAAI,GAAG,IAAI,CAAC5E,KAAK,CAACyB,OAAO,CAAC,CAAC;MACjC,OAAO5B,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,SAAS,CAAC6E,IAAI,CAAC,CAAC;IAC3C;;IAEA;AACJ;AACA;IACWC,OAAOA,CAAA,EAAS;MAEnB,IAAI,IAAI,CAAC7E,KAAK,EAAE;QACZ,IAAI,CAACA,KAAK,CAAC6E,OAAO,CAAC,CAAC;MACxB;IACJ;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAzF,YAAA,GAAAA,YAAA;EAAA,OAAAyF,SAAA;AAAA","ignoreList":[]}
@@ -13,13 +13,18 @@ declare module "nz/co/siliconst/ui5/metaui/core/StateManager" {
13
13
  private model;
14
14
  private activeModelName;
15
15
  private schema;
16
+ private _useMessageManager;
16
17
  /**
17
- * Initializes the state manager with an optional initial payload.
18
+ * Initializes the state manager with an authentic SAPUI5 JSONModel.
18
19
  * @param initialData The initial JSON payload to populate the fields.
19
20
  * @param schema The normalized schema for live validation.
20
21
  * @param modelName The UI5 model alias used for isolation.
21
22
  */
22
23
  constructor(initialData: Record<string, unknown>, schema: ISchema, modelName?: string);
24
+ /**
25
+ * Updates the flag indicating whether this manager should push validation errors directly to the global MessageManager.
26
+ */
27
+ setUseMessageManager(use: boolean): void;
23
28
  /**
24
29
  * Validates a specific path against the schema and updates the MessageManager.
25
30
  */
@@ -1 +1 @@
1
- {"version":3,"file":"StateManager.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/StateManager.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,8CAA8C,CAAC;IAC9D;;;OAGG;IAEH,OAAO,SAAS,MAAM,6BAA6B,CAAC;IACpD,OAAO,aAAa,MAAM,2BAA2B,CAAC;IACtD,OAAO,EAAE,OAAO,EAAqB,MAAM,+CAA+C,CAAC;IAQ3F;;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ACH,OAAO,CAAC,YAAY;QA6EpB;;;;WAIG;QACH,OAAO,CAAC,mBAAmB;QAQ3B;;;WAGG;QACI,QAAQ,IAAI,SAAS;QAI5B;;;;;WAKG;QACI,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;QAOvF;;;WAGG;QACI,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;QAMhD;;WAEG;QACI,OAAO,IAAI,IAAI;KAMzB;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["sap/ui/model/json/JSONModel","./PipelineManager","sap/ui/core/message/Message","sap/ui/core/library","sap/ui/core/Messaging"],function(e,t,s,a,i){"use strict";const r=t["GlobalPipeline"];class o{constructor(t={},s,a="meta"){this.activeModelName=a;this.schema=s;const i=JSON.parse(JSON.stringify(t));this.model=new e(i);this.model.setDefaultBindingMode("TwoWay");const r=this.model.setProperty.bind(this.model);this.model.setProperty=(e,t,s,a)=>{const i=r(e,t,s,a);this.validatePath(e,t);return i}}validatePath(e,t){const o=e.replace(/^\//,"");const n=this.findMetadataForPath(o);const d=i;const l=e.startsWith("/")?e:`/${e}`;const g=d.getMessageModel().getData();const h=g.filter(e=>{const t=e.getTarget()===l&&e.getMessageProcessor()&&e.getMessageProcessor().getId()===this.model.getId();return t});if(h.length>0){d.removeMessages(h)}if(!n)return;const c=[];const m={};if(n.required){c.push("required")}if(n.type==="string"&&n.maxLength){c.push("maxLength");m["maxLength"]={max:n.maxLength}}if(n.ui?.validators){for(const e of n.ui.validators){if(typeof e==="string"){c.push(e)}else if(e&&e.name){c.push(e.name);if(e.args!==undefined){m[e.name]=e.args}}}}if(c.length>0){const e=r.executeValidation(t,c,m);if(!e.isValid){const t=new s({message:e.errorMessage||"Invalid value.",type:a.MessageType.Error,target:l,processor:this.model});d.addMessages(t)}}}findMetadataForPath(e){if(!this.schema||!this.schema.properties)return undefined;return this.schema.properties[e]}getModel(){return this.model}bindControl(e,t,s){e.bindProperty(t,{path:s,model:"meta"})}extractPayload(){const e=this.model.getData();return JSON.parse(JSON.stringify(e))}destroy(){if(this.model){this.model.destroy()}}}var n={__esModule:true};n.StateManager=o;return n});
1
+ sap.ui.define(["sap/ui/model/json/JSONModel","./PipelineManager","sap/ui/core/message/Message","sap/ui/core/library","sap/ui/core/Messaging"],function(e,s,t,a,i){"use strict";const n=s["GlobalPipeline"];class r{schema=null;_useMessageManager=false;constructor(s={},t,a="meta"){this.activeModelName=a;this.schema=t;const i=JSON.parse(JSON.stringify(s));this.model=new e(i);this.model.setDefaultBindingMode("TwoWay");const n=this.model.setProperty.bind(this.model);this.model.setProperty=(e,s,t,a)=>{const i=n(e,s,t,a);this.validatePath(e,s);return i}}setUseMessageManager(e){this._useMessageManager=e}validatePath(e,s){const r=e.replace(/^\//,"");const o=this.findMetadataForPath(r);const g=i;const d=e.startsWith("/")?e:`/${e}`;if(this._useMessageManager){const e=g.getMessageModel().getData();const s=e.filter(e=>{const s=e.getTarget()===d&&e.getMessageProcessor()&&e.getMessageProcessor().getId()===this.model.getId();return s});if(s.length>0){g.removeMessages(s)}}if(!o)return;const m=[];const h={};if(o.required){m.push("required")}if(o.type==="string"&&o.maxLength){m.push("maxLength");h["maxLength"]=o.maxLength}if(o.minLength){m.push("minLength");h["minLength"]=o.minLength}if(o.pattern){m.push("pattern");h["pattern"]=o.pattern}if(o.minimum!==undefined||o.maximum!==undefined){m.push("range");h["range"]={min:o.minimum,max:o.maximum}}const u=o.ui?.format;if(u==="email"||u==="url"||u==="iban"){m.push(u)}if(o.ui?.validators){for(const e of o.ui.validators){if(typeof e==="string"){m.push(e)}else if(e&&e.name){m.push(e.name);if(e.args!==undefined){h[e.name]=e.args}}}}if(m.length>0){const e=n.executeValidation(s,m,h);if(!e.isValid&&this._useMessageManager){const s=new t({message:e.errorMessage||"Invalid value.",type:a.MessageType.Error,target:d,processor:this.model});g.addMessages(s)}}}findMetadataForPath(e){if(!this.schema||!this.schema.properties)return undefined;return this.schema.properties[e]}getModel(){return this.model}bindControl(e,s,t){e.bindProperty(s,{path:t,model:"meta"})}extractPayload(){const e=this.model.getData();return JSON.parse(JSON.stringify(e))}destroy(){if(this.model){this.model.destroy()}}}var o={__esModule:true};o.StateManager=r;return o});
2
2
  //# sourceMappingURL=StateManager.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StateManager.js","names":["GlobalPipeline","___PipelineManager","StateManager","constructor","initialData","schema","modelName","this","activeModelName","safeData","JSON","parse","stringify","model","JSONModel","setDefaultBindingMode","originalSetProperty","setProperty","bind","sPath","oValue","oContext","bAsyncUpdate","result","validatePath","value","fieldKey","replace","metadata","findMetadataForPath","messageManager","Messaging","targetPath","startsWith","existingMessages","getMessageModel","getData","messagesToRemove","filter","msg","isMatch","getTarget","getMessageProcessor","getId","length","removeMessages","validatorsToRun","argsMap","required","push","type","maxLength","max","ui","validators","v","name","args","undefined","validationResult","executeValidation","isValid","newMsg","Message","message","errorMessage","coreLibrary","MessageType","Error","target","processor","addMessages","path","properties","getModel","bindControl","control","property","bindingPath","bindProperty","extractPayload","data","destroy","__exports","__esModule"],"sources":["StateManager.ts"],"sourcesContent":["/**\n * @file StateManager.ts\n * @description Isolated internal state management. Decouples the MetaUI engine from external host models.\n */\n\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport ManagedObject from \"sap/ui/base/ManagedObject\";\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { GlobalPipeline } from \"./PipelineManager\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\nimport Core from \"sap/ui/core/Core\";\nimport Messaging from \"sap/ui/core/Messaging\";\n\n\n/**\n * Manages the isolated internal data payload for the MetaUI engine.\n */\nexport class StateManager {\n private model: JSONModel;\n private activeModelName: string;\n private schema: ISchema;\n\n /**\n * Initializes the state manager with an optional initial payload.\n * @param initialData The initial JSON payload to populate the fields.\n * @param schema The normalized schema for live validation.\n * @param modelName The UI5 model alias used for isolation.\n */\n constructor(initialData: Record<string, unknown> = {}, schema: ISchema, modelName: string = \"meta\") {\n this.activeModelName = modelName;\n this.schema = schema;\n \n // Deep copy to ensure no reference leakage from the host application\n const safeData = JSON.parse(JSON.stringify(initialData));\n this.model = new JSONModel(safeData);\n this.model.setDefaultBindingMode(\"TwoWay\");\n\n // Centralized Model-Level Validation Interceptor\n const originalSetProperty = this.model.setProperty.bind(this.model);\n this.model.setProperty = (sPath: string, oValue: unknown, oContext?: unknown, bAsyncUpdate?: boolean) => {\n const result = originalSetProperty(sPath, oValue, oContext, bAsyncUpdate);\n this.validatePath(sPath, oValue);\n return result;\n };\n }\n\n /**\n * Validates a specific path against the schema and updates the MessageManager.\n */\n private validatePath(sPath: string, value: unknown): void {\n const fieldKey = sPath.replace(/^\\//, \"\");\n const metadata = this.findMetadataForPath(fieldKey);\n \n const messageManager = Messaging;\n const targetPath = sPath.startsWith(\"/\") ? sPath : `/${sPath}`; // Pure UI5: target MUST be absolute path\n \n // 1. Remove existing messages (strictly for THIS model instance)\n const existingMessages = messageManager.getMessageModel().getData();\n const messagesToRemove = existingMessages.filter((msg: sap.ui.core.message.Message) => {\n const isMatch = msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.model.getId();\n return isMatch;\n });\n \n \n if (messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n\n if (!metadata) return;\n\n // 2. Run GlobalPipeline\n const validatorsToRun: string[] = [];\n const argsMap: Record<string, unknown> = {};\n\n if (metadata.required) {\n validatorsToRun.push(\"required\");\n }\n if (metadata.type === \"string\" && metadata.maxLength) {\n validatorsToRun.push(\"maxLength\");\n argsMap[\"maxLength\"] = { max: metadata.maxLength };\n }\n if (metadata.ui?.validators) {\n for (const v of metadata.ui.validators) {\n if (typeof v === \"string\") {\n validatorsToRun.push(v);\n } else if (v && v.name) {\n validatorsToRun.push(v.name);\n if (v.args !== undefined) {\n argsMap[v.name] = v.args;\n }\n }\n }\n }\n\n if (validatorsToRun.length > 0) {\n const validationResult = GlobalPipeline.executeValidation(value, validatorsToRun, argsMap);\n if (!validationResult.isValid) {\n const newMsg = new Message({\n message: validationResult.errorMessage || \"Invalid value.\",\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: this.model\n });\n messageManager.addMessages(newMsg);\n }\n }\n }\n\n /**\n * Resolves the schema metadata for a given internal binding path.\n * @param path The flat binding path representing the field.\n * @returns The associated IPropertyMetadata, or undefined if not mapped.\n */\n private findMetadataForPath(path: string): IPropertyMetadata | undefined {\n if (!this.schema || !this.schema.properties) return undefined;\n // Basic single-level support for now. Nested object resolution would split by '.' or '/'\n return this.schema.properties[path];\n }\n\n\n\n /**\n * Retrieves the isolated JSONModel instance to attach to the root GeneratorHost control.\n * @returns The internal JSONModel.\n */\n public getModel(): JSONModel {\n return this.model;\n }\n\n /**\n * Binds a generated UI control property to a path in the internal model.\n * @param control The target UI5 Control.\n * @param property The UI5 property name (e.g., 'value').\n * @param bindingPath The exact path in the JSON payload.\n */\n public bindControl(control: ManagedObject, property: string, bindingPath: string): void {\n control.bindProperty(property, {\n path: bindingPath,\n model: \"meta\" // Assumes the model is bound to the root container with the name 'meta'\n });\n }\n\n /**\n * Extracts the flat JavaScript object representing the current state of the UI.\n * @returns A serialized record of the data payload, free of UI5 wrappers.\n */\n public extractPayload(): Record<string, unknown> {\n // Create a deep copy to prevent accidental mutations by the host\n const data = this.model.getData();\n return JSON.parse(JSON.stringify(data));\n }\n\n /**\n * Cleans up internal state and natively destroys the UI5 JSONModel to prevent memory leaks.\n */\n public destroy(): void {\n \n if (this.model) {\n this.model.destroy();\n }\n }\n}\n"],"mappings":"qLAQSA,EAAcC,EAAA,kBAUhB,MAAMC,EAWTC,YAAYC,EAAuC,CAAC,EAAGC,EAAiBC,EAAoB,QACxFC,KAAKC,gBAAkBF,EACvBC,KAAKF,OAASA,EAGd,MAAMI,EAAWC,KAAKC,MAAMD,KAAKE,UAAUR,I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E,IACxB,CACJ,CACJ,CACJ,CAEA,GAAIX,EAAgBF,OAAS,EAAG,CAC5B,MAAMe,EAAmB3D,EAAe4D,kBAAkBnC,EAAOqB,EAAiBC,GAClF,IAAKY,EAAiBE,QAAS,CAC3B,MAAMC,EAAS,IAAIC,EAAQ,CACvBC,QAASL,EAAiBM,cAAgB,iBAC1Cf,KAAMgB,EAAYC,YAAYC,MAC9BC,OAAQrC,EACRsC,UAAW/D,KAAKM,QAEpBiB,EAAeyC,YAAYT,EAC/B,CACJ,CACJ,CAOQjC,oBAAoB2C,GACxB,IAAKjE,KAAKF,SAAWE,KAAKF,OAAOoE,WAAY,OAAOf,UAEpD,OAAOnD,KAAKF,OAAOoE,WAAWD,EAClC,CAQOE,WACH,OAAOnE,KAAKM,KAChB,CAQO8D,YAAYC,EAAwBC,EAAkBC,GACzDF,EAAQG,aAAaF,EAAU,CAC3BL,KAAMM,EACNjE,MAAO,QAEf,CAMOmE,iBAEH,MAAMC,EAAO1E,KAAKM,MAAMuB,UACxB,OAAO1B,KAAKC,MAAMD,KAAKE,UAAUqE,GACrC,CAKOC,UAEH,GAAI3E,KAAKM,MAAO,CACZN,KAAKM,MAAMqE,SACf,CACJ,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAAjF,eAAA,OAAAiF,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"StateManager.js","names":["GlobalPipeline","___PipelineManager","StateManager","schema","_useMessageManager","constructor","initialData","modelName","this","activeModelName","safeData","JSON","parse","stringify","model","JSONModel","setDefaultBindingMode","originalSetProperty","setProperty","bind","sPath","oValue","oContext","bAsyncUpdate","result","validatePath","setUseMessageManager","use","value","fieldKey","replace","metadata","findMetadataForPath","messageManager","Messaging","targetPath","startsWith","existingMessages","getMessageModel","getData","messagesToRemove","filter","msg","isMatch","getTarget","getMessageProcessor","getId","length","removeMessages","validatorsToRun","argsMap","required","push","type","maxLength","minLength","pattern","minimum","undefined","maximum","min","max","format","ui","validators","v","name","args","validationResult","executeValidation","isValid","newMsg","Message","message","errorMessage","coreLibrary","MessageType","Error","target","processor","addMessages","path","properties","getModel","bindControl","control","property","bindingPath","bindProperty","extractPayload","data","destroy","__exports","__esModule"],"sources":["StateManager.ts"],"sourcesContent":["/**\n * @file StateManager.ts\n * @description Isolated internal state management. Decouples the MetaUI engine from external host models.\n */\n\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport ManagedObject from \"sap/ui/base/ManagedObject\";\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { GlobalPipeline } from \"./PipelineManager\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\nimport Core from \"sap/ui/core/Core\";\nimport Messaging from \"sap/ui/core/Messaging\";\n\n\n/**\n * Manages the isolated internal data payload for the MetaUI engine.\n */\nexport class StateManager {\n private model: JSONModel;\n private activeModelName: string;\n private schema: ISchema | null = null;\n private _useMessageManager: boolean = false;\n\n /**\n * Initializes the state manager with an authentic SAPUI5 JSONModel.\n * @param initialData The initial JSON payload to populate the fields.\n * @param schema The normalized schema for live validation.\n * @param modelName The UI5 model alias used for isolation.\n */\n constructor(initialData: Record<string, unknown> = {}, schema: ISchema, modelName: string = \"meta\") {\n this.activeModelName = modelName;\n this.schema = schema;\n \n // Deep copy to ensure no reference leakage from the host application\n const safeData = JSON.parse(JSON.stringify(initialData));\n this.model = new JSONModel(safeData);\n this.model.setDefaultBindingMode(\"TwoWay\");\n\n // Centralized Model-Level Validation Interceptor\n const originalSetProperty = this.model.setProperty.bind(this.model);\n this.model.setProperty = (sPath: string, oValue: unknown, oContext?: unknown, bAsyncUpdate?: boolean) => {\n const result = originalSetProperty(sPath, oValue, oContext, bAsyncUpdate);\n this.validatePath(sPath, oValue);\n return result;\n };\n }\n\n /**\n * Updates the flag indicating whether this manager should push validation errors directly to the global MessageManager.\n */\n public setUseMessageManager(use: boolean): void {\n this._useMessageManager = use;\n }\n\n /**\n * Validates a specific path against the schema and updates the MessageManager.\n */\n private validatePath(sPath: string, value: unknown): void {\n const fieldKey = sPath.replace(/^\\//, \"\");\n const metadata = this.findMetadataForPath(fieldKey);\n \n const messageManager = Messaging;\n const targetPath = sPath.startsWith(\"/\") ? sPath : `/${sPath}`; // Pure UI5: target MUST be absolute path\n \n // 1. Remove existing messages (strictly for THIS model instance)\n if (this._useMessageManager) {\n const existingMessages = messageManager.getMessageModel().getData();\n const messagesToRemove = existingMessages.filter((msg: sap.ui.core.message.Message) => {\n const isMatch = msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.model.getId();\n return isMatch;\n });\n \n if (messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n }\n\n if (!metadata) return;\n\n // 2. Run GlobalPipeline\n const validatorsToRun: string[] = [];\n const argsMap: Record<string, unknown> = {};\n\n if (metadata.required) {\n validatorsToRun.push(\"required\");\n }\n if (metadata.type === \"string\" && metadata.maxLength) {\n validatorsToRun.push(\"maxLength\");\n argsMap[\"maxLength\"] = metadata.maxLength;\n }\n if (metadata.minLength) {\n validatorsToRun.push(\"minLength\");\n argsMap[\"minLength\"] = metadata.minLength;\n }\n if (metadata.pattern) {\n validatorsToRun.push(\"pattern\");\n argsMap[\"pattern\"] = metadata.pattern;\n }\n if (metadata.minimum !== undefined || metadata.maximum !== undefined) {\n validatorsToRun.push(\"range\");\n argsMap[\"range\"] = { min: metadata.minimum, max: metadata.maximum };\n }\n \n const format = metadata.ui?.format;\n if (format === \"email\" || format === \"url\" || format === \"iban\") {\n validatorsToRun.push(format);\n }\n if (metadata.ui?.validators) {\n for (const v of metadata.ui.validators) {\n if (typeof v === \"string\") {\n validatorsToRun.push(v);\n } else if (v && v.name) {\n validatorsToRun.push(v.name);\n if (v.args !== undefined) {\n argsMap[v.name] = v.args;\n }\n }\n }\n }\n\n if (validatorsToRun.length > 0) {\n const validationResult = GlobalPipeline.executeValidation(value, validatorsToRun, argsMap);\n if (!validationResult.isValid && this._useMessageManager) {\n const newMsg = new Message({\n message: validationResult.errorMessage || \"Invalid value.\",\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: this.model\n });\n messageManager.addMessages(newMsg);\n }\n }\n }\n\n /**\n * Resolves the schema metadata for a given internal binding path.\n * @param path The flat binding path representing the field.\n * @returns The associated IPropertyMetadata, or undefined if not mapped.\n */\n private findMetadataForPath(path: string): IPropertyMetadata | undefined {\n if (!this.schema || !this.schema.properties) return undefined;\n // Basic single-level support for now. Nested object resolution would split by '.' or '/'\n return this.schema.properties[path];\n }\n\n\n\n /**\n * Retrieves the isolated JSONModel instance to attach to the root GeneratorHost control.\n * @returns The internal JSONModel.\n */\n public getModel(): JSONModel {\n return this.model;\n }\n\n /**\n * Binds a generated UI control property to a path in the internal model.\n * @param control The target UI5 Control.\n * @param property The UI5 property name (e.g., 'value').\n * @param bindingPath The exact path in the JSON payload.\n */\n public bindControl(control: ManagedObject, property: string, bindingPath: string): void {\n control.bindProperty(property, {\n path: bindingPath,\n model: \"meta\" // Assumes the model is bound to the root container with the name 'meta'\n });\n }\n\n /**\n * Extracts the flat JavaScript object representing the current state of the UI.\n * @returns A serialized record of the data payload, free of UI5 wrappers.\n */\n public extractPayload(): Record<string, unknown> {\n // Create a deep copy to prevent accidental mutations by the host\n const data = this.model.getData();\n return JSON.parse(JSON.stringify(data));\n }\n\n /**\n * Cleans up internal state and natively destroys the UI5 JSONModel to prevent memory leaks.\n */\n public destroy(): void {\n \n if (this.model) {\n this.model.destroy();\n }\n }\n}\n"],"mappings":"qLAQSA,EAAcC,EAAA,kBAUhB,MAAMC,EAGDC,OAAyB,KACzBC,mBAA8B,MAQtCC,YAAYC,EAAuC,CAAC,EAAGH,EAAiBI,EAAoB,QACxFC,KAAKC,gBAAkBF,EACvBC,KAAKL,OAASA,EAGd,MAAMO,EAAWC,KAAKC,MAAMD,KAAKE,UAAUP,IAC3CE,KAAKM,MAAQ,IAAIC,EAAUL,GAC3BF,KAAKM,MAAME,sBAAsB,UAGjC,MAAMC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WAAA,MAAAD,EAAA1F,eAAA,OAAA0F,CAAA","ignoreList":[]}
@@ -19,10 +19,11 @@ import Messaging from "sap/ui/core/Messaging";
19
19
  export class StateManager {
20
20
  private model: JSONModel;
21
21
  private activeModelName: string;
22
- private schema: ISchema;
22
+ private schema: ISchema | null = null;
23
+ private _useMessageManager: boolean = false;
23
24
 
24
25
  /**
25
- * Initializes the state manager with an optional initial payload.
26
+ * Initializes the state manager with an authentic SAPUI5 JSONModel.
26
27
  * @param initialData The initial JSON payload to populate the fields.
27
28
  * @param schema The normalized schema for live validation.
28
29
  * @param modelName The UI5 model alias used for isolation.
@@ -45,6 +46,13 @@ export class StateManager {
45
46
  };
46
47
  }
47
48
 
49
+ /**
50
+ * Updates the flag indicating whether this manager should push validation errors directly to the global MessageManager.
51
+ */
52
+ public setUseMessageManager(use: boolean): void {
53
+ this._useMessageManager = use;
54
+ }
55
+
48
56
  /**
49
57
  * Validates a specific path against the schema and updates the MessageManager.
50
58
  */
@@ -56,15 +64,16 @@ export class StateManager {
56
64
  const targetPath = sPath.startsWith("/") ? sPath : `/${sPath}`; // Pure UI5: target MUST be absolute path
57
65
 
58
66
  // 1. Remove existing messages (strictly for THIS model instance)
59
- const existingMessages = messageManager.getMessageModel().getData();
60
- const messagesToRemove = existingMessages.filter((msg: sap.ui.core.message.Message) => {
61
- const isMatch = msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.model.getId();
62
- return isMatch;
63
- });
64
-
65
-
66
- if (messagesToRemove.length > 0) {
67
- messageManager.removeMessages(messagesToRemove);
67
+ if (this._useMessageManager) {
68
+ const existingMessages = messageManager.getMessageModel().getData();
69
+ const messagesToRemove = existingMessages.filter((msg: sap.ui.core.message.Message) => {
70
+ const isMatch = msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.model.getId();
71
+ return isMatch;
72
+ });
73
+
74
+ if (messagesToRemove.length > 0) {
75
+ messageManager.removeMessages(messagesToRemove);
76
+ }
68
77
  }
69
78
 
70
79
  if (!metadata) return;
@@ -78,7 +87,24 @@ export class StateManager {
78
87
  }
79
88
  if (metadata.type === "string" && metadata.maxLength) {
80
89
  validatorsToRun.push("maxLength");
81
- argsMap["maxLength"] = { max: metadata.maxLength };
90
+ argsMap["maxLength"] = metadata.maxLength;
91
+ }
92
+ if (metadata.minLength) {
93
+ validatorsToRun.push("minLength");
94
+ argsMap["minLength"] = metadata.minLength;
95
+ }
96
+ if (metadata.pattern) {
97
+ validatorsToRun.push("pattern");
98
+ argsMap["pattern"] = metadata.pattern;
99
+ }
100
+ if (metadata.minimum !== undefined || metadata.maximum !== undefined) {
101
+ validatorsToRun.push("range");
102
+ argsMap["range"] = { min: metadata.minimum, max: metadata.maximum };
103
+ }
104
+
105
+ const format = metadata.ui?.format;
106
+ if (format === "email" || format === "url" || format === "iban") {
107
+ validatorsToRun.push(format);
82
108
  }
83
109
  if (metadata.ui?.validators) {
84
110
  for (const v of metadata.ui.validators) {
@@ -95,7 +121,7 @@ export class StateManager {
95
121
 
96
122
  if (validatorsToRun.length > 0) {
97
123
  const validationResult = GlobalPipeline.executeValidation(value, validatorsToRun, argsMap);
98
- if (!validationResult.isValid) {
124
+ if (!validationResult.isValid && this._useMessageManager) {
99
125
  const newMsg = new Message({
100
126
  message: validationResult.errorMessage || "Invalid value.",
101
127
  type: coreLibrary.MessageType.Error,
@@ -1 +1 @@
1
- {"version":3,"file":"IPlugin-dbg.js","names":[],"sources":["IPlugin.ts"],"sourcesContent":["/**\n * @file IPlugin.ts\n * @description Contract for all discrete UI control generation plugins.\n * Enforces a strict lifecycle for rendering, validation, and dynamic state updates.\n */\n\nimport Control from \"sap/ui/core/Control\";\nimport { IPropertyMetadata } from \"./ISchema\";\n\nexport interface IPluginValidationResult {\n isValid: boolean;\n errorMessage?: string;\n fieldKey?: string;\n}\n\nexport interface IPlugin {\n /**\n * Instantiates the raw UI5 control and binds it to the specified data model.\n * \n * @param fieldMetadata The JSON Schema defining the field's constraints and UI hints.\n * @param bindingPath The specific JSON path representing the field within the payload.\n * @param modelName The UI5 JSONModel alias used for data binding (defaults to 'meta').\n * @param engineScopeId The deterministic scope ID provided by the Engine.\n * @param onChange The callback fired natively when a field value blur/change occurs.\n * @returns {Control} The generated UI5 control ready to be mounted.\n */\n render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control;\n\n /**\n * Triggers the internal validation pipeline for this specific plugin instance.\n * \n * @returns {IPluginValidationResult} The structural validity state and error messages.\n */\n validate(): IPluginValidationResult;\n\n /**\n * Executes when the ConditionEngine pushes dynamic metadata mutations to the field.\n * \n * @param newMetadata The mutated schema metadata.\n */\n onStateChange(newMetadata: IPropertyMetadata): void;\n\n /**\n * Optional lifecycle hook executed when the parent layout is destroyed.\n * Plugins must use this to destroy isolated JSONModels, custom EventBus listeners, \n * or embedded Dialogs to prevent memory leaks in the SAP Fiori Launchpad.\n */\n destroy?(): void;\n\n /**\n * Injects the global editable mode context into the plugin before rendering.\n * @param editable True if the plugin should render in an editable mode.\n */\n setEditable?(editable: boolean): void;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"IPlugin-dbg.js","names":[],"sources":["IPlugin.ts"],"sourcesContent":["/**\n * @file IPlugin.ts\n * @description Contract for all discrete UI control generation plugins.\n * Enforces a strict lifecycle for rendering, validation, and dynamic state updates.\n */\n\nimport Control from \"sap/ui/core/Control\";\nimport { IPropertyMetadata } from \"./ISchema\";\n\nexport interface IPluginValidationResult {\n isValid: boolean;\n errorMessage?: string;\n fieldKey?: string;\n}\n\nexport interface IPlugin {\n /**\n * Instructs the plugin whether to delegate visual error states to the global MessageManager.\n * @param useMessageManager True if the global MessageManager is active.\n */\n setUseMessageManager?(useMessageManager: boolean): void;\n\n /**\n * Instantiates the raw UI5 control and binds it to the specified data model.\n * \n * @param fieldMetadata The JSON Schema defining the field's constraints and UI hints.\n * @param bindingPath The specific JSON path representing the field within the payload.\n * @param modelName The UI5 JSONModel alias used for data binding (defaults to 'meta').\n * @param engineScopeId The deterministic scope ID provided by the Engine.\n * @param onChange The callback fired natively when a field value blur/change occurs.\n * @returns {Control} The generated UI5 control ready to be mounted.\n */\n render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control;\n\n /**\n * Triggers the internal validation pipeline for this specific plugin instance.\n * \n * @returns {IPluginValidationResult} The structural validity state and error messages.\n */\n validate(): IPluginValidationResult;\n\n /**\n * Executes when the ConditionEngine pushes dynamic metadata mutations to the field.\n * \n * @param newMetadata The mutated schema metadata.\n */\n onStateChange(newMetadata: IPropertyMetadata): void;\n\n /**\n * Optionally allows the plugin to natively manage its own UI control's visual ValueState (e.g., red borders).\n * Used when the global MessageManager is disabled.\n * \n * @param isValid Whether the field passed validation.\n * @param errorMessage The error message to display if invalid.\n */\n setVisualValidationState?(isValid: boolean, errorMessage?: string): void;\n\n /**\n * Optional lifecycle hook executed when the parent layout is destroyed.\n * Plugins must use this to destroy isolated JSONModels, custom EventBus listeners, \n * or embedded Dialogs to prevent memory leaks in the SAP Fiori Launchpad.\n */\n destroy?(): void;\n\n /**\n * Injects the global editable mode context into the plugin before rendering.\n * @param editable True if the plugin should render in an editable mode.\n */\n setEditable?(editable: boolean): void;\n}\n"],"mappings":"","ignoreList":[]}
@@ -12,6 +12,11 @@ declare module "nz/co/siliconst/ui5/metaui/interfaces/IPlugin" {
12
12
  fieldKey?: string;
13
13
  }
14
14
  export interface IPlugin {
15
+ /**
16
+ * Instructs the plugin whether to delegate visual error states to the global MessageManager.
17
+ * @param useMessageManager True if the global MessageManager is active.
18
+ */
19
+ setUseMessageManager?(useMessageManager: boolean): void;
15
20
  /**
16
21
  * Instantiates the raw UI5 control and binds it to the specified data model.
17
22
  *
@@ -35,6 +40,14 @@ declare module "nz/co/siliconst/ui5/metaui/interfaces/IPlugin" {
35
40
  * @param newMetadata The mutated schema metadata.
36
41
  */
37
42
  onStateChange(newMetadata: IPropertyMetadata): void;
43
+ /**
44
+ * Optionally allows the plugin to natively manage its own UI control's visual ValueState (e.g., red borders).
45
+ * Used when the global MessageManager is disabled.
46
+ *
47
+ * @param isValid Whether the field passed validation.
48
+ * @param errorMessage The error message to display if invalid.
49
+ */
50
+ setVisualValidationState?(isValid: boolean, errorMessage?: string): void;
38
51
  /**
39
52
  * Optional lifecycle hook executed when the parent layout is destroyed.
40
53
  * Plugins must use this to destroy isolated JSONModels, custom EventBus listeners,
@@ -1 +1 @@
1
- {"version":3,"file":"IPlugin.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,+CAA+C,CAAC;IAC/D;;;;OAIG;IAEH,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAElF,UAAiB,uBAAuB;QACpC,OAAO,EAAE,OAAO,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACrB;IAED,UAAiB,OAAO;QACpB;;;;;;;;;WASG;QACH,MAAM,CAAC,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC;QAExN;;;;WAIG;QACH,QAAQ,IAAI,uBAAuB,CAAC;QAEpC;;;;WAIG;QACH,aAAa,CAAC,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAAC;QAEpD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,WAAW,CAAC,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;KACzC;CAEA"}
@@ -14,6 +14,12 @@ export interface IPluginValidationResult {
14
14
  }
15
15
 
16
16
  export interface IPlugin {
17
+ /**
18
+ * Instructs the plugin whether to delegate visual error states to the global MessageManager.
19
+ * @param useMessageManager True if the global MessageManager is active.
20
+ */
21
+ setUseMessageManager?(useMessageManager: boolean): void;
22
+
17
23
  /**
18
24
  * Instantiates the raw UI5 control and binds it to the specified data model.
19
25
  *
@@ -40,6 +46,15 @@ export interface IPlugin {
40
46
  */
41
47
  onStateChange(newMetadata: IPropertyMetadata): void;
42
48
 
49
+ /**
50
+ * Optionally allows the plugin to natively manage its own UI control's visual ValueState (e.g., red borders).
51
+ * Used when the global MessageManager is disabled.
52
+ *
53
+ * @param isValid Whether the field passed validation.
54
+ * @param errorMessage The error message to display if invalid.
55
+ */
56
+ setVisualValidationState?(isValid: boolean, errorMessage?: string): void;
57
+
43
58
  /**
44
59
  * Optional lifecycle hook executed when the parent layout is destroyed.
45
60
  * Plugins must use this to destroy isolated JSONModels, custom EventBus listeners,
@@ -1 +1 @@
1
- {"version":3,"file":"ISchema-dbg.js","names":[],"sources":["ISchema.ts"],"sourcesContent":["/**\n * @file ISchema.ts\n * @description MetaUI v2 Core Schema Contract.\n * Aligned with standard JSON-Schema syntax (properties, items) for native AI generation,\n * with a proprietary 'ui' directive block for Fiori visual orchestration.\n */\n\nexport type FieldType = \"string\" | \"number\" | \"integer\" | \"boolean\" | \"date\" | \"array\" | \"object\";\n\n/**\n * Value help structure mapping SAP Key/Text pairs.\n */\nexport interface IValueHelp {\n key: string;\n text: string;\n}\n\nexport interface IValidationRule {\n name: string;\n args?: unknown;\n}\n\n/**\n * An element in the visual layout tree.\n */\nexport interface ILayoutElement {\n type: \"Group\" | \"Control\" | \"HorizontalLayout\" | \"VerticalLayout\" | \"WizardStep\";\n label?: string;\n scope?: string; // JSON Pointer to property, e.g. \"#/properties/FirstName\"\n elements?: ILayoutElement[];\n widget?: string; // Optional override for the widget\n}\n\n/**\n * Visual orchestration directives to separate layout from data modeling.\n */\nexport interface IUIDirective {\n label?: string;\n isKey?: boolean;\n readOnly?: boolean;\n widget?: string;\n visibleOn?: string;\n enabledOn?: string;\n format?: string;\n rows?: number;\n fullWidth?: boolean;\n validators?: (string | IValidationRule)[];\n formatter?: string;\n args?: unknown;\n dialogButtonText?: string;\n}\n\nexport interface IRemoteValueHelpConfig {\n url: string;\n keyPath: string;\n textPath: string;\n}\n\n/**\n * Standard JSON-Schema property definition.\n */\nexport interface IPropertyMetadata {\n type: FieldType;\n \n // MetaUI specific orchestration\n ui?: IUIDirective;\n \n // Standard validations\n required?: boolean;\n maxLength?: number;\n minimum?: number;\n maximum?: number;\n pattern?: string;\n \n // Numeric specifics\n precision?: number;\n scale?: number;\n multipleOf?: number;\n \n // Value constraints\n valueHelp?: IValueHelp[] | IRemoteValueHelpConfig;\n enum?: string[] | number[];\n \n // Nested recursion for objects and arrays\n properties?: Record<string, IPropertyMetadata>;\n items?: IPropertyMetadata;\n uiLayout?: ILayoutElement[];\n additionalProperties?: boolean;\n}\n\n/**\n * The master schema contract ingested by the Engine.\n */\nexport interface ISchema {\n title?: string;\n layoutStrategy?: string;\n type?: \"object\" | \"array\"; // Implicit layout hinting\n properties?: Record<string, IPropertyMetadata>;\n items?: IPropertyMetadata;\n uiLayout?: ILayoutElement[];\n additionalProperties?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ISchema-dbg.js","names":[],"sources":["ISchema.ts"],"sourcesContent":["/**\n * @file ISchema.ts\n * @description MetaUI v2 Core Schema Contract.\n * Aligned with standard JSON-Schema syntax (properties, items) for native AI generation,\n * with a proprietary 'ui' directive block for Fiori visual orchestration.\n */\n\nexport type FieldType = \"string\" | \"number\" | \"integer\" | \"boolean\" | \"date\" | \"array\" | \"object\";\n\n/**\n * Value help structure mapping SAP Key/Text pairs.\n */\nexport interface IValueHelp {\n key: string;\n text: string;\n}\n\nexport interface IValidationRule {\n name: string;\n args?: unknown;\n}\n\n/**\n * An element in the visual layout tree.\n */\nexport interface ILayoutElement {\n type: \"Group\" | \"Control\" | \"HorizontalLayout\" | \"VerticalLayout\" | \"WizardStep\";\n label?: string;\n scope?: string; // JSON Pointer to property, e.g. \"#/properties/FirstName\"\n elements?: ILayoutElement[];\n widget?: string; // Optional override for the widget\n}\n\n/**\n * Visual orchestration directives to separate layout from data modeling.\n */\nexport interface IUIDirective {\n label?: string;\n isKey?: boolean;\n readOnly?: boolean;\n widget?: string;\n visibleOn?: string;\n enabledOn?: string;\n format?: string;\n rows?: number;\n fullWidth?: boolean;\n validators?: (string | IValidationRule)[];\n formatter?: string;\n args?: unknown;\n dialogButtonText?: string;\n}\n\nexport interface IRemoteValueHelpConfig {\n url: string;\n keyPath: string;\n textPath: string;\n}\n\n/**\n * Standard JSON-Schema property definition.\n */\nexport interface IPropertyMetadata {\n type: FieldType;\n \n // MetaUI specific orchestration\n ui?: IUIDirective;\n \n // Standard validations\n required?: boolean;\n maxLength?: number;\n minLength?: number;\n minimum?: number;\n maximum?: number;\n pattern?: string;\n \n // Numeric specifics\n precision?: number;\n scale?: number;\n multipleOf?: number;\n \n // Value constraints\n valueHelp?: IValueHelp[] | IRemoteValueHelpConfig;\n enum?: string[] | number[];\n \n // Nested recursion for objects and arrays\n properties?: Record<string, IPropertyMetadata>;\n items?: IPropertyMetadata;\n uiLayout?: ILayoutElement[];\n additionalProperties?: boolean;\n}\n\n/**\n * The master schema contract ingested by the Engine.\n */\nexport interface ISchema {\n title?: string;\n layoutStrategy?: string;\n type?: \"object\" | \"array\"; // Implicit layout hinting\n properties?: Record<string, IPropertyMetadata>;\n items?: IPropertyMetadata;\n uiLayout?: ILayoutElement[];\n additionalProperties?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
@@ -58,6 +58,7 @@ declare module "nz/co/siliconst/ui5/metaui/interfaces/ISchema" {
58
58
  ui?: IUIDirective;
59
59
  required?: boolean;
60
60
  maxLength?: number;
61
+ minLength?: number;
61
62
  minimum?: number;
62
63
  maximum?: number;
63
64
  pattern?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ISchema.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,+CAA+C,CAAC;IAC/D;;;;;OAKG;IAEH,KAAY,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAElG;;OAEG;IACH,UAAiB,UAAU;QACvB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KAChB;IAED,UAAiB,eAAe;QAC5B,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,OAAO,CAAC;KAClB;IAED;;OAEG;IACH,UAAiB,cAAc;QAC3B,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,YAAY,CAAC;QACjF,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;QAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB;IAED;;OAEG;IACH,UAAiB,YAAY;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,eAAe,CAA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iBAAiB,CAAC;QAC1B,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;QAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAClC;CAEA"}
@@ -68,6 +68,7 @@ export interface IPropertyMetadata {
68
68
  // Standard validations
69
69
  required?: boolean;
70
70
  maxLength?: number;
71
+ minLength?: number;
71
72
  minimum?: number;
72
73
  maximum?: number;
73
74
  pattern?: string;