@siliconst/metaui 1.4.7 → 1.4.9

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 (401) hide show
  1. package/package.json +1 -1
  2. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl-dbg.js.map +1 -1
  3. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl.d.ts +2 -2
  4. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl.d.ts.map +1 -1
  5. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl.js.map +1 -1
  6. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControl.ts +2 -2
  7. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer-dbg.js.map +1 -1
  8. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer.js.map +1 -1
  9. package/src/nz/co/siliconst/ui5/metaui/controls/BaseHardwareControlRenderer.ts +2 -2
  10. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl-dbg.js +3 -2
  11. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl-dbg.js.map +1 -1
  12. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.d.ts +1 -1
  13. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.d.ts.map +1 -1
  14. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.js +1 -1
  15. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.js.map +1 -1
  16. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.ts +4 -3
  17. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +8 -5
  18. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js.map +1 -1
  19. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts +6 -6
  20. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +1 -1
  21. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js +1 -1
  22. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js.map +1 -1
  23. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts +14 -10
  24. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl-dbg.js +1 -1
  25. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl-dbg.js.map +1 -1
  26. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.d.ts +2 -2
  27. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.d.ts.map +1 -1
  28. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.js.map +1 -1
  29. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.ts +2 -2
  30. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl-dbg.js +30 -8
  31. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl-dbg.js.map +1 -1
  32. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.d.ts +10 -1
  33. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.d.ts.map +1 -1
  34. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.js +1 -1
  35. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.js.map +1 -1
  36. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.ts +39 -8
  37. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl-dbg.js +9 -6
  38. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl-dbg.js.map +1 -1
  39. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.d.ts +31 -0
  40. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.d.ts.map +1 -1
  41. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.js +1 -1
  42. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.js.map +1 -1
  43. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.ts +47 -12
  44. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +6 -14
  45. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js.map +1 -1
  46. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts +1 -2
  47. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts.map +1 -1
  48. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js +1 -1
  49. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js.map +1 -1
  50. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.ts +12 -19
  51. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js.map +1 -1
  52. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts +3 -3
  53. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts.map +1 -1
  54. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js.map +1 -1
  55. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.ts +4 -4
  56. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js.map +1 -1
  57. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts +1 -1
  58. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts.map +1 -1
  59. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js.map +1 -1
  60. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts +1 -1
  61. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate-dbg.js +1 -1
  62. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate-dbg.js.map +1 -1
  63. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts +4 -3
  64. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts.map +1 -1
  65. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.js.map +1 -1
  66. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.ts +10 -9
  67. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js +3 -3
  68. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js.map +1 -1
  69. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts +1 -1
  70. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts.map +1 -1
  71. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js +1 -1
  72. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js.map +1 -1
  73. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts +7 -6
  74. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js.map +1 -1
  75. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.d.ts +1 -1
  76. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.d.ts.map +1 -1
  77. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.js.map +1 -1
  78. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.ts +1 -1
  79. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js.map +1 -1
  80. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js.map +1 -1
  81. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts +1 -1
  82. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js.map +1 -1
  83. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js.map +1 -1
  84. package/src/nz/co/siliconst/ui5/metaui/core/Engine.ts +2 -2
  85. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager-dbg.js.map +1 -1
  86. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.d.ts +1 -1
  87. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.d.ts.map +1 -1
  88. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.js.map +1 -1
  89. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.ts +1 -1
  90. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +5 -1
  91. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js.map +1 -1
  92. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts.map +1 -1
  93. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js +1 -1
  94. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js.map +1 -1
  95. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts +9 -5
  96. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -1
  97. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +1 -1
  98. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
  99. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
  100. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +7 -7
  101. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator-dbg.js.map +1 -1
  102. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.d.ts +1 -1
  103. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.d.ts.map +1 -1
  104. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.js.map +1 -1
  105. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.ts +1 -1
  106. package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js.map +1 -1
  107. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts +2 -2
  108. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts.map +1 -1
  109. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js.map +1 -1
  110. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.ts +6 -6
  111. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPipeline-dbg.js.map +1 -1
  112. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPipeline.d.ts +1 -1
  113. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPipeline.d.ts.map +1 -1
  114. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPipeline.ts +1 -1
  115. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js.map +1 -1
  116. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js.map +1 -1
  117. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.ts +1 -1
  118. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout-dbg.js.map +1 -1
  119. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.js.map +1 -1
  120. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.ts +1 -1
  121. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js +3 -3
  122. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -1
  123. package/src/nz/co/siliconst/ui5/metaui/library-preload.js +33 -32
  124. package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
  125. package/src/nz/co/siliconst/ui5/metaui/library.d.ts +27 -1
  126. package/src/nz/co/siliconst/ui5/metaui/library.d.ts.map +1 -1
  127. package/src/nz/co/siliconst/ui5/metaui/library.js +1 -1
  128. package/src/nz/co/siliconst/ui5/metaui/library.js.map +1 -1
  129. package/src/nz/co/siliconst/ui5/metaui/library.ts +34 -2
  130. package/src/nz/co/siliconst/ui5/metaui/manifest.json +2 -1
  131. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin-dbg.js.map +1 -1
  132. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.d.ts +1 -1
  133. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.d.ts.map +1 -1
  134. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.js.map +1 -1
  135. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.ts +1 -1
  136. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin-dbg.js +0 -2
  137. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin-dbg.js.map +1 -1
  138. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.d.ts +1 -1
  139. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.d.ts.map +1 -1
  140. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.js.map +1 -1
  141. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.ts +2 -4
  142. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin-dbg.js.map +1 -1
  143. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin.d.ts +1 -1
  144. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin.d.ts.map +1 -1
  145. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin.js.map +1 -1
  146. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin.ts +1 -1
  147. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js +5 -3
  148. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js.map +1 -1
  149. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.d.ts +1 -1
  150. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.d.ts.map +1 -1
  151. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js +1 -1
  152. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js.map +1 -1
  153. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts +7 -6
  154. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +3 -9
  155. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js.map +1 -1
  156. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.d.ts +2 -2
  157. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.d.ts.map +1 -1
  158. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js +1 -1
  159. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js.map +1 -1
  160. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +9 -14
  161. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js +14 -3
  162. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js.map +1 -1
  163. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts +2 -2
  164. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts.map +1 -1
  165. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js +1 -1
  166. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js.map +1 -1
  167. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +19 -8
  168. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +1 -3
  169. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
  170. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.d.ts +1 -1
  171. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.d.ts.map +1 -1
  172. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js +1 -1
  173. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
  174. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +3 -3
  175. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +2 -4
  176. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
  177. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.d.ts +2 -2
  178. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.d.ts.map +1 -1
  179. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js +1 -1
  180. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
  181. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +7 -7
  182. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +2 -4
  183. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js.map +1 -1
  184. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.d.ts +2 -2
  185. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.d.ts.map +1 -1
  186. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js +1 -1
  187. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
  188. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +15 -15
  189. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +2 -4
  190. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
  191. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.d.ts +2 -2
  192. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.d.ts.map +1 -1
  193. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
  194. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
  195. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +4 -4
  196. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +2 -4
  197. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
  198. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.d.ts +2 -2
  199. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.d.ts.map +1 -1
  200. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
  201. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
  202. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +4 -4
  203. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +2 -4
  204. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
  205. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.d.ts +2 -2
  206. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.d.ts.map +1 -1
  207. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js +1 -1
  208. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
  209. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +4 -4
  210. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +2 -4
  211. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
  212. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.d.ts +2 -2
  213. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.d.ts.map +1 -1
  214. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
  215. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
  216. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +4 -4
  217. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +2 -4
  218. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
  219. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.d.ts +2 -2
  220. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.d.ts.map +1 -1
  221. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js +1 -1
  222. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
  223. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +7 -7
  224. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js.map +1 -1
  225. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.d.ts +1 -1
  226. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.d.ts.map +1 -1
  227. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.js.map +1 -1
  228. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.ts +1 -1
  229. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +2 -4
  230. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js.map +1 -1
  231. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.d.ts +2 -2
  232. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.d.ts.map +1 -1
  233. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js +1 -1
  234. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js.map +1 -1
  235. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +5 -5
  236. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +2 -4
  237. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
  238. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.d.ts +2 -2
  239. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.d.ts.map +1 -1
  240. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
  241. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
  242. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +4 -4
  243. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js +5 -3
  244. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js.map +1 -1
  245. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.d.ts +1 -1
  246. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.d.ts.map +1 -1
  247. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js +1 -1
  248. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js.map +1 -1
  249. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.ts +11 -9
  250. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +2 -4
  251. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
  252. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.d.ts +2 -2
  253. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.d.ts.map +1 -1
  254. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
  255. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
  256. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +4 -4
  257. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +1 -3
  258. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
  259. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.d.ts.map +1 -1
  260. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js +1 -1
  261. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
  262. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +5 -5
  263. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +2 -4
  264. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
  265. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.d.ts +2 -2
  266. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.d.ts.map +1 -1
  267. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js +1 -1
  268. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
  269. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +9 -9
  270. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +2 -4
  271. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
  272. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.d.ts +2 -2
  273. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.d.ts.map +1 -1
  274. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
  275. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
  276. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +6 -6
  277. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +2 -4
  278. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
  279. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.d.ts +2 -2
  280. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.d.ts.map +1 -1
  281. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js +1 -1
  282. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
  283. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +6 -6
  284. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +2 -4
  285. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js.map +1 -1
  286. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.d.ts +2 -2
  287. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.d.ts.map +1 -1
  288. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js +1 -1
  289. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js.map +1 -1
  290. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +6 -6
  291. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +2 -4
  292. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
  293. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.d.ts +2 -2
  294. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.d.ts.map +1 -1
  295. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js +1 -1
  296. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
  297. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +6 -6
  298. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +2 -4
  299. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
  300. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.d.ts +2 -2
  301. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.d.ts.map +1 -1
  302. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
  303. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
  304. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +6 -6
  305. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +2 -4
  306. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
  307. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.d.ts +2 -2
  308. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.d.ts.map +1 -1
  309. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js +1 -1
  310. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
  311. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +8 -8
  312. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js +9 -0
  313. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js.map +1 -1
  314. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.d.ts +8 -1
  315. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.d.ts.map +1 -1
  316. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js.map +1 -1
  317. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.ts +13 -6
  318. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin-dbg.js +9 -0
  319. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin-dbg.js.map +1 -1
  320. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.d.ts +8 -1
  321. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.d.ts.map +1 -1
  322. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.js.map +1 -1
  323. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin.ts +10 -3
  324. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin-dbg.js +19 -0
  325. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin-dbg.js.map +1 -1
  326. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.d.ts +18 -1
  327. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.d.ts.map +1 -1
  328. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.js.map +1 -1
  329. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.ts +19 -2
  330. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js +23 -0
  331. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js.map +1 -1
  332. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.d.ts +20 -1
  333. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.d.ts.map +1 -1
  334. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js.map +1 -1
  335. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.ts +25 -6
  336. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin-dbg.js.map +1 -1
  337. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.d.ts +1 -1
  338. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.d.ts.map +1 -1
  339. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.js.map +1 -1
  340. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.ts +2 -2
  341. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin-dbg.js +6 -0
  342. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin-dbg.js.map +1 -1
  343. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.d.ts +6 -1
  344. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.d.ts.map +1 -1
  345. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.js.map +1 -1
  346. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.ts +7 -2
  347. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin-dbg.js +5 -0
  348. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin-dbg.js.map +1 -1
  349. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.d.ts +6 -1
  350. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.d.ts.map +1 -1
  351. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.js.map +1 -1
  352. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.ts +6 -1
  353. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin-dbg.js +5 -0
  354. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin-dbg.js.map +1 -1
  355. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.d.ts +6 -1
  356. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.d.ts.map +1 -1
  357. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.js.map +1 -1
  358. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.ts +6 -1
  359. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin-dbg.js.map +1 -1
  360. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.d.ts +1 -1
  361. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.d.ts.map +1 -1
  362. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.js.map +1 -1
  363. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.ts +1 -1
  364. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin-dbg.js +6 -0
  365. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin-dbg.js.map +1 -1
  366. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.d.ts +7 -1
  367. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.d.ts.map +1 -1
  368. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.js.map +1 -1
  369. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.ts +7 -1
  370. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin-dbg.js +6 -0
  371. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin-dbg.js.map +1 -1
  372. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.d.ts +7 -1
  373. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.d.ts.map +1 -1
  374. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.js.map +1 -1
  375. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.ts +7 -1
  376. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin-dbg.js +6 -0
  377. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin-dbg.js.map +1 -1
  378. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.d.ts +7 -1
  379. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.d.ts.map +1 -1
  380. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.js.map +1 -1
  381. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.ts +7 -1
  382. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin-dbg.js +6 -0
  383. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin-dbg.js.map +1 -1
  384. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.d.ts +7 -1
  385. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.d.ts.map +1 -1
  386. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.js.map +1 -1
  387. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.ts +7 -1
  388. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin-dbg.js +6 -0
  389. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin-dbg.js.map +1 -1
  390. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.d.ts +7 -1
  391. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.d.ts.map +1 -1
  392. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.js.map +1 -1
  393. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.ts +7 -1
  394. package/src/nz/co/siliconst/ui5/metaui/typings/ui5-custom.d.ts +20 -0
  395. package/src/nz/co/siliconst/ui5/metaui/utils/ExpressionBuilder-dbg.js +50 -0
  396. package/src/nz/co/siliconst/ui5/metaui/utils/ExpressionBuilder-dbg.js.map +1 -0
  397. package/src/nz/co/siliconst/ui5/metaui/utils/ExpressionBuilder.d.ts +19 -0
  398. package/src/nz/co/siliconst/ui5/metaui/utils/ExpressionBuilder.d.ts.map +1 -0
  399. package/src/nz/co/siliconst/ui5/metaui/utils/ExpressionBuilder.js +2 -0
  400. package/src/nz/co/siliconst/ui5/metaui/utils/ExpressionBuilder.js.map +1 -0
  401. package/src/nz/co/siliconst/ui5/metaui/utils/ExpressionBuilder.ts +43 -0
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultLayoutGenerator-dbg.js","names":["DefaultLayoutGenerator","ensureLayout","schema","uiLayout","Array","isArray","length","type","props","items","properties","Object","keys","elements","generateElementsFromProperties","filter","e","label","title","basePath","key","prop","currentPath","push","ui","scope","error","__ui5_require_async","then","Logger","message","__exports","__esModule"],"sources":["DefaultLayoutGenerator.ts"],"sourcesContent":["/**\n * @file DefaultLayoutGenerator.ts\n * @description Automatically synthesizes a default UI layout for schemas that lack an explicit mapping.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\n\n/**\n * Encapsulates the logic to dynamically build a safe, default layout orchestration\n * when the developer or backend fails to provide an explicit `uiLayout`.\n * \n * By elevating this into a dedicated utility, we avoid polluting layout engines\n * (like FormLayout or TableLayout) with structural inference responsibilities.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class DefaultLayoutGenerator {\n /**\n * Inspects a schema. If it has properties but no `uiLayout`, it synthesizes a default.\n * @param schema The ISchema dictionary.\n * @returns boolean True if a layout was synthesized, false if it already existed or was empty.\n */\n public static ensureLayout(schema: ISchema): boolean {\n // If it already has a valid array, do nothing\n if (schema.uiLayout && Array.isArray(schema.uiLayout) && schema.uiLayout.length > 0) {\n return false;\n }\n\n const isArray = schema.type === \"array\";\n const props = isArray ? schema.items?.properties : schema.properties;\n\n if (!props || Object.keys(props).length === 0) {\n return false; // Nothing to map\n }\n\n const elements = this.generateElementsFromProperties(props, \"#/properties\");\n\n if (isArray) {\n // Table layouts expect an array of flat Controls at the root uiLayout\n // For tables, we flatten the deep elements or just render the root level\n // To keep it safe, we'll just use the flat elements for tables\n schema.uiLayout = elements.filter(e => e.type === \"Control\");\n } else {\n // Form layouts expect a grouped structure\n schema.uiLayout = [\n {\n type: \"Group\",\n label: schema.title,\n elements: elements\n }\n ];\n }\n\n return true;\n }\n\n /**\n * Recursively traverses property metadata to synthesize generic Group and Control layout definitions.\n * @param props The properties object from the schema.\n * @param basePath The absolute JSON scope path to prefix bindings.\n * @returns An array of generated layout element descriptors.\n */\n private static generateElementsFromProperties(props: any, basePath: string): ILayoutElement[] {\n const elements: ILayoutElement[] = [];\n for (const key of Object.keys(props)) {\n try {\n const prop = props[key];\n const currentPath = `${basePath}/${key}`;\n\n if (prop.type === \"object\" && prop.properties) {\n elements.push({\n type: \"Group\",\n label: prop.ui?.label || key,\n elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)\n });\n } else {\n elements.push({\n type: \"Control\",\n scope: currentPath\n });\n }\n } catch (error) {\n // If a single synthesized property fails, swallow it to prevent the entire synthesized form from crashing.\n import(\"../utils/Logger\").then(({ Logger }) => {\n Logger.error(`[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}'`, (error as Error).message);\n });\n }\n }\n return elements;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAAA;AACA;AACA;AACA;;EAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,sBAAsB,CAAC;IAChC;AACJ;AACA;AACA;AACA;IACI,OAAcC,YAAYA,CAACC,MAAe,EAAW;MACjD;MACA,IAAIA,MAAM,CAACC,QAAQ,IAAIC,KAAK,CAACC,OAAO,CAACH,MAAM,CAACC,QAAQ,CAAC,IAAID,MAAM,CAACC,QAAQ,CAACG,MAAM,GAAG,CAAC,EAAE;QACjF,OAAO,KAAK;MAChB;MAEA,MAAMD,OAAO,GAAGH,MAAM,CAACK,IAAI,KAAK,OAAO;MACvC,MAAMC,KAAK,GAAGH,OAAO,GAAGH,MAAM,CAACO,KAAK,EAAEC,UAAU,GAAGR,MAAM,CAACQ,UAAU;MAEpE,IAAI,CAACF,KAAK,IAAIG,MAAM,CAACC,IAAI,CAACJ,KAAK,CAAC,CAACF,MAAM,KAAK,CAAC,EAAE;QAC3C,OAAO,KAAK,CAAC,CAAC;MAClB;MAEA,MAAMO,QAAQ,GAAG,IAAI,CAACC,8BAA8B,CAACN,KAAK,EAAE,cAAc,CAAC;MAE3E,IAAIH,OAAO,EAAE;QACT;QACA;QACA;QACAH,MAAM,CAACC,QAAQ,GAAGU,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;QACN;MACJ;MACA,OAAOjB,QAAQ;IACnB;EACJ;EAAC,IAAAkB,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA/B,sBAAA,GAAAA,sBAAA;EAAA,OAAA+B,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"DefaultLayoutGenerator-dbg.js","names":["DefaultLayoutGenerator","ensureLayout","schema","uiLayout","Array","isArray","length","type","props","items","properties","Object","keys","elements","generateElementsFromProperties","filter","e","label","title","basePath","key","prop","currentPath","push","ui","scope","error","__ui5_require_async","then","Logger","message","__exports","__esModule"],"sources":["DefaultLayoutGenerator.ts"],"sourcesContent":["/**\n * @file DefaultLayoutGenerator.ts\n * @description Automatically synthesizes a default UI layout for schemas that lack an explicit mapping.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\n\n/**\n * Encapsulates the logic to dynamically build a safe, default layout orchestration\n * when the developer or backend fails to provide an explicit `uiLayout`.\n * \n * By elevating this into a dedicated utility, we avoid polluting layout engines\n * (like FormLayout or TableLayout) with structural inference responsibilities.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class DefaultLayoutGenerator {\n /**\n * Inspects a schema. If it has properties but no `uiLayout`, it synthesizes a default.\n * @param schema The ISchema dictionary.\n * @returns boolean True if a layout was synthesized, false if it already existed or was empty.\n */\n public static ensureLayout(schema: ISchema): boolean {\n // If it already has a valid array, do nothing\n if (schema.uiLayout && Array.isArray(schema.uiLayout) && schema.uiLayout.length > 0) {\n return false;\n }\n\n const isArray = schema.type === \"array\";\n const props = isArray ? schema.items?.properties : schema.properties;\n\n if (!props || Object.keys(props).length === 0) {\n return false; // Nothing to map\n }\n\n const elements = this.generateElementsFromProperties(props, \"#/properties\");\n\n if (isArray) {\n // Table layouts expect an array of flat Controls at the root uiLayout\n // For tables, we flatten the deep elements or just render the root level\n // To keep it safe, we'll just use the flat elements for tables\n schema.uiLayout = elements.filter(e => e.type === \"Control\");\n } else {\n // Form layouts expect a grouped structure\n schema.uiLayout = [\n {\n type: \"Group\",\n label: schema.title,\n elements: elements\n }\n ];\n }\n\n return true;\n }\n\n /**\n * Recursively traverses property metadata to synthesize generic Group and Control layout definitions.\n * @param props The properties object from the schema.\n * @param basePath The absolute JSON scope path to prefix bindings.\n * @returns An array of generated layout element descriptors.\n */\n private static generateElementsFromProperties(props: Record<string, import(\"../interfaces/ISchema\").IPropertyMetadata>, basePath: string): ILayoutElement[] {\n const elements: ILayoutElement[] = [];\n for (const key of Object.keys(props)) {\n try {\n const prop = props[key];\n const currentPath = `${basePath}/${key}`;\n\n if (prop.type === \"object\" && prop.properties) {\n elements.push({\n type: \"Group\",\n label: prop.ui?.label || key,\n elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)\n });\n } else {\n elements.push({\n type: \"Control\",\n scope: currentPath\n });\n }\n } catch (error) {\n // If a single synthesized property fails, swallow it to prevent the entire synthesized form from crashing.\n import(\"../utils/Logger\").then(({ Logger }) => {\n Logger.error(`[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}'`, (error as Error).message);\n });\n }\n }\n return elements;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAAA;AACA;AACA;AACA;;EAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,sBAAsB,CAAC;IAChC;AACJ;AACA;AACA;AACA;IACI,OAAcC,YAAYA,CAACC,MAAe,EAAW;MACjD;MACA,IAAIA,MAAM,CAACC,QAAQ,IAAIC,KAAK,CAACC,OAAO,CAACH,MAAM,CAACC,QAAQ,CAAC,IAAID,MAAM,CAACC,QAAQ,CAACG,MAAM,GAAG,CAAC,EAAE;QACjF,OAAO,KAAK;MAChB;MAEA,MAAMD,OAAO,GAAGH,MAAM,CAACK,IAAI,KAAK,OAAO;MACvC,MAAMC,KAAK,GAAGH,OAAO,GAAGH,MAAM,CAACO,KAAK,EAAEC,UAAU,GAAGR,MAAM,CAACQ,UAAU;MAEpE,IAAI,CA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;cACfkB,KAAK,EAAEH;YACX,CAAC,CAAC;UACN;QACJ,CAAC,CAAC,OAAOI,KAAK,EAAE;UACZ;UACAC,mBAAA,CAAO,iBAAiB,CAAC,CAACC,IAAI,CAAC,CAAC;YAAEC;UAAO,CAAC,KAAK;YAC3CA,MAAM,CAACH,KAAK,CAAC,kEAAkEN,GAAG,GAAG,EAAGM,KAAK,CAAWI,OAAO,CAAC;UACpH,CAAC,CAAC;QACN;MACJ;MACA,OAAOjB,QAAQ;IACnB;EACJ;EAAC,IAAAkB,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA/B,sBAAA,GAAAA,sBAAA;EAAA,OAAA+B,SAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultLayoutGenerator.js","names":["DefaultLayoutGenerator","ensureLayout","schema","uiLayout","Array","isArray","length","type","props","items","properties","Object","keys","elements","this","generateElementsFromProperties","filter","e","label","title","basePath","key","prop","currentPath","push","ui","scope","error","__ui5_require_async","then","Logger","message","__exports","__esModule"],"sources":["DefaultLayoutGenerator.ts"],"sourcesContent":["/**\n * @file DefaultLayoutGenerator.ts\n * @description Automatically synthesizes a default UI layout for schemas that lack an explicit mapping.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\n\n/**\n * Encapsulates the logic to dynamically build a safe, default layout orchestration\n * when the developer or backend fails to provide an explicit `uiLayout`.\n * \n * By elevating this into a dedicated utility, we avoid polluting layout engines\n * (like FormLayout or TableLayout) with structural inference responsibilities.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class DefaultLayoutGenerator {\n /**\n * Inspects a schema. If it has properties but no `uiLayout`, it synthesizes a default.\n * @param schema The ISchema dictionary.\n * @returns boolean True if a layout was synthesized, false if it already existed or was empty.\n */\n public static ensureLayout(schema: ISchema): boolean {\n // If it already has a valid array, do nothing\n if (schema.uiLayout && Array.isArray(schema.uiLayout) && schema.uiLayout.length > 0) {\n return false;\n }\n\n const isArray = schema.type === \"array\";\n const props = isArray ? schema.items?.properties : schema.properties;\n\n if (!props || Object.keys(props).length === 0) {\n return false; // Nothing to map\n }\n\n const elements = this.generateElementsFromProperties(props, \"#/properties\");\n\n if (isArray) {\n // Table layouts expect an array of flat Controls at the root uiLayout\n // For tables, we flatten the deep elements or just render the root level\n // To keep it safe, we'll just use the flat elements for tables\n schema.uiLayout = elements.filter(e => e.type === \"Control\");\n } else {\n // Form layouts expect a grouped structure\n schema.uiLayout = [\n {\n type: \"Group\",\n label: schema.title,\n elements: elements\n }\n ];\n }\n\n return true;\n }\n\n /**\n * Recursively traverses property metadata to synthesize generic Group and Control layout definitions.\n * @param props The properties object from the schema.\n * @param basePath The absolute JSON scope path to prefix bindings.\n * @returns An array of generated layout element descriptors.\n */\n private static generateElementsFromProperties(props: any, basePath: string): ILayoutElement[] {\n const elements: ILayoutElement[] = [];\n for (const key of Object.keys(props)) {\n try {\n const prop = props[key];\n const currentPath = `${basePath}/${key}`;\n\n if (prop.type === \"object\" && prop.properties) {\n elements.push({\n type: \"Group\",\n label: prop.ui?.label || key,\n elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)\n });\n } else {\n elements.push({\n type: \"Control\",\n scope: currentPath\n });\n }\n } catch (error) {\n // If a single synthesized property fails, swallow it to prevent the entire synthesized form from crashing.\n import(\"../utils/Logger\").then(({ Logger }) => {\n Logger.error(`[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}'`, (error as Error).message);\n });\n }\n }\n return elements;\n }\n}\n"],"mappings":"qSAiBO,MAAMA,EAMT,mBAAcC,CAAaC,GAEvB,GAAIA,EAAOC,UAAYC,MAAMC,QAAQH,EAAOC,WAAaD,EAAOC,SAASG,OAAS,EAAG,CACjF,OAAO,KACX,CAEA,MAAMD,EAAUH,EAAOK,OAAS,QAChC,MAAMC,EAAQH,EAAUH,EAAOO,OAAOC,WAAaR,EAAOQ,WAE1D,IAAKF,GAASG,OAAOC,KAAKJ,GAAOF,SAAW,EAAG,CAC3C,OAAO,KACX,CAEA,MAAMO,EAAWC,KAAKC,+BAA+BP,EAAO,gBAE5D,GAAIH,EAAS,CAITH,EAAOC,SAAWU,EAASG,OAAOC,GAAKA,EAAEV,OAAS,UACtD,KAAO,CAEHL,EAAOC,SAAW,CACd,CACII,KAAM,QACNW,MAAOhB,EAAOiB,MACdN,SAAUA,GAGtB,CAEA,OAAO,IACX,CAQA,qCAAeE,CAA+BP,EAAYY,GACtD,MAAMP,EAA6B,GACnC,IAAK,MAAMQ,KAAOV,OAAOC,KAAKJ,GAAQ,CAClC,IACI,MAAMc,EAAOd,EAAMa,GACnB,MAAME,EAAc,GAAGH,KAAYC,IAEnC,GAAIC,EAAKf,OAAS,UAAYe,EAAKZ,WAAY,CAC3CG,EAASW,KAAK,CACVjB,KAAM,QACNW,MAAOI,EAAKG,IAAIP,OAASG,EACzBR,SAAUC,KAAKC,+BAA+BO,EAAKZ,WAAY,GAAGa,iBAE1E,KAAO,CACHV,EAASW,KAAK,CACVjB,KAAM,UACNmB,MAAOH,GAEf,CACJ,CAAE,MAAOI,GAELC,EAAO,mBAAmBC,KAAK,EAAGC,aAC9BA,EAAOH,MAAM,kEAAkEN,KAASM,EAAgBI,UAEhH,CACJ,CACA,OAAOlB,CACX,EACH,IAAAmB,EAAA,CAAAC,WAAA,MAAAD,EAAAhC,yBAAA,OAAAgC,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"DefaultLayoutGenerator.js","names":["DefaultLayoutGenerator","ensureLayout","schema","uiLayout","Array","isArray","length","type","props","items","properties","Object","keys","elements","this","generateElementsFromProperties","filter","e","label","title","basePath","key","prop","currentPath","push","ui","scope","error","__ui5_require_async","then","Logger","message","__exports","__esModule"],"sources":["DefaultLayoutGenerator.ts"],"sourcesContent":["/**\n * @file DefaultLayoutGenerator.ts\n * @description Automatically synthesizes a default UI layout for schemas that lack an explicit mapping.\n */\n\nimport { ISchema, ILayoutElement } from \"../interfaces/ISchema\";\n\n/**\n * Encapsulates the logic to dynamically build a safe, default layout orchestration\n * when the developer or backend fails to provide an explicit `uiLayout`.\n * \n * By elevating this into a dedicated utility, we avoid polluting layout engines\n * (like FormLayout or TableLayout) with structural inference responsibilities.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class DefaultLayoutGenerator {\n /**\n * Inspects a schema. If it has properties but no `uiLayout`, it synthesizes a default.\n * @param schema The ISchema dictionary.\n * @returns boolean True if a layout was synthesized, false if it already existed or was empty.\n */\n public static ensureLayout(schema: ISchema): boolean {\n // If it already has a valid array, do nothing\n if (schema.uiLayout && Array.isArray(schema.uiLayout) && schema.uiLayout.length > 0) {\n return false;\n }\n\n const isArray = schema.type === \"array\";\n const props = isArray ? schema.items?.properties : schema.properties;\n\n if (!props || Object.keys(props).length === 0) {\n return false; // Nothing to map\n }\n\n const elements = this.generateElementsFromProperties(props, \"#/properties\");\n\n if (isArray) {\n // Table layouts expect an array of flat Controls at the root uiLayout\n // For tables, we flatten the deep elements or just render the root level\n // To keep it safe, we'll just use the flat elements for tables\n schema.uiLayout = elements.filter(e => e.type === \"Control\");\n } else {\n // Form layouts expect a grouped structure\n schema.uiLayout = [\n {\n type: \"Group\",\n label: schema.title,\n elements: elements\n }\n ];\n }\n\n return true;\n }\n\n /**\n * Recursively traverses property metadata to synthesize generic Group and Control layout definitions.\n * @param props The properties object from the schema.\n * @param basePath The absolute JSON scope path to prefix bindings.\n * @returns An array of generated layout element descriptors.\n */\n private static generateElementsFromProperties(props: Record<string, import(\"../interfaces/ISchema\").IPropertyMetadata>, basePath: string): ILayoutElement[] {\n const elements: ILayoutElement[] = [];\n for (const key of Object.keys(props)) {\n try {\n const prop = props[key];\n const currentPath = `${basePath}/${key}`;\n\n if (prop.type === \"object\" && prop.properties) {\n elements.push({\n type: \"Group\",\n label: prop.ui?.label || key,\n elements: this.generateElementsFromProperties(prop.properties, `${currentPath}/properties`)\n });\n } else {\n elements.push({\n type: \"Control\",\n scope: currentPath\n });\n }\n } catch (error) {\n // If a single synthesized property fails, swallow it to prevent the entire synthesized form from crashing.\n import(\"../utils/Logger\").then(({ Logger }) => {\n Logger.error(`[MetaUI] DefaultLayoutGenerator failed to synthesize property '${key}'`, (error as Error).message);\n });\n }\n }\n return elements;\n }\n}\n"],"mappings":"qSAiBO,MAAMA,EAMT,mBAAcC,CAAaC,GAEvB,GAAIA,EAAOC,UAAYC,MAAMC,QAAQH,EAAOC,WAAaD,EAAOC,SAASG,OAAS,EAAG,CACjF,OAAO,KACX,CAEA,MAAMD,EAAUH,EAAOK,OAAS,QAChC,MAAMC,EAAQH,EAAUH,EAAOO,OAAOC,WAAaR,EAAOQ,WAE1D,IAAKF,GAASG,OAAOC,KAAKJ,GAAOF,SAAW,EAAG,CAC3C,OAAO,KACX,CAEA,MAAMO,EAAWC,KAAKC,+BAA+BP,EAAO,gBAE5D,GAAIH,EAAS,CAITH,EAAOC,SAAWU,EAASG,OAAOC,GAAKA,EAAEV,OAAS,UACtD,KAAO,CAEHL,EAAOC,SAAW,CACd,CACII,KAAM,QACNW,MAAOhB,EAAOiB,MACdN,SAAUA,GAGtB,CAEA,OAAO,IACX,CAQA,qCAAeE,CAA+BP,EAA0EY,GACpH,MAAMP,EAA6B,GACnC,IAAK,MAAMQ,KAAOV,OAAOC,KAAKJ,GAAQ,CAClC,IACI,MAAMc,EAAOd,EAAMa,GACnB,MAAME,EAAc,GAAGH,KAAYC,IAEnC,GAAIC,EAAKf,OAAS,UAAYe,EAAKZ,WAAY,CAC3CG,EAASW,KAAK,CACVjB,KAAM,QACNW,MAAOI,EAAKG,IAAIP,OAASG,EACzBR,SAAUC,KAAKC,+BAA+BO,EAAKZ,WAAY,GAAGa,iBAE1E,KAAO,CACHV,EAASW,KAAK,CACVjB,KAAM,UACNmB,MAAOH,GAEf,CACJ,CAAE,MAAOI,GAELC,EAAO,mBAAmBC,KAAK,EAAGC,aAC9BA,EAAOH,MAAM,kEAAkEN,KAASM,EAAgBI,UAEhH,CACJ,CACA,OAAOlB,CACX,EACH,IAAAmB,EAAA,CAAAC,WAAA,MAAAD,EAAAhC,yBAAA,OAAAgC,CAAA","ignoreList":[]}
@@ -61,7 +61,7 @@ export class DefaultLayoutGenerator {
61
61
  * @param basePath The absolute JSON scope path to prefix bindings.
62
62
  * @returns An array of generated layout element descriptors.
63
63
  */
64
- private static generateElementsFromProperties(props: any, basePath: string): ILayoutElement[] {
64
+ private static generateElementsFromProperties(props: Record<string, import("../interfaces/ISchema").IPropertyMetadata>, basePath: string): ILayoutElement[] {
65
65
  const elements: ILayoutElement[] = [];
66
66
  for (const key of Object.keys(props)) {
67
67
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"Engine-dbg.js","names":["ConditionEngine","___ConditionEngine","PluginRegistry","___PluginRegistry","Logger","___utils_Logger","DefaultLayoutGenerator","___DefaultLayoutGenerator","Engine","conditionEngine","activePlugins","isEditable","constructor","editable","build","schema","model","modelName","onSubmit","engineScopeId","onChange","activeModel","isValid","fieldKey","errorMessage","controlId","handleEvent","ensureLayout","warn","layoutStrategy","type","layoutManager","getInstance","getLayout","render","error","msg","message","showErrorPopup","Text","text","generateField","fieldMeta","bindingPath","isTemplate","plugin","getPlugin","ui","widget","setEditable","push","path","scopeId","undefined","control","registerPlugin","generateLayout","validateAll","errors","item","result","validate","replace","name","destroy","messageManager","Messaging","existingMessages","getMessageModel","getData","messagesToRemove","targetPath","matched","filter","getTarget","getMessageProcessor","getId","length","removeMessages","__exports","__esModule"],"sources":["Engine.ts"],"sourcesContent":["/**\n * @file Engine.ts\n * @description The central orchestrator that routes data between the Layout Factory and Plugin Registry (v2).\n */\n\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { IPlugin, IPluginValidationResult } from \"../interfaces/IPlugin\";\nimport { ConditionEngine } from \"./ConditionEngine\";\nimport { PluginRegistry } from \"./PluginRegistry\";\nimport Control from \"sap/ui/core/Control\";\nimport VBox from \"sap/m/VBox\";\nimport Text from \"sap/m/Text\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\nimport Core from \"sap/ui/core/Core\";\nimport Messaging from \"sap/ui/core/Messaging\";\n\n/**\n * The Engine is responsible for translating a normalized schema into a physical UI5 layout.\n * It delegates layout generation to the configured `LayoutManager` and field generation to the `PluginRegistry`.\n * It strictly routes execution flow and tracks active plugins for validation.\n * It embodies the \"Plugin-First Philosophy\" by routing all complex field and layout rendering\n * through discrete, decoupled plugins rather than handling native overrides.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class Engine {\n /** Handles dynamic conditional logic across the active form. */\n private conditionEngine: ConditionEngine | null = null;\n\n /** Array of all instantiated plugins generated during the current build. */\n private activePlugins: { plugin: IPlugin, path: string }[] = [];\n\n /** Deterministic scope ID injected by the host control to prevent clone collisions. */\n public engineScopeId?: string;\n\n private activeModel?: sap.ui.model.Model;\n\n /** Tracks whether the entire engine is running in Editable mode. */\n public readonly isEditable: boolean = true;\n\n /**\n * Initializes a new Engine instance.\n * @param editable Whether the engine should render form fields as editable or read-only.\n */\n constructor(editable: boolean = true) {\n this.isEditable = editable;\n }\n\n /**\n * Bootstraps the layout generation process by resolving the correct layout strategy.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param model The active StateManager JSONModel instance.\n * @param modelName The UI5 model alias used for isolation.\n * @param onSubmit Callback fired when form is submitted.\n * @param engineScopeId Deterministic scope ID for this engine instance.\n * @param onChange Callback fired when field values change.\n * @returns The generated root UI5 Control container.\n */\n public build(schema: ISchema, model: sap.ui.model.Model, modelName: string = \"meta\", onSubmit?: () => void, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control {\n this.conditionEngine = new ConditionEngine(schema);\n this.activePlugins = [];\n this.activeModel = model;\n this.engineScopeId = engineScopeId;\n this.onChange = (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => {\n if (this.conditionEngine && fieldKey) {\n this.conditionEngine.handleEvent(fieldKey, isValid);\n }\n if (onChange) {\n onChange(isValid, fieldKey, errorMessage, controlId);\n }\n };\n\n try {\n // Intercept and synthesize a default layout if the developer/backend failed to provide one\n if (DefaultLayoutGenerator.ensureLayout(schema)) {\n Logger.warn(\"[MetaUI Engine] Missing 'uiLayout' array in schema. Synthesized a default layout mapping to prevent a blank render.\");\n }\n\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n\n return layoutManager.render(schema, modelName, this, onSubmit);\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(\"[MetaUI Engine] Critical error during layout generation\", msg);\n Logger.showErrorPopup(`Engine failed to generate the layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Layout Error\" });\n }\n }\n\n /**\n * Instantiates the correct plugin for a specific field based on type and widget hints,\n * and tracks the plugin for global validation.\n * \n * @param fieldMeta The metadata schema specific to the field.\n * @param bindingPath The JSON path representing the field within the payload.\n * @param modelName The UI5 JSONModel name used for data binding.\n * @returns The generated UI5 Control for the field.\n */\n public generateField(fieldMeta: IPropertyMetadata, bindingPath: string, modelName: string, isTemplate: boolean = false): Control {\n try {\n const plugin = PluginRegistry.getInstance().getPlugin(fieldMeta.type || \"string\", fieldMeta.ui?.widget);\n plugin.setEditable(this.isEditable);\n\n if (!isTemplate) {\n this.activePlugins.push({ plugin, path: bindingPath });\n }\n const scopeId = isTemplate ? undefined : this.engineScopeId;\n const control = plugin.render(fieldMeta, bindingPath, modelName, scopeId, this.onChange);\n\n if (this.conditionEngine) {\n this.conditionEngine.registerPlugin(bindingPath, plugin);\n }\n\n return control;\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Failed to generate field at ${bindingPath}`, msg);\n Logger.showErrorPopup(`Failed to generate field '${bindingPath}'.\\n\\nDetails: ${msg}`);\n return new Text({ text: `[Error generating field ${bindingPath}]` });\n }\n }\n\n /**\n * Generates a sub-layout (like an embedded table or nested form) without \n * destroying the current Engine state or Condition tracking.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param modelName The UI5 JSONModel name used for data binding (defaults to \"meta\").\n * @param bindingPath Optional path to bind the sub-layout to a specific array/object property.\n * @returns The generated root UI5 Control container.\n */\n public generateLayout(schema: ISchema, modelName: string, bindingPath?: string): Control {\n try {\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n return layoutManager.render(schema, modelName, this, undefined, bindingPath);\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Critical error generating sub-layout for ${bindingPath}`, msg);\n Logger.showErrorPopup(`Engine failed to generate a sub-layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Sub-Layout Error\" });\n }\n }\n\n /**\n * Iterates through all active plugins and triggers their internal validation pipelines.\n * \n * @returns {IPluginValidationResult[]} Array of validation error objects. Empty array if valid.\n */\n public validateAll(): IPluginValidationResult[] {\n const errors: IPluginValidationResult[] = [];\n for (const item of this.activePlugins) {\n try {\n const result = item.plugin.validate();\n if (!result.isValid) {\n // Ensure the path is bound to the error so GeneratorHost knows where to target it\n result.fieldKey = result.fieldKey || item.path.replace(/^\\//, \"\");\n errors.push(result);\n // Add console log to find which plugin fails silently\n Logger.error(\"[MetaUI Validation] Plugin failed validation silently:\", item.path || item.plugin.constructor.name);\n }\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Validation] Exception during plugin validation at path ${item.path}`, msg);\n errors.push({ isValid: false, errorMessage: `Validation crashed: ${msg}`, fieldKey: item.path.replace(/^\\//, \"\") });\n }\n }\n return errors;\n }\n\n /**\n * Cleans up internal state and destroys the condition engine to prevent memory leaks.\n */\n public destroy(): void {\n if (this.conditionEngine) {\n this.conditionEngine.destroy();\n this.conditionEngine = null;\n }\n\n // ------------------------------------------------------------------------\n // Ghost Error Prevention\n // Flush MessageManager for active plugins before destroying their controls\n // ------------------------------------------------------------------------\n const messageManager = Messaging;\n const existingMessages = messageManager.getMessageModel().getData();\n const messagesToRemove: any[] = [];\n\n for (const item of this.activePlugins) {\n if (this.activeModel) {\n const targetPath = `/${item.path.replace(/^\\//, \"\")}`;\n const matched = existingMessages.filter((msg: any) =>\n msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.activeModel.getId()\n );\n messagesToRemove.push(...matched);\n }\n if (typeof item.plugin.destroy === \"function\") {\n item.plugin.destroy();\n }\n }\n\n if (messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n\n this.activePlugins = [];\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAQSA,eAAe,GAAAC,kBAAA;EAAA,MACfC,cAAc,GAAAC,iBAAA;EAAA,MAIdC,MAAM,GAAAC,eAAA;EAAA,MACNC,sBAAsB,GAAAC,yBAAA;EAI/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,MAAM,CAAC;IAChB;IACQC,eAAe,GAA2B,IAAI;;IAEtD;IACQC,aAAa,GAAwC,EAAE;;IAE/D;;IAKA;IACgBC,UAAU,GAAY,IAAI;;IAE1C;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,QAAiB,GAAG,IAAI,EAAE;MAClC,IAAI,CAACF,UAAU,GAAGE,QAAQ;IAC9B;;IAEA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWC,KAAKA,CAACC,MAAe,EAAEC,KAAyB,EAAEC,SAAiB,GAAG,MAAM,EAAEC,QAAqB,EAAEC,aAAsB,EAAEC,QAAmG,EAAW;MAC9O,IAAI,CAACX,eAAe,GAAG,IAAIT,eAAe,CAACe,MAAM,CAAC;MAClD,IAAI,CAACL,aAAa,GAAG,EAAE;MACvB,IAAI,CAACW,WAAW,GAAGL,KAAK;MACxB,IAAI,CA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CAACd,MAAM,CAACmB,OAAO,CAAC,CAAC;QACzB;MACJ;MAEA,IAAIM,gBAAgB,CAACO,MAAM,GAAG,CAAC,EAAE;QAC7BZ,cAAc,CAACa,cAAc,CAACR,gBAAgB,CAAC;MACnD;MAEA,IAAI,CAAC5D,aAAa,GAAG,EAAE;IAC3B;EACJ;EAAC,IAAAqE,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAvE,MAAA,GAAAA,MAAA;EAAA,OAAAuE,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"Engine-dbg.js","names":["ConditionEngine","___ConditionEngine","PluginRegistry","___PluginRegistry","Logger","___utils_Logger","DefaultLayoutGenerator","___DefaultLayoutGenerator","Engine","conditionEngine","activePlugins","isEditable","constructor","editable","build","schema","model","modelName","onSubmit","engineScopeId","onChange","activeModel","isValid","fieldKey","errorMessage","controlId","handleEvent","ensureLayout","warn","layoutStrategy","type","layoutManager","getInstance","getLayout","render","error","msg","message","showErrorPopup","Text","text","generateField","fieldMeta","bindingPath","isTemplate","plugin","getPlugin","ui","widget","setEditable","push","path","scopeId","undefined","control","registerPlugin","generateLayout","validateAll","errors","item","result","validate","replace","name","destroy","messageManager","Messaging","existingMessages","getMessageModel","getData","messagesToRemove","targetPath","matched","filter","getTarget","getMessageProcessor","getId","length","removeMessages","__exports","__esModule"],"sources":["Engine.ts"],"sourcesContent":["/**\n * @file Engine.ts\n * @description The central orchestrator that routes data between the Layout Factory and Plugin Registry (v2).\n */\n\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { IPlugin, IPluginValidationResult } from \"../interfaces/IPlugin\";\nimport { ConditionEngine } from \"./ConditionEngine\";\nimport { PluginRegistry } from \"./PluginRegistry\";\nimport Control from \"sap/ui/core/Control\";\nimport VBox from \"sap/m/VBox\";\nimport Text from \"sap/m/Text\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\nimport Core from \"sap/ui/core/Core\";\nimport Messaging from \"sap/ui/core/Messaging\";\n\n/**\n * The Engine is responsible for translating a normalized schema into a physical UI5 layout.\n * It delegates layout generation to the configured `LayoutManager` and field generation to the `PluginRegistry`.\n * It strictly routes execution flow and tracks active plugins for validation.\n * It embodies the \"Plugin-First Philosophy\" by routing all complex field and layout rendering\n * through discrete, decoupled plugins rather than handling native overrides.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class Engine {\n /** Handles dynamic conditional logic across the active form. */\n private conditionEngine: ConditionEngine | null = null;\n\n /** Array of all instantiated plugins generated during the current build. */\n private activePlugins: { plugin: IPlugin, path: string }[] = [];\n\n /** Deterministic scope ID injected by the host control to prevent clone collisions. */\n public engineScopeId?: string;\n\n private activeModel?: sap.ui.model.Model;\n\n /** Tracks whether the entire engine is running in Editable mode. */\n public readonly isEditable: boolean = true;\n\n /**\n * Initializes a new Engine instance.\n * @param editable Whether the engine should render form fields as editable or read-only.\n */\n constructor(editable: boolean = true) {\n this.isEditable = editable;\n }\n\n /**\n * Bootstraps the layout generation process by resolving the correct layout strategy.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param model The active StateManager JSONModel instance.\n * @param modelName The UI5 model alias used for isolation.\n * @param onSubmit Callback fired when form is submitted.\n * @param engineScopeId Deterministic scope ID for this engine instance.\n * @param onChange Callback fired when field values change.\n * @returns The generated root UI5 Control container.\n */\n public build(schema: ISchema, model: sap.ui.model.Model, modelName: string = \"meta\", onSubmit?: () => void, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control {\n this.conditionEngine = new ConditionEngine(schema);\n this.activePlugins = [];\n this.activeModel = model;\n this.engineScopeId = engineScopeId;\n this.onChange = (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => {\n if (this.conditionEngine && fieldKey) {\n this.conditionEngine.handleEvent(fieldKey, isValid);\n }\n if (onChange) {\n onChange(isValid, fieldKey, errorMessage, controlId);\n }\n };\n\n try {\n // Intercept and synthesize a default layout if the developer/backend failed to provide one\n if (DefaultLayoutGenerator.ensureLayout(schema)) {\n Logger.warn(\"[MetaUI Engine] Missing 'uiLayout' array in schema. Synthesized a default layout mapping to prevent a blank render.\");\n }\n\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n\n return layoutManager.render(schema, modelName, this, onSubmit);\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(\"[MetaUI Engine] Critical error during layout generation\", msg);\n Logger.showErrorPopup(`Engine failed to generate the layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Layout Error\" });\n }\n }\n\n /**\n * Instantiates the correct plugin for a specific field based on type and widget hints,\n * and tracks the plugin for global validation.\n * \n * @param fieldMeta The metadata schema specific to the field.\n * @param bindingPath The JSON path representing the field within the payload.\n * @param modelName The UI5 JSONModel name used for data binding.\n * @returns The generated UI5 Control for the field.\n */\n public generateField(fieldMeta: IPropertyMetadata, bindingPath: string, modelName: string, isTemplate: boolean = false): Control {\n try {\n const plugin = PluginRegistry.getInstance().getPlugin(fieldMeta.type || \"string\", fieldMeta.ui?.widget);\n plugin.setEditable(this.isEditable);\n\n if (!isTemplate) {\n this.activePlugins.push({ plugin, path: bindingPath });\n }\n const scopeId = isTemplate ? undefined : this.engineScopeId;\n const control = plugin.render(fieldMeta, bindingPath, modelName, scopeId, this.onChange);\n\n if (this.conditionEngine) {\n this.conditionEngine.registerPlugin(bindingPath, plugin);\n }\n\n return control;\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Failed to generate field at ${bindingPath}`, msg);\n Logger.showErrorPopup(`Failed to generate field '${bindingPath}'.\\n\\nDetails: ${msg}`);\n return new Text({ text: `[Error generating field ${bindingPath}]` });\n }\n }\n\n /**\n * Generates a sub-layout (like an embedded table or nested form) without \n * destroying the current Engine state or Condition tracking.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param modelName The UI5 JSONModel name used for data binding (defaults to \"meta\").\n * @param bindingPath Optional path to bind the sub-layout to a specific array/object property.\n * @returns The generated root UI5 Control container.\n */\n public generateLayout(schema: ISchema, modelName: string, bindingPath?: string): Control {\n try {\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n return layoutManager.render(schema, modelName, this, undefined, bindingPath);\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Critical error generating sub-layout for ${bindingPath}`, msg);\n Logger.showErrorPopup(`Engine failed to generate a sub-layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Sub-Layout Error\" });\n }\n }\n\n /**\n * Iterates through all active plugins and triggers their internal validation pipelines.\n * \n * @returns {IPluginValidationResult[]} Array of validation error objects. Empty array if valid.\n */\n public validateAll(): IPluginValidationResult[] {\n const errors: IPluginValidationResult[] = [];\n for (const item of this.activePlugins) {\n try {\n const result = item.plugin.validate();\n if (!result.isValid) {\n // Ensure the path is bound to the error so GeneratorHost knows where to target it\n result.fieldKey = result.fieldKey || item.path.replace(/^\\//, \"\");\n errors.push(result);\n // Add console log to find which plugin fails silently\n Logger.error(\"[MetaUI Validation] Plugin failed validation silently:\", item.path || item.plugin.constructor.name);\n }\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Validation] Exception during plugin validation at path ${item.path}`, msg);\n errors.push({ isValid: false, errorMessage: `Validation crashed: ${msg}`, fieldKey: item.path.replace(/^\\//, \"\") });\n }\n }\n return errors;\n }\n\n /**\n * Cleans up internal state and destroys the condition engine to prevent memory leaks.\n */\n public destroy(): void {\n if (this.conditionEngine) {\n this.conditionEngine.destroy();\n this.conditionEngine = null;\n }\n\n // ------------------------------------------------------------------------\n // Ghost Error Prevention\n // Flush MessageManager for active plugins before destroying their controls\n // ------------------------------------------------------------------------\n const messageManager = Messaging;\n const existingMessages = messageManager.getMessageModel().getData();\n const messagesToRemove: sap.ui.core.message.Message[] = [];\n\n for (const item of this.activePlugins) {\n if (this.activeModel) {\n const targetPath = `/${item.path.replace(/^\\//, \"\")}`;\n const matched = existingMessages.filter((msg: sap.ui.core.message.Message) =>\n msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.activeModel.getId()\n );\n messagesToRemove.push(...matched);\n }\n if (typeof item.plugin.destroy === \"function\") {\n item.plugin.destroy();\n }\n }\n\n if (messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n\n this.activePlugins = [];\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAQSA,eAAe,GAAAC,kBAAA;EAAA,MACfC,cAAc,GAAAC,iBAAA;EAAA,MAIdC,MAAM,GAAAC,eAAA;EAAA,MACNC,sBAAsB,GAAAC,yBAAA;EAI/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,MAAM,CAAC;IAChB;IACQC,eAAe,GAA2B,IAAI;;IAEtD;IACQC,aAAa,GAAwC,EAAE;;IAE/D;;IAKA;IACgBC,UAAU,GAAY,IAAI;;IAE1C;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,QAAiB,GAAG,IAAI,EAAE;MAClC,IAAI,CAACF,UAAU,GAAGE,QAAQ;IAC9B;;IAEA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWC,KAAKA,CAACC,MAAe,EAAEC,KAAyB,EAAEC,SAAiB,GAAG,MAAM,EAAEC,QAAqB,EAAEC,aAAsB,EAAEC,QAAmG,EAAW;MAC9O,IAAI,CAACX,eAAe,GAAG,IAAIT,eAAe,CAACe,MAAM,CAAC;MAClD,IAAI,CAACL,aAAa,GAAG,EAAE;MACvB,IAAI,CAACW,WAAW,GAAGL,KAAK;MACxB,IAAI,CAACG,aAAa,GAAGA,aAAa;MAClC,IAAI,CAAC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ACzB;MACJ;MAEA,IAAIM,gBAAgB,CAACO,MAAM,GAAG,CAAC,EAAE;QAC7BZ,cAAc,CAACa,cAAc,CAACR,gBAAgB,CAAC;MACnD;MAEA,IAAI,CAAC5D,aAAa,GAAG,EAAE;IAC3B;EACJ;EAAC,IAAAqE,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAvE,MAAA,GAAAA,MAAA;EAAA,OAAAuE,SAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Engine.js","names":["ConditionEngine","___ConditionEngine","PluginRegistry","___PluginRegistry","Logger","___utils_Logger","DefaultLayoutGenerator","___DefaultLayoutGenerator","Engine","conditionEngine","activePlugins","isEditable","constructor","editable","this","build","schema","model","modelName","onSubmit","engineScopeId","onChange","activeModel","isValid","fieldKey","errorMessage","controlId","handleEvent","ensureLayout","warn","layoutStrategy","type","layoutManager","getInstance","getLayout","render","error","msg","message","showErrorPopup","Text","text","generateField","fieldMeta","bindingPath","isTemplate","plugin","getPlugin","ui","widget","setEditable","push","path","scopeId","undefined","control","registerPlugin","generateLayout","validateAll","errors","item","result","validate","replace","name","destroy","messageManager","Messaging","existingMessages","getMessageModel","getData","messagesToRemove","targetPath","matched","filter","getTarget","getMessageProcessor","getId","length","removeMessages","__exports","__esModule"],"sources":["Engine.ts"],"sourcesContent":["/**\n * @file Engine.ts\n * @description The central orchestrator that routes data between the Layout Factory and Plugin Registry (v2).\n */\n\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { IPlugin, IPluginValidationResult } from \"../interfaces/IPlugin\";\nimport { ConditionEngine } from \"./ConditionEngine\";\nimport { PluginRegistry } from \"./PluginRegistry\";\nimport Control from \"sap/ui/core/Control\";\nimport VBox from \"sap/m/VBox\";\nimport Text from \"sap/m/Text\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\nimport Core from \"sap/ui/core/Core\";\nimport Messaging from \"sap/ui/core/Messaging\";\n\n/**\n * The Engine is responsible for translating a normalized schema into a physical UI5 layout.\n * It delegates layout generation to the configured `LayoutManager` and field generation to the `PluginRegistry`.\n * It strictly routes execution flow and tracks active plugins for validation.\n * It embodies the \"Plugin-First Philosophy\" by routing all complex field and layout rendering\n * through discrete, decoupled plugins rather than handling native overrides.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class Engine {\n /** Handles dynamic conditional logic across the active form. */\n private conditionEngine: ConditionEngine | null = null;\n\n /** Array of all instantiated plugins generated during the current build. */\n private activePlugins: { plugin: IPlugin, path: string }[] = [];\n\n /** Deterministic scope ID injected by the host control to prevent clone collisions. */\n public engineScopeId?: string;\n\n private activeModel?: sap.ui.model.Model;\n\n /** Tracks whether the entire engine is running in Editable mode. */\n public readonly isEditable: boolean = true;\n\n /**\n * Initializes a new Engine instance.\n * @param editable Whether the engine should render form fields as editable or read-only.\n */\n constructor(editable: boolean = true) {\n this.isEditable = editable;\n }\n\n /**\n * Bootstraps the layout generation process by resolving the correct layout strategy.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param model The active StateManager JSONModel instance.\n * @param modelName The UI5 model alias used for isolation.\n * @param onSubmit Callback fired when form is submitted.\n * @param engineScopeId Deterministic scope ID for this engine instance.\n * @param onChange Callback fired when field values change.\n * @returns The generated root UI5 Control container.\n */\n public build(schema: ISchema, model: sap.ui.model.Model, modelName: string = \"meta\", onSubmit?: () => void, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control {\n this.conditionEngine = new ConditionEngine(schema);\n this.activePlugins = [];\n this.activeModel = model;\n this.engineScopeId = engineScopeId;\n this.onChange = (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => {\n if (this.conditionEngine && fieldKey) {\n this.conditionEngine.handleEvent(fieldKey, isValid);\n }\n if (onChange) {\n onChange(isValid, fieldKey, errorMessage, controlId);\n }\n };\n\n try {\n // Intercept and synthesize a default layout if the developer/backend failed to provide one\n if (DefaultLayoutGenerator.ensureLayout(schema)) {\n Logger.warn(\"[MetaUI Engine] Missing 'uiLayout' array in schema. Synthesized a default layout mapping to prevent a blank render.\");\n }\n\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n\n return layoutManager.render(schema, modelName, this, onSubmit);\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(\"[MetaUI Engine] Critical error during layout generation\", msg);\n Logger.showErrorPopup(`Engine failed to generate the layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Layout Error\" });\n }\n }\n\n /**\n * Instantiates the correct plugin for a specific field based on type and widget hints,\n * and tracks the plugin for global validation.\n * \n * @param fieldMeta The metadata schema specific to the field.\n * @param bindingPath The JSON path representing the field within the payload.\n * @param modelName The UI5 JSONModel name used for data binding.\n * @returns The generated UI5 Control for the field.\n */\n public generateField(fieldMeta: IPropertyMetadata, bindingPath: string, modelName: string, isTemplate: boolean = false): Control {\n try {\n const plugin = PluginRegistry.getInstance().getPlugin(fieldMeta.type || \"string\", fieldMeta.ui?.widget);\n plugin.setEditable(this.isEditable);\n\n if (!isTemplate) {\n this.activePlugins.push({ plugin, path: bindingPath });\n }\n const scopeId = isTemplate ? undefined : this.engineScopeId;\n const control = plugin.render(fieldMeta, bindingPath, modelName, scopeId, this.onChange);\n\n if (this.conditionEngine) {\n this.conditionEngine.registerPlugin(bindingPath, plugin);\n }\n\n return control;\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Failed to generate field at ${bindingPath}`, msg);\n Logger.showErrorPopup(`Failed to generate field '${bindingPath}'.\\n\\nDetails: ${msg}`);\n return new Text({ text: `[Error generating field ${bindingPath}]` });\n }\n }\n\n /**\n * Generates a sub-layout (like an embedded table or nested form) without \n * destroying the current Engine state or Condition tracking.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param modelName The UI5 JSONModel name used for data binding (defaults to \"meta\").\n * @param bindingPath Optional path to bind the sub-layout to a specific array/object property.\n * @returns The generated root UI5 Control container.\n */\n public generateLayout(schema: ISchema, modelName: string, bindingPath?: string): Control {\n try {\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n return layoutManager.render(schema, modelName, this, undefined, bindingPath);\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Critical error generating sub-layout for ${bindingPath}`, msg);\n Logger.showErrorPopup(`Engine failed to generate a sub-layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Sub-Layout Error\" });\n }\n }\n\n /**\n * Iterates through all active plugins and triggers their internal validation pipelines.\n * \n * @returns {IPluginValidationResult[]} Array of validation error objects. Empty array if valid.\n */\n public validateAll(): IPluginValidationResult[] {\n const errors: IPluginValidationResult[] = [];\n for (const item of this.activePlugins) {\n try {\n const result = item.plugin.validate();\n if (!result.isValid) {\n // Ensure the path is bound to the error so GeneratorHost knows where to target it\n result.fieldKey = result.fieldKey || item.path.replace(/^\\//, \"\");\n errors.push(result);\n // Add console log to find which plugin fails silently\n Logger.error(\"[MetaUI Validation] Plugin failed validation silently:\", item.path || item.plugin.constructor.name);\n }\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Validation] Exception during plugin validation at path ${item.path}`, msg);\n errors.push({ isValid: false, errorMessage: `Validation crashed: ${msg}`, fieldKey: item.path.replace(/^\\//, \"\") });\n }\n }\n return errors;\n }\n\n /**\n * Cleans up internal state and destroys the condition engine to prevent memory leaks.\n */\n public destroy(): void {\n if (this.conditionEngine) {\n this.conditionEngine.destroy();\n this.conditionEngine = null;\n }\n\n // ------------------------------------------------------------------------\n // Ghost Error Prevention\n // Flush MessageManager for active plugins before destroying their controls\n // ------------------------------------------------------------------------\n const messageManager = Messaging;\n const existingMessages = messageManager.getMessageModel().getData();\n const messagesToRemove: any[] = [];\n\n for (const item of this.activePlugins) {\n if (this.activeModel) {\n const targetPath = `/${item.path.replace(/^\\//, \"\")}`;\n const matched = existingMessages.filter((msg: any) =>\n msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.activeModel.getId()\n );\n messagesToRemove.push(...matched);\n }\n if (typeof item.plugin.destroy === \"function\") {\n item.plugin.destroy();\n }\n }\n\n if (messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n\n this.activePlugins = [];\n }\n}\n"],"mappings":"4KAAA,MAQSA,EAAeC,EAAA,yBACfC,EAAcC,EAAA,wBAIdC,EAAMC,EAAA,gBACNC,EAAsBC,EAAA,0BAcxB,MAAMC,EAEDC,gBAA0C,KAG1CC,cAAqD,GAQ7CC,WAAsB,KAMtCC,YAAYC,EAAoB,MAC5BC,KAAKH,WAAaE,CACtB,CAaOE,MAAMC,EAAiBC,EAA2BC,EAAoB,OAAQC,EAAuBC,EAAwBC,GAChIP,KAAKL,gBAAkB,IAAIT,EAAgBgB,GAC3CF,KAAKJ,cAAgB,GACrBI,KAAKQ,YAAcL,EACnBH,KAAKM,cAAgBA,EACrBN,KAAKO,SAAW,CAACE,EAAkBC,EAAmBC,EAAuBC,KACzE,GAAIZ,KAAKL,iBAAmBe,EAAU,CAClCV,KAAKL,gBAAgBkB,YAAYH,EAAUD,EAC/C,CACA,GAAIF,EAAU,CACVA,EAASE,EAASC,EAAUC,EAAcC,EAC9C,GAGJ,IAEI,GAAIpB,EAAuBsB,aAAaZ,GAAS,CAC7CZ,EAAOyB,KAAK,sHAChB,CAEA,MAAMC,EAAiBd,EAAOc,iBAAmBd,EAAOe,OAAS,QAAU,QAAU,QACrF,MAAMC,EAAgB9B,EAAe+B,cAAcC,UAAUJ,GAE7D,OAAOE,EAAcG,OAAOnB,EAAQE,EAAWJ,KAAMK,EACzD,CAAE,MAAOiB,GACL,MAAMC,EAAOD,EAAgBE,QAC7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luginRegistry","___PluginRegistry","Logger","___utils_Logger","DefaultLayoutGenerator","___DefaultLayoutGenerator","Engine","conditionEngine","activePlugins","isEditable","constructor","editable","this","build","schema","model","modelName","onSubmit","engineScopeId","onChange","activeModel","isValid","fieldKey","errorMessage","controlId","handleEvent","ensureLayout","warn","layoutStrategy","type","layoutManager","getInstance","getLayout","render","error","msg","message","showErrorPopup","Text","text","generateField","fieldMeta","bindingPath","isTemplate","plugin","getPlugin","ui","widget","setEditable","push","path","scopeId","undefined","control","registerPlugin","generateLayout","validateAll","errors","item","result","validate","replace","name","destroy","messageManager","Messaging","existingMessages","getMessageModel","getData","messagesToRemove","targetPath","matched","filter","getTarget","getMessageProcessor","getId","length","removeMessages","__exports","__esModule"],"sources":["Engine.ts"],"sourcesContent":["/**\n * @file Engine.ts\n * @description The central orchestrator that routes data between the Layout Factory and Plugin Registry (v2).\n */\n\nimport { ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { IPlugin, IPluginValidationResult } from \"../interfaces/IPlugin\";\nimport { ConditionEngine } from \"./ConditionEngine\";\nimport { PluginRegistry } from \"./PluginRegistry\";\nimport Control from \"sap/ui/core/Control\";\nimport VBox from \"sap/m/VBox\";\nimport Text from \"sap/m/Text\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\nimport Core from \"sap/ui/core/Core\";\nimport Messaging from \"sap/ui/core/Messaging\";\n\n/**\n * The Engine is responsible for translating a normalized schema into a physical UI5 layout.\n * It delegates layout generation to the configured `LayoutManager` and field generation to the `PluginRegistry`.\n * It strictly routes execution flow and tracks active plugins for validation.\n * It embodies the \"Plugin-First Philosophy\" by routing all complex field and layout rendering\n * through discrete, decoupled plugins rather than handling native overrides.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class Engine {\n /** Handles dynamic conditional logic across the active form. */\n private conditionEngine: ConditionEngine | null = null;\n\n /** Array of all instantiated plugins generated during the current build. */\n private activePlugins: { plugin: IPlugin, path: string }[] = [];\n\n /** Deterministic scope ID injected by the host control to prevent clone collisions. */\n public engineScopeId?: string;\n\n private activeModel?: sap.ui.model.Model;\n\n /** Tracks whether the entire engine is running in Editable mode. */\n public readonly isEditable: boolean = true;\n\n /**\n * Initializes a new Engine instance.\n * @param editable Whether the engine should render form fields as editable or read-only.\n */\n constructor(editable: boolean = true) {\n this.isEditable = editable;\n }\n\n /**\n * Bootstraps the layout generation process by resolving the correct layout strategy.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param model The active StateManager JSONModel instance.\n * @param modelName The UI5 model alias used for isolation.\n * @param onSubmit Callback fired when form is submitted.\n * @param engineScopeId Deterministic scope ID for this engine instance.\n * @param onChange Callback fired when field values change.\n * @returns The generated root UI5 Control container.\n */\n public build(schema: ISchema, model: sap.ui.model.Model, modelName: string = \"meta\", onSubmit?: () => void, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void): Control {\n this.conditionEngine = new ConditionEngine(schema);\n this.activePlugins = [];\n this.activeModel = model;\n this.engineScopeId = engineScopeId;\n this.onChange = (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => {\n if (this.conditionEngine && fieldKey) {\n this.conditionEngine.handleEvent(fieldKey, isValid);\n }\n if (onChange) {\n onChange(isValid, fieldKey, errorMessage, controlId);\n }\n };\n\n try {\n // Intercept and synthesize a default layout if the developer/backend failed to provide one\n if (DefaultLayoutGenerator.ensureLayout(schema)) {\n Logger.warn(\"[MetaUI Engine] Missing 'uiLayout' array in schema. Synthesized a default layout mapping to prevent a blank render.\");\n }\n\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n\n return layoutManager.render(schema, modelName, this, onSubmit);\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(\"[MetaUI Engine] Critical error during layout generation\", msg);\n Logger.showErrorPopup(`Engine failed to generate the layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Layout Error\" });\n }\n }\n\n /**\n * Instantiates the correct plugin for a specific field based on type and widget hints,\n * and tracks the plugin for global validation.\n * \n * @param fieldMeta The metadata schema specific to the field.\n * @param bindingPath The JSON path representing the field within the payload.\n * @param modelName The UI5 JSONModel name used for data binding.\n * @returns The generated UI5 Control for the field.\n */\n public generateField(fieldMeta: IPropertyMetadata, bindingPath: string, modelName: string, isTemplate: boolean = false): Control {\n try {\n const plugin = PluginRegistry.getInstance().getPlugin(fieldMeta.type || \"string\", fieldMeta.ui?.widget);\n plugin.setEditable(this.isEditable);\n\n if (!isTemplate) {\n this.activePlugins.push({ plugin, path: bindingPath });\n }\n const scopeId = isTemplate ? undefined : this.engineScopeId;\n const control = plugin.render(fieldMeta, bindingPath, modelName, scopeId, this.onChange);\n\n if (this.conditionEngine) {\n this.conditionEngine.registerPlugin(bindingPath, plugin);\n }\n\n return control;\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Failed to generate field at ${bindingPath}`, msg);\n Logger.showErrorPopup(`Failed to generate field '${bindingPath}'.\\n\\nDetails: ${msg}`);\n return new Text({ text: `[Error generating field ${bindingPath}]` });\n }\n }\n\n /**\n * Generates a sub-layout (like an embedded table or nested form) without \n * destroying the current Engine state or Condition tracking.\n * \n * @param schema The normalized JSON schema representing the view.\n * @param modelName The UI5 JSONModel name used for data binding (defaults to \"meta\").\n * @param bindingPath Optional path to bind the sub-layout to a specific array/object property.\n * @returns The generated root UI5 Control container.\n */\n public generateLayout(schema: ISchema, modelName: string, bindingPath?: string): Control {\n try {\n const layoutStrategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n const layoutManager = PluginRegistry.getInstance().getLayout(layoutStrategy);\n return layoutManager.render(schema, modelName, this, undefined, bindingPath);\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Engine] Critical error generating sub-layout for ${bindingPath}`, msg);\n Logger.showErrorPopup(`Engine failed to generate a sub-layout.\\n\\nDetails: ${msg}`);\n return new Text({ text: \"Critical Sub-Layout Error\" });\n }\n }\n\n /**\n * Iterates through all active plugins and triggers their internal validation pipelines.\n * \n * @returns {IPluginValidationResult[]} Array of validation error objects. Empty array if valid.\n */\n public validateAll(): IPluginValidationResult[] {\n const errors: IPluginValidationResult[] = [];\n for (const item of this.activePlugins) {\n try {\n const result = item.plugin.validate();\n if (!result.isValid) {\n // Ensure the path is bound to the error so GeneratorHost knows where to target it\n result.fieldKey = result.fieldKey || item.path.replace(/^\\//, \"\");\n errors.push(result);\n // Add console log to find which plugin fails silently\n Logger.error(\"[MetaUI Validation] Plugin failed validation silently:\", item.path || item.plugin.constructor.name);\n }\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI Validation] Exception during plugin validation at path ${item.path}`, msg);\n errors.push({ isValid: false, errorMessage: `Validation crashed: ${msg}`, fieldKey: item.path.replace(/^\\//, \"\") });\n }\n }\n return errors;\n }\n\n /**\n * Cleans up internal state and destroys the condition engine to prevent memory leaks.\n */\n public destroy(): void {\n if (this.conditionEngine) {\n this.conditionEngine.destroy();\n this.conditionEngine = null;\n }\n\n // ------------------------------------------------------------------------\n // Ghost Error Prevention\n // Flush MessageManager for active plugins before destroying their controls\n // ------------------------------------------------------------------------\n const messageManager = Messaging;\n const existingMessages = messageManager.getMessageModel().getData();\n const messagesToRemove: sap.ui.core.message.Message[] = [];\n\n for (const item of this.activePlugins) {\n if (this.activeModel) {\n const targetPath = `/${item.path.replace(/^\\//, \"\")}`;\n const matched = existingMessages.filter((msg: sap.ui.core.message.Message) =>\n msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.activeModel.getId()\n );\n messagesToRemove.push(...matched);\n }\n if (typeof item.plugin.destroy === \"function\") {\n item.plugin.destroy();\n }\n }\n\n if (messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRem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,OAAQf,GAC5FsB,EAAOR,KAAK,CAAE5B,QAAS,MAAOE,aAAc,uBAAuBY,IAAOb,SAAUoC,EAAKR,KAAKW,QAAQ,MAAO,KACjH,CACJ,CACA,OAAOJ,CACX,CAKOM,UACH,GAAInD,KAAKL,gBAAiB,CACtBK,KAAKL,gBAAgBwD,UACrBnD,KAAKL,gBAAkB,IAC3B,CAMA,MAAMyD,EAAiBC,EACvB,MAAMC,EAAmBF,EAAeG,kBAAkBC,UAC1D,MAAMC,EAAkD,GAExD,IAAK,MAAMX,KAAQ9C,KAAKJ,cAAe,CACnC,GAAII,KAAKQ,YAAa,CAClB,MAAMkD,EAAa,IAAIZ,EAAKR,KAAKW,QAAQ,MAAO,MAChD,MAAMU,EAAUL,EAAiBM,OAAQrC,GACrCA,EAAIsC,cAAgBH,GAAcnC,EAAIuC,uBAAyBvC,EAAIuC,sBAAsBC,UAAY/D,KAAKQ,YAAYuD,SAE1HN,EAAiBpB,QAAQsB,EAC7B,CACA,UAAWb,EAAKd,OAAOmB,UAAY,WAAY,CAC3CL,EAAKd,OAAOmB,SAChB,CACJ,CAEA,GAAIM,EAAiBO,OAAS,EAAG,CAC7BZ,EAAea,eAAeR,EAClC,CAEAzD,KAAKJ,cAAgB,EACzB,EACH,IAAAsE,EAAA,CAAAC,WAAA,MAAAD,EAAAxE,SAAA,OAAAwE,CAAA","ignoreList":[]}
@@ -188,12 +188,12 @@ export class Engine {
188
188
  // ------------------------------------------------------------------------
189
189
  const messageManager = Messaging;
190
190
  const existingMessages = messageManager.getMessageModel().getData();
191
- const messagesToRemove: any[] = [];
191
+ const messagesToRemove: sap.ui.core.message.Message[] = [];
192
192
 
193
193
  for (const item of this.activePlugins) {
194
194
  if (this.activeModel) {
195
195
  const targetPath = `/${item.path.replace(/^\//, "")}`;
196
- const matched = existingMessages.filter((msg: any) =>
196
+ const matched = existingMessages.filter((msg: sap.ui.core.message.Message) =>
197
197
  msg.getTarget() === targetPath && msg.getMessageProcessor() && msg.getMessageProcessor().getId() === this.activeModel.getId()
198
198
  );
199
199
  messagesToRemove.push(...matched);
@@ -1 +1 @@
1
- {"version":3,"file":"PipelineManager-dbg.js","names":["Registry","___Registry","PatternValidatorPlugin","___plugins_validators_PatternValidatorPlugin","MinLengthValidatorPlugin","___plugins_validators_MinLengthValidatorPlugin","RangeValidatorPlugin","___plugins_validators_RangeValidatorPlugin","UrlValidatorPlugin","___plugins_validators_UrlValidatorPlugin","IbanValidatorPlugin","___plugins_validators_IbanValidatorPlugin","EmailValidatorPlugin","___plugins_validators_EmailValidatorPlugin","DateFormatterPlugin","___plugins_formatters_DateFormatterPlugin","PhoneFormatterPlugin","___plugins_formatters_PhoneFormatterPlugin","TextCaseFormatterPlugin","___plugins_formatters_TextCaseFormatterPlugin","Logger","___utils_Logger","RequiredValidator","validate","parsedValue","args","undefined","isValid","errorMessage","MaxLengthValidator","length","PipelineManager","formatters","parsers","validators","constructor","register","executeValidation","requestedValidators","argsMap","rule","validator","get","result","error","msg","message","warn","GlobalPipeline","__exports","__esModule"],"sources":["PipelineManager.ts"],"sourcesContent":["/**\n * @file PipelineManager.ts\n * @description Central manager for the data manipulation pipeline. \n * Orchestrates Formatting, Parsing, and Validating data using the generic Registry.\n */\n\nimport { Registry } from \"./Registry\";\nimport { IFormatter, IParser, IValidator, IValidationResult } from \"../interfaces/IPipeline\";\nimport { PatternValidatorPlugin } from \"../plugins/validators/PatternValidatorPlugin\";\nimport { MinLengthValidatorPlugin } from \"../plugins/validators/MinLengthValidatorPlugin\";\nimport { RangeValidatorPlugin } from \"../plugins/validators/RangeValidatorPlugin\";\nimport { UrlValidatorPlugin } from \"../plugins/validators/UrlValidatorPlugin\";\nimport { IbanValidatorPlugin } from \"../plugins/validators/IbanValidatorPlugin\";\nimport { EmailValidatorPlugin } from \"../plugins/validators/EmailValidatorPlugin\";\nimport { DateFormatterPlugin } from \"../plugins/formatters/DateFormatterPlugin\";\nimport { PhoneFormatterPlugin } from \"../plugins/formatters/PhoneFormatterPlugin\";\nimport { TextCaseFormatterPlugin } from \"../plugins/formatters/TextCaseFormatterPlugin\";\nimport { Logger } from \"../utils/Logger\";\n\n// --- Built-in Default Validators ---\n/** Internal rule for required fields. */\nclass RequiredValidator implements IValidator {\n /** Validates that the value is not null, undefined, or empty string. */\n validate(parsedValue: unknown, args?: unknown): IValidationResult {\n if (parsedValue === null || parsedValue === undefined || parsedValue === \"\") {\n return { isValid: false, errorMessage: \"This field is required.\" };\n }\n return { isValid: true };\n }\n}\n\n/** Internal rule for string maximum length. */\nclass MaxLengthValidator implements IValidator {\n /** Validates that a string does not exceed the provided argument length. */\n validate(parsedValue: unknown, args?: unknown): IValidationResult {\n if (typeof parsedValue === \"string\" && args && typeof args === \"number\") {\n if (parsedValue.length > args) {\n return { isValid: false, errorMessage: `Maximum length is ${args} characters.` };\n }\n }\n return { isValid: true };\n }\n}\n\n\n/**\n * The core engine responsible for marshalling data through the validation, formatting, and parsing phases.\n * Pluggable design allows new validators to be registered dynamically.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class PipelineManager {\n /** Registry of data formatters applied before pushing to the UI. */\n public readonly formatters: Registry<IFormatter> = new Registry<IFormatter>(\"Formatters\");\n /** Registry of data parsers applied when pulling data from the UI. */\n public readonly parsers: Registry<IParser> = new Registry<IParser>(\"Parsers\");\n /** Registry of business logic validators. */\n public readonly validators: Registry<IValidator> = new Registry<IValidator>(\"Validators\");\n\n /**\n * Bootstraps the PipelineManager with default validators (required, maxLength, email).\n */\n constructor() {\n // Register default validators\n this.validators.register(\"required\", new RequiredValidator());\n this.validators.register(\"maxLength\", new MaxLengthValidator());\n this.validators.register(\"pattern\", new PatternValidatorPlugin());\n this.validators.register(\"minLength\", new MinLengthValidatorPlugin());\n this.validators.register(\"range\", new RangeValidatorPlugin());\n this.validators.register(\"url\", new UrlValidatorPlugin());\n this.validators.register(\"iban\", new IbanValidatorPlugin());\n this.validators.register(\"email\", new EmailValidatorPlugin());\n\n // Register default formatters\n this.formatters.register(\"date\", new DateFormatterPlugin());\n this.formatters.register(\"phone\", new PhoneFormatterPlugin());\n this.formatters.register(\"textCase\", new TextCaseFormatterPlugin());\n }\n\n /**\n * Executes the validation pipeline sequentially. Fails fast on the first encountered error.\n * \n * @param parsedValue The raw extracted value from the UI control.\n * @param requestedValidators Array of validation rule keys (e.g. ['required', 'email']).\n * @param argsMap Optional map of parameters required by specific rules (e.g. { maxLength: 50 }).\n * @returns {IValidationResult} The final result state and any associated error message.\n */\n public executeValidation(parsedValue: unknown, requestedValidators: string[], argsMap?: Record<string, any>): IValidationResult {\n for (const rule of requestedValidators) {\n const validator = this.validators.get(rule);\n if (validator) {\n const args = argsMap ? argsMap[rule] : undefined;\n try {\n const result = validator.validate(parsedValue, args);\n if (!result.isValid) {\n return result; // Fast fail on first error\n }\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI] PipelineManager: Validator '${rule}' crashed during execution.`, msg);\n return { isValid: false, errorMessage: `System validation error: ${msg}` };\n }\n } else {\n Logger.warn(`[MetaUI] PipelineManager: Requested validator '${rule}' not found in registry.`);\n }\n }\n return { isValid: true };\n }\n}\n\n/** \n * Singleton instance for global access to the active validation pipeline. \n * @public \n */\nexport const GlobalPipeline = new PipelineManager();\n"],"mappings":";;;EAAA;AACA;AACA;AACA;AACA;EAJA,MAMSA,QAAQ,GAAAC,WAAA;EAAA,MAERC,sBAAsB,GAAAC,4CAAA;EAAA,MACtBC,wBAAwB,GAAAC,8CAAA;EAAA,MACxBC,oBAAoB,GAAAC,0CAAA;EAAA,MACpBC,kBAAkB,GAAAC,wCAAA;EAAA,MAClBC,mBAAmB,GAAAC,yCAAA;EAAA,MACnBC,oBAAoB,GAAAC,0CAAA;EAAA,MACpBC,mBAAmB,GAAAC,yCAAA;EAAA,MACnBC,oBAAoB,GAAAC,0CAAA;EAAA,MACpBC,uBAAuB,GAAAC,6CAAA;EAAA,MACvBC,MAAM,GAAAC,eAAA,YAEf;EACA;EACA,MAAMC,iB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B,MAAM,CAAC,CAAC;YACnB;UACJ,CAAC,CAAC,OAAOC,KAAK,EAAE;YACZ,MAAMC,GAAG,GAAID,KAAK,CAAWE,OAAO;YACpC1B,MAAM,CAACwB,KAAK,CAAC,wCAAwCJ,IAAI,6BAA6B,EAAEK,GAAG,CAAC;YAC5F,OAAO;cAAElB,OAAO,EAAE,KAAK;cAAEC,YAAY,EAAE,4BAA4BiB,GAAG;YAAG,CAAC;UAC9E;QACJ,CAAC,MAAM;UACHzB,MAAM,CAAC2B,IAAI,CAAC,kDAAkDP,IAAI,0BAA0B,CAAC;QACjG;MACJ;MACA,OAAO;QAAEb,OAAO,EAAE;MAAK,CAAC;IAC5B;EACJ;;EAEA;AACA;AACA;AACA;EACO,MAAMqB,cAAc,GAAG,IAAIjB,eAAe,CAAC,CAAC;EAAC,IAAAkB,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAlB,eAAA,GAAAA,eAAA;EAAAkB,SAAA,CAAAD,cAAA,GAAAA,cAAA;EAAA,OAAAC,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"PipelineManager-dbg.js","names":["Registry","___Registry","PatternValidatorPlugin","___plugins_validators_PatternValidatorPlugin","MinLengthValidatorPlugin","___plugins_validators_MinLengthValidatorPlugin","RangeValidatorPlugin","___plugins_validators_RangeValidatorPlugin","UrlValidatorPlugin","___plugins_validators_UrlValidatorPlugin","IbanValidatorPlugin","___plugins_validators_IbanValidatorPlugin","EmailValidatorPlugin","___plugins_validators_EmailValidatorPlugin","DateFormatterPlugin","___plugins_formatters_DateFormatterPlugin","PhoneFormatterPlugin","___plugins_formatters_PhoneFormatterPlugin","TextCaseFormatterPlugin","___plugins_formatters_TextCaseFormatterPlugin","Logger","___utils_Logger","RequiredValidator","validate","parsedValue","args","undefined","isValid","errorMessage","MaxLengthValidator","length","PipelineManager","formatters","parsers","validators","constructor","register","executeValidation","requestedValidators","argsMap","rule","validator","get","result","error","msg","message","warn","GlobalPipeline","__exports","__esModule"],"sources":["PipelineManager.ts"],"sourcesContent":["/**\n * @file PipelineManager.ts\n * @description Central manager for the data manipulation pipeline. \n * Orchestrates Formatting, Parsing, and Validating data using the generic Registry.\n */\n\nimport { Registry } from \"./Registry\";\nimport { IFormatter, IParser, IValidator, IValidationResult } from \"../interfaces/IPipeline\";\nimport { PatternValidatorPlugin } from \"../plugins/validators/PatternValidatorPlugin\";\nimport { MinLengthValidatorPlugin } from \"../plugins/validators/MinLengthValidatorPlugin\";\nimport { RangeValidatorPlugin } from \"../plugins/validators/RangeValidatorPlugin\";\nimport { UrlValidatorPlugin } from \"../plugins/validators/UrlValidatorPlugin\";\nimport { IbanValidatorPlugin } from \"../plugins/validators/IbanValidatorPlugin\";\nimport { EmailValidatorPlugin } from \"../plugins/validators/EmailValidatorPlugin\";\nimport { DateFormatterPlugin } from \"../plugins/formatters/DateFormatterPlugin\";\nimport { PhoneFormatterPlugin } from \"../plugins/formatters/PhoneFormatterPlugin\";\nimport { TextCaseFormatterPlugin } from \"../plugins/formatters/TextCaseFormatterPlugin\";\nimport { Logger } from \"../utils/Logger\";\n\n// --- Built-in Default Validators ---\n/** Internal rule for required fields. */\nclass RequiredValidator implements IValidator {\n /** Validates that the value is not null, undefined, or empty string. */\n validate(parsedValue: unknown, args?: unknown): IValidationResult {\n if (parsedValue === null || parsedValue === undefined || parsedValue === \"\") {\n return { isValid: false, errorMessage: \"This field is required.\" };\n }\n return { isValid: true };\n }\n}\n\n/** Internal rule for string maximum length. */\nclass MaxLengthValidator implements IValidator {\n /** Validates that a string does not exceed the provided argument length. */\n validate(parsedValue: unknown, args?: unknown): IValidationResult {\n if (typeof parsedValue === \"string\" && args && typeof args === \"number\") {\n if (parsedValue.length > args) {\n return { isValid: false, errorMessage: `Maximum length is ${args} characters.` };\n }\n }\n return { isValid: true };\n }\n}\n\n\n/**\n * The core engine responsible for marshalling data through the validation, formatting, and parsing phases.\n * Pluggable design allows new validators to be registered dynamically.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class PipelineManager {\n /** Registry of data formatters applied before pushing to the UI. */\n public readonly formatters: Registry<IFormatter> = new Registry<IFormatter>(\"Formatters\");\n /** Registry of data parsers applied when pulling data from the UI. */\n public readonly parsers: Registry<IParser> = new Registry<IParser>(\"Parsers\");\n /** Registry of business logic validators. */\n public readonly validators: Registry<IValidator> = new Registry<IValidator>(\"Validators\");\n\n /**\n * Bootstraps the PipelineManager with default validators (required, maxLength, email).\n */\n constructor() {\n // Register default validators\n this.validators.register(\"required\", new RequiredValidator());\n this.validators.register(\"maxLength\", new MaxLengthValidator());\n this.validators.register(\"pattern\", new PatternValidatorPlugin());\n this.validators.register(\"minLength\", new MinLengthValidatorPlugin());\n this.validators.register(\"range\", new RangeValidatorPlugin());\n this.validators.register(\"url\", new UrlValidatorPlugin());\n this.validators.register(\"iban\", new IbanValidatorPlugin());\n this.validators.register(\"email\", new EmailValidatorPlugin());\n\n // Register default formatters\n this.formatters.register(\"date\", new DateFormatterPlugin());\n this.formatters.register(\"phone\", new PhoneFormatterPlugin());\n this.formatters.register(\"textCase\", new TextCaseFormatterPlugin());\n }\n\n /**\n * Executes the validation pipeline sequentially. Fails fast on the first encountered error.\n * \n * @param parsedValue The raw extracted value from the UI control.\n * @param requestedValidators Array of validation rule keys (e.g. ['required', 'email']).\n * @param argsMap Optional map of parameters required by specific rules (e.g. { maxLength: 50 }).\n * @returns {IValidationResult} The final result state and any associated error message.\n */\n public executeValidation(parsedValue: unknown, requestedValidators: string[], argsMap?: Record<string, unknown>): IValidationResult {\n for (const rule of requestedValidators) {\n const validator = this.validators.get(rule);\n if (validator) {\n const args = argsMap ? argsMap[rule] : undefined;\n try {\n const result = validator.validate(parsedValue, args);\n if (!result.isValid) {\n return result; // Fast fail on first error\n }\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI] PipelineManager: Validator '${rule}' crashed during execution.`, msg);\n return { isValid: false, errorMessage: `System validation error: ${msg}` };\n }\n } else {\n Logger.warn(`[MetaUI] PipelineManager: Requested validator '${rule}' not found in registry.`);\n }\n }\n return { isValid: true };\n }\n}\n\n/** \n * Singleton instance for global access to the active validation pipeline. \n * @public \n */\nexport const GlobalPipeline = new PipelineManager();\n"],"mappings":";;;EAAA;AACA;AACA;AACA;AACA;EAJA,MAMSA,QAAQ,GAAAC,WAAA;EAAA,MAERC,sBAAsB,GAAAC,4CAAA;EAAA,MACtBC,wBAAwB,GAAAC,8CAAA;EAAA,MACxBC,oBAAoB,GAAAC,0CAAA;EAAA,MACpBC,kBAAkB,GAAAC,wCAAA;EAAA,MAClBC,mBAAmB,GAAAC,yCAAA;EAAA,MACnBC,oBAAoB,GAAAC,0CAAA;EAAA,MACpBC,mBAAmB,GAAAC,yCAAA;EAAA,MACnBC,oBAAoB,GAAAC,0CAAA;EAAA,MACpBC,uBAAuB,GAAAC,6CAAA;EAAA,MACvBC,MAAM,GAAAC,eAAA,YAEf;EACA;EACA,MAAMC,iBAAiB,CAAuB;IAC1C;IACAC,QAAQA,CAACC,WAAoB,EAAEC,IAAc,EAAqB;MAC9D,IAAID,WAAW,KAAK,IAAI,IAAIA,WAAW,KAAKE,SAAS,IAAIF,WAAW,KAAK,EAAE,EAAE;QACzE,OAAO;UAAEG,OAAO,EAAE,KAAK;UAAEC,YAAY,EAAE;QAA0B,CAAC;MACtE;MACA,OAAO;QAAED,OAAO,EAAE;MAAK,CAAC;IAC5B;EACJ;;EAEA;EACA,MAAME,kBAAkB,CAAuB;IAC3C;IACAN,QAAQA,CAACC,WAAoB,EAAEC,IAAc,EAAqB;MAC9D,IAAI,OAAOD,WAAW,KAAK,QAAQ,IAAIC,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;QACrE,IAAID,WAAW,CAACM,MAAM,GAAGL,IAAI,EAAE;UAC3B,OAAO;YAAEE,OAAO,EAAE,KAAK;YAAEC,YAAY,EAAE,qBAAqBH,IAAI;UAAe,CAAC;QACpF;MACJ;MACA,OAAO;QAAEE,OAAO,E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AAA;AAAA","ignoreList":[]}
@@ -42,7 +42,7 @@ declare module "nz/co/siliconst/ui5/metaui/core/PipelineManager" {
42
42
  * @param argsMap Optional map of parameters required by specific rules (e.g. { maxLength: 50 }).
43
43
  * @returns {IValidationResult} The final result state and any associated error message.
44
44
  */
45
- executeValidation(parsedValue: unknown, requestedValidators: string[], argsMap?: Record<string, any>): IValidationResult;
45
+ executeValidation(parsedValue: unknown, requestedValidators: string[], argsMap?: Record<string, unknown>): IValidationResult;
46
46
  }
47
47
  /**
48
48
  * Singleton instance for global access to the active validation pipeline.
@@ -1 +1 @@
1
- {"version":3,"file":"PipelineManager.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/PipelineManager.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,iDAAiD,CAAC;IACjE;;;;OAIG;IAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;IACpE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;IAarH,yCAAyC;IACzC,MAAM,iBAAkB,YAAW,UAAU;QACzC,wEAAwE;QACxE,QAAQ,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,iBAAiB;KAMpE;IAED,+CAA+C;IAC/C,MAAM,kBAAmB,YAAW,UAAU;QAC1C,4EAA4E;QAC5E,QAAQ,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,iBAAiB;KAQpE;IAGD;;;;;;OAMG;IACH,MAAa,eAAe;QACxB,oEAAoE;QACpE,SAAgB,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,CAA0C;QAC1F,sEAAsE;QACtE,SAAgB,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAoC;QAC9E,6CAA6C;QAC7C,SAAgB,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,CAA0C;QAE1F;;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C,MAAM,EAAE,OAAO,CAAC,GAAG,iBAAiB;KAqBtI;IAED;;;OAGG;IACI,MAAM,cAAc,iBAAwB,CAAC;CAEnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"PipelineManager.js","names":["Registry","___Registry","PatternValidatorPlugin","___plugins_validators_PatternValidatorPlugin","MinLengthValidatorPlugin","___plugins_validators_MinLengthValidatorPlugin","RangeValidatorPlugin","___plugins_validators_RangeValidatorPlugin","UrlValidatorPlugin","___plugins_validators_UrlValidatorPlugin","IbanValidatorPlugin","___plugins_validators_IbanValidatorPlugin","EmailValidatorPlugin","___plugins_validators_EmailValidatorPlugin","DateFormatterPlugin","___plugins_formatters_DateFormatterPlugin","PhoneFormatterPlugin","___plugins_formatters_PhoneFormatterPlugin","TextCaseFormatterPlugin","___plugins_formatters_TextCaseFormatterPlugin","Logger","___utils_Logger","RequiredValidator","validate","parsedValue","args","undefined","isValid","errorMessage","MaxLengthValidator","length","PipelineManager","formatters","parsers","validators","constructor","this","register","executeValidation","requestedValidators","argsMap","rule","validator","get","result","error","msg","message","warn","GlobalPipeline","__exports","__esModule"],"sources":["PipelineManager.ts"],"sourcesContent":["/**\n * @file PipelineManager.ts\n * @description Central manager for the data manipulation pipeline. \n * Orchestrates Formatting, Parsing, and Validating data using the generic Registry.\n */\n\nimport { Registry } from \"./Registry\";\nimport { IFormatter, IParser, IValidator, IValidationResult } from \"../interfaces/IPipeline\";\nimport { PatternValidatorPlugin } from \"../plugins/validators/PatternValidatorPlugin\";\nimport { MinLengthValidatorPlugin } from \"../plugins/validators/MinLengthValidatorPlugin\";\nimport { RangeValidatorPlugin } from \"../plugins/validators/RangeValidatorPlugin\";\nimport { UrlValidatorPlugin } from \"../plugins/validators/UrlValidatorPlugin\";\nimport { IbanValidatorPlugin } from \"../plugins/validators/IbanValidatorPlugin\";\nimport { EmailValidatorPlugin } from \"../plugins/validators/EmailValidatorPlugin\";\nimport { DateFormatterPlugin } from \"../plugins/formatters/DateFormatterPlugin\";\nimport { PhoneFormatterPlugin } from \"../plugins/formatters/PhoneFormatterPlugin\";\nimport { TextCaseFormatterPlugin } from \"../plugins/formatters/TextCaseFormatterPlugin\";\nimport { Logger } from \"../utils/Logger\";\n\n// --- Built-in Default Validators ---\n/** Internal rule for required fields. */\nclass RequiredValidator implements IValidator {\n /** Validates that the value is not null, undefined, or empty string. */\n validate(parsedValue: unknown, args?: unknown): IValidationResult {\n if (parsedValue === null || parsedValue === undefined || parsedValue === \"\") {\n return { isValid: false, errorMessage: \"This field is required.\" };\n }\n return { isValid: true };\n }\n}\n\n/** Internal rule for string maximum length. */\nclass MaxLengthValidator implements IValidator {\n /** Validates that a string does not exceed the provided argument length. */\n validate(parsedValue: unknown, args?: unknown): IValidationResult {\n if (typeof parsedValue === \"string\" && args && typeof args === \"number\") {\n if (parsedValue.length > args) {\n return { isValid: false, errorMessage: `Maximum length is ${args} characters.` };\n }\n }\n return { isValid: true };\n }\n}\n\n\n/**\n * The core engine responsible for marshalling data through the validation, formatting, and parsing phases.\n * Pluggable design allows new validators to be registered dynamically.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class PipelineManager {\n /** Registry of data formatters applied before pushing to the UI. */\n public readonly formatters: Registry<IFormatter> = new Registry<IFormatter>(\"Formatters\");\n /** Registry of data parsers applied when pulling data from the UI. */\n public readonly parsers: Registry<IParser> = new Registry<IParser>(\"Parsers\");\n /** Registry of business logic validators. */\n public readonly validators: Registry<IValidator> = new Registry<IValidator>(\"Validators\");\n\n /**\n * Bootstraps the PipelineManager with default validators (required, maxLength, email).\n */\n constructor() {\n // Register default validators\n this.validators.register(\"required\", new RequiredValidator());\n this.validators.register(\"maxLength\", new MaxLengthValidator());\n this.validators.register(\"pattern\", new PatternValidatorPlugin());\n this.validators.register(\"minLength\", new MinLengthValidatorPlugin());\n this.validators.register(\"range\", new RangeValidatorPlugin());\n this.validators.register(\"url\", new UrlValidatorPlugin());\n this.validators.register(\"iban\", new IbanValidatorPlugin());\n this.validators.register(\"email\", new EmailValidatorPlugin());\n\n // Register default formatters\n this.formatters.register(\"date\", new DateFormatterPlugin());\n this.formatters.register(\"phone\", new PhoneFormatterPlugin());\n this.formatters.register(\"textCase\", new TextCaseFormatterPlugin());\n }\n\n /**\n * Executes the validation pipeline sequentially. Fails fast on the first encountered error.\n * \n * @param parsedValue The raw extracted value from the UI control.\n * @param requestedValidators Array of validation rule keys (e.g. ['required', 'email']).\n * @param argsMap Optional map of parameters required by specific rules (e.g. { maxLength: 50 }).\n * @returns {IValidationResult} The final result state and any associated error message.\n */\n public executeValidation(parsedValue: unknown, requestedValidators: string[], argsMap?: Record<string, any>): IValidationResult {\n for (const rule of requestedValidators) {\n const validator = this.validators.get(rule);\n if (validator) {\n const args = argsMap ? argsMap[rule] : undefined;\n try {\n const result = validator.validate(parsedValue, args);\n if (!result.isValid) {\n return result; // Fast fail on first error\n }\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI] PipelineManager: Validator '${rule}' crashed during execution.`, msg);\n return { isValid: false, errorMessage: `System validation error: ${msg}` };\n }\n } else {\n Logger.warn(`[MetaUI] PipelineManager: Requested validator '${rule}' not found in registry.`);\n }\n }\n return { isValid: true };\n }\n}\n\n/** \n * Singleton instance for global access to the active validation pipeline. \n * @public \n */\nexport const GlobalPipeline = new PipelineManager();\n"],"mappings":"sfAAA,MAMSA,EAAQC,EAAA,kBAERC,EAAsBC,EAAA,gCACtBC,EAAwBC,EAAA,kCACxBC,EAAoBC,EAAA,8BACpBC,EAAkBC,EAAA,4BAClBC,EAAmBC,EAAA,6BACnBC,EAAoBC,EAAA,8BACpBC,EAAmBC,EAAA,6BACnBC,EAAoBC,EAAA,8BACpBC,EAAuBC,EAAA,iCACvBC,EAAMC,EAAA,UAIf,MAAMC,EAEFC,SAASC,EAAsBC,GAC3B,GAAID,IAAgB,MAAQA,IAAgBE,WAAaF,IAAgB,GAAI,CACzE,MAAO,CAAEG,QAAS,MAAOC,aAAc,0BAC3C,CACA,M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,4BAA4BkB,IACvE,CACJ,KAAO,CACH1B,EAAO4B,KAAK,kDAAkDP,4BAClE,CACJ,CACA,MAAO,CAAEd,QAAS,KACtB,EAOG,MAAMsB,EAAiB,IAAIlB,EAAkB,IAAAmB,EAAA,CAAAC,WAAA,MAAAD,EAAAnB,kBAAAmB,EAAAD,iBAAA,OAAAC,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"PipelineManager.js","names":["Registry","___Registry","PatternValidatorPlugin","___plugins_validators_PatternValidatorPlugin","MinLengthValidatorPlugin","___plugins_validators_MinLengthValidatorPlugin","RangeValidatorPlugin","___plugins_validators_RangeValidatorPlugin","UrlValidatorPlugin","___plugins_validators_UrlValidatorPlugin","IbanValidatorPlugin","___plugins_validators_IbanValidatorPlugin","EmailValidatorPlugin","___plugins_validators_EmailValidatorPlugin","DateFormatterPlugin","___plugins_formatters_DateFormatterPlugin","PhoneFormatterPlugin","___plugins_formatters_PhoneFormatterPlugin","TextCaseFormatterPlugin","___plugins_formatters_TextCaseFormatterPlugin","Logger","___utils_Logger","RequiredValidator","validate","parsedValue","args","undefined","isValid","errorMessage","MaxLengthValidator","length","PipelineManager","formatters","parsers","validators","constructor","this","register","executeValidation","requestedValidators","argsMap","rule","validator","get","result","error","msg","message","warn","GlobalPipeline","__exports","__esModule"],"sources":["PipelineManager.ts"],"sourcesContent":["/**\n * @file PipelineManager.ts\n * @description Central manager for the data manipulation pipeline. \n * Orchestrates Formatting, Parsing, and Validating data using the generic Registry.\n */\n\nimport { Registry } from \"./Registry\";\nimport { IFormatter, IParser, IValidator, IValidationResult } from \"../interfaces/IPipeline\";\nimport { PatternValidatorPlugin } from \"../plugins/validators/PatternValidatorPlugin\";\nimport { MinLengthValidatorPlugin } from \"../plugins/validators/MinLengthValidatorPlugin\";\nimport { RangeValidatorPlugin } from \"../plugins/validators/RangeValidatorPlugin\";\nimport { UrlValidatorPlugin } from \"../plugins/validators/UrlValidatorPlugin\";\nimport { IbanValidatorPlugin } from \"../plugins/validators/IbanValidatorPlugin\";\nimport { EmailValidatorPlugin } from \"../plugins/validators/EmailValidatorPlugin\";\nimport { DateFormatterPlugin } from \"../plugins/formatters/DateFormatterPlugin\";\nimport { PhoneFormatterPlugin } from \"../plugins/formatters/PhoneFormatterPlugin\";\nimport { TextCaseFormatterPlugin } from \"../plugins/formatters/TextCaseFormatterPlugin\";\nimport { Logger } from \"../utils/Logger\";\n\n// --- Built-in Default Validators ---\n/** Internal rule for required fields. */\nclass RequiredValidator implements IValidator {\n /** Validates that the value is not null, undefined, or empty string. */\n validate(parsedValue: unknown, args?: unknown): IValidationResult {\n if (parsedValue === null || parsedValue === undefined || parsedValue === \"\") {\n return { isValid: false, errorMessage: \"This field is required.\" };\n }\n return { isValid: true };\n }\n}\n\n/** Internal rule for string maximum length. */\nclass MaxLengthValidator implements IValidator {\n /** Validates that a string does not exceed the provided argument length. */\n validate(parsedValue: unknown, args?: unknown): IValidationResult {\n if (typeof parsedValue === \"string\" && args && typeof args === \"number\") {\n if (parsedValue.length > args) {\n return { isValid: false, errorMessage: `Maximum length is ${args} characters.` };\n }\n }\n return { isValid: true };\n }\n}\n\n\n/**\n * The core engine responsible for marshalling data through the validation, formatting, and parsing phases.\n * Pluggable design allows new validators to be registered dynamically.\n * \n * @namespace nz.co.siliconst.ui5.metaui.core\n * @public\n */\nexport class PipelineManager {\n /** Registry of data formatters applied before pushing to the UI. */\n public readonly formatters: Registry<IFormatter> = new Registry<IFormatter>(\"Formatters\");\n /** Registry of data parsers applied when pulling data from the UI. */\n public readonly parsers: Registry<IParser> = new Registry<IParser>(\"Parsers\");\n /** Registry of business logic validators. */\n public readonly validators: Registry<IValidator> = new Registry<IValidator>(\"Validators\");\n\n /**\n * Bootstraps the PipelineManager with default validators (required, maxLength, email).\n */\n constructor() {\n // Register default validators\n this.validators.register(\"required\", new RequiredValidator());\n this.validators.register(\"maxLength\", new MaxLengthValidator());\n this.validators.register(\"pattern\", new PatternValidatorPlugin());\n this.validators.register(\"minLength\", new MinLengthValidatorPlugin());\n this.validators.register(\"range\", new RangeValidatorPlugin());\n this.validators.register(\"url\", new UrlValidatorPlugin());\n this.validators.register(\"iban\", new IbanValidatorPlugin());\n this.validators.register(\"email\", new EmailValidatorPlugin());\n\n // Register default formatters\n this.formatters.register(\"date\", new DateFormatterPlugin());\n this.formatters.register(\"phone\", new PhoneFormatterPlugin());\n this.formatters.register(\"textCase\", new TextCaseFormatterPlugin());\n }\n\n /**\n * Executes the validation pipeline sequentially. Fails fast on the first encountered error.\n * \n * @param parsedValue The raw extracted value from the UI control.\n * @param requestedValidators Array of validation rule keys (e.g. ['required', 'email']).\n * @param argsMap Optional map of parameters required by specific rules (e.g. { maxLength: 50 }).\n * @returns {IValidationResult} The final result state and any associated error message.\n */\n public executeValidation(parsedValue: unknown, requestedValidators: string[], argsMap?: Record<string, unknown>): IValidationResult {\n for (const rule of requestedValidators) {\n const validator = this.validators.get(rule);\n if (validator) {\n const args = argsMap ? argsMap[rule] : undefined;\n try {\n const result = validator.validate(parsedValue, args);\n if (!result.isValid) {\n return result; // Fast fail on first error\n }\n } catch (error) {\n const msg = (error as Error).message;\n Logger.error(`[MetaUI] PipelineManager: Validator '${rule}' crashed during execution.`, msg);\n return { isValid: false, errorMessage: `System validation error: ${msg}` };\n }\n } else {\n Logger.warn(`[MetaUI] PipelineManager: Requested validator '${rule}' not found in registry.`);\n }\n }\n return { isValid: true };\n }\n}\n\n/** \n * Singleton instance for global access to the active validation pipeline. \n * @public \n */\nexport const GlobalPipeline = new PipelineManager();\n"],"mappings":"sfAAA,MAMSA,EAAQC,EAAA,kBAERC,EAAsBC,EAAA,gCACtBC,EAAwBC,EAAA,kCACxBC,EAAoBC,EAAA,8BACpBC,EAAkBC,EAAA,4BAClBC,EAAmBC,EAAA,6BACnBC,EAAoBC,EAAA,8BACpBC,EAAmBC,EAAA,6BACnBC,EAAoBC,EAAA,8BACpBC,EAAuBC,EAAA,iCACvBC,EAAMC,EAAA,UAIf,MAAMC,EAEFC,SAAS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E,MAAOC,GACL,MAAMC,EAAOD,EAAgBE,QAC7B3B,EAAOyB,MAAM,wCAAwCJ,+BAAmCK,GACxF,MAAO,CAAEnB,QAAS,MAAOC,aAAc,4BAA4BkB,IACvE,CACJ,KAAO,CACH1B,EAAO4B,KAAK,kDAAkDP,4BAClE,CACJ,CACA,MAAO,CAAEd,QAAS,KACtB,EAOG,MAAMsB,EAAiB,IAAIlB,EAAkB,IAAAmB,EAAA,CAAAC,WAAA,MAAAD,EAAAnB,kBAAAmB,EAAAD,iBAAA,OAAAC,CAAA","ignoreList":[]}
@@ -86,7 +86,7 @@ export class PipelineManager {
86
86
  * @param argsMap Optional map of parameters required by specific rules (e.g. { maxLength: 50 }).
87
87
  * @returns {IValidationResult} The final result state and any associated error message.
88
88
  */
89
- public executeValidation(parsedValue: unknown, requestedValidators: string[], argsMap?: Record<string, any>): IValidationResult {
89
+ public executeValidation(parsedValue: unknown, requestedValidators: string[], argsMap?: Record<string, unknown>): IValidationResult {
90
90
  for (const rule of requestedValidators) {
91
91
  const validator = this.validators.get(rule);
92
92
  if (validator) {
@@ -125,7 +125,9 @@ sap.ui.define(["../utils/Logger"], function (___utils_Logger) {
125
125
  if (prop.items && prop.items.type) {
126
126
  try {
127
127
  pathsToLoad.add(this.getFieldPath(prop.items.type, prop.items.ui?.widget));
128
- } catch (e) {}
128
+ } catch (e) {
129
+ Logger.warn(`[MetaUI LazyLoad] Could not find mapped plugin for array item type ${prop.items.type}`);
130
+ }
129
131
  }
130
132
  }
131
133
  };
@@ -154,6 +156,8 @@ sap.ui.define(["../utils/Logger"], function (___utils_Logger) {
154
156
  this.activePromises[path] = new Promise((resolve, reject) => {
155
157
  sap.ui.require([path], Module => resolve(Module), err => {
156
158
  Logger.error(`Failed to lazy load module: ${path}`);
159
+ // CRITICAL: Delete from cache so future attempts can retry the network request
160
+ delete this.activePromises[path];
157
161
  reject(err);
158
162
  });
159
163
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PluginRegistry-dbg.js","names":["Logger","___utils_Logger","PluginRegistry","fieldIndex","actionIndex","layoutIndex","activePromises","constructor","registerPluginPath","undefined","registerLayoutPath","getInstance","instance","type","widgetName","path","key","registerActionPath","actionName","strategy","getFieldPath","Error","getLayoutPath","getPathsToLoad","schema","pathsToLoad","Set","layoutStrategy","add","scanProperties","props","prop","ui","widget","e","warn","properties","items","preloadDependencies","promises","Array","from","map","Promise","resolve","reject","sap","require","Module","err","error","all","extractConstructor","default","keys","Object","getPlugin","PluginClass","getLayout","LayoutClass","__exports","__esModule"],"sources":["PluginRegistry.ts"],"sourcesContent":["/**\n * @file PluginRegistry.ts\n * @description Centralized hub for mapping UI5 controls to SAP schema data types.\n * Enforces the Registry Pattern to decouple the core engine from specific UI5 control implementations.\n * NOW WITH UNIVERSAL LAZY LOADING.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { FieldType, ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\n\nexport class PluginRegistry {\n private static instance: PluginRegistry;\n \n private fieldIndex: Record<string, string> = {};\n private actionIndex: Record<string, string> = {};\n private layoutIndex: Record<string, string> = {};\n \n private activePromises: Record<string, Promise<any>> = {};\n\n private constructor() {\n // Core Mappings\n this.registerPluginPath(\"string\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin\");\n this.registerPluginPath(\"number\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin\");\n this.registerPluginPath(\"integer\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin\");\n this.registerPluginPath(\"date\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin\");\n this.registerPluginPath(\"boolean\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin\");\n this.registerPluginPath(\"array\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin\");\n this.registerPluginPath(\"object\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin\");\n\n // Widget Overrides\n this.registerPluginPath(\"string\", \"time\", \"nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin\");\n this.registerPluginPath(\"string\", \"datetime\", \"nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin\");\n this.registerPluginPath(\"boolean\", \"switch\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin\");\n this.registerPluginPath(\"string\", \"select\", \"nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin\");\n this.registerPluginPath(\"string\", \"textArea\", \"nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin\");\n this.registerPluginPath(\"string\", \"codeEditor\", \"nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin\");\n \n // Phase 1 Mappings\n this.registerPluginPath(\"string\", \"fileUploader\", \"nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin\");\n this.registerPluginPath(\"array\", \"multiSelect\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin\");\n this.registerPluginPath(\"number\", \"slider\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin\");\n this.registerPluginPath(\"number\", \"rating\", \"nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin\");\n this.registerPluginPath(\"string\", \"messageStrip\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin\");\n\n // Phase 5 Mappings (Hardware)\n this.registerPluginPath(\"string\", \"camera\", \"nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin\");\n this.registerPluginPath(\"string\", \"signature\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin\");\n this.registerPluginPath(\"object\", \"location\", \"nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin\");\n this.registerPluginPath(\"string\", \"scanner\", \"nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin\");\n this.registerPluginPath(\"string\", \"voiceInput\", \"nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin\");\n this.registerPluginPath(\"string\", \"richText\", \"nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin\");\n\n // Actions & Datasources\n this.registerPluginPath(\"string\", \"urlButton\", \"nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin\");\n this.registerPluginPath(\"string\", \"submitButton\", \"nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin\");\n this.registerPluginPath(\"string\", \"odataSelect\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin\");\n this.registerPluginPath(\"string\", \"remoteDropdown\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin\");\n this.registerPluginPath(\"string\", \"liveSearch\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin\");\n this.registerPluginPath(\"string\", \"remoteValueHelp\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin\");\n\n // Layouts\n this.registerLayoutPath(\"form\", \"nz/co/siliconst/ui5/metaui/layouts/FormLayout\");\n this.registerLayoutPath(\"table\", \"nz/co/siliconst/ui5/metaui/layouts/TableLayout\");\n this.registerLayoutPath(\"wizard\", \"nz/co/siliconst/ui5/metaui/layouts/WizardLayout\");\n this.registerLayoutPath(\"compact\", \"nz/co/siliconst/ui5/metaui/layouts/CompactLayout\");\n }\n\n public static getInstance(): PluginRegistry {\n if (!PluginRegistry.instance) {\n PluginRegistry.instance = new PluginRegistry();\n }\n return PluginRegistry.instance;\n }\n\n public registerPluginPath(type: FieldType, widgetName: string | undefined, path: string): void {\n const key = widgetName ? `${type}:${widgetName}` : type;\n this.fieldIndex[key] = path;\n }\n\n public registerActionPath(actionName: string, path: string): void {\n this.actionIndex[actionName] = path;\n }\n\n public registerLayoutPath(strategy: string, path: string): void {\n this.layoutIndex[strategy] = path;\n }\n\n private getFieldPath(type: FieldType, widgetName?: string): string {\n let path;\n if (widgetName) {\n path = this.fieldIndex[`${type}:${widgetName}`];\n }\n if (!path) {\n path = this.fieldIndex[type];\n }\n if (!path) {\n throw new Error(`No plugin path mapped for FieldType: ${type} (widget: ${widgetName})`);\n }\n return path;\n }\n\n private getLayoutPath(strategy: string): string {\n const path = this.layoutIndex[strategy];\n if (!path) {\n throw new Error(`No layout path mapped for strategy: ${strategy}`);\n }\n return path;\n }\n\n /**\n * Statically traverses the schema structure to identify all required plugins\n * and layouts without actually instantiating them.\n * \n * @param {ISchema} schema The root JSON schema payload to traverse\n * @returns {Set<string>} A distinct set of UI5 module paths required to render the schema\n */\n public getPathsToLoad(schema: ISchema): Set<string> {\n const pathsToLoad = new Set<string>();\n \n // 1. Gather layout strategy\n const strategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n pathsToLoad.add(this.getLayoutPath(strategy));\n\n // 2. Recursively gather field plugins\n const scanProperties = (props: Record<string, IPropertyMetadata>) => {\n for (const key in props) {\n const prop = props[key];\n try {\n pathsToLoad.add(this.getFieldPath(prop.type || \"string\", prop.ui?.widget));\n } catch (e) {\n Logger.warn(`[MetaUI LazyLoad] Could not find mapped plugin for field ${key}`);\n }\n if (prop.properties) scanProperties(prop.properties);\n if (prop.items && prop.items.properties) scanProperties(prop.items.properties);\n if (prop.items && prop.items.type) {\n try {\n pathsToLoad.add(this.getFieldPath(prop.items.type, prop.items.ui?.widget));\n } catch (e) {}\n }\n }\n };\n\n if (schema.properties) {\n scanProperties(schema.properties);\n } else if (schema.items && schema.items.properties) {\n scanProperties(schema.items.properties);\n }\n\n return pathsToLoad;\n }\n\n /**\n * Defers the generation of the UI until all required UI5 modules have been\n * downloaded asynchronously. Maintains a cache of active promises to prevent\n * redundant network requests for the same module.\n * \n * @param {ISchema} schema The root JSON schema payload to parse\n * @returns {Promise<void>} Resolves when all dependencies are securely in the UI5 require cache\n */\n public async preloadDependencies(schema: ISchema): Promise<void> {\n const pathsToLoad = this.getPathsToLoad(schema);\n\n // 3. Batch execute sap.ui.require via Promises\n const promises = Array.from(pathsToLoad).map(path => {\n if (!this.activePromises[path]) {\n this.activePromises[path] = new Promise((resolve, reject) => {\n sap.ui.require([path], \n (Module: any) => resolve(Module), \n (err: any) => {\n Logger.error(`Failed to lazy load module: ${path}`);\n reject(err);\n }\n );\n });\n }\n return this.activePromises[path];\n });\n\n await Promise.all(promises);\n }\n\n private extractConstructor(Module: any): any {\n if (!Module) return null;\n if (typeof Module === \"function\") return Module;\n if (Module.default && typeof Module.default === \"function\") return Module.default;\n \n // Handle namespace exports (e.g. { FormLayout: class... })\n const keys = Object.keys(Module);\n for (const key of keys) {\n if (typeof Module[key] === \"function\") {\n return Module[key];\n }\n }\n return null;\n }\n\n public getPlugin(type: FieldType, widgetName?: string): IPlugin {\n const path = this.getFieldPath(type, widgetName);\n const Module = sap.ui.require(path);\n const PluginClass = this.extractConstructor(Module);\n \n if (!PluginClass) {\n throw new Error(`[MetaUI Plugin Instantiation] Plugin ${path} was not preloaded or has no constructor!`);\n }\n \n return new PluginClass();\n }\n\n public getLayout(strategy: string): ILayoutManager {\n const path = this.getLayoutPath(strategy);\n const Module = sap.ui.require(path);\n const LayoutClass = this.extractConstructor(Module);\n \n if (!LayoutClass) {\n throw new Error(`[MetaUI Layout Instantiation] Layout ${path} was not preloaded or has no constructor!`);\n }\n \n return new LayoutClass();\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;AACA;AACA;EALA,MAUSA,MAAM,GAAAC,eAAA;EAGR,MAAMC,cAAc,CAAC;IAGhBC,UAAU,GAA2B,CAAC,CAAC;IACvCC,WAAW,GAA2B,CAAC,CAAC;IACxCC,WAAW,GAA2B,CAAC,CAAC;IAExCC,cAAc,GAAiC,CAAC,CAAC;IAEjDC,WAAWA,CAAA,EAAG;MAClB;MACA,IAAI,CAACC,kBAAkB,CAAC,QAAQ,EAAEC,SAAS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utils_Logger","PluginRegistry","fieldIndex","actionIndex","layoutIndex","activePromises","constructor","registerPluginPath","undefined","registerLayoutPath","getInstance","instance","type","widgetName","path","key","registerActionPath","actionName","strategy","getFieldPath","Error","getLayoutPath","getPathsToLoad","schema","pathsToLoad","Set","layoutStrategy","add","scanProperties","props","prop","ui","widget","e","warn","properties","items","preloadDependencies","promises","Array","from","map","Promise","resolve","reject","sap","require","Module","err","error","all","extractConstructor","default","keys","Object","getPlugin","PluginClass","getLayout","LayoutClass","__exports","__esModule"],"sources":["PluginRegistry.ts"],"sourcesContent":["/**\n * @file PluginRegistry.ts\n * @description Centralized hub for mapping UI5 controls to SAP schema data types.\n * Enforces the Registry Pattern to decouple the core engine from specific UI5 control implementations.\n * NOW WITH UNIVERSAL LAZY LOADING.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { FieldType, ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\n\nexport class PluginRegistry {\n private static instance: PluginRegistry;\n \n private fieldIndex: Record<string, string> = {};\n private actionIndex: Record<string, string> = {};\n private layoutIndex: Record<string, string> = {};\n \n private activePromises: Record<string, Promise<unknown>> = {};\n\n private constructor() {\n // Core Mappings\n this.registerPluginPath(\"string\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin\");\n this.registerPluginPath(\"number\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin\");\n this.registerPluginPath(\"integer\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin\");\n this.registerPluginPath(\"date\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin\");\n this.registerPluginPath(\"boolean\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin\");\n this.registerPluginPath(\"array\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin\");\n this.registerPluginPath(\"object\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin\");\n\n // Widget Overrides\n this.registerPluginPath(\"string\", \"time\", \"nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin\");\n this.registerPluginPath(\"string\", \"datetime\", \"nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin\");\n this.registerPluginPath(\"boolean\", \"switch\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin\");\n this.registerPluginPath(\"string\", \"select\", \"nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin\");\n this.registerPluginPath(\"string\", \"textArea\", \"nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin\");\n this.registerPluginPath(\"string\", \"codeEditor\", \"nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin\");\n \n // Phase 1 Mappings\n this.registerPluginPath(\"string\", \"fileUploader\", \"nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin\");\n this.registerPluginPath(\"array\", \"multiSelect\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin\");\n this.registerPluginPath(\"number\", \"slider\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin\");\n this.registerPluginPath(\"number\", \"rating\", \"nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin\");\n this.registerPluginPath(\"string\", \"messageStrip\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin\");\n\n // Phase 5 Mappings (Hardware)\n this.registerPluginPath(\"string\", \"camera\", \"nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin\");\n this.registerPluginPath(\"string\", \"signature\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin\");\n this.registerPluginPath(\"object\", \"location\", \"nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin\");\n this.registerPluginPath(\"string\", \"scanner\", \"nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin\");\n this.registerPluginPath(\"string\", \"voiceInput\", \"nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin\");\n this.registerPluginPath(\"string\", \"richText\", \"nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin\");\n\n // Actions & Datasources\n this.registerPluginPath(\"string\", \"urlButton\", \"nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin\");\n this.registerPluginPath(\"string\", \"submitButton\", \"nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin\");\n this.registerPluginPath(\"string\", \"odataSelect\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin\");\n this.registerPluginPath(\"string\", \"remoteDropdown\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin\");\n this.registerPluginPath(\"string\", \"liveSearch\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin\");\n this.registerPluginPath(\"string\", \"remoteValueHelp\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin\");\n\n // Layouts\n this.registerLayoutPath(\"form\", \"nz/co/siliconst/ui5/metaui/layouts/FormLayout\");\n this.registerLayoutPath(\"table\", \"nz/co/siliconst/ui5/metaui/layouts/TableLayout\");\n this.registerLayoutPath(\"wizard\", \"nz/co/siliconst/ui5/metaui/layouts/WizardLayout\");\n this.registerLayoutPath(\"compact\", \"nz/co/siliconst/ui5/metaui/layouts/CompactLayout\");\n }\n\n public static getInstance(): PluginRegistry {\n if (!PluginRegistry.instance) {\n PluginRegistry.instance = new PluginRegistry();\n }\n return PluginRegistry.instance;\n }\n\n public registerPluginPath(type: FieldType, widgetName: string | undefined, path: string): void {\n const key = widgetName ? `${type}:${widgetName}` : type;\n this.fieldIndex[key] = path;\n }\n\n public registerActionPath(actionName: string, path: string): void {\n this.actionIndex[actionName] = path;\n }\n\n public registerLayoutPath(strategy: string, path: string): void {\n this.layoutIndex[strategy] = path;\n }\n\n private getFieldPath(type: FieldType, widgetName?: string): string {\n let path;\n if (widgetName) {\n path = this.fieldIndex[`${type}:${widgetName}`];\n }\n if (!path) {\n path = this.fieldIndex[type];\n }\n if (!path) {\n throw new Error(`No plugin path mapped for FieldType: ${type} (widget: ${widgetName})`);\n }\n return path;\n }\n\n private getLayoutPath(strategy: string): string {\n const path = this.layoutIndex[strategy];\n if (!path) {\n throw new Error(`No layout path mapped for strategy: ${strategy}`);\n }\n return path;\n }\n\n /**\n * Statically traverses the schema structure to identify all required plugins\n * and layouts without actually instantiating them.\n * \n * @param {ISchema} schema The root JSON schema payload to traverse\n * @returns {Set<string>} A distinct set of UI5 module paths required to render the schema\n */\n public getPathsToLoad(schema: ISchema): Set<string> {\n const pathsToLoad = new Set<string>();\n \n // 1. Gather layout strategy\n const strategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n pathsToLoad.add(this.getLayoutPath(strategy));\n\n // 2. Recursively gather field plugins\n const scanProperties = (props: Record<string, IPropertyMetadata>) => {\n for (const key in props) {\n const prop = props[key];\n try {\n pathsToLoad.add(this.getFieldPath(prop.type || \"string\", prop.ui?.widget));\n } catch (e) {\n Logger.warn(`[MetaUI LazyLoad] Could not find mapped plugin for field ${key}`);\n }\n if (prop.properties) scanProperties(prop.properties);\n if (prop.items && prop.items.properties) scanProperties(prop.items.properties);\n if (prop.items && prop.items.type) {\n try {\n pathsToLoad.add(this.getFieldPath(prop.items.type, prop.items.ui?.widget));\n } catch (e) {\n Logger.warn(`[MetaUI LazyLoad] Could not find mapped plugin for array item type ${prop.items.type}`);\n }\n }\n }\n };\n\n if (schema.properties) {\n scanProperties(schema.properties);\n } else if (schema.items && schema.items.properties) {\n scanProperties(schema.items.properties);\n }\n\n return pathsToLoad;\n }\n\n /**\n * Defers the generation of the UI until all required UI5 modules have been\n * downloaded asynchronously. Maintains a cache of active promises to prevent\n * redundant network requests for the same module.\n * \n * @param {ISchema} schema The root JSON schema payload to parse\n * @returns {Promise<void>} Resolves when all dependencies are securely in the UI5 require cache\n */\n public async preloadDependencies(schema: ISchema): Promise<void> {\n const pathsToLoad = this.getPathsToLoad(schema);\n\n // 3. Batch execute sap.ui.require via Promises\n const promises = Array.from(pathsToLoad).map(path => {\n if (!this.activePromises[path]) {\n this.activePromises[path] = new Promise((resolve, reject) => {\n sap.ui.require([path], \n (Module: unknown) => resolve(Module), \n (err: unknown) => {\n Logger.error(`Failed to lazy load module: ${path}`);\n // CRITICAL: Delete from cache so future attempts can retry the network request\n delete this.activePromises[path];\n reject(err);\n }\n );\n });\n }\n return this.activePromises[path];\n });\n\n await Promise.all(promises);\n }\n\n private extractConstructor(Module: unknown): new () => IPlugin | ILayoutManager | null {\n if (!Module) return null;\n if (typeof Module === \"function\") return Module;\n if (Module.default && typeof Module.default === \"function\") return Module.default;\n \n // Handle namespace exports (e.g. { FormLayout: class... })\n const keys = Object.keys(Module);\n for (const key of keys) {\n if (typeof Module[key] === \"function\") {\n return Module[key];\n }\n }\n return null;\n }\n\n public getPlugin(type: FieldType, widgetName?: string): IPlugin {\n const path = this.getFieldPath(type, widgetName);\n const Module = sap.ui.require(path);\n const PluginClass = this.extractConstructor(Module);\n \n if (!PluginClass) {\n throw new Error(`[MetaUI Plugin Instantiation] Plugin ${path} was not preloaded or has no constructor!`);\n }\n \n return new PluginClass();\n }\n\n public getLayout(strategy: string): ILayoutManager {\n const path = this.getLayoutPath(strategy);\n const Module = sap.ui.require(path);\n const LayoutClass = this.extractConstructor(Module);\n \n if (!LayoutClass) {\n throw new Error(`[MetaUI Layout Instantiation] Layout ${path} was not preloaded or has no constructor!`);\n }\n \n return new LayoutClass();\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;AACA;AACA;EALA,MAUSA,MAAM,GAAAC,eAAA;EAGR,MAAMC,cAAc,CAAC;IAGhBC,UAAU,GAA2B,CAAC,CAAC;IACvCC,WAAW,GAA2B,CAAC,CAAC;IACxCC,WAAW,GAA2B,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,GAAG,OAAO,CAAC,IAAI,CAAC;QAwBhE,OAAO,CAAC,kBAAkB;QAenB,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO;QAYxD,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc;KAWrD;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["../utils/Logger"],function(i){"use strict";const t=i["Logger"];class e{fieldIndex={};actionIndex={};layoutIndex={};activePromises={};constructor(){this.registerPluginPath("string",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin");this.registerPluginPath("number",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin");this.registerPluginPath("integer",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin");this.registerPluginPath("date",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin");this.registerPluginPath("boolean",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin");this.registerPluginPath("array",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin");this.registerPluginPath("object",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin");this.registerPluginPath("string","time","nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin");this.registerPluginPath("string","datetime","nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin");this.registerPluginPath("boolean","switch","nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin");this.registerPluginPath("string","select","nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin");this.registerPluginPath("string","textArea","nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin");this.registerPluginPath("string","codeEditor","nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin");this.registerPluginPath("string","fileUploader","nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin");this.registerPluginPath("array","multiSelect","nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin");this.registerPluginPath("number","slider","nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin");this.registerPluginPath("number","rating","nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin");this.registerPluginPath("string","messageStrip","nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin");this.registerPluginPath("string","camera","nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin");this.registerPluginPath("string","signature","nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin");this.registerPluginPath("object","location","nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin");this.registerPluginPath("string","scanner","nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin");this.registerPluginPath("string","voiceInput","nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin");this.registerPluginPath("string","richText","nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin");this.registerPluginPath("string","urlButton","nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin");this.registerPluginPath("string","submitButton","nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin");this.registerPluginPath("string","odataSelect","nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin");this.registerPluginPath("string","remoteDropdown","nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin");this.registerPluginPath("string","liveSearch","nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin");this.registerPluginPath("string","remoteValueHelp","nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin");this.registerLayoutPath("form","nz/co/siliconst/ui5/metaui/layouts/FormLayout");this.registerLayoutPath("table","nz/co/siliconst/ui5/metaui/layouts/TableLayout");this.registerLayoutPath("wizard","nz/co/siliconst/ui5/metaui/layouts/WizardLayout");this.registerLayoutPath("compact","nz/co/siliconst/ui5/metaui/layouts/CompactLayout")}static getInstance(){if(!e.instance){e.instance=new e}return e.instance}registerPluginPath(i,t,e){const n=t?`${i}:${t}`:i;this.fieldIndex[n]=e}registerActionPath(i,t){this.actionIndex[i]=t}registerLayoutPath(i,t){this.layoutIndex[i]=t}getFieldPath(i,t){let e;if(t){e=this.fieldIndex[`${i}:${t}`]}if(!e){e=this.fieldIndex[i]}if(!e){throw new Error(`No plugin path mapped for FieldType: ${i} (widget: ${t})`)}return e}getLayoutPath(i){const t=this.layoutIndex[i];if(!t){throw new Error(`No layout path mapped for strategy: ${i}`)}return t}getPathsToLoad(i){const e=new Set;const n=i.layoutStrategy||(i.type==="array"?"table":"form");e.add(this.getLayoutPath(n));const s=i=>{for(const n in i){const o=i[n];try{e.add(this.getFieldPath(o.type||"string",o.ui?.widget))}catch(i){t.warn(`[MetaUI LazyLoad] Could not find mapped plugin for field ${n}`)}if(o.properties)s(o.properties);if(o.items&&o.items.properties)s(o.items.properties);if(o.items&&o.items.type){try{e.add(this.getFieldPath(o.items.type,o.items.ui?.widget))}catch(i){}}}};if(i.properties){s(i.properties)}else if(i.items&&i.items.properties){s(i.items.properties)}return e}async preloadDependencies(i){const e=this.getPathsToLoad(i);const n=Array.from(e).map(i=>{if(!this.activePromises[i]){this.activePromises[i]=new Promise((e,n)=>{sap.ui.require([i],i=>e(i),e=>{t.error(`Failed to lazy load module: ${i}`);n(e)})})}return this.activePromises[i]});await Promise.all(n)}extractConstructor(i){if(!i)return null;if(typeof i==="function")return i;if(i.default&&typeof i.default==="function")return i.default;const t=Object.keys(i);for(const e of t){if(typeof i[e]==="function"){return i[e]}}return null}getPlugin(i,t){const e=this.getFieldPath(i,t);const n=sap.ui.require(e);const s=this.extractConstructor(n);if(!s){throw new Error(`[MetaUI Plugin Instantiation] Plugin ${e} was not preloaded or has no constructor!`)}return new s}getLayout(i){const t=this.getLayoutPath(i);const e=sap.ui.require(t);const n=this.extractConstructor(e);if(!n){throw new Error(`[MetaUI Layout Instantiation] Layout ${t} was not preloaded or has no constructor!`)}return new n}}var n={__esModule:true};n.PluginRegistry=e;return n});
1
+ sap.ui.define(["../utils/Logger"],function(i){"use strict";const t=i["Logger"];class e{fieldIndex={};actionIndex={};layoutIndex={};activePromises={};constructor(){this.registerPluginPath("string",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin");this.registerPluginPath("number",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin");this.registerPluginPath("integer",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin");this.registerPluginPath("date",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin");this.registerPluginPath("boolean",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin");this.registerPluginPath("array",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin");this.registerPluginPath("object",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin");this.registerPluginPath("string","time","nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin");this.registerPluginPath("string","datetime","nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin");this.registerPluginPath("boolean","switch","nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin");this.registerPluginPath("string","select","nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin");this.registerPluginPath("string","textArea","nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin");this.registerPluginPath("string","codeEditor","nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin");this.registerPluginPath("string","fileUploader","nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin");this.registerPluginPath("array","multiSelect","nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin");this.registerPluginPath("number","slider","nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin");this.registerPluginPath("number","rating","nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin");this.registerPluginPath("string","messageStrip","nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin");this.registerPluginPath("string","camera","nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin");this.registerPluginPath("string","signature","nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin");this.registerPluginPath("object","location","nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin");this.registerPluginPath("string","scanner","nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin");this.registerPluginPath("string","voiceInput","nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin");this.registerPluginPath("string","richText","nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin");this.registerPluginPath("string","urlButton","nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin");this.registerPluginPath("string","submitButton","nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin");this.registerPluginPath("string","odataSelect","nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin");this.registerPluginPath("string","remoteDropdown","nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin");this.registerPluginPath("string","liveSearch","nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin");this.registerPluginPath("string","remoteValueHelp","nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin");this.registerLayoutPath("form","nz/co/siliconst/ui5/metaui/layouts/FormLayout");this.registerLayoutPath("table","nz/co/siliconst/ui5/metaui/layouts/TableLayout");this.registerLayoutPath("wizard","nz/co/siliconst/ui5/metaui/layouts/WizardLayout");this.registerLayoutPath("compact","nz/co/siliconst/ui5/metaui/layouts/CompactLayout")}static getInstance(){if(!e.instance){e.instance=new e}return e.instance}registerPluginPath(i,t,e){const n=t?`${i}:${t}`:i;this.fieldIndex[n]=e}registerActionPath(i,t){this.actionIndex[i]=t}registerLayoutPath(i,t){this.layoutIndex[i]=t}getFieldPath(i,t){let e;if(t){e=this.fieldIndex[`${i}:${t}`]}if(!e){e=this.fieldIndex[i]}if(!e){throw new Error(`No plugin path mapped for FieldType: ${i} (widget: ${t})`)}return e}getLayoutPath(i){const t=this.layoutIndex[i];if(!t){throw new Error(`No layout path mapped for strategy: ${i}`)}return t}getPathsToLoad(i){const e=new Set;const n=i.layoutStrategy||(i.type==="array"?"table":"form");e.add(this.getLayoutPath(n));const s=i=>{for(const n in i){const o=i[n];try{e.add(this.getFieldPath(o.type||"string",o.ui?.widget))}catch(i){t.warn(`[MetaUI LazyLoad] Could not find mapped plugin for field ${n}`)}if(o.properties)s(o.properties);if(o.items&&o.items.properties)s(o.items.properties);if(o.items&&o.items.type){try{e.add(this.getFieldPath(o.items.type,o.items.ui?.widget))}catch(i){t.warn(`[MetaUI LazyLoad] Could not find mapped plugin for array item type ${o.items.type}`)}}}};if(i.properties){s(i.properties)}else if(i.items&&i.items.properties){s(i.items.properties)}return e}async preloadDependencies(i){const e=this.getPathsToLoad(i);const n=Array.from(e).map(i=>{if(!this.activePromises[i]){this.activePromises[i]=new Promise((e,n)=>{sap.ui.require([i],i=>e(i),e=>{t.error(`Failed to lazy load module: ${i}`);delete this.activePromises[i];n(e)})})}return this.activePromises[i]});await Promise.all(n)}extractConstructor(i){if(!i)return null;if(typeof i==="function")return i;if(i.default&&typeof i.default==="function")return i.default;const t=Object.keys(i);for(const e of t){if(typeof i[e]==="function"){return i[e]}}return null}getPlugin(i,t){const e=this.getFieldPath(i,t);const n=sap.ui.require(e);const s=this.extractConstructor(n);if(!s){throw new Error(`[MetaUI Plugin Instantiation] Plugin ${e} was not preloaded or has no constructor!`)}return new s}getLayout(i){const t=this.getLayoutPath(i);const e=sap.ui.require(t);const n=this.extractConstructor(e);if(!n){throw new Error(`[MetaUI Layout Instantiation] Layout ${t} was not preloaded or has no constructor!`)}return new n}}var n={__esModule:true};n.PluginRegistry=e;return n});
2
2
  //# sourceMappingURL=PluginRegistry.js.map