@siliconst/metaui 1.4.5 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (329) hide show
  1. package/package.json +1 -1
  2. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl-dbg.js +13 -0
  3. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl-dbg.js.map +1 -1
  4. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.d.ts +10 -0
  5. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.d.ts.map +1 -1
  6. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.js.map +1 -1
  7. package/src/nz/co/siliconst/ui5/metaui/controls/CameraControl.ts +10 -0
  8. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +49 -6
  9. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js.map +1 -1
  10. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts +48 -5
  11. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +1 -1
  12. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js +1 -1
  13. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js.map +1 -1
  14. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts +49 -5
  15. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl-dbg.js +32 -1
  16. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl-dbg.js.map +1 -1
  17. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.d.ts +7 -0
  18. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.d.ts.map +1 -1
  19. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.js +1 -1
  20. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.js.map +1 -1
  21. package/src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.ts +11 -1
  22. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl-dbg.js +20 -0
  23. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl-dbg.js.map +1 -1
  24. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.d.ts +12 -0
  25. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.d.ts.map +1 -1
  26. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.js +1 -1
  27. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.js.map +1 -1
  28. package/src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.ts +21 -0
  29. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl-dbg.js +9 -0
  30. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl-dbg.js.map +1 -1
  31. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.d.ts +7 -0
  32. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.d.ts.map +1 -1
  33. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.js.map +1 -1
  34. package/src/nz/co/siliconst/ui5/metaui/controls/SignatureControl.ts +7 -0
  35. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl-dbg.js +13 -0
  36. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl-dbg.js.map +1 -1
  37. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.d.ts +10 -0
  38. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.d.ts.map +1 -1
  39. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.js.map +1 -1
  40. package/src/nz/co/siliconst/ui5/metaui/controls/VoiceInputControl.ts +10 -0
  41. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +46 -10
  42. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js.map +1 -1
  43. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts +17 -5
  44. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts.map +1 -1
  45. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js +1 -1
  46. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js.map +1 -1
  47. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.ts +48 -8
  48. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js +5 -0
  49. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js.map +1 -1
  50. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts +4 -0
  51. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts.map +1 -1
  52. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js.map +1 -1
  53. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.ts +4 -0
  54. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js +4 -0
  55. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js.map +1 -1
  56. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts +4 -0
  57. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts.map +1 -1
  58. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js.map +1 -1
  59. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts +4 -0
  60. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js +4 -0
  61. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js.map +1 -1
  62. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts +4 -0
  63. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts.map +1 -1
  64. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js.map +1 -1
  65. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts +4 -0
  66. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js +45 -12
  67. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js.map +1 -1
  68. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.d.ts +6 -0
  69. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.d.ts.map +1 -1
  70. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js +1 -1
  71. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js.map +1 -1
  72. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts +25 -12
  73. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +30 -17
  74. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js.map +1 -1
  75. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts +8 -8
  76. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts.map +1 -1
  77. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js +1 -1
  78. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js.map +1 -1
  79. package/src/nz/co/siliconst/ui5/metaui/core/Engine.ts +39 -32
  80. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager-dbg.js +17 -3
  81. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager-dbg.js.map +1 -1
  82. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.d.ts +4 -0
  83. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.d.ts.map +1 -1
  84. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.js +1 -1
  85. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.js.map +1 -1
  86. package/src/nz/co/siliconst/ui5/metaui/core/PipelineManager.ts +13 -3
  87. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +158 -106
  88. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js.map +1 -1
  89. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts +25 -26
  90. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts.map +1 -1
  91. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js +1 -1
  92. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js.map +1 -1
  93. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts +176 -113
  94. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +26 -0
  95. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -1
  96. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +22 -0
  97. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
  98. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
  99. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +22 -0
  100. package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js +6 -0
  101. package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js.map +1 -1
  102. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts +5 -0
  103. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts.map +1 -1
  104. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js.map +1 -1
  105. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.ts +5 -0
  106. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin-dbg.js.map +1 -1
  107. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts +3 -3
  108. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts.map +1 -1
  109. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts +3 -3
  110. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout-dbg.js +10 -0
  111. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout-dbg.js.map +1 -1
  112. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.d.ts +9 -0
  113. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.d.ts.map +1 -1
  114. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.js.map +1 -1
  115. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.ts +9 -0
  116. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js +10 -0
  117. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js.map +1 -1
  118. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts +9 -0
  119. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts.map +1 -1
  120. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js.map +1 -1
  121. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.ts +9 -0
  122. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js +2 -2
  123. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js.map +1 -1
  124. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js +1 -1
  125. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js.map +1 -1
  126. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.ts +2 -2
  127. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout-dbg.js +9 -0
  128. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout-dbg.js.map +1 -1
  129. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.d.ts +8 -0
  130. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.d.ts.map +1 -1
  131. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.js.map +1 -1
  132. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.ts +8 -0
  133. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js +2 -32
  134. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -1
  135. package/src/nz/co/siliconst/ui5/metaui/library-preload.js +36 -37
  136. package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
  137. package/src/nz/co/siliconst/ui5/metaui/library.d.ts +0 -6
  138. package/src/nz/co/siliconst/ui5/metaui/library.d.ts.map +1 -1
  139. package/src/nz/co/siliconst/ui5/metaui/library.js +1 -1
  140. package/src/nz/co/siliconst/ui5/metaui/library.js.map +1 -1
  141. package/src/nz/co/siliconst/ui5/metaui/library.ts +0 -33
  142. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin-dbg.js +2 -2
  143. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin-dbg.js.map +1 -1
  144. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.js +1 -1
  145. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.js.map +1 -1
  146. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.ts +2 -2
  147. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin-dbg.js +2 -2
  148. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin-dbg.js.map +1 -1
  149. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.js +1 -1
  150. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.js.map +1 -1
  151. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.ts +2 -2
  152. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js +23 -5
  153. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js.map +1 -1
  154. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.d.ts +16 -0
  155. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.d.ts.map +1 -1
  156. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js +1 -1
  157. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js.map +1 -1
  158. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts +21 -5
  159. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +21 -2
  160. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js.map +1 -1
  161. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.d.ts +17 -0
  162. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.d.ts.map +1 -1
  163. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js +1 -1
  164. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js.map +1 -1
  165. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +19 -2
  166. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js +6 -6
  167. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js.map +1 -1
  168. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts +5 -5
  169. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts.map +1 -1
  170. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js +1 -1
  171. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js.map +1 -1
  172. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +6 -6
  173. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +3 -2
  174. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
  175. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.d.ts.map +1 -1
  176. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js +1 -1
  177. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
  178. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +4 -2
  179. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +21 -2
  180. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
  181. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.d.ts +17 -0
  182. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.d.ts.map +1 -1
  183. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js +1 -1
  184. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
  185. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +19 -2
  186. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +31 -2
  187. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js.map +1 -1
  188. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.d.ts +25 -0
  189. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.d.ts.map +1 -1
  190. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js +1 -1
  191. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
  192. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +27 -2
  193. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +21 -2
  194. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
  195. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.d.ts +17 -0
  196. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.d.ts.map +1 -1
  197. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
  198. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
  199. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +19 -2
  200. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +21 -2
  201. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
  202. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.d.ts +17 -0
  203. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.d.ts.map +1 -1
  204. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
  205. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
  206. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +19 -2
  207. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +4 -2
  208. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
  209. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.d.ts +2 -0
  210. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.d.ts.map +1 -1
  211. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js +1 -1
  212. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
  213. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +4 -2
  214. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +21 -2
  215. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
  216. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.d.ts +17 -0
  217. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.d.ts.map +1 -1
  218. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
  219. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
  220. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +19 -2
  221. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +21 -2
  222. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
  223. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.d.ts +17 -0
  224. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.d.ts.map +1 -1
  225. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js +1 -1
  226. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
  227. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +19 -2
  228. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js +18 -0
  229. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js.map +1 -1
  230. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.d.ts +16 -0
  231. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.d.ts.map +1 -1
  232. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.js.map +1 -1
  233. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.ts +16 -0
  234. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +21 -2
  235. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js.map +1 -1
  236. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.d.ts +17 -0
  237. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.d.ts.map +1 -1
  238. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js +1 -1
  239. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js.map +1 -1
  240. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +19 -2
  241. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +21 -2
  242. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
  243. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.d.ts +17 -0
  244. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.d.ts.map +1 -1
  245. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
  246. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
  247. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +19 -2
  248. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js +28 -5
  249. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js.map +1 -1
  250. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.d.ts +20 -0
  251. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.d.ts.map +1 -1
  252. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js +1 -1
  253. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js.map +1 -1
  254. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.ts +25 -5
  255. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +21 -2
  256. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
  257. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.d.ts +17 -0
  258. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.d.ts.map +1 -1
  259. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
  260. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
  261. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +19 -2
  262. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +21 -2
  263. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
  264. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.d.ts +17 -0
  265. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.d.ts.map +1 -1
  266. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js +1 -1
  267. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
  268. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +19 -2
  269. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +21 -2
  270. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
  271. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.d.ts +17 -0
  272. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.d.ts.map +1 -1
  273. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js +1 -1
  274. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
  275. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +19 -2
  276. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +21 -2
  277. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
  278. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.d.ts +17 -0
  279. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.d.ts.map +1 -1
  280. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
  281. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
  282. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +19 -2
  283. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +4 -2
  284. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
  285. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.d.ts +2 -0
  286. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.d.ts.map +1 -1
  287. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js +1 -1
  288. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
  289. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +4 -2
  290. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +21 -2
  291. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js.map +1 -1
  292. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.d.ts +17 -0
  293. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.d.ts.map +1 -1
  294. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js +1 -1
  295. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js.map +1 -1
  296. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +19 -2
  297. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +21 -2
  298. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
  299. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.d.ts +17 -0
  300. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.d.ts.map +1 -1
  301. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js +1 -1
  302. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
  303. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +19 -2
  304. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +21 -2
  305. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
  306. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.d.ts +17 -0
  307. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.d.ts.map +1 -1
  308. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
  309. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
  310. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +19 -2
  311. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +21 -2
  312. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
  313. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.d.ts +17 -0
  314. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.d.ts.map +1 -1
  315. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js +1 -1
  316. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
  317. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +19 -2
  318. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin-dbg.js +2 -2
  319. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin-dbg.js.map +1 -1
  320. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.js +1 -1
  321. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.js.map +1 -1
  322. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.ts +2 -2
  323. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry-dbg.js +0 -32
  324. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry-dbg.js.map +0 -1
  325. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.d.ts +0 -16
  326. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.d.ts.map +0 -1
  327. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.js +0 -2
  328. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.js.map +0 -1
  329. package/src/nz/co/siliconst/ui5/metaui/core/LayoutRegistry.ts +0 -26
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicHost.js","names":["GeneratorHost","_interopRequireDefault","__GeneratorHost","Logger","___utils_Logger","ODataDelegate","___host_delegates_ODataDelegate","DynamicHost","Control","extend","constructor","prototype","apply","this","arguments","_innerHost","odataDelegate","_initializedInner","renderer","apiVersion","render","rm","control","openStart","style","openEnd","content","getAggregation","renderControl","close","metadata","properties","schemaDefinition","type","defaultValue","data","bindable","dataJson","liveUpdate","isValid","useMessageManager","modelName","debugMode","displayMode","aggregations","_content","multiple","visibility","events","beforeSubmit","parameters","payload","addError","preventDefault","submit","payloadJson","cancel","fieldChange","fieldPath","value","validationStateChanged","validationError","message","validationSuccess","initODataDelegate","_initODataDelegate","oContext","getBindingContext","debug","getPath","requestObject","getObject","syncToEngine","Object","keys","setBindingContext","_setBindingContext","sModelName","Control.prototype.setBindingContext.call","bindElement","_bindElement","vPath","mParameters","Control.prototype.bindElement.call","model","undefined","oBinding","getElementBinding","attachChange","onBeforeRendering","_onBeforeRendering","schema","getProperty","hasSchema","hasData","props","getMetadata","getProperties","propName","val","Control.prototype.getProperty.call","setProperty","setAggregation","getEvents","eventName","attachEvent","oEvent","params","getParameters","Control.prototype.setProperty.call","str","JSON","stringify","handleFieldChange","fireEvent","_setProperty","propertyName","suppressInvalidate","openInDialog","_openInDialog","title","submitButtonText","cancelButtonText","triggerSubmit","_triggerSubmit","_getProperty"],"sources":["DynamicHost.ts"],"sourcesContent":["import Control from \"sap/ui/core/Control\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport GeneratorHost from \"./host/GeneratorHost\";\nimport { Logger } from \"../utils/Logger\";\nimport { ODataDelegate } from \"./host/delegates/ODataDelegate\";\n\n/**\n * A transparent wrapper control (Facade) that automatically chooses between Explicit Schema Mode \n * and Inference Mode based on the presence of a 'schemaDefinition'.\n * \n * This maintains total architectural separation of the modes without forcing developers to \n * use different XML tags.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nexport default class DynamicHost extends Control {\n private _innerHost: GeneratorHost | null = null;\n private odataDelegate: ODataDelegate | null = null;\n private _initializedInner: boolean = false;\n\n static readonly metadata = {\n properties: {\n schemaDefinition: { type: \"any\", defaultValue: null },\n data: { type: \"object\", defaultValue: null, bindable: \"bindable\" },\n dataJson: { type: \"string\", defaultValue: null, bindable: \"bindable\" },\n liveUpdate: { type: \"boolean\", defaultValue: false },\n isValid: { type: \"boolean\", defaultValue: true },\n useMessageManager: { type: \"boolean\", defaultValue: false },\n modelName: { type: \"string\", defaultValue: \"meta\" },\n debugMode: { type: \"boolean\", defaultValue: false },\n displayMode: { type: \"boolean\", defaultValue: false }\n },\n aggregations: {\n _content: { type: \"sap.ui.core.Control\", multiple: false, visibility: \"hidden\" }\n },\n events: {\n beforeSubmit: {\n parameters: {\n payload: { type: \"object\" },\n addError: { type: \"function\" },\n preventDefault: { type: \"function\" }\n }\n },\n submit: {\n parameters: {\n payload: { type: \"object\" },\n payloadJson: { type: \"string\" }\n }\n },\n cancel: {},\n fieldChange: {\n parameters: {\n fieldPath: { type: \"string\" },\n value: { type: \"any\" },\n payload: { type: \"object\" },\n isValid: { type: \"boolean\" }\n }\n },\n validationStateChanged: { parameters: { isValid: { type: \"boolean\" } } },\n validationError: { parameters: { fieldPath: { type: \"string\" }, message: { type: \"string\" } } },\n validationSuccess: { parameters: { fieldPath: { type: \"string\" } } }\n }\n };\n\n static renderer = {\n apiVersion: 2,\n render(rm: RenderManager, control: DynamicHost) {\n rm.openStart(\"div\", control);\n rm.style(\"width\", \"100%\");\n rm.style(\"height\", \"100%\");\n rm.openEnd();\n\n const content = control.getAggregation(\"_content\") as Control;\n if (content) {\n rm.renderControl(content);\n }\n\n rm.close(\"div\");\n }\n };\n\n private _innerHost: GeneratorHost | null = null;\n private _initializedInner: boolean = false;\n\n /**\n * Standard UI5 Lifecycle Hook.\n * Evaluates the initial properties and spawns the appropriate inner host strategy via the HostFactory.\n * It handles the complex lifecycle task of copying all bindings, raw properties, and event listeners \n * down to the inner host perfectly transparently.\n */\n private initODataDelegate(): void {\n if (!this.odataDelegate) {\n const oContext = this.getBindingContext(\"odata\") || this.getBindingContext();\n if (oContext) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context found for delegate initialization: ${oContext.getPath()}`, \"DynamicHost\");\n if (typeof (oContext as any).requestObject === \"function\" || typeof (oContext as any).getObject === \"function\") {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context supports requestObject/getObject. Instantiating ODataDelegate.`, \"DynamicHost\");\n this.odataDelegate = new ODataDelegate(this, oContext as any);\n this.odataDelegate.syncToEngine();\n } else {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context does NOT support requestObject/getObject! Keys: ${Object.keys(oContext)}`, \"DynamicHost\");\n }\n }\n }\n }\n\n public setBindingContext(oContext: sap.ui.model.Context | null | undefined, sModelName?: string): this {\n super.setBindingContext(oContext, sModelName);\n this.initODataDelegate();\n return this;\n }\n\n public bindElement(vPath: string | any, mParameters?: object): this {\n super.bindElement(vPath, mParameters);\n const sModelName = typeof vPath === \"object\" ? vPath.model : undefined;\n const oBinding = this.getElementBinding(sModelName);\n if (oBinding) {\n oBinding.attachChange(() => {\n this.initODataDelegate();\n });\n }\n return this;\n }\n\n public onBeforeRendering(): void {\n Logger.debug(\"[MetaUI DynamicHost]\", `onBeforeRendering called. _initializedInner: ${this._initializedInner}`, \"DynamicHost\");\n\n this.initODataDelegate();\n\n if (!this._initializedInner) {\n const schema = this.getProperty(\"schemaDefinition\");\n const dataJson = this.getProperty(\"dataJson\");\n const data = this.getProperty(\"data\");\n\n const hasSchema = !!schema;\n const hasData = !!dataJson || !!data;\n\n Logger.debug(\"[MetaUI DynamicHost]\", `Evaluating boot. hasSchema: ${hasSchema}, hasData: ${hasData}`, \"DynamicHost\");\n\n // Only boot if we have either a schema or some data to infer from\n if (hasSchema || hasData) {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Booting inner host. hasSchema: ${hasSchema}, hasData: ${hasData}`, \"DynamicHost\");\n }\n // The architectural Facade router logic:\n // We've simplified this! We no longer use HostFactory or separate subclasses.\n // GeneratorHost is fully capable of inferring the schema if none is provided.\n this._innerHost = new GeneratorHost();\n\n // 1. Forward all static values to the spawned host BEFORE mounting.\n // Since we no longer use bindProperty, it's perfectly safe to set raw properties before mounting.\n const props = this.getMetadata().getProperties();\n for (const propName in props) {\n const val = super.getProperty(propName);\n if (val !== null && val !== undefined) {\n this._innerHost.setProperty(propName, val);\n }\n }\n\n // 2. Mount so it inherits models and triggers lifecycle.\n this.setAggregation(\"_content\", this._innerHost);\n\n // 3. Forward all event subscriptions.\n // By proxying the events upwards, the developer can subscribe to `<meta:DynamicHost submit=\"...\">` \n // and perfectly receive the inner host's submission event.\n const events = this.getMetadata().getEvents();\n for (const eventName in events) {\n this._innerHost.attachEvent(eventName, (oEvent: any) => {\n // Natively push updated payload out to any bound Fiori Element properties.\n // Using super.setProperty prevents an infinite loop back down to _innerHost.\n if (eventName === \"submit\" || eventName === \"fieldChange\") {\n const params = oEvent.getParameters();\n if (params.payload) {\n super.setProperty(\"data\", params.payload, true);\n\n const str = params.payloadJson || JSON.stringify(params.payload, null, 2);\n super.setProperty(\"dataJson\", str, true);\n }\n if (eventName === \"fieldChange\" && this.odataDelegate) {\n this.odataDelegate.handleFieldChange(params.fieldPath, params.value);\n }\n }\n this.fireEvent(eventName, oEvent.getParameters());\n });\n }\n\n this._initializedInner = true;\n }\n }\n }\n\n /**\n * Overrides standard UI5 setProperty to act as a transparent proxy.\n * When a property is updated on the wrapper (either programmatically or via a binding update),\n * it instantly mirrors that value down to the inner instantiated host.\n */\n public setProperty(propertyName: string, value: unknown, suppressInvalidate?: boolean): this {\n if (propertyName === \"data\" || propertyName === \"dataJson\" || propertyName === \"schemaDefinition\") {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Wrapper received setProperty: ${propertyName}`, \"DynamicHost\");\n }\n }\n super.setProperty(propertyName, value, suppressInvalidate);\n if (this._innerHost) {\n this._innerHost.setProperty(propertyName, value, suppressInvalidate);\n } else if (propertyName === \"data\" || propertyName === \"dataJson\" || propertyName === \"schemaDefinition\") {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `_innerHost not yet initialized when ${propertyName} was set. Booting will happen on next render.`, \"DynamicHost\");\n }\n }\n return this;\n }\n\n\n\n\n\n /**\n * Programmatic API support. Routes dialog commands down to the spawned inner host.\n */\n public openInDialog(title?: string, submitButtonText?: string, cancelButtonText?: string): void {\n if (!this._innerHost) {\n this.onBeforeRendering(); // Force init if they bypassed UI5 rendering\n }\n this._innerHost?.openInDialog(title, submitButtonText, cancelButtonText);\n }\n\n /**\n * Proxies submission triggering down to the instantiated generator host.\n */\n public triggerSubmit(): boolean {\n if (!this._innerHost) {\n return false;\n }\n return (this._innerHost as any).triggerSubmit();\n }\n\n /**\n * Overrides standard UI5 getProperty to transparently pull extracted data from the inner host.\n */\n public getProperty(propertyName: string): any {\n if (this._innerHost && (propertyName === \"data\" || propertyName === \"dataJson\")) {\n return this._innerHost.getProperty(propertyName);\n }\n return super.getProperty(propertyName);\n }\n}\n"],"mappings":"sOAEOA,EAAaC,EAAAC,GAAA,MACXC,EAAMC,EAAA,gBACNC,EAAaC,EAAA,iBAEtB,MASqBC,EAAoBC,EAAOC,OAAA,mDAAAC,YAAA,SAAAA,IAAAF,EAAAG,UAAAD,YAAAE,MAAAC,KAAAC,WAAAD,KACpCE,WAAmC,KAAIF,KACvCG,cAAsC,KAAIH,KAC1CI,kBAA6B,MAAKJ,KA+DlCE,WAAmC,KAAIF,KACvCI,kBAA6B,KAAK,EAlBnCC,SAAW,CACdC,WAAY,EACZC,OAAOC,EAAmBC,GACtBD,EAAGE,UAAU,MAAOD,GACpBD,EAAGG,MAAM,QAAS,QAClBH,EAAGG,MAAM,SAAU,QACnBH,EAAGI,UAEH,MAAMC,EAAUJ,EAAQK,eAAe,YACvC,GAAID,EAAS,CACTL,EAAGO,cAAcF,EACrB,CAEAL,EAAGQ,MAAM,MACb,GA1DYC,SAAW,CACvBC,WAAY,CACRC,iBAAkB,CAAEC,KAAM,MAAOC,aAAc,MAC/CC,KAAM,CAAEF,KAAM,SAAUC,aAAc,KAAME,SAAU,YACtDC,SAAU,CAAE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AAa,SAAAC,IAChB,IAAK/G,KAAKE,WAAY,CAClB,OAAO,KACX,CACA,OAAQF,KAAKE,WAAmB4G,eACpC,EAKO/B,YAAW,SAAAiC,EAACT,GACf,GAAIvG,KAAKE,aAAeqG,IAAiB,QAAUA,IAAiB,YAAa,CAC7E,OAAOvG,KAAKE,WAAW6E,YAAYwB,EACvC,CACA,OAAAhB,6BAAAvF,KAAyBuG,EAC7B,IAAC,OAtOgB7G,CAAW","ignoreList":[]}
1
+ {"version":3,"file":"DynamicHost.js","names":["GeneratorHost","_interopRequireDefault","__GeneratorHost","Logger","___utils_Logger","ODataDelegate","___host_delegates_ODataDelegate","DynamicHost","Control","extend","constructor","prototype","apply","this","arguments","_innerHost","odataDelegate","_initializedInner","renderer","apiVersion","render","rm","control","openStart","style","openEnd","content","getAggregation","renderControl","close","metadata","properties","schemaDefinition","type","defaultValue","data","bindable","dataJson","liveUpdate","isValid","useMessageManager","modelName","debugMode","editable","aggregations","_content","multiple","visibility","events","beforeSubmit","parameters","payload","addError","preventDefault","submit","payloadJson","cancel","fieldChange","fieldPath","value","validationStateChanged","validationError","message","validationSuccess","initODataDelegate","_initODataDelegate","oContext","getBindingContext","debug","getPath","requestObject","getObject","syncToEngine","Object","keys","setBindingContext","_setBindingContext","sModelName","Control.prototype.setBindingContext.call","bindElement","_bindElement","vPath","mParameters","Control.prototype.bindElement.call","model","undefined","oBinding","getElementBinding","attachChange","onBeforeRendering","_onBeforeRendering","schema","getProperty","hasSchema","hasData","props","getMetadata","getProperties","propName","val","Control.prototype.getProperty.call","setProperty","setAggregation","getEvents","eventName","attachEvent","oEvent","params","getParameters","Control.prototype.setProperty.call","str","JSON","stringify","handleFieldChange","fireEvent","_setProperty","propertyName","suppressInvalidate","openInDialog","_openInDialog","title","submitButtonText","cancelButtonText","triggerSubmit","_triggerSubmit","_getProperty"],"sources":["DynamicHost.ts"],"sourcesContent":["import Control from \"sap/ui/core/Control\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport GeneratorHost from \"./host/GeneratorHost\";\nimport { Logger } from \"../utils/Logger\";\nimport { ODataDelegate } from \"./host/delegates/ODataDelegate\";\n\n/**\n * A transparent wrapper control (Facade) that automatically chooses between Explicit Schema Mode \n * and Inference Mode based on the presence of a 'schemaDefinition'.\n * \n * This maintains total architectural separation of the modes without forcing developers to \n * use different XML tags.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nexport default class DynamicHost extends Control {\n private _innerHost: GeneratorHost | null = null;\n private odataDelegate: ODataDelegate | null = null;\n private _initializedInner: boolean = false;\n\n static readonly metadata = {\n properties: {\n schemaDefinition: { type: \"any\", defaultValue: null },\n data: { type: \"object\", defaultValue: null, bindable: \"bindable\" },\n dataJson: { type: \"string\", defaultValue: null, bindable: \"bindable\" },\n liveUpdate: { type: \"boolean\", defaultValue: false },\n isValid: { type: \"boolean\", defaultValue: true },\n useMessageManager: { type: \"boolean\", defaultValue: false },\n modelName: { type: \"string\", defaultValue: \"meta\" },\n debugMode: { type: \"boolean\", defaultValue: false },\n editable: { type: \"boolean\", defaultValue: true }\n },\n aggregations: {\n _content: { type: \"sap.ui.core.Control\", multiple: false, visibility: \"hidden\" }\n },\n events: {\n beforeSubmit: {\n parameters: {\n payload: { type: \"object\" },\n addError: { type: \"function\" },\n preventDefault: { type: \"function\" }\n }\n },\n submit: {\n parameters: {\n payload: { type: \"object\" },\n payloadJson: { type: \"string\" }\n }\n },\n cancel: {},\n fieldChange: {\n parameters: {\n fieldPath: { type: \"string\" },\n value: { type: \"any\" },\n payload: { type: \"object\" },\n isValid: { type: \"boolean\" }\n }\n },\n validationStateChanged: { parameters: { isValid: { type: \"boolean\" } } },\n validationError: { parameters: { fieldPath: { type: \"string\" }, message: { type: \"string\" } } },\n validationSuccess: { parameters: { fieldPath: { type: \"string\" } } }\n }\n };\n\n static renderer = {\n apiVersion: 2,\n render(rm: RenderManager, control: DynamicHost) {\n rm.openStart(\"div\", control);\n rm.style(\"width\", \"100%\");\n rm.style(\"height\", \"100%\");\n rm.openEnd();\n\n const content = control.getAggregation(\"_content\") as Control;\n if (content) {\n rm.renderControl(content);\n }\n\n rm.close(\"div\");\n }\n };\n\n /**\n * Internal reference to the generated inner host instance.\n * @private\n */\n private _innerHost: GeneratorHost | null = null;\n \n /**\n * Flag indicating if the inner host has been initialized.\n * @private\n */\n private _initializedInner: boolean = false;\n\n /**\n * Initializes the OData Delegate if an OData context is detected.\n * This allows DynamicHost to seamlessly synchronize metadata and properties from an OData model.\n * @private\n */\n private initODataDelegate(): void {\n if (!this.odataDelegate) {\n const oContext = this.getBindingContext(\"odata\") || this.getBindingContext();\n if (oContext) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context found for delegate initialization: ${oContext.getPath()}`, \"DynamicHost\");\n if (typeof (oContext as any).requestObject === \"function\" || typeof (oContext as any).getObject === \"function\") {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context supports requestObject/getObject. Instantiating ODataDelegate.`, \"DynamicHost\");\n this.odataDelegate = new ODataDelegate(this, oContext as any);\n this.odataDelegate.syncToEngine();\n } else {\n Logger.debug(\"[MetaUI DynamicHost]\", `Context does NOT support requestObject/getObject! Keys: ${Object.keys(oContext)}`, \"DynamicHost\");\n }\n }\n }\n }\n\n /**\n * Standard UI5 method override.\n * Sets the binding context for the control and attempts to initialize the OData delegate\n * if the context points to an OData model.\n * \n * @param {sap.ui.model.Context | null | undefined} oContext The binding context object\n * @param {string} [sModelName] Optional model name\n * @returns {this} The control instance for chaining\n */\n public setBindingContext(oContext: sap.ui.model.Context | null | undefined, sModelName?: string): this {\n super.setBindingContext(oContext, sModelName);\n this.initODataDelegate();\n return this;\n }\n\n /**\n * Standard UI5 method override.\n * Binds the element to the given path and attaches a change listener to re-evaluate\n * the OData delegate when the element binding resolves.\n * \n * @param {string | any} vPath The binding path or configuration object\n * @param {object} [mParameters] Optional binding parameters\n * @returns {this} The control instance for chaining\n */\n public bindElement(vPath: string | any, mParameters?: object): this {\n super.bindElement(vPath, mParameters);\n const sModelName = typeof vPath === \"object\" ? vPath.model : undefined;\n const oBinding = this.getElementBinding(sModelName);\n if (oBinding) {\n oBinding.attachChange(() => {\n this.initODataDelegate();\n });\n }\n return this;\n }\n\n /**\n * Standard UI5 Lifecycle Hook.\n * Evaluates the initial properties and spawns the GeneratorHost.\n * It handles the complex lifecycle task of copying all bindings, raw properties, and event listeners \n * down to the inner host perfectly transparently.\n */\n public onBeforeRendering(): void {\n Logger.debug(\"[MetaUI DynamicHost]\", `onBeforeRendering called. _initializedInner: ${this._initializedInner}`, \"DynamicHost\");\n\n this.initODataDelegate();\n\n if (!this._initializedInner) {\n const schema = this.getProperty(\"schemaDefinition\");\n const dataJson = this.getProperty(\"dataJson\");\n const data = this.getProperty(\"data\");\n\n const hasSchema = !!schema;\n const hasData = !!dataJson || !!data;\n\n Logger.debug(\"[MetaUI DynamicHost]\", `Evaluating boot. hasSchema: ${hasSchema}, hasData: ${hasData}`, \"DynamicHost\");\n\n // Only boot if we have either a schema or some data to infer from\n if (hasSchema || hasData) {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Booting inner host. hasSchema: ${hasSchema}, hasData: ${hasData}`, \"DynamicHost\");\n }\n // The architectural Facade router logic:\n // We've simplified this! We no longer use HostFactory or separate subclasses.\n // GeneratorHost is fully capable of inferring the schema if none is provided.\n this._innerHost = new GeneratorHost();\n\n // 1. Forward all static values to the spawned host BEFORE mounting.\n // Since we no longer use bindProperty, it's perfectly safe to set raw properties before mounting.\n const props = this.getMetadata().getProperties();\n for (const propName in props) {\n const val = super.getProperty(propName);\n if (val !== null && val !== undefined) {\n this._innerHost.setProperty(propName, val);\n }\n }\n\n // 2. Mount so it inherits models and triggers lifecycle.\n this.setAggregation(\"_content\", this._innerHost);\n\n // 3. Forward all event subscriptions.\n // By proxying the events upwards, the developer can subscribe to `<meta:DynamicHost submit=\"...\">` \n // and perfectly receive the inner host's submission event.\n const events = this.getMetadata().getEvents();\n for (const eventName in events) {\n this._innerHost.attachEvent(eventName, (oEvent: any) => {\n // Natively push updated payload out to any bound Fiori Element properties.\n // Using super.setProperty prevents an infinite loop back down to _innerHost.\n if (eventName === \"submit\" || eventName === \"fieldChange\") {\n const params = oEvent.getParameters();\n if (params.payload) {\n super.setProperty(\"data\", params.payload, true);\n\n const str = params.payloadJson || JSON.stringify(params.payload, null, 2);\n super.setProperty(\"dataJson\", str, true);\n }\n if (eventName === \"fieldChange\" && this.odataDelegate) {\n this.odataDelegate.handleFieldChange(params.fieldPath, params.value);\n }\n }\n this.fireEvent(eventName, oEvent.getParameters());\n });\n }\n\n this._initializedInner = true;\n }\n }\n }\n\n /**\n * Overrides standard UI5 setProperty to act as a transparent proxy.\n * When a property is updated on the wrapper (either programmatically or via a binding update),\n * it instantly mirrors that value down to the inner instantiated host.\n */\n public setProperty(propertyName: string, value: unknown, suppressInvalidate?: boolean): this {\n if (propertyName === \"data\" || propertyName === \"dataJson\" || propertyName === \"schemaDefinition\") {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `Wrapper received setProperty: ${propertyName}`, \"DynamicHost\");\n }\n }\n super.setProperty(propertyName, value, suppressInvalidate);\n if (this._innerHost) {\n this._innerHost.setProperty(propertyName, value, suppressInvalidate);\n } else if (propertyName === \"data\" || propertyName === \"dataJson\" || propertyName === \"schemaDefinition\") {\n if (this.getProperty(\"debugMode\")) {\n Logger.debug(\"[MetaUI DynamicHost]\", `_innerHost not yet initialized when ${propertyName} was set. Booting will happen on next render.`, \"DynamicHost\");\n }\n }\n return this;\n }\n\n\n\n\n\n /**\n * Programmatic API support. Routes dialog commands down to the spawned inner host.\n * If the inner host has not booted yet, it forces initialization immediately.\n * \n * @param {string} [title=\"Form\"] The title of the dialog\n * @param {string} [submitButtonText=\"OK\"] The text for the primary action button\n * @param {string} [cancelButtonText=\"Cancel\"] The text for the cancel button\n */\n public openInDialog(title?: string, submitButtonText?: string, cancelButtonText?: string): void {\n if (!this._innerHost) {\n this.onBeforeRendering(); // Force init if they bypassed UI5 rendering\n }\n this._innerHost?.openInDialog(title, submitButtonText, cancelButtonText);\n }\n\n /**\n * Proxies submission triggering down to the instantiated generator host.\n * Evaluates the internal Engine validation suite and returns true if structurally sound.\n * \n * @returns {boolean} True if the internal payload passes schema validation, false otherwise.\n */\n public triggerSubmit(): boolean {\n if (!this._innerHost) {\n return false;\n }\n return (this._innerHost as any).triggerSubmit();\n }\n\n /**\n * Overrides standard UI5 getProperty to transparently pull extracted data from the inner host.\n * Ensures that querying the DynamicHost facade for `data` always yields the freshest payload.\n * \n * @param {string} propertyName The name of the property to retrieve\n * @returns {any} The property value\n */\n public getProperty(propertyName: string): any {\n if (this._innerHost && (propertyName === \"data\" || propertyName === \"dataJson\")) {\n return this._innerHost.getProperty(propertyName);\n }\n return super.getProperty(propertyName);\n }\n}\n"],"mappings":"sOAEOA,EAAaC,EAAAC,GAAA,MACXC,EAAMC,EAAA,gBACNC,EAAaC,EAAA,iBAEtB,MASqBC,EAAoBC,EAAOC,OAAA,mDAAAC,YAAA,SAAAA,IAAAF,EAAAG,UAAAD,YAAAE,MAAAC,KAAAC,WAAAD,KACpCE,WAAmC,KAAIF,KACvCG,cAAsC,KAAIH,KAC1CI,kBAA6B,MA+DrCJ,KAIQE,WAAmC,KAE3CF,KAIQI,kBAA6B,KAAK,EA3BnCC,SAAW,CACdC,WAAY,EACZC,OAAOC,EAAmBC,GACtBD,EAAGE,UAAU,MAAOD,GACpBD,EAAGG,MAAM,QAAS,QAClBH,EAAGG,MAAM,SAAU,QACnBH,EAAGI,UAEH,MAAMC,EAAUJ,EAAQK,eAAe,YACvC,GAAID,EAAS,CACTL,EAAGO,cAAcF,EACrB,CAEAL,EAAGQ,MAAM,MACb,GA1DYC,SAAW,CACvBC,WAAY,CACRC,iBAAkB,CAAEC,KAAM,MAAOC,aAAc,MAC/CC,KAAM,CAAEF,KAAM,SAAUC,aAAc,KAAME,SAAU,YACtDC,SAAU,CAAEJ,KAAM,S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AC,IAChB,IAAK/G,KAAKE,WAAY,CAClB,OAAO,KACX,CACA,OAAQF,KAAKE,WAAmB4G,eACpC,EASO/B,YAAW,SAAAiC,EAACT,GACf,GAAIvG,KAAKE,aAAeqG,IAAiB,QAAUA,IAAiB,YAAa,CAC7E,OAAOvG,KAAKE,WAAW6E,YAAYwB,EACvC,CACA,OAAAhB,6BAAAvF,KAAyBuG,EAC7B,IAAC,OAlRgB7G,CAAW","ignoreList":[]}
@@ -28,7 +28,7 @@ export default class DynamicHost extends Control {
28
28
  useMessageManager: { type: "boolean", defaultValue: false },
29
29
  modelName: { type: "string", defaultValue: "meta" },
30
30
  debugMode: { type: "boolean", defaultValue: false },
31
- displayMode: { type: "boolean", defaultValue: false }
31
+ editable: { type: "boolean", defaultValue: true }
32
32
  },
33
33
  aggregations: {
34
34
  _content: { type: "sap.ui.core.Control", multiple: false, visibility: "hidden" }
@@ -79,14 +79,22 @@ export default class DynamicHost extends Control {
79
79
  }
80
80
  };
81
81
 
82
+ /**
83
+ * Internal reference to the generated inner host instance.
84
+ * @private
85
+ */
82
86
  private _innerHost: GeneratorHost | null = null;
87
+
88
+ /**
89
+ * Flag indicating if the inner host has been initialized.
90
+ * @private
91
+ */
83
92
  private _initializedInner: boolean = false;
84
93
 
85
94
  /**
86
- * Standard UI5 Lifecycle Hook.
87
- * Evaluates the initial properties and spawns the appropriate inner host strategy via the HostFactory.
88
- * It handles the complex lifecycle task of copying all bindings, raw properties, and event listeners
89
- * down to the inner host perfectly transparently.
95
+ * Initializes the OData Delegate if an OData context is detected.
96
+ * This allows DynamicHost to seamlessly synchronize metadata and properties from an OData model.
97
+ * @private
90
98
  */
91
99
  private initODataDelegate(): void {
92
100
  if (!this.odataDelegate) {
@@ -104,12 +112,30 @@ export default class DynamicHost extends Control {
104
112
  }
105
113
  }
106
114
 
115
+ /**
116
+ * Standard UI5 method override.
117
+ * Sets the binding context for the control and attempts to initialize the OData delegate
118
+ * if the context points to an OData model.
119
+ *
120
+ * @param {sap.ui.model.Context | null | undefined} oContext The binding context object
121
+ * @param {string} [sModelName] Optional model name
122
+ * @returns {this} The control instance for chaining
123
+ */
107
124
  public setBindingContext(oContext: sap.ui.model.Context | null | undefined, sModelName?: string): this {
108
125
  super.setBindingContext(oContext, sModelName);
109
126
  this.initODataDelegate();
110
127
  return this;
111
128
  }
112
129
 
130
+ /**
131
+ * Standard UI5 method override.
132
+ * Binds the element to the given path and attaches a change listener to re-evaluate
133
+ * the OData delegate when the element binding resolves.
134
+ *
135
+ * @param {string | any} vPath The binding path or configuration object
136
+ * @param {object} [mParameters] Optional binding parameters
137
+ * @returns {this} The control instance for chaining
138
+ */
113
139
  public bindElement(vPath: string | any, mParameters?: object): this {
114
140
  super.bindElement(vPath, mParameters);
115
141
  const sModelName = typeof vPath === "object" ? vPath.model : undefined;
@@ -122,6 +148,12 @@ export default class DynamicHost extends Control {
122
148
  return this;
123
149
  }
124
150
 
151
+ /**
152
+ * Standard UI5 Lifecycle Hook.
153
+ * Evaluates the initial properties and spawns the GeneratorHost.
154
+ * It handles the complex lifecycle task of copying all bindings, raw properties, and event listeners
155
+ * down to the inner host perfectly transparently.
156
+ */
125
157
  public onBeforeRendering(): void {
126
158
  Logger.debug("[MetaUI DynamicHost]", `onBeforeRendering called. _initializedInner: ${this._initializedInner}`, "DynamicHost");
127
159
 
@@ -217,6 +249,11 @@ export default class DynamicHost extends Control {
217
249
 
218
250
  /**
219
251
  * Programmatic API support. Routes dialog commands down to the spawned inner host.
252
+ * If the inner host has not booted yet, it forces initialization immediately.
253
+ *
254
+ * @param {string} [title="Form"] The title of the dialog
255
+ * @param {string} [submitButtonText="OK"] The text for the primary action button
256
+ * @param {string} [cancelButtonText="Cancel"] The text for the cancel button
220
257
  */
221
258
  public openInDialog(title?: string, submitButtonText?: string, cancelButtonText?: string): void {
222
259
  if (!this._innerHost) {
@@ -227,6 +264,9 @@ export default class DynamicHost extends Control {
227
264
 
228
265
  /**
229
266
  * Proxies submission triggering down to the instantiated generator host.
267
+ * Evaluates the internal Engine validation suite and returns true if structurally sound.
268
+ *
269
+ * @returns {boolean} True if the internal payload passes schema validation, false otherwise.
230
270
  */
231
271
  public triggerSubmit(): boolean {
232
272
  if (!this._innerHost) {
@@ -237,6 +277,10 @@ export default class DynamicHost extends Control {
237
277
 
238
278
  /**
239
279
  * Overrides standard UI5 getProperty to transparently pull extracted data from the inner host.
280
+ * Ensures that querying the DynamicHost facade for `data` always yields the freshest payload.
281
+ *
282
+ * @param {string} propertyName The name of the property to retrieve
283
+ * @returns {any} The property value
240
284
  */
241
285
  public getProperty(propertyName: string): any {
242
286
  if (this._innerHost && (propertyName === "data" || propertyName === "dataJson")) {
@@ -4,6 +4,23 @@ sap.ui.define(["./BaseHardwareControl", "./BaseHardwareControlRenderer", "sap/m/
4
4
  function _interopRequireDefault(obj) {
5
5
  return obj && obj.__esModule && typeof obj.default !== "undefined" ? obj.default : obj;
6
6
  }
7
+ function __ui5_require_async(path) {
8
+ return new Promise(function (resolve, reject) {
9
+ sap.ui.require([path], function (module) {
10
+ if (!(module && module.__esModule)) {
11
+ module = module === null || !(typeof module === "object" && path.endsWith("/library")) ? {
12
+ default: module
13
+ } : module;
14
+ Object.defineProperty(module, "__esModule", {
15
+ value: true
16
+ });
17
+ }
18
+ resolve(module);
19
+ }, function (err) {
20
+ reject(err);
21
+ });
22
+ });
23
+ }
7
24
  /**
8
25
  * @file GeolocationControl.ts
9
26
  * @description Native UI5 Control for GPS capture.
@@ -23,6 +40,10 @@ sap.ui.define(["./BaseHardwareControl", "./BaseHardwareControlRenderer", "sap/m/
23
40
  }
24
41
  }
25
42
  };
43
+
44
+ /**
45
+ * Initializes the control and builds the internal UI components.
46
+ */
26
47
  init() {
27
48
  super.init();
28
49
  this.locationBtn = new Button({
@@ -39,6 +60,11 @@ sap.ui.define(["./BaseHardwareControl", "./BaseHardwareControlRenderer", "sap/m/
39
60
  });
40
61
  this.setAggregation("_content", this.vBox);
41
62
  }
63
+
64
+ /**
65
+ * Lifecycle hook called before the control is rendered to the DOM.
66
+ * Updates button state and sets any existing values.
67
+ */
42
68
  onBeforeRendering() {
43
69
  const metadata = this.getProperty("schemaMetadata");
44
70
  if (metadata && metadata.ui && metadata.ui.label) {
@@ -63,7 +89,12 @@ sap.ui.define(["./BaseHardwareControl", "./BaseHardwareControlRenderer", "sap/m/
63
89
  this.resultInput.setVisible(true);
64
90
  this.setValueAndFire(locStr);
65
91
  MessageToast.show("Location acquired.");
66
- }, () => {
92
+ }, error => {
93
+ __ui5_require_async("../utils/Logger").then(({
94
+ Logger
95
+ }) => {
96
+ Logger.error("[MetaUI] Geolocation failed or denied", error.message, "GeolocationControl");
97
+ });
67
98
  MessageToast.show("Unable to retrieve your location");
68
99
  });
69
100
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GeolocationControl-dbg.js","names":["BaseHardwareControl","_interopRequireDefault","__BaseHardwareControl","BaseHardwareControlRenderer","__BaseHardwareControlRenderer","GeolocationControl","renderer","metadata","aggregations","_content","type","multiple","visibility","init","locationBtn","Button","icon","text","press","getLocation","bind","resultInput","Input","editable","visible","vBox","VBox","items","setAggregation","onBeforeRendering","getProperty","ui","label","setText","readOnly","setEnabled","currentVal","setValue","setVisible","navigator","geolocation","MessageToast","show","getCurrentPosition","position","locStr","coords","latitude","longitude","setValueAndFire"],"sources":["GeolocationControl.ts"],"sourcesContent":["/**\n * @file GeolocationControl.ts\n * @description Native UI5 Control for GPS capture.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nimport BaseHardwareControl from \"./BaseHardwareControl\";\nimport BaseHardwareControlRenderer from \"./BaseHardwareControlRenderer\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport Button from \"sap/m/Button\";\nimport Input from \"sap/m/Input\";\nimport VBox from \"sap/m/VBox\";\nimport MessageToast from \"sap/m/MessageToast\";\n\nexport default class GeolocationControl extends BaseHardwareControl {\n private vBox: VBox;\n private locationBtn: Button;\n private resultInput: Input;\n\n static readonly renderer = BaseHardwareControlRenderer;\n\n static readonly metadata = {\n aggregations: {\n _content: { type: \"sap.m.VBox\", multiple: false, visibility: \"hidden\" }\n }\n };\n\n public init(): void {\n super.init();\n\n this.locationBtn = new Button({\n icon: \"sap-icon://map\",\n text: \"Get Location\",\n press: this.getLocation.bind(this)\n });\n\n this.resultInput = new Input({\n editable: false,\n visible: false\n });\n\n this.vBox = new VBox({\n items: [this.locationBtn, this.resultInput]\n });\n\n this.setAggregation(\"_content\", this.vBox);\n }\n\n public onBeforeRendering(): void {\n const metadata = this.getProperty(\"schemaMetadata\");\n if (metadata && metadata.ui && metadata.ui.label) {\n this.locationBtn.setText(metadata.ui.label);\n }\n\n const readOnly = this.getProperty(\"readOnly\");\n this.locationBtn.setEnabled(!readOnly);\n\n const currentVal = this.getProperty(\"value\");\n if (currentVal) {\n this.resultInput.setValue(currentVal as string);\n this.resultInput.setVisible(true);\n }\n }\n\n private getLocation(): void {\n if (!navigator.geolocation) {\n MessageToast.show(\"Geolocation is not supported by your browser\");\n return;\n }\n\n navigator.geolocation.getCurrentPosition(\n (position) => {\n const locStr = `${position.coords.latitude}, ${position.coords.longitude}`;\n this.resultInput.setValue(locStr);\n this.resultInput.setVisible(true);\n this.setValueAndFire(locStr);\n MessageToast.show(\"Location acquired.\");\n },\n () => {\n MessageToast.show(\"Unable to retrieve your location\");\n }\n );\n }\n\n\n}\n"],"mappings":";;;;;;EAAA;AACA;AACA;AACA;AACA;AACA;EALA,MAMOA,mBAAmB,GAAAC,sBAAA,CAAAC,qBAAA;EAAA,MACnBC,2BAA2B,GAAAF,sBAAA,CAAAG,6BAAA;EAOnB,MAAMC,kBAAkB,SAASL,mBAAmB,CAAC;IAKhE,OAAgBM,QAAQ,GAAGH,2BAA2B;IAEtD,OAAgBI,QAAQ,GAAG;MACvBC,YAAY,EAAE;QACVC,QAAQ,EAAE;UAAEC,IAAI,EAAE,YAAY;UAAEC,QAAQ,EAAE,KAAK;UAAEC,UAAU,EAAE;QAAS;MAC1E;IACJ,CAA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IAAI,CAACoB,SAAS,CAACC,WAAW,EAAE;QACxBC,YAAY,CAACC,IAAI,CAAC,8CAA8C,CAAC;QACjE;MACJ;MAEAH,SAAS,CAACC,WAAW,CAACG,kBAAkB,CACnCC,QAAQ,IAAK;QACV,MAAMC,MAAM,GAAG,GAAGD,QAAQ,CAACE,MAAM,CAACC,QAAQ,KAAKH,QAAQ,CAACE,MAAM,CAACE,SAAS,EAAE;QAC1E,IAAI,CAAC3B,WAAW,CAACgB,QAAQ,CAACQ,MAAM,CAAC;QACjC,IAAI,CAACxB,WAAW,CAACiB,UAAU,CAAC,IAAI,CAAC;QACjC,IAAI,CAACW,eAAe,CAACJ,MAAM,CAAC;QAC5BJ,YAAY,CAACC,IAAI,CAAC,oBAAoB,CAAC;MAC3C,CAAC,EACD,MAAM;QACFD,YAAY,CAACC,IAAI,CAAC,kCAAkC,CAAC;MACzD,CACJ,CAAC;IACL;EAGJ;EAAC,OAAArC,kBAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"GeolocationControl-dbg.js","names":["BaseHardwareControl","_interopRequireDefault","__BaseHardwareControl","BaseHardwareControlRenderer","__BaseHardwareControlRenderer","GeolocationControl","renderer","metadata","aggregations","_content","type","multiple","visibility","init","locationBtn","Button","icon","text","press","getLocation","bind","resultInput","Input","editable","visible","vBox","VBox","items","setAggregation","onBeforeRendering","getProperty","ui","label","setText","readOnly","setEnabled","currentVal","setValue","setVisible","navigator","geolocation","MessageToast","show","getCurrentPosition","position","locStr","coords","latitude","longitude","setValueAndFire","error","__ui5_require_async","then","Logger","message"],"sources":["GeolocationControl.ts"],"sourcesContent":["/**\n * @file GeolocationControl.ts\n * @description Native UI5 Control for GPS capture.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nimport BaseHardwareControl from \"./BaseHardwareControl\";\nimport BaseHardwareControlRenderer from \"./BaseHardwareControlRenderer\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport Button from \"sap/m/Button\";\nimport Input from \"sap/m/Input\";\nimport VBox from \"sap/m/VBox\";\nimport MessageToast from \"sap/m/MessageToast\";\n\nexport default class GeolocationControl extends BaseHardwareControl {\n private vBox: VBox;\n private locationBtn: Button;\n private resultInput: Input;\n\n static readonly renderer = BaseHardwareControlRenderer;\n\n static readonly metadata = {\n aggregations: {\n _content: { type: \"sap.m.VBox\", multiple: false, visibility: \"hidden\" }\n }\n };\n\n /**\n * Initializes the control and builds the internal UI components.\n */\n public init(): void {\n super.init();\n\n this.locationBtn = new Button({\n icon: \"sap-icon://map\",\n text: \"Get Location\",\n press: this.getLocation.bind(this)\n });\n\n this.resultInput = new Input({\n editable: false,\n visible: false\n });\n\n this.vBox = new VBox({\n items: [this.locationBtn, this.resultInput]\n });\n\n this.setAggregation(\"_content\", this.vBox);\n }\n\n /**\n * Lifecycle hook called before the control is rendered to the DOM.\n * Updates button state and sets any existing values.\n */\n public onBeforeRendering(): void {\n const metadata = this.getProperty(\"schemaMetadata\");\n if (metadata && metadata.ui && metadata.ui.label) {\n this.locationBtn.setText(metadata.ui.label);\n }\n\n const readOnly = this.getProperty(\"readOnly\");\n this.locationBtn.setEnabled(!readOnly);\n\n const currentVal = this.getProperty(\"value\");\n if (currentVal) {\n this.resultInput.setValue(currentVal as string);\n this.resultInput.setVisible(true);\n }\n }\n\n private getLocation(): void {\n if (!navigator.geolocation) {\n MessageToast.show(\"Geolocation is not supported by your browser\");\n return;\n }\n\n navigator.geolocation.getCurrentPosition(\n (position) => {\n const locStr = `${position.coords.latitude}, ${position.coords.longitude}`;\n this.resultInput.setValue(locStr);\n this.resultInput.setVisible(true);\n this.setValueAndFire(locStr);\n MessageToast.show(\"Location acquired.\");\n },\n (error) => {\n import(\"../utils/Logger\").then(({ Logger }) => {\n Logger.error(\"[MetaUI] Geolocation failed or denied\", error.message, \"GeolocationControl\");\n });\n MessageToast.show(\"Unable to retrieve your location\");\n }\n );\n }\n\n\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAAA;AACA;AACA;A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liconst/ui5/metaui/controls/GeolocationControl" {
24
24
  };
25
25
  };
26
26
  };
27
+ /**
28
+ * Initializes the control and builds the internal UI components.
29
+ */
27
30
  init(): void;
31
+ /**
32
+ * Lifecycle hook called before the control is rendered to the DOM.
33
+ * Updates button state and sets any existing values.
34
+ */
28
35
  onBeforeRendering(): void;
29
36
  private getLocation;
30
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GeolocationControl.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,wDAAwD,CAAC;IACxE;;;;;OAKG;IACH,OAAO,mBAAmB,MAAM,yDAAyD,CAAC;IAE1F,OAAO,aAAa,MAAM,2BAA2B,CAAC;IAMtD,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,mBAAmB;QAC/D,OAAO,CAAC,IAAI,CAAO;QACnB,OAAO,CAAC,WAAW,CAAS;QAC5B,OAAO,CAAC,WAAW,CAAQ;QAE3B,MAAM,CAAC,QAAQ,CAAC,QAAQ;;;UAA+B;QAEvD,MAAM,CAAC,QAAQ,CAAC,QAAQ;;;;;;;;UAItB;QAEK,IAAI,IAAI,IAAI;QAqBZ,iBAAiB,IAAI,IAAI;QAgBhC,OAAO,CAAC,WAAW;KAqBtB;CAEA"}
1
+ {"version":3,"file":"GeolocationControl.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/GeolocationControl.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,wDAAwD,CAAC;IACxE;;;;;OAKG;IACH,OAAO,mBAAmB,MAAM,yDAAyD,CAAC;IAE1F,OAAO,aAAa,MAAM,2BAA2B,CAAC;IAMtD,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,mBAAmB;QAC/D,OAAO,CAAC,IAAI,CAAO;QACnB,OAAO,CAAC,WAAW,CAAS;QAC5B,OAAO,CAAC,WAAW,CAAQ;QAE3B,MAAM,CAAC,QAAQ,CAAC,QAAQ;;;UAA+B;QAEvD,MAAM,CAAC,QAAQ,CAAC,QAAQ;;;;;;;;UAItB;QAEF;;WAEG;QACI,IAAI,IAAI,IAAI;QAqBnB;;;WAGG;QACI,iBAAiB,IAAI,IAAI;QAgBhC,OAAO,CAAC,WAAW;KAwBtB;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["./BaseHardwareControl","./BaseHardwareControlRenderer","sap/m/Button","sap/m/Input","sap/m/VBox","sap/m/MessageToast"],function(t,e,s,i,o,n){"use strict";function a(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const r=a(t);const l=a(e);class u extends r{static renderer=l;static metadata={aggregations:{_content:{type:"sap.m.VBox",multiple:false,visibility:"hidden"}}};init(){super.init();this.locationBtn=new s({icon:"sap-icon://map",text:"Get Location",press:this.getLocation.bind(this)});this.resultInput=new i({editable:false,visible:false});this.vBox=new o({items:[this.locationBtn,this.resultInput]});this.setAggregation("_content",this.vBox)}onBeforeRendering(){const t=this.getProperty("schemaMetadata");if(t&&t.ui&&t.ui.label){this.locationBtn.setText(t.ui.label)}const e=this.getProperty("readOnly");this.locationBtn.setEnabled(!e);const s=this.getProperty("value");if(s){this.resultInput.setValue(s);this.resultInput.setVisible(true)}}getLocation(){if(!navigator.geolocation){n.show("Geolocation is not supported by your browser");return}navigator.geolocation.getCurrentPosition(t=>{const e=`${t.coords.latitude}, ${t.coords.longitude}`;this.resultInput.setValue(e);this.resultInput.setVisible(true);this.setValueAndFire(e);n.show("Location acquired.")},()=>{n.show("Unable to retrieve your location")})}}return u});
1
+ sap.ui.define(["./BaseHardwareControl","./BaseHardwareControlRenderer","sap/m/Button","sap/m/Input","sap/m/VBox","sap/m/MessageToast"],function(t,e,o,i,n,s){"use strict";function a(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}function r(t){return new Promise(function(e,o){sap.ui.require([t],function(o){if(!(o&&o.__esModule)){o=o===null||!(typeof o==="object"&&t.endsWith("/library"))?{default:o}:o;Object.defineProperty(o,"__esModule",{value:true})}e(o)},function(t){o(t)})})}const u=a(t);const l=a(e);class c extends u{static renderer=l;static metadata={aggregations:{_content:{type:"sap.m.VBox",multiple:false,visibility:"hidden"}}};init(){super.init();this.locationBtn=new o({icon:"sap-icon://map",text:"Get Location",press:this.getLocation.bind(this)});this.resultInput=new i({editable:false,visible:false});this.vBox=new n({items:[this.locationBtn,this.resultInput]});this.setAggregation("_content",this.vBox)}onBeforeRendering(){const t=this.getProperty("schemaMetadata");if(t&&t.ui&&t.ui.label){this.locationBtn.setText(t.ui.label)}const e=this.getProperty("readOnly");this.locationBtn.setEnabled(!e);const o=this.getProperty("value");if(o){this.resultInput.setValue(o);this.resultInput.setVisible(true)}}getLocation(){if(!navigator.geolocation){s.show("Geolocation is not supported by your browser");return}navigator.geolocation.getCurrentPosition(t=>{const e=`${t.coords.latitude}, ${t.coords.longitude}`;this.resultInput.setValue(e);this.resultInput.setVisible(true);this.setValueAndFire(e);s.show("Location acquired.")},t=>{r("../utils/Logger").then(({Logger:e})=>{e.error("[MetaUI] Geolocation failed or denied",t.message,"GeolocationControl")});s.show("Unable to retrieve your location")})}}return c});
2
2
  //# sourceMappingURL=GeolocationControl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GeolocationControl.js","names":["BaseHardwareControl","_interopRequireDefault","__BaseHardwareControl","BaseHardwareControlRenderer","__BaseHardwareControlRenderer","GeolocationControl","static","aggregations","_content","type","multiple","visibility","init","super","this","locationBtn","Button","icon","text","press","getLocation","bind","resultInput","Input","editable","visible","vBox","VBox","items","setAggregation","onBeforeRendering","metadata","getProperty","ui","label","setText","readOnly","setEnabled","currentVal","setValue","setVisible","navigator","geolocation","MessageToast","show","getCurrentPosition","position","locStr","coords","latitude","longitude","setValueAndFire"],"sources":["GeolocationControl.ts"],"sourcesContent":["/**\n * @file GeolocationControl.ts\n * @description Native UI5 Control for GPS capture.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nimport BaseHardwareControl from \"./BaseHardwareControl\";\nimport BaseHardwareControlRenderer from \"./BaseHardwareControlRenderer\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport Button from \"sap/m/Button\";\nimport Input from \"sap/m/Input\";\nimport VBox from \"sap/m/VBox\";\nimport MessageToast from \"sap/m/MessageToast\";\n\nexport default class GeolocationControl extends BaseHardwareControl {\n private vBox: VBox;\n private locationBtn: Button;\n private resultInput: Input;\n\n static readonly renderer = BaseHardwareControlRenderer;\n\n static readonly metadata = {\n aggregations: {\n _content: { type: \"sap.m.VBox\", multiple: false, visibility: \"hidden\" }\n }\n };\n\n public init(): void {\n super.init();\n\n this.locationBtn = new Button({\n icon: \"sap-icon://map\",\n text: \"Get Location\",\n press: this.getLocation.bind(this)\n });\n\n this.resultInput = new Input({\n editable: false,\n visible: false\n });\n\n this.vBox = new VBox({\n items: [this.locationBtn, this.resultInput]\n });\n\n this.setAggregation(\"_content\", this.vBox);\n }\n\n public onBeforeRendering(): void {\n const metadata = this.getProperty(\"schemaMetadata\");\n if (metadata && metadata.ui && metadata.ui.label) {\n this.locationBtn.setText(metadata.ui.label);\n }\n\n const readOnly = this.getProperty(\"readOnly\");\n this.locationBtn.setEnabled(!readOnly);\n\n const currentVal = this.getProperty(\"value\");\n if (currentVal) {\n this.resultInput.setValue(currentVal as string);\n this.resultInput.setVisible(true);\n }\n }\n\n private getLocation(): void {\n if (!navigator.geolocation) {\n MessageToast.show(\"Geolocation is not supported by your browser\");\n return;\n }\n\n navigator.geolocation.getCurrentPosition(\n (position) => {\n const locStr = `${position.coords.latitude}, ${position.coords.longitude}`;\n this.resultInput.setValue(locStr);\n this.resultInput.setVisible(true);\n this.setValueAndFire(locStr);\n MessageToast.show(\"Location acquired.\");\n },\n () => {\n MessageToast.show(\"Unable to retrieve your location\");\n }\n );\n }\n\n\n}\n"],"mappings":"2PAAA,MAMOA,EAAmBC,EAAAC,GAAA,MACnBC,EAA2BF,EAAAG,GAOnB,MAAMC,UAA2BL,EAK5CM,gBAA2BH,EAE3BG,gBAA2B,CACvBC,aAAc,CACVC,SAAU,CAAEC,KAAM,aAAcC,SAAU,MAAOC,WAAY,YAI9DC,OACHC,MAAMD,OAENE,KAAKC,YAAc,IAAIC,EAAO,CAC1BC,KAAM,iBACNC,KAAM,eACNC,MAAOL,KAAKM,YAAYC,KAAKP,QAGjCA,KAAKQ,YAAc,IAAIC,EAAM,CACzBC,SAAU,MACVC,QAAS,QAGbX,KAAKY,KAAO,IAAIC,EAAK,CACjBC,MAAO,CAACd,KAAKC,YAAaD,KAAKQ,eAGnCR,KAAKe,eAAe,WAAYf,KAAKY,KACzC,CAEOI,oBACH,MAAMC,EAAWjB,KAAKkB,YAAY,kBAClC,GAAID,GAAYA,EAASE,IAAMF,EAASE,GAAGC,MAAO,CAC9CpB,KAAKC,YAAYoB,QAAQJ,EAASE,GAAGC,MACzC,CAEA,MAAME,EAAWtB,KAAKkB,YAAY,YAClClB,KAAKC,YAAYsB,YAAYD,GAE7B,MAAME,EAAaxB,KAAKkB,YAAY,SACpC,GAAIM,EAAY,CACZxB,KAAKQ,YAAYiB,SAASD,GAC1BxB,KAAKQ,YAAYkB,WAAW,KAChC,CACJ,CAEQpB,cACJ,IAAKqB,UAAUC,YAAa,CACxBC,EAAaC,KAAK,gDAClB,MACJ,CAEAH,UAAUC,YAAYG,mBACjBC,IACG,MAAMC,EAAS,GAAGD,EAASE,OAAOC,aAAaH,EAASE,OAAOE,YAC/DpC,KAAKQ,YAAYiB,SAASQ,GAC1BjC,KAAKQ,YAAYkB,WAAW,MAC5B1B,KAAKqC,gBAAgBJ,GACrBJ,EAAaC,KAAK,uBAEtB,KACID,EAAaC,KAAK,qCAG9B,EAGH,OAAAvC,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"GeolocationControl.js","names":["BaseHardwareControl","_interopRequireDefault","__BaseHardwareControl","BaseHardwareControlRenderer","__BaseHardwareControlRenderer","GeolocationControl","static","aggregations","_content","type","multiple","visibility","init","super","this","locationBtn","Button","icon","text","press","getLocation","bind","resultInput","Input","editable","visible","vBox","VBox","items","setAggregation","onBeforeRendering","metadata","getProperty","ui","label","setText","readOnly","setEnabled","currentVal","setValue","setVisible","navigator","geolocation","MessageToast","show","getCurrentPosition","position","locStr","coords","latitude","longitude","setValueAndFire","error","__ui5_require_async","then","Logger","message"],"sources":["GeolocationControl.ts"],"sourcesContent":["/**\n * @file GeolocationControl.ts\n * @description Native UI5 Control for GPS capture.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nimport BaseHardwareControl from \"./BaseHardwareControl\";\nimport BaseHardwareControlRenderer from \"./BaseHardwareControlRenderer\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport Button from \"sap/m/Button\";\nimport Input from \"sap/m/Input\";\nimport VBox from \"sap/m/VBox\";\nimport MessageToast from \"sap/m/MessageToast\";\n\nexport default class GeolocationControl extends BaseHardwareControl {\n private vBox: VBox;\n private locationBtn: Button;\n private resultInput: Input;\n\n static readonly renderer = BaseHardwareControlRenderer;\n\n static readonly metadata = {\n aggregations: {\n _content: { type: \"sap.m.VBox\", multiple: false, visibility: \"hidden\" }\n }\n };\n\n /**\n * Initializes the control and builds the internal UI components.\n */\n public init(): void {\n super.init();\n\n this.locationBtn = new Button({\n icon: \"sap-icon://map\",\n text: \"Get Location\",\n press: this.getLocation.bind(this)\n });\n\n this.resultInput = new Input({\n editable: false,\n visible: false\n });\n\n this.vBox = new VBox({\n items: [this.locationBtn, this.resultInput]\n });\n\n this.setAggregation(\"_content\", this.vBox);\n }\n\n /**\n * Lifecycle hook called before the control is rendered to the DOM.\n * Updates button state and sets any existing values.\n */\n public onBeforeRendering(): void {\n const metadata = this.getProperty(\"schemaMetadata\");\n if (metadata && metadata.ui && metadata.ui.label) {\n this.locationBtn.setText(metadata.ui.label);\n }\n\n const readOnly = this.getProperty(\"readOnly\");\n this.locationBtn.setEnabled(!readOnly);\n\n const currentVal = this.getProperty(\"value\");\n if (currentVal) {\n this.resultInput.setValue(currentVal as string);\n this.resultInput.setVisible(true);\n }\n }\n\n private getLocation(): void {\n if (!navigator.geolocation) {\n MessageToast.show(\"Geolocation is not supported by your browser\");\n return;\n }\n\n navigator.geolocation.getCurrentPosition(\n (position) => {\n const locStr = `${position.coords.latitude}, ${position.coords.longitude}`;\n this.resultInput.setValue(locStr);\n this.resultInput.setVisible(true);\n this.setValueAndFire(locStr);\n MessageToast.show(\"Location acquired.\");\n },\n (error) => {\n import(\"../utils/Logger\").then(({ Logger }) => {\n Logger.error(\"[MetaUI] Geolocation failed or denied\", error.message, \"GeolocationControl\");\n });\n MessageToast.show(\"Unable to retrieve your location\");\n }\n );\n }\n\n\n}\n"],"mappings":"ufAAA,MAMOA,EAAmBC,EAAAC,GAAA,MACnBC,EAA2BF,EAAAG,GAOnB,MAAMC,UAA2BL,EAK5CM,gBAA2BH,EAE3BG,gBAA2B,CACvBC,aAAc,CACVC,SAAU,CAAEC,KAAM,aAAcC,SAAU,MAAOC,WAAY,YAO9DC,OACHC,MAAMD,OAENE,KAAKC,YAAc,IAAIC,EAAO,CAC1BC,KAAM,iBACNC,KAAM,eACNC,MAAOL,KAAKM,YAAYC,KAAKP,QAGjCA,KAAKQ,YAAc,IAAIC,EAAM,CACzBC,SAAU,MACVC,QAAS,QAGbX,KAAKY,KAAO,IAAIC,EAAK,CACjBC,MAAO,CAACd,KAAKC,YAAaD,KAAKQ,eAGnCR,KAAKe,eAAe,WAAYf,KAAKY,KACzC,CAMOI,oBACH,MAAMC,EAAWjB,KAAKkB,YAAY,kBAClC,GAAID,GAAYA,EAASE,IAAMF,EAASE,GAAGC,MAAO,CAC9CpB,KAAKC,YAAYoB,QAAQJ,EAASE,GAAGC,MACzC,CAEA,MAAME,EAAWtB,KAAKkB,YAAY,YAClClB,KAAKC,YAAYsB,YAAYD,GAE7B,MAAME,EAAaxB,KAAKkB,YAAY,SACpC,GAAIM,EAAY,CACZxB,KAAKQ,YAAYiB,SAASD,GAC1BxB,KAAKQ,YAAYkB,WAAW,KAChC,CACJ,CAEQpB,cACJ,IAAKqB,UAAUC,YAAa,CACxBC,EAAaC,KAAK,gDAClB,MACJ,CAEAH,UAAUC,YAAYG,mBACjBC,IACG,MAAMC,EAAS,GAAGD,EAASE,OAAOC,aAAaH,EAASE,OAAOE,YAC/DpC,KAAKQ,YAAYiB,SAASQ,GAC1BjC,KAAKQ,YAAYkB,WAAW,MAC5B1B,KAAKqC,gBAAgBJ,GACrBJ,EAAaC,KAAK,uBAErBQ,IACGC,EAAO,mBAAmBC,KAAK,EAAGC,aAC9BA,EAAOH,MAAM,wCAAyCA,EAAMI,QAAS,wBAEzEb,EAAaC,KAAK,qCAG9B,EAGH,OAAAvC,CAAA","ignoreList":[]}
@@ -25,6 +25,9 @@ export default class GeolocationControl extends BaseHardwareControl {
25
25
  }
26
26
  };
27
27
 
28
+ /**
29
+ * Initializes the control and builds the internal UI components.
30
+ */
28
31
  public init(): void {
29
32
  super.init();
30
33
 
@@ -46,6 +49,10 @@ export default class GeolocationControl extends BaseHardwareControl {
46
49
  this.setAggregation("_content", this.vBox);
47
50
  }
48
51
 
52
+ /**
53
+ * Lifecycle hook called before the control is rendered to the DOM.
54
+ * Updates button state and sets any existing values.
55
+ */
49
56
  public onBeforeRendering(): void {
50
57
  const metadata = this.getProperty("schemaMetadata");
51
58
  if (metadata && metadata.ui && metadata.ui.label) {
@@ -76,7 +83,10 @@ export default class GeolocationControl extends BaseHardwareControl {
76
83
  this.setValueAndFire(locStr);
77
84
  MessageToast.show("Location acquired.");
78
85
  },
79
- () => {
86
+ (error) => {
87
+ import("../utils/Logger").then(({ Logger }) => {
88
+ Logger.error("[MetaUI] Geolocation failed or denied", error.message, "GeolocationControl");
89
+ });
80
90
  MessageToast.show("Unable to retrieve your location");
81
91
  }
82
92
  );
@@ -53,6 +53,26 @@ sap.ui.define(["./BaseHardwareControl", "./BaseHardwareControlRenderer", "sap/m/
53
53
  this.richTextEditor.setValue(currentVal);
54
54
  }
55
55
  }
56
+ },
57
+ /**
58
+ * Overrides the default property setter to prevent full DOM invalidation.
59
+ * When dataJson pushes updates down to the UI5 models, UI5 typically destroys
60
+ * and recreates the custom control if the property changes.
61
+ * By suppressing re-rendering (true flag) and manually passing the value
62
+ * to the inner RichTextEditor, we prevent TinyMCE from tearing down its iframe
63
+ * and triggering expensive, redundant plugin boot sequences.
64
+ *
65
+ * @param {any} val The new string value to bind
66
+ * @returns {this} The control instance for chaining
67
+ */
68
+ setValue: function _setValue(val) {
69
+ this.setProperty("value", val, true); // suppress re-rendering
70
+ if (this.richTextEditor && val !== undefined && val !== null) {
71
+ if (this.richTextEditor.getValue() !== val) {
72
+ this.richTextEditor.setValue(val);
73
+ }
74
+ }
75
+ return this;
56
76
  }
57
77
  });
58
78
  return RichTextControl;
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextControl-dbg.js","names":["BaseHardwareControl","_interopRequireDefault","__BaseHardwareControl","BaseHardwareControlRenderer","__BaseHardwareControlRenderer","RichTextControl","extend","metadata","properties","events","aggregations","_content","type","multiple","visibility","renderer","init","_init","BaseHardwareControl.prototype.init.call","richTextEditor","RichTextEditor","width","height","showGroupFont","showGroupInsert","tooltip","change","oEvent","val","getParameter","setValueAndFire","vBox","VBox","items","setAggregation","onBeforeRendering","_onBeforeRendering","readOnly","getProperty","setEditable","currentVal","undefined","getValue","setValue"],"sources":["RichTextControl.ts"],"sourcesContent":["import BaseHardwareControl from \"./BaseHardwareControl\";\nimport BaseHardwareControlRenderer from \"./BaseHardwareControlRenderer\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport VBox from \"sap/m/VBox\";\nimport RichTextEditor from \"sap/ui/richtexteditor/RichTextEditor\";\n\n/**\n * @file RichTextControl.ts\n * @description Native UI5 Control for rich text input.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nexport default class RichTextControl extends BaseHardwareControl {\n private vBox!: VBox;\n private richTextEditor!: RichTextEditor;\n\n static readonly renderer = BaseHardwareControlRenderer;\n\n static readonly metadata = {\n properties: {},\n events: {},\n aggregations: {\n _content: { type: \"sap.m.VBox\", multiple: false, visibility: \"hidden\" }\n }\n };\n\n public init(): void {\n super.init();\n\n this.richTextEditor = new RichTextEditor({\n width: \"100%\",\n height: \"300px\",\n showGroupFont: true,\n showGroupInsert: true,\n tooltip: \"Rich Text Editor\",\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"newValue\");\n this.setValueAndFire(val);\n }\n });\n\n this.vBox = new VBox({\n items: [this.richTextEditor]\n });\n\n this.setAggregation(\"_content\", this.vBox);\n }\n\n public onBeforeRendering(): void {\n const readOnly = this.getProperty(\"readOnly\");\n this.richTextEditor.setEditable(!readOnly);\n\n const currentVal = this.getProperty(\"value\");\n if (currentVal !== undefined && currentVal !== null) {\n // Prevent recursive update if the value matches the editor's current value\n if (this.richTextEditor.getValue() !== currentVal) {\n this.richTextEditor.setValue(currentVal as string);\n }\n }\n }\n}\n"],"mappings":";;;;;;QAAOA,mBAAmB,GAAAC,sBAAA,CAAAC,qBAAA;EAAA,MACnBC,2BAA2B,GAAAF,sBAAA,CAAAG,6BAAA;EAKlC;AACA;AACA;AACA;AACA;AACA;EALA,MAMqBC,eAAe,GAASL,mBAAmB,CAAAM,MAAA;IAM5CC,QAAQ,EAAG;MACvBC,UAAU,EAAE,CAAC,CAAC;MACdC,MAAM,EAAE,CAAC,CAAC;MACVC,YAAY,EAAE;QACVC,QAAQ,EAAE;UAAEC,IAAI,EAAE,YAAY;UAAEC,QAAQ,EAAE,KAAK;UAAEC,UAAU,EAAE;QAAS;MAC1E;IACJ,CAAC;IAReC,QAAQ,EAAGZ,2BAA2B;IAU/Ca,IAAI,WAAAC,MAAA,EAAS;MAChBC,uCAAA;MAEA,IAAI,CAACC,cAAc,GAAG,IAAIC,cAAc,CAAC;QACrCC,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,OAAO;QACfC,aAAa,EAAE,IAAI;QACnBC,eAAe,EAAE,IAAI;QACrBC,OAAO,EAAE,kBAAkB;QAC3BC,MAAM,EAAGC,MAAyB,IAAK;UACnC,MAAMC,GAAG,GAAGD,MAAM,CAACE,YAAY,CAAC,UAAU,CAAC;UAC3C,IAAI,CAACC,eAAe,CAACF,GAAG,CAAC;QAC7B;MACJ,CAAC,CAAC;MAEF,IAAI,CAACG,IAAI,GAAG,IAAIC,IAAI,CAAC;QACjBC,KAAK,EAAE,CAAC,IAAI,CAACd,cAAc;MAC/B,CAAC,CAAC;MAEF,IAAI,CAACe,cAAc,CAAC,UAAU,EAAE,IAAI,CAACH,IAAI,CAAC;IAC9C,CAAC;IAEMI,iBAAiB,WAAAC,mBAAA,EAAS;MAC7B,MAAMC,QAAQ,GAAG,IAAI,CAACC,WAAW,CAAC,UAAU,CAAC;MAC7C,IAAI,CAACnB,cAAc,CAACoB,WAAW,CAAC,CAACF,QAAQ,CAAC;MAE1C,MAAMG,UAAU,GAAG,IAAI,CAACF,WAAW,CAAC,OAAO,CAAC;MAC5C,IAAIE,UAAU,KAAKC,SAAS,IAAID,UAAU,KAAK,IAAI,EAAE;QACjD;QACA,IAAI,IAAI,CAACrB,cAAc,CAACuB,QAAQ,CAAC,CAAC,KAAKF,UAAU,EAAE;UAC/C,IAAI,CAACrB,cAAc,CAACwB,QAAQ,CAACH,UAAoB,CAAC;QACtD;MACJ;IACJ;EAAC;EAAA,OA/CgBnC,eAAe;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"RichTextControl-dbg.js","names":["BaseHardwareControl","_interopRequireDefault","__BaseHardwareControl","BaseHardwareControlRenderer","__BaseHardwareControlRenderer","RichTextControl","extend","metadata","properties","events","aggregations","_content","type","multiple","visibility","renderer","init","_init","BaseHardwareControl.prototype.init.call","richTextEditor","RichTextEditor","width","height","showGroupFont","showGroupInsert","tooltip","change","oEvent","val","getParameter","setValueAndFire","vBox","VBox","items","setAggregation","onBeforeRendering","_onBeforeRendering","readOnly","getProperty","setEditable","currentVal","undefined","getValue","setValue","_setValue","setProperty"],"sources":["RichTextControl.ts"],"sourcesContent":["import BaseHardwareControl from \"./BaseHardwareControl\";\nimport BaseHardwareControlRenderer from \"./BaseHardwareControlRenderer\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport VBox from \"sap/m/VBox\";\nimport RichTextEditor from \"sap/ui/richtexteditor/RichTextEditor\";\n\n/**\n * @file RichTextControl.ts\n * @description Native UI5 Control for rich text input.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nexport default class RichTextControl extends BaseHardwareControl {\n private vBox!: VBox;\n private richTextEditor!: RichTextEditor;\n\n static readonly renderer = BaseHardwareControlRenderer;\n\n static readonly metadata = {\n properties: {},\n events: {},\n aggregations: {\n _content: { type: \"sap.m.VBox\", multiple: false, visibility: \"hidden\" }\n }\n };\n\n public init(): void {\n super.init();\n\n this.richTextEditor = new RichTextEditor({\n width: \"100%\",\n height: \"300px\",\n showGroupFont: true,\n showGroupInsert: true,\n tooltip: \"Rich Text Editor\",\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"newValue\");\n this.setValueAndFire(val);\n }\n });\n\n this.vBox = new VBox({\n items: [this.richTextEditor]\n });\n\n this.setAggregation(\"_content\", this.vBox);\n }\n\n public onBeforeRendering(): void {\n const readOnly = this.getProperty(\"readOnly\");\n this.richTextEditor.setEditable(!readOnly);\n\n const currentVal = this.getProperty(\"value\");\n if (currentVal !== undefined && currentVal !== null) {\n // Prevent recursive update if the value matches the editor's current value\n if (this.richTextEditor.getValue() !== currentVal) {\n this.richTextEditor.setValue(currentVal as string);\n }\n }\n }\n\n /**\n * Overrides the default property setter to prevent full DOM invalidation.\n * When dataJson pushes updates down to the UI5 models, UI5 typically destroys \n * and recreates the custom control if the property changes. \n * By suppressing re-rendering (true flag) and manually passing the value \n * to the inner RichTextEditor, we prevent TinyMCE from tearing down its iframe\n * and triggering expensive, redundant plugin boot sequences.\n *\n * @param {any} val The new string value to bind\n * @returns {this} The control instance for chaining\n */\n public setValue(val: any): this {\n this.setProperty(\"value\", val, true); // suppress re-rendering\n if (this.richTextEditor && val !== undefined && val !== null) {\n if (this.richTextEditor.getValue() !== val) {\n this.richTextEditor.setValue(val as string);\n }\n }\n return this;\n }\n}\n"],"mappings":";;;;;;QAAOA,mBAAmB,GAAAC,sBAAA,CAAAC,qBAAA;EAAA,MACnBC,2BAA2B,GAAAF,sBAAA,CAAAG,6BAAA;EAKlC;AACA;AACA;AACA;AACA;AACA;EALA,MAMqBC,eAAe,GAASL,mBAAmB,CAAAM,MAAA;IAM5CC,QAAQ,EAAG;MACvBC,UAAU,EAAE,CAAC,CAAC;MACdC,MAAM,EAAE,CAAC,CAAC;MACVC,YAAY,EAAE;QACVC,QAAQ,EAAE;UAAEC,IAAI,EAAE,YAAY;UAAEC,QAAQ,EAAE,KAAK;UAAEC,UAAU,EAAE;QAAS;MAC1E;IACJ,CAAC;IAReC,QAAQ,EAAGZ,2BAA2B;IAU/Ca,IAAI,WAAAC,MAAA,EAAS;MAChBC,uCAAA;MAEA,IAAI,CAACC,cAAc,GAAG,IAAIC,cAAc,CAAC;QACrCC,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,OAAO;QACfC,aAAa,EAAE,IAAI;QACnBC,eAAe,EAAE,IAAI;QACrBC,OAAO,EAAE,kBAAkB;QAC3BC,MAAM,EAAGC,MAAyB,IAAK;UACnC,MAAMC,GAAG,GAAGD,MAAM,CAACE,YAAY,CAAC,UAAU,CAAC;UAC3C,IAAI,CAACC,eAAe,CAACF,GAAG,CAAC;QAC7B;MACJ,CAAC,CAAC;MAEF,IAAI,CAACG,IAAI,GAAG,IAAIC,IAAI,CAAC;QACjBC,KAAK,EAAE,CAAC,IAAI,CAACd,cAAc;MAC/B,CAAC,CAAC;MAEF,IAAI,CAACe,cAAc,CAAC,UAAU,EAAE,IAAI,CAACH,IAAI,CAAC;IAC9C,CAAC;IAEMI,iBAAiB,WAAAC,mBAAA,EAAS;MAC7B,MAAMC,QAAQ,GAAG,IAAI,CAACC,WAAW,CAAC,UAAU,CAAC;MAC7C,IAAI,CAACnB,cAAc,CAACoB,WAAW,CAAC,CAACF,QAAQ,CAAC;MAE1C,MAAMG,UAAU,GAAG,IAAI,CAACF,WAAW,CAAC,OAAO,CAAC;MAC5C,IAAIE,UAAU,KAAKC,SAAS,IAAID,UAAU,KAAK,IAAI,EAAE;QACjD;QACA,IAAI,IAAI,CAACrB,cAAc,CAACuB,QAAQ,CAAC,CAAC,KAAKF,UAAU,EAAE;UAC/C,IAAI,CAACrB,cAAc,CAACwB,QAAQ,CAACH,UAAoB,CAAC;QACtD;MACJ;IACJ,CAAC;IAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWG,QAAQ,WAAAC,UAAChB,GAAQ,EAAQ;MAC5B,IAAI,CAACiB,WAAW,CAAC,OAAO,EAAEjB,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;MACtC,IAAI,IAAI,CAACT,cAAc,IAAIS,GAAG,KAAKa,SAAS,IAAIb,GAAG,KAAK,IAAI,EAAE;QAC1D,IAAI,IAAI,CAACT,cAAc,CAACuB,QAAQ,CAAC,CAAC,KAAKd,GAAG,EAAE;UACxC,IAAI,CAACT,cAAc,CAACwB,QAAQ,CAACf,GAAa,CAAC;QAC/C;MACJ;MACA,OAAO,IAAI;IACf;EAAC;EAAA,OApEgBvB,eAAe;AAAA","ignoreList":[]}
@@ -27,6 +27,18 @@ declare module "nz/co/siliconst/ui5/metaui/controls/RichTextControl" {
27
27
  };
28
28
  init(): void;
29
29
  onBeforeRendering(): void;
30
+ /**
31
+ * Overrides the default property setter to prevent full DOM invalidation.
32
+ * When dataJson pushes updates down to the UI5 models, UI5 typically destroys
33
+ * and recreates the custom control if the property changes.
34
+ * By suppressing re-rendering (true flag) and manually passing the value
35
+ * to the inner RichTextEditor, we prevent TinyMCE from tearing down its iframe
36
+ * and triggering expensive, redundant plugin boot sequences.
37
+ *
38
+ * @param {any} val The new string value to bind
39
+ * @returns {this} The control instance for chaining
40
+ */
41
+ setValue(val: any): this;
30
42
  }
31
43
  }
32
44
  //# sourceMappingURL=RichTextControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextControl.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,qDAAqD,CAAC;IACrE,OAAO,mBAAmB,MAAM,yDAAyD,CAAC;IAE1F,OAAO,aAAa,MAAM,2BAA2B,CAAC;IAItD;;;;;OAKG;IACH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,mBAAmB;QAC5D,OAAO,CAAC,IAAI,CAAQ;QACpB,OAAO,CAAC,cAAc,CAAkB;QAExC,MAAM,CAAC,QAAQ,CAAC,QAAQ;;;UAA+B;QAEvD,MAAM,CAAC,QAAQ,CAAC,QAAQ;;;;;;;;;;UAMtB;QAEK,IAAI,IAAI,IAAI;QAsBZ,iBAAiB,IAAI,IAAI;KAYnC;CAEA"}
1
+ {"version":3,"file":"RichTextControl.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/RichTextControl.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,qDAAqD,CAAC;IACrE,OAAO,mBAAmB,MAAM,yDAAyD,CAAC;IAE1F,OAAO,aAAa,MAAM,2BAA2B,CAAC;IAItD;;;;;OAKG;IACH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,mBAAmB;QAC5D,OAAO,CAAC,IAAI,CAAQ;QACpB,OAAO,CAAC,cAAc,CAAkB;QAExC,MAAM,CAAC,QAAQ,CAAC,QAAQ;;;UAA+B;QAEvD,MAAM,CAAC,QAAQ,CAAC,QAAQ;;;;;;;;;;UAMtB;QAEK,IAAI,IAAI,IAAI;QAsBZ,iBAAiB,IAAI,IAAI;QAahC;;;;;;;;;;WAUG;QACI,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;KASlC;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["./BaseHardwareControl","./BaseHardwareControlRenderer","sap/m/VBox","sap/ui/richtexteditor/RichTextEditor"],function(t,e,i,n){"use strict";function o(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const r=o(t);const s=o(e);const a=r.extend("nz.co.siliconst.ui5.metaui.controls.RichTextControl",{metadata:{properties:{},events:{},aggregations:{_content:{type:"sap.m.VBox",multiple:false,visibility:"hidden"}}},renderer:s,init:function t(){r.prototype.init.call(this);this.richTextEditor=new n({width:"100%",height:"300px",showGroupFont:true,showGroupInsert:true,tooltip:"Rich Text Editor",change:t=>{const e=t.getParameter("newValue");this.setValueAndFire(e)}});this.vBox=new i({items:[this.richTextEditor]});this.setAggregation("_content",this.vBox)},onBeforeRendering:function t(){const e=this.getProperty("readOnly");this.richTextEditor.setEditable(!e);const i=this.getProperty("value");if(i!==undefined&&i!==null){if(this.richTextEditor.getValue()!==i){this.richTextEditor.setValue(i)}}}});return a});
1
+ sap.ui.define(["./BaseHardwareControl","./BaseHardwareControlRenderer","sap/m/VBox","sap/ui/richtexteditor/RichTextEditor"],function(t,e,i,r){"use strict";function n(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const o=n(t);const s=n(e);const h=o.extend("nz.co.siliconst.ui5.metaui.controls.RichTextControl",{metadata:{properties:{},events:{},aggregations:{_content:{type:"sap.m.VBox",multiple:false,visibility:"hidden"}}},renderer:s,init:function t(){o.prototype.init.call(this);this.richTextEditor=new r({width:"100%",height:"300px",showGroupFont:true,showGroupInsert:true,tooltip:"Rich Text Editor",change:t=>{const e=t.getParameter("newValue");this.setValueAndFire(e)}});this.vBox=new i({items:[this.richTextEditor]});this.setAggregation("_content",this.vBox)},onBeforeRendering:function t(){const e=this.getProperty("readOnly");this.richTextEditor.setEditable(!e);const i=this.getProperty("value");if(i!==undefined&&i!==null){if(this.richTextEditor.getValue()!==i){this.richTextEditor.setValue(i)}}},setValue:function t(e){this.setProperty("value",e,true);if(this.richTextEditor&&e!==undefined&&e!==null){if(this.richTextEditor.getValue()!==e){this.richTextEditor.setValue(e)}}return this}});return h});
2
2
  //# sourceMappingURL=RichTextControl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextControl.js","names":["BaseHardwareControl","_interopRequireDefault","__BaseHardwareControl","BaseHardwareControlRenderer","__BaseHardwareControlRenderer","RichTextControl","extend","metadata","properties","events","aggregations","_content","type","multiple","visibility","renderer","init","_init","BaseHardwareControl.prototype.init.call","this","richTextEditor","RichTextEditor","width","height","showGroupFont","showGroupInsert","tooltip","change","oEvent","val","getParameter","setValueAndFire","vBox","VBox","items","setAggregation","onBeforeRendering","_onBeforeRendering","readOnly","getProperty","setEditable","currentVal","undefined","getValue","setValue"],"sources":["RichTextControl.ts"],"sourcesContent":["import BaseHardwareControl from \"./BaseHardwareControl\";\nimport BaseHardwareControlRenderer from \"./BaseHardwareControlRenderer\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport VBox from \"sap/m/VBox\";\nimport RichTextEditor from \"sap/ui/richtexteditor/RichTextEditor\";\n\n/**\n * @file RichTextControl.ts\n * @description Native UI5 Control for rich text input.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nexport default class RichTextControl extends BaseHardwareControl {\n private vBox!: VBox;\n private richTextEditor!: RichTextEditor;\n\n static readonly renderer = BaseHardwareControlRenderer;\n\n static readonly metadata = {\n properties: {},\n events: {},\n aggregations: {\n _content: { type: \"sap.m.VBox\", multiple: false, visibility: \"hidden\" }\n }\n };\n\n public init(): void {\n super.init();\n\n this.richTextEditor = new RichTextEditor({\n width: \"100%\",\n height: \"300px\",\n showGroupFont: true,\n showGroupInsert: true,\n tooltip: \"Rich Text Editor\",\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"newValue\");\n this.setValueAndFire(val);\n }\n });\n\n this.vBox = new VBox({\n items: [this.richTextEditor]\n });\n\n this.setAggregation(\"_content\", this.vBox);\n }\n\n public onBeforeRendering(): void {\n const readOnly = this.getProperty(\"readOnly\");\n this.richTextEditor.setEditable(!readOnly);\n\n const currentVal = this.getProperty(\"value\");\n if (currentVal !== undefined && currentVal !== null) {\n // Prevent recursive update if the value matches the editor's current value\n if (this.richTextEditor.getValue() !== currentVal) {\n this.richTextEditor.setValue(currentVal as string);\n }\n }\n }\n}\n"],"mappings":"kPAAOA,EAAmBC,EAAAC,GAAA,MACnBC,EAA2BF,EAAAG,GAKlC,MAMqBC,EAAwBL,EAAmBM,OAAA,uDAM5CC,SAAW,CACvBC,WAAY,CAAC,EACbC,OAAQ,CAAC,EACTC,aAAc,CACVC,SAAU,CAAEC,KAAM,aAAcC,SAAU,MAAOC,WAAY,YANrDC,SAAWZ,EAUpBa,KAAI,SAAAC,IACPC,sBAAAC,MAEAA,KAAKC,eAAiB,IAAIC,EAAe,CACrCC,MAAO,OACPC,OAAQ,QACRC,cAAe,KACfC,gBAAiB,KACjBC,QAAS,mBACTC,OAASC,IACL,MAAMC,EAAMD,EAAOE,aAAa,YAChCX,KAAKY,gBAAgBF,MAI7BV,KAAKa,KAAO,IAAIC,EAAK,CACjBC,MAAO,CAACf,KAAKC,kBAGjBD,KAAKgB,eAAe,WAAYhB,KAAKa,KACzC,EAEOI,kBAAiB,SAAAC,IACpB,MAAMC,EAAWnB,KAAKoB,YAAY,YAClCpB,KAAKC,eAAeoB,aAAaF,GAEjC,MAAMG,EAAatB,KAAKoB,YAAY,SACpC,GAAIE,IAAeC,WAAaD,IAAe,KAAM,CAEjD,GAAItB,KAAKC,eAAeuB,aAAeF,EAAY,CAC/CtB,KAAKC,eAAewB,SAASH,EACjC,CACJ,CACJ,IAAC,OA/CgBpC,CAAe","ignoreList":[]}
1
+ {"version":3,"file":"RichTextControl.js","names":["BaseHardwareControl","_interopRequireDefault","__BaseHardwareControl","BaseHardwareControlRenderer","__BaseHardwareControlRenderer","RichTextControl","extend","metadata","properties","events","aggregations","_content","type","multiple","visibility","renderer","init","_init","BaseHardwareControl.prototype.init.call","this","richTextEditor","RichTextEditor","width","height","showGroupFont","showGroupInsert","tooltip","change","oEvent","val","getParameter","setValueAndFire","vBox","VBox","items","setAggregation","onBeforeRendering","_onBeforeRendering","readOnly","getProperty","setEditable","currentVal","undefined","getValue","setValue","_setValue","setProperty"],"sources":["RichTextControl.ts"],"sourcesContent":["import BaseHardwareControl from \"./BaseHardwareControl\";\nimport BaseHardwareControlRenderer from \"./BaseHardwareControlRenderer\";\nimport RenderManager from \"sap/ui/core/RenderManager\";\nimport VBox from \"sap/m/VBox\";\nimport RichTextEditor from \"sap/ui/richtexteditor/RichTextEditor\";\n\n/**\n * @file RichTextControl.ts\n * @description Native UI5 Control for rich text input.\n * \n * @namespace nz.co.siliconst.ui5.metaui.controls\n */\nexport default class RichTextControl extends BaseHardwareControl {\n private vBox!: VBox;\n private richTextEditor!: RichTextEditor;\n\n static readonly renderer = BaseHardwareControlRenderer;\n\n static readonly metadata = {\n properties: {},\n events: {},\n aggregations: {\n _content: { type: \"sap.m.VBox\", multiple: false, visibility: \"hidden\" }\n }\n };\n\n public init(): void {\n super.init();\n\n this.richTextEditor = new RichTextEditor({\n width: \"100%\",\n height: \"300px\",\n showGroupFont: true,\n showGroupInsert: true,\n tooltip: \"Rich Text Editor\",\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"newValue\");\n this.setValueAndFire(val);\n }\n });\n\n this.vBox = new VBox({\n items: [this.richTextEditor]\n });\n\n this.setAggregation(\"_content\", this.vBox);\n }\n\n public onBeforeRendering(): void {\n const readOnly = this.getProperty(\"readOnly\");\n this.richTextEditor.setEditable(!readOnly);\n\n const currentVal = this.getProperty(\"value\");\n if (currentVal !== undefined && currentVal !== null) {\n // Prevent recursive update if the value matches the editor's current value\n if (this.richTextEditor.getValue() !== currentVal) {\n this.richTextEditor.setValue(currentVal as string);\n }\n }\n }\n\n /**\n * Overrides the default property setter to prevent full DOM invalidation.\n * When dataJson pushes updates down to the UI5 models, UI5 typically destroys \n * and recreates the custom control if the property changes. \n * By suppressing re-rendering (true flag) and manually passing the value \n * to the inner RichTextEditor, we prevent TinyMCE from tearing down its iframe\n * and triggering expensive, redundant plugin boot sequences.\n *\n * @param {any} val The new string value to bind\n * @returns {this} The control instance for chaining\n */\n public setValue(val: any): this {\n this.setProperty(\"value\", val, true); // suppress re-rendering\n if (this.richTextEditor && val !== undefined && val !== null) {\n if (this.richTextEditor.getValue() !== val) {\n this.richTextEditor.setValue(val as string);\n }\n }\n return this;\n }\n}\n"],"mappings":"kPAAOA,EAAmBC,EAAAC,GAAA,MACnBC,EAA2BF,EAAAG,GAKlC,MAMqBC,EAAwBL,EAAmBM,OAAA,uDAM5CC,SAAW,CACvBC,WAAY,CAAC,EACbC,OAAQ,CAAC,EACTC,aAAc,CACVC,SAAU,CAAEC,KAAM,aAAcC,SAAU,MAAOC,WAAY,YANrDC,SAAWZ,EAUpBa,KAAI,SAAAC,IACPC,sBAAAC,MAEAA,KAAKC,eAAiB,IAAIC,EAAe,CACrCC,MAAO,OACPC,OAAQ,QACRC,cAAe,KACfC,gBAAiB,KACjBC,QAAS,mBACTC,OAASC,IACL,MAAMC,EAAMD,EAAOE,aAAa,YAChCX,KAAKY,gBAAgBF,MAI7BV,KAAKa,KAAO,IAAIC,EAAK,CACjBC,MAAO,CAACf,KAAKC,kBAGjBD,KAAKgB,eAAe,WAAYhB,KAAKa,KACzC,EAEOI,kBAAiB,SAAAC,IACpB,MAAMC,EAAWnB,KAAKoB,YAAY,YAClCpB,KAAKC,eAAeoB,aAAaF,GAEjC,MAAMG,EAAatB,KAAKoB,YAAY,SACpC,GAAIE,IAAeC,WAAaD,IAAe,KAAM,CAEjD,GAAItB,KAAKC,eAAeuB,aAAeF,EAAY,CAC/CtB,KAAKC,eAAewB,SAASH,EACjC,CACJ,CACJ,EAaOG,SAAQ,SAAAC,EAAChB,GACZV,KAAK2B,YAAY,QAASjB,EAAK,MAC/B,GAAIV,KAAKC,gBAAkBS,IAAQa,WAAab,IAAQ,KAAM,CAC1D,GAAIV,KAAKC,eAAeuB,aAAed,EAAK,CACxCV,KAAKC,eAAewB,SAASf,EACjC,CACJ,CACA,OAAOV,IACX,IAAC,OApEgBd,CAAe","ignoreList":[]}
@@ -58,4 +58,25 @@ export default class RichTextControl extends BaseHardwareControl {
58
58
  }
59
59
  }
60
60
  }
61
+
62
+ /**
63
+ * Overrides the default property setter to prevent full DOM invalidation.
64
+ * When dataJson pushes updates down to the UI5 models, UI5 typically destroys
65
+ * and recreates the custom control if the property changes.
66
+ * By suppressing re-rendering (true flag) and manually passing the value
67
+ * to the inner RichTextEditor, we prevent TinyMCE from tearing down its iframe
68
+ * and triggering expensive, redundant plugin boot sequences.
69
+ *
70
+ * @param {any} val The new string value to bind
71
+ * @returns {this} The control instance for chaining
72
+ */
73
+ public setValue(val: any): this {
74
+ this.setProperty("value", val, true); // suppress re-rendering
75
+ if (this.richTextEditor && val !== undefined && val !== null) {
76
+ if (this.richTextEditor.getValue() !== val) {
77
+ this.richTextEditor.setValue(val as string);
78
+ }
79
+ }
80
+ return this;
81
+ }
61
82
  }
@@ -18,6 +18,10 @@ sap.ui.define(["./BaseHardwareControl", "sap/m/Button", "sap/m/VBox", "sap/ui/co
18
18
  isDrawing = false;
19
19
  canvasCtx = null;
20
20
  canvasEl = null;
21
+
22
+ /**
23
+ * Initializes the control and builds the canvas drawing surface.
24
+ */
21
25
  init() {
22
26
  super.init();
23
27
  this.canvasHtml = new HTML({
@@ -142,6 +146,11 @@ sap.ui.define(["./BaseHardwareControl", "sap/m/Button", "sap/m/VBox", "sap/ui/co
142
146
  this.setValueAndFire(dataUrl);
143
147
  }
144
148
  }
149
+
150
+ /**
151
+ * Sets the value of the control programmatically and re-draws the canvas.
152
+ * @param value The base64 data URL string representing the signature image.
153
+ */
145
154
  setValue(value) {
146
155
  super.setValue(value);
147
156
  if (value && typeof value === "string" && value.startsWith("data:image")) {