@siliconst/metaui 1.4.10 → 1.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/README.md +4 -178
  2. package/package.json +1 -1
  3. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +46 -8
  4. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js.map +1 -1
  5. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts +27 -3
  6. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +1 -1
  7. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js +1 -1
  8. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js.map +1 -1
  9. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts +41 -9
  10. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +132 -18
  11. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js.map +1 -1
  12. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts +14 -9
  13. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts.map +1 -1
  14. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js +1 -1
  15. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js.map +1 -1
  16. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.ts +117 -18
  17. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js +1 -3
  18. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate-dbg.js.map +1 -1
  19. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.d.ts.map +1 -1
  20. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js +1 -1
  21. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.js.map +1 -1
  22. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DataSyncDelegate.ts +1 -3
  23. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js +9 -6
  24. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js.map +1 -1
  25. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts +1 -1
  26. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts.map +1 -1
  27. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js +1 -1
  28. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js.map +1 -1
  29. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts +9 -6
  30. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js +56 -49
  31. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js.map +1 -1
  32. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts +9 -4
  33. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.d.ts.map +1 -1
  34. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js +1 -1
  35. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js.map +1 -1
  36. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts +67 -50
  37. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js +0 -2
  38. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine-dbg.js.map +1 -1
  39. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.d.ts +0 -2
  40. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.d.ts.map +1 -1
  41. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.js.map +1 -1
  42. package/src/nz/co/siliconst/ui5/metaui/core/ConditionEngine.ts +0 -3
  43. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js +4 -6
  44. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js.map +1 -1
  45. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js +1 -1
  46. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js.map +1 -1
  47. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts +4 -4
  48. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +34 -9
  49. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js.map +1 -1
  50. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts +16 -2
  51. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts.map +1 -1
  52. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js +1 -1
  53. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js.map +1 -1
  54. package/src/nz/co/siliconst/ui5/metaui/core/Engine.ts +36 -5
  55. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +19 -2
  56. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js.map +1 -1
  57. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts +9 -0
  58. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts.map +1 -1
  59. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js +1 -1
  60. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js.map +1 -1
  61. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts +21 -7
  62. package/src/nz/co/siliconst/ui5/metaui/core/Registry-dbg.js +3 -1
  63. package/src/nz/co/siliconst/ui5/metaui/core/Registry-dbg.js.map +1 -1
  64. package/src/nz/co/siliconst/ui5/metaui/core/Registry.d.ts.map +1 -1
  65. package/src/nz/co/siliconst/ui5/metaui/core/Registry.js +1 -1
  66. package/src/nz/co/siliconst/ui5/metaui/core/Registry.js.map +1 -1
  67. package/src/nz/co/siliconst/ui5/metaui/core/Registry.ts +3 -1
  68. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +54 -34
  69. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -1
  70. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +3 -1
  71. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
  72. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js +1 -1
  73. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
  74. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +55 -34
  75. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator-dbg.js +7 -6
  76. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator-dbg.js.map +1 -1
  77. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.d.ts.map +1 -1
  78. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.js +1 -1
  79. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.js.map +1 -1
  80. package/src/nz/co/siliconst/ui5/metaui/core/SchemaValidator.ts +7 -6
  81. package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js +40 -11
  82. package/src/nz/co/siliconst/ui5/metaui/core/StateManager-dbg.js.map +1 -1
  83. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts +6 -1
  84. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.d.ts.map +1 -1
  85. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js +1 -1
  86. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.js.map +1 -1
  87. package/src/nz/co/siliconst/ui5/metaui/core/StateManager.ts +39 -13
  88. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin-dbg.js.map +1 -1
  89. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts +13 -0
  90. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts.map +1 -1
  91. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts +15 -0
  92. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema-dbg.js.map +1 -1
  93. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts +1 -0
  94. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts.map +1 -1
  95. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts +1 -0
  96. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js +1 -1
  97. package/src/nz/co/siliconst/ui5/metaui/library-dbg.js.map +1 -1
  98. package/src/nz/co/siliconst/ui5/metaui/library-preload.js +41 -40
  99. package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
  100. package/src/nz/co/siliconst/ui5/metaui/library.d.ts +1 -0
  101. package/src/nz/co/siliconst/ui5/metaui/library.d.ts.map +1 -1
  102. package/src/nz/co/siliconst/ui5/metaui/library.js +1 -1
  103. package/src/nz/co/siliconst/ui5/metaui/library.js.map +1 -1
  104. package/src/nz/co/siliconst/ui5/metaui/library.ts +1 -0
  105. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +2 -2
  106. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js.map +1 -1
  107. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js +1 -1
  108. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js.map +1 -1
  109. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +2 -2
  110. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js +77 -1
  111. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js.map +1 -1
  112. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts +17 -0
  113. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts.map +1 -1
  114. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js +1 -1
  115. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js.map +1 -1
  116. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +67 -7
  117. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +1 -1
  118. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
  119. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js +1 -1
  120. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
  121. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +1 -1
  122. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +1 -1
  123. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
  124. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js +1 -1
  125. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
  126. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +1 -1
  127. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +5 -1
  128. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js.map +1 -1
  129. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.d.ts.map +1 -1
  130. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js +1 -1
  131. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
  132. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +5 -1
  133. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +1 -1
  134. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
  135. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
  136. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
  137. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +1 -1
  138. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +1 -1
  139. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
  140. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
  141. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
  142. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +1 -1
  143. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +1 -1
  144. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
  145. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js +1 -1
  146. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
  147. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +1 -1
  148. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +1 -1
  149. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
  150. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
  151. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
  152. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +1 -1
  153. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +1 -1
  154. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
  155. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js +1 -1
  156. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
  157. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +1 -1
  158. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js +130 -0
  159. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js.map +1 -0
  160. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts +39 -0
  161. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts.map +1 -0
  162. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js +2 -0
  163. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js.map +1 -0
  164. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts +127 -0
  165. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +1 -1
  166. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js.map +1 -1
  167. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js +1 -1
  168. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js.map +1 -1
  169. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +1 -1
  170. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +2 -2
  171. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
  172. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
  173. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
  174. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +2 -2
  175. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +1 -1
  176. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
  177. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
  178. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
  179. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +1 -1
  180. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +1 -1
  181. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
  182. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js +1 -1
  183. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
  184. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +1 -1
  185. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +1 -1
  186. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
  187. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js +1 -1
  188. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
  189. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +1 -1
  190. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +1 -1
  191. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
  192. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
  193. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
  194. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +1 -1
  195. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +1 -1
  196. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
  197. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js +1 -1
  198. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
  199. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +1 -1
  200. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +1 -1
  201. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js.map +1 -1
  202. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js +1 -1
  203. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js.map +1 -1
  204. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +1 -1
  205. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +1 -1
  206. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
  207. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js +1 -1
  208. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
  209. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +1 -1
  210. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +1 -1
  211. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
  212. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
  213. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
  214. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +1 -1
  215. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +1 -1
  216. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
  217. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js +1 -1
  218. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
  219. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +1 -1
  220. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin-dbg.js.map +1 -1
  221. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.js.map +1 -1
  222. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin.ts +1 -1
  223. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin-dbg.js.map +1 -1
  224. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.js.map +1 -1
  225. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin.ts +1 -1
  226. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin-dbg.js.map +1 -1
  227. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.d.ts +1 -1
  228. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.d.ts.map +1 -1
  229. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.js.map +1 -1
  230. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.ts +2 -2
  231. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin-dbg.js.map +1 -1
  232. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.d.ts +1 -1
  233. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.d.ts.map +1 -1
  234. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.js.map +1 -1
  235. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.ts +1 -1
  236. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin-dbg.js +1 -1
  237. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin-dbg.js.map +1 -1
  238. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.d.ts +1 -1
  239. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.d.ts.map +1 -1
  240. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.js +1 -1
  241. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.js.map +1 -1
  242. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.ts +2 -2
  243. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin-dbg.js +1 -1
  244. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin-dbg.js.map +1 -1
  245. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.d.ts +1 -1
  246. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.d.ts.map +1 -1
  247. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.js +1 -1
  248. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.js.map +1 -1
  249. package/src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.ts +2 -2
  250. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin-dbg.js +1 -1
  251. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin-dbg.js.map +1 -1
  252. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.d.ts +1 -1
  253. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.d.ts.map +1 -1
  254. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.js +1 -1
  255. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.js.map +1 -1
  256. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.ts +3 -3
  257. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin-dbg.js.map +1 -1
  258. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.d.ts +1 -1
  259. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.d.ts.map +1 -1
  260. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.js.map +1 -1
  261. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugin.ts +1 -1
  262. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin-dbg.js.map +1 -1
  263. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.d.ts +1 -1
  264. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.d.ts.map +1 -1
  265. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.js.map +1 -1
  266. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/MinLengthValidatorPlugin.ts +1 -1
  267. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin-dbg.js +2 -2
  268. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin-dbg.js.map +1 -1
  269. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.d.ts +1 -1
  270. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.d.ts.map +1 -1
  271. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.js +1 -1
  272. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.js.map +1 -1
  273. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/PatternValidatorPlugin.ts +4 -4
  274. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin-dbg.js +3 -2
  275. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin-dbg.js.map +1 -1
  276. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.d.ts +1 -1
  277. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.d.ts.map +1 -1
  278. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.js +1 -1
  279. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.js.map +1 -1
  280. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/RangeValidatorPlugin.ts +4 -3
  281. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin-dbg.js +3 -1
  282. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin-dbg.js.map +1 -1
  283. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.d.ts +1 -1
  284. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.d.ts.map +1 -1
  285. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.js +1 -1
  286. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.js.map +1 -1
  287. package/src/nz/co/siliconst/ui5/metaui/plugins/validators/UrlValidatorPlugin.ts +4 -3
@@ -1 +1 @@
1
- {"version":3,"file":"DateTimePlugin-dbg.js","names":["BasePlugin","___BasePlugin","DateTimePlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","control","TextControl","id","generateStableId","text","path","type","formatOptions","source","pattern","applyCommonDirectives","DateTimePicker","value","editable","ui","readOnly","required","change","oEvent","val","getParameter","result","validate","isValid","fieldKey","getValue","applyState","input","setEditable","setRequired","__exports","__esModule"],"sources":["DateTimePlugin.ts"],"sourcesContent":["/**\n * @file DateTimePlugin.ts\n * @description Handles rendering logic for DateTime strings (timestamps).\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport DateTimePicker from \"sap/m/DateTimePicker\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\n\n/**\n * Handles rendering and logic for timestamps/datetime inputs.\n */\nexport class DateTimePlugin extends BasePlugin {\n /**\n * Renders a `sap.m.DateTimePicker` component.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured DateTimePicker control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n type: \"sap.ui.model.type.DateTime\",\n formatOptions: {\n source: { pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\" },\n pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\"\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new DateTimePicker({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: {\n path: `${modelName}>${bindingPath}`,\n type: \"sap.ui.model.type.DateTime\",\n formatOptions: {\n source: { pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\" },\n pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\"\n }\n },\n editable: !fieldMetadata.ui?.readOnly,\n required: fieldMetadata.required,\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"value\");\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current datetime string.\n * @returns {unknown} The datetime value.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as DateTimePicker).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n const input = this.control as DateTimePicker;\n input.setEditable(!this.metadata.ui?.readOnly);\n input.setRequired(this.metadata.required);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAMnB;AACA;AACA;EACO,MAAMC,cAAc,SAASF,UAAU,CAAC;IAC3C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWG,MAAMA,CAACC,aAAgC,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MAC1L,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACC,QAAQ,GAAGL,aAAa;MAE7B,IAAI,CAAC,IAAI,CAACM,UAAU,EAAE;QAElB,IAAI,CAACC,OAAO,GAAG,IAAIC,WAAW,CAAC;UAC3BC,EAAE,EAAE,IAA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B;;IAEA;AACJ;AACA;AACA;IACcyB,QAAQA,CAAA,EAAY;MAC1B,OAAO,IAAI,CAACzB,OAAO,GAAI,IAAI,CAACA,OAAO,CAAoByB,QAAQ,CAAC,CAAC,GAAG,IAAI;IAC5E;;IAEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAAC1B,OAAO,IAAI,IAAI,CAACF,QAAQ,EAAE;QAC/B,IAAI,CAAC,IAAI,CAACC,UAAU,EAAE;QACtB,MAAM4B,KAAK,GAAG,IAAI,CAAC3B,OAAyB;QAC5C2B,KAAK,CAACC,WAAW,CAAC,CAAC,IAAI,CAAC9B,QAAQ,CAACgB,EAAE,EAAEC,QAAQ,CAAC;QAC9CY,KAAK,CAACE,WAAW,CAAC,IAAI,CAAC/B,QAAQ,CAACkB,QAAQ,CAAC;MAC7C;IACJ;EACJ;EAAC,IAAAc,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAvC,cAAA,GAAAA,cAAA;EAAA,OAAAuC,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"DateTimePlugin-dbg.js","names":["BasePlugin","___BasePlugin","DateTimePlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","control","TextControl","id","generateStableId","text","path","type","formatOptions","source","pattern","applyCommonDirectives","DateTimePicker","value","editable","ui","readOnly","required","change","oEvent","val","getParameter","result","validateAndApplyVisualState","isValid","fieldKey","getValue","applyState","input","setEditable","setRequired","__exports","__esModule"],"sources":["DateTimePlugin.ts"],"sourcesContent":["/**\n * @file DateTimePlugin.ts\n * @description Handles rendering logic for DateTime strings (timestamps).\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport DateTimePicker from \"sap/m/DateTimePicker\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\n\n/**\n * Handles rendering and logic for timestamps/datetime inputs.\n */\nexport class DateTimePlugin extends BasePlugin {\n /**\n * Renders a `sap.m.DateTimePicker` component.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured DateTimePicker control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n type: \"sap.ui.model.type.DateTime\",\n formatOptions: {\n source: { pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\" },\n pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\"\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new DateTimePicker({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: {\n path: `${modelName}>${bindingPath}`,\n type: \"sap.ui.model.type.DateTime\",\n formatOptions: {\n source: { pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\" },\n pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\"\n }\n },\n editable: !fieldMetadata.ui?.readOnly,\n required: fieldMetadata.required,\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"value\");\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current datetime string.\n * @returns {unknown} The datetime value.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as DateTimePicker).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n const input = this.control as DateTimePicker;\n input.setEditable(!this.metadata.ui?.readOnly);\n input.setRequired(this.metadata.required);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAMnB;AACA;AACA;EACO,MAAMC,cAAc,SAASF,UAAU,CAAC;IAC3C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWG,MAAMA,CAACC,aAAgC,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MAC1L,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACC,QAAQ,GAAGL,aAAa;MAE7B,IAAI,CAAC,IAAI,CAACM,UAAU,EAAE;QAElB,IAAI,CAACC,OAAO,GAAG,IAAIC,WAAW,CAAC;UAC3BC,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACP,aAAa,EAAEF,WAAW,CAAC;UACrDU,IAAI,EAAE;YACFC,IAAI,EAAE,GAAGV,SAAS,IAAID,WAAW,EAAE;YACnCY,IAAI,EAAE,4BAA4B;YAClCC,aAAa,EAAE;cACXC,MAAM,EAAE;gBAAEC,OAAO,EAAE;cAA2B,CAAC;cAC/CA,OAAO,EAAE;YACb;UACJ;QACJ,CAAC,CAAC;QACF,IAAI,CAACC,qBAAqB,CAAC,IAAI,CAACV,OAAO,EAAEP,aAAa,EAAEE,SAAS,CAAC;QAClE,OAAO,IAAI,CAACK,OAAO;MACvB;MAEA,IAAI,CAACA,OAAO,GAAG,IAAIW,cAAc,CAAC;QAC9BT,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACP,aAAa,EAAEF,WAAW,CAAC;QACrDkB,KAAK,EAAE;UACHP,IAAI,EAAE,GAAGV,SAAS,IAAID,WAAW,EAAE;UACnCY,IAAI,EAAE,4BAA4B;UAClCC,aAAa,EAAE;YACXC,MAAM,EAAE;cAAEC,OAAO,EAAE;YAA2B,CAAC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+1,2 @@
1
- sap.ui.define(["./BasePlugin","sap/m/DateTimePicker","sap/m/Text"],function(t,e,i){"use strict";const a=t["BasePlugin"];class s extends a{render(t,a,s="meta",n,r){this.onChange=r;this.metadata=t;if(!this.isEditable){this.control=new i({id:this.generateStableId(n,a),text:{path:`${s}>${a}`,type:"sap.ui.model.type.DateTime",formatOptions:{source:{pattern:"yyyy-MM-dd'T'HH:mm:ss'Z'"},pattern:"yyyy-MM-dd'T'HH:mm:ss'Z'"}}});this.applyCommonDirectives(this.control,t,s);return this.control}this.control=new e({id:this.generateStableId(n,a),value:{path:`${s}>${a}`,type:"sap.ui.model.type.DateTime",formatOptions:{source:{pattern:"yyyy-MM-dd'T'HH:mm:ss'Z'"},pattern:"yyyy-MM-dd'T'HH:mm:ss'Z'"}},editable:!t.ui?.readOnly,required:t.required,change:t=>{const e=t.getParameter("value");const i=this.validate();if(this.onChange){this.onChange(i.isValid,this.fieldKey)}}});this.applyCommonDirectives(this.control,t,s);return this.control}getValue(){return this.control?this.control.getValue():null}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;const t=this.control;t.setEditable(!this.metadata.ui?.readOnly);t.setRequired(this.metadata.required)}}}var n={__esModule:true};n.DateTimePlugin=s;return n});
1
+ sap.ui.define(["./BasePlugin","sap/m/DateTimePicker","sap/m/Text"],function(t,e,i){"use strict";const a=t["BasePlugin"];class s extends a{render(t,a,s="meta",n,r){this.onChange=r;this.metadata=t;if(!this.isEditable){this.control=new i({id:this.generateStableId(n,a),text:{path:`${s}>${a}`,type:"sap.ui.model.type.DateTime",formatOptions:{source:{pattern:"yyyy-MM-dd'T'HH:mm:ss'Z'"},pattern:"yyyy-MM-dd'T'HH:mm:ss'Z'"}}});this.applyCommonDirectives(this.control,t,s);return this.control}this.control=new e({id:this.generateStableId(n,a),value:{path:`${s}>${a}`,type:"sap.ui.model.type.DateTime",formatOptions:{source:{pattern:"yyyy-MM-dd'T'HH:mm:ss'Z'"},pattern:"yyyy-MM-dd'T'HH:mm:ss'Z'"}},editable:!t.ui?.readOnly,required:t.required,change:t=>{const e=t.getParameter("value");const i=this.validateAndApplyVisualState();if(this.onChange){this.onChange(i.isValid,this.fieldKey)}}});this.applyCommonDirectives(this.control,t,s);return this.control}getValue(){return this.control?this.control.getValue():null}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;const t=this.control;t.setEditable(!this.metadata.ui?.readOnly);t.setRequired(this.metadata.required)}}}var n={__esModule:true};n.DateTimePlugin=s;return n});
2
2
  //# sourceMappingURL=DateTimePlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateTimePlugin.js","names":["BasePlugin","___BasePlugin","DateTimePlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","control","TextControl","id","generateStableId","text","path","type","formatOptions","source","pattern","applyCommonDirectives","DateTimePicker","value","editable","ui","readOnly","required","change","oEvent","val","getParameter","result","validate","isValid","fieldKey","getValue","applyState","input","setEditable","setRequired","__exports","__esModule"],"sources":["DateTimePlugin.ts"],"sourcesContent":["/**\n * @file DateTimePlugin.ts\n * @description Handles rendering logic for DateTime strings (timestamps).\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport DateTimePicker from \"sap/m/DateTimePicker\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\n\n/**\n * Handles rendering and logic for timestamps/datetime inputs.\n */\nexport class DateTimePlugin extends BasePlugin {\n /**\n * Renders a `sap.m.DateTimePicker` component.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured DateTimePicker control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n type: \"sap.ui.model.type.DateTime\",\n formatOptions: {\n source: { pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\" },\n pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\"\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new DateTimePicker({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: {\n path: `${modelName}>${bindingPath}`,\n type: \"sap.ui.model.type.DateTime\",\n formatOptions: {\n source: { pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\" },\n pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\"\n }\n },\n editable: !fieldMetadata.ui?.readOnly,\n required: fieldMetadata.required,\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"value\");\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current datetime string.\n * @returns {unknown} The datetime value.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as DateTimePicker).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n const input = this.control as DateTimePicker;\n input.setEditable(!this.metadata.ui?.readOnly);\n input.setRequired(this.metadata.required);\n }\n }\n}\n"],"mappings":"gGAAA,MAKSA,EAAUC,EAAA,cASZ,MAAMC,UAAuBF,EAWzBG,OAAOC,EAAmCC,EAAsBC,EAAoB,OAAQC,EAAwBC,GACvHC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAEhB,IAAKK,KAAKE,WAAY,CAElBF,KAAKG,QAAU,IAAIC,EAAY,CAC3BC,GAAIL,KAAKM,iBAAiBR,EAAeF,GACzCW,KAAM,CACFC,KAAM,GAAGX,KAAaD,IACtBa,KAAM,6BACNC,cAAe,CACXC,OAAQ,CAAEC,QAAS,4BACnBA,QAAS,+BAIrBZ,KAAKa,sBAAsBb,KAAKG,QAASR,EAAeE,GACxD,OAAOG,KAAKG,OAChB,CAEAH,KAAKG,QAAU,IAAIW,EAAe,CAC9BT,GAAIL,KAAKM,iBAAiBR,EAAeF,GACzCmB,MAAO,CACHP,KAAM,GAAGX,KAAaD,IACtBa,KAAM,6BACNC,cAAe,CACXC,OAAQ,CAAEC,QAAS,4BACnBA,QAAS,6BAGjBI,UAAWrB,EAAcsB,IAAIC,SAC7BC,SAAUxB,EAAcwB,SACxBC,OAASC,IACL,MAAMC,EAAMD,EAAOE,aAAa,SAChC,MAAMC,EAASxB,KAAKyB,WACpB,GAAIzB,KAAKD,SAAU,CACfC,KAAKD,SAASyB,EAAOE,QAAS1B,KAAK2B,SACvC,KAIR3B,KAAKa,sBAAsBb,KAAKG,QAASR,EAAeE,GAExD,OAAOG,KAAKG,OAChB,CAMUyB,WACN,OAAO5B,KAAKG,QAAWH,KAAKG,QAA2ByB,WAAa,IACxE,CAKUC,aACN,GAAI7B,KAAKG,SAAWH,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACtB,MAAM4B,EAAQ9B,KAAKG,QACnB2B,EAAMC,aAAa/B,KAAKC,SAASgB,IAAIC,UACrCY,EAAME,YAAYhC,KAAKC,SAASkB,SACpC,CACJ,EACH,IAAAc,EAAA,CAAAC,WAAA,MAAAD,EAAAxC,iBAAA,OAAAwC,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"DateTimePlugin.js","names":["BasePlugin","___BasePlugin","DateTimePlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","control","TextControl","id","generateStableId","text","path","type","formatOptions","source","pattern","applyCommonDirectives","DateTimePicker","value","editable","ui","readOnly","required","change","oEvent","val","getParameter","result","validateAndApplyVisualState","isValid","fieldKey","getValue","applyState","input","setEditable","setRequired","__exports","__esModule"],"sources":["DateTimePlugin.ts"],"sourcesContent":["/**\n * @file DateTimePlugin.ts\n * @description Handles rendering logic for DateTime strings (timestamps).\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport DateTimePicker from \"sap/m/DateTimePicker\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\n\n/**\n * Handles rendering and logic for timestamps/datetime inputs.\n */\nexport class DateTimePlugin extends BasePlugin {\n /**\n * Renders a `sap.m.DateTimePicker` component.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured DateTimePicker control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n type: \"sap.ui.model.type.DateTime\",\n formatOptions: {\n source: { pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\" },\n pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\"\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new DateTimePicker({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: {\n path: `${modelName}>${bindingPath}`,\n type: \"sap.ui.model.type.DateTime\",\n formatOptions: {\n source: { pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\" },\n pattern: \"yyyy-MM-dd'T'HH:mm:ss'Z'\"\n }\n },\n editable: !fieldMetadata.ui?.readOnly,\n required: fieldMetadata.required,\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"value\");\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current datetime string.\n * @returns {unknown} The datetime value.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as DateTimePicker).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n const input = this.control as DateTimePicker;\n input.setEditable(!this.metadata.ui?.readOnly);\n input.setRequired(this.metadata.required);\n }\n }\n}\n"],"mappings":"gGAAA,MAKSA,EAAUC,EAAA,cASZ,MAAMC,UAAuBF,EAWzBG,OAAOC,EAAmCC,EAAsBC,EAAoB,OAAQC,EAAwBC,GACvHC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAEhB,IAAKK,KAAKE,WAAY,CAElBF,KAAKG,QAAU,IAAIC,EAAY,CAC3BC,GAAIL,KAAKM,iBAAiBR,EAAeF,GACzCW,KAAM,CACFC,KAAM,GAAGX,KAAaD,IACtBa,KAAM,6BACNC,cAAe,CACXC,OAAQ,CAAEC,QAAS,4BACnBA,QAAS,+BAIrBZ,KAAKa,sBAAsBb,KAAKG,QAASR,EAAeE,GACxD,OAAOG,KAAKG,OAChB,CAEAH,KAAKG,QAAU,IAAIW,EAAe,CAC9BT,GAAIL,KAAKM,iBAAiBR,EAAeF,GACzCmB,MAAO,CACHP,KAAM,GAAGX,KAAaD,IACtBa,KAAM,6BACNC,cAAe,CACXC,OAAQ,CAAEC,QAAS,4BACnBA,QAAS,6BAGjBI,UAAWrB,EAAcsB,IAAIC,SAC7BC,SAAUxB,EAAcwB,SACxBC,OAASC,IACL,MAAMC,EAAMD,EAAOE,aAAa,SAChC,MAAMC,EAASxB,KAAKyB,8BACpB,GAAIzB,KAAKD,SAAU,CACfC,KAAKD,SAASyB,EAAOE,QAAS1B,KAAK2B,SACvC,KAIR3B,KAAKa,sBAAsBb,KAAKG,QAASR,EAAeE,GAExD,OAAOG,KAAKG,OAChB,CAMUyB,WACN,OAAO5B,KAAKG,QAAWH,KAAKG,QAA2ByB,WAAa,IACxE,CAKUC,aACN,GAAI7B,KAAKG,SAAWH,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACtB,MAAM4B,EAAQ9B,KAAKG,QACnB2B,EAAMC,aAAa/B,KAAKC,SAASgB,IAAIC,UACrCY,EAAME,YAAYhC,KAAKC,SAASkB,SACpC,CACJ,EACH,IAAAc,EAAA,CAAAC,WAAA,MAAAD,EAAAxC,iBAAA,OAAAwC,CAAA","ignoreList":[]}
@@ -58,7 +58,7 @@ export class DateTimePlugin extends BasePlugin {
58
58
  required: fieldMetadata.required,
59
59
  change: (oEvent: sap.ui.base.Event) => {
60
60
  const val = oEvent.getParameter("value");
61
- const result = this.validate();
61
+ const result = this.validateAndApplyVisualState();
62
62
  if (this.onChange) {
63
63
  this.onChange(result.isValid, this.fieldKey);
64
64
  }
@@ -53,7 +53,7 @@ sap.ui.define(["./BasePlugin", "sap/m/Select", "sap/ui/core/Item", "sap/m/Text"]
53
53
  change: oEvent => {
54
54
  const item = oEvent.getParameter("selectedItem");
55
55
  const val = item ? item.getKey() : "";
56
- const result = this.validate();
56
+ const result = this.validateAndApplyVisualState();
57
57
  if (this.onChange) {
58
58
  this.onChange(result.isValid, this.fieldKey);
59
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownPlugin-dbg.js","names":["BasePlugin","___BasePlugin","DropdownPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","valueHelpArray","valueHelp","Array","isArray","enum","map","e","key","String","text","control","TextControl","id","generateStableId","path","formatter","match","find","vh","applyCommonDirectives","select","Select","selectedKey","enabled","ui","readOnly","forceSelection","change","oEvent","item","getParameter","val","getKey","result","validate","isValid","fieldKey","length","addItem","Item","forEach","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["DropdownPlugin.ts"],"sourcesContent":["/**\n * @file DropdownPlugin.ts\n * @description Renders a sap.m.Select utilizing the schema's valueHelp structure.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Select from \"sap/m/Select\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\n\n/**\n * Handles rendering logic for dropdown inputs.\n * Maps the static `valueHelp` schema array to `sap.ui.core.Item` elements.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class DropdownPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Select` component populated with schema-defined value help.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured Select control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n \n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (key: string) => {\n const match = valueHelpArray.find(vh => vh.key === key);\n return match ? match.text : key;\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n const select = new Select({\n id: this.generateStableId(engineScopeId, bindingPath),\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n forceSelection: false,\n change: (oEvent: sap.ui.base.Event) => {\n const item = oEvent.getParameter(\"selectedItem\");\n const val = item ? item.getKey() : \"\";\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n\n if (valueHelpArray.length > 0) {\n // Always add the empty placeholder so that 'required' checks can actually fire if the user hasn't made a choice\n select.addItem(new Item({ key: \"\", text: \"--- Select ---\" }));\n \n valueHelpArray.forEach(vh => {\n select.addItem(new Item({ key: vh.key, text: vh.text }));\n });\n }\n\n this.control = select;\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the currently selected key.\n * @returns {unknown} The selected key.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as Select).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic metadata state (e.g. readOnly) when the ConditionEngine fires.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n const select = this.control as Select;\n select.setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAOnB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,cAAc,SAASF,UAAU,CAAC;IAC3C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWG,MAAMA,CAACC,aAAgC,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MAC1L,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACC,QAAQ,GAAGL,aAAa;MAE7B,IAAI,CAAC,IAAI,CAACM,UAAU,EAAE;QAGlB,MAAMC,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,GAAI,IAAI,CAACA,OAAO,CAAYgC,cAAc,CAAC,CAAC,GAAG,IAAI;IAC1E;;IAEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACjC,OAAO,IAAI,IAAI,CAACZ,QAAQ,EAAE;QAC/B,IAAI,CAAC,IAAI,CAACC,UAAU,EAAE;QACtB,MAAMqB,MAAM,GAAG,IAAI,CAACV,OAAiB;QACrCU,MAAM,CAACwB,UAAU,CAAC,CAAC,IAAI,CAAC9C,QAAQ,CAAC0B,EAAE,EAAEC,QAAQ,CAAC;MAClD;IACJ;EACJ;EAAC,IAAAoB,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAtD,cAAA,GAAAA,cAAA;EAAA,OAAAsD,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"DropdownPlugin-dbg.js","names":["BasePlugin","___BasePlugin","DropdownPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","valueHelpArray","valueHelp","Array","isArray","enum","map","e","key","String","text","control","TextControl","id","generateStableId","path","formatter","match","find","vh","applyCommonDirectives","select","Select","selectedKey","enabled","ui","readOnly","forceSelection","change","oEvent","item","getParameter","val","getKey","result","validateAndApplyVisualState","isValid","fieldKey","length","addItem","Item","forEach","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["DropdownPlugin.ts"],"sourcesContent":["/**\n * @file DropdownPlugin.ts\n * @description Renders a sap.m.Select utilizing the schema's valueHelp structure.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Select from \"sap/m/Select\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\n\n/**\n * Handles rendering logic for dropdown inputs.\n * Maps the static `valueHelp` schema array to `sap.ui.core.Item` elements.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class DropdownPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Select` component populated with schema-defined value help.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured Select control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n \n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (key: string) => {\n const match = valueHelpArray.find(vh => vh.key === key);\n return match ? match.text : key;\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n const select = new Select({\n id: this.generateStableId(engineScopeId, bindingPath),\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n forceSelection: false,\n change: (oEvent: sap.ui.base.Event) => {\n const item = oEvent.getParameter(\"selectedItem\");\n const val = item ? item.getKey() : \"\";\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n\n if (valueHelpArray.length > 0) {\n // Always add the empty placeholder so that 'required' checks can actually fire if the user hasn't made a choice\n select.addItem(new Item({ key: \"\", text: \"--- Select ---\" }));\n \n valueHelpArray.forEach(vh => {\n select.addItem(new Item({ key: vh.key, text: vh.text }));\n });\n }\n\n this.control = select;\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the currently selected key.\n * @returns {unknown} The selected key.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as Select).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic metadata state (e.g. readOnly) when the ConditionEngine fires.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n const select = this.control as Select;\n select.setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAOnB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,cAAc,SAASF,UAAU,CAAC;IAC3C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWG,MAAMA,CAACC,aAAgC,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MAC1L,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACC,QAAQ,GAAGL,aAAa;MAE7B,IAAI,CAAC,IAAI,CAACM,UAAU,EAAE;QAGlB,MAAMC,cAAc,GAAGP,aAAa,CAACQ,SAAS,IAAIC,KAAK,CAACC,OAAO,CAACV,aAAa,CAACQ,SAAS,CAAC,GAClFR,aAAa,CAACQ,SAAS,GACtBR,aAAa,CAACW,IAAI,GAAGX,aAAa,CAACW,IAAI,CAACC,GAAG,CAACC,CAAC,KAAK;UAAEC,GAAG,EAAEC,MAAM,CAACF,CAAC,CAAC;UAAEG,IAAI,EAAED,MAAM,CAACF,CAAC;QAAE,CAAC,CAAC,CAAC,GAAG,EAAG;QAEpG,IAAI,CAACI,OAAO,GAAG,IAAIC,WAAW,CAAC;UAC3BC,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACjB,aAAa,EAAE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AD,SAAA,CAAAtD,cAAA,GAAAA,cAAA;EAAA,OAAAsD,SAAA;AAAA","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["./BasePlugin","sap/m/Select","sap/ui/core/Item","sap/m/Text"],function(e,t,n,i){"use strict";const a=e["BasePlugin"];class s extends a{render(e,a,s="meta",r,l){this.onChange=l;this.metadata=e;if(!this.isEditable){const t=e.valueHelp&&Array.isArray(e.valueHelp)?e.valueHelp:e.enum?e.enum.map(e=>({key:String(e),text:String(e)})):[];this.control=new i({id:this.generateStableId(r,a),text:{path:`${s}>${a}`,formatter:e=>{const n=t.find(t=>t.key===e);return n?n.text:e}}});this.applyCommonDirectives(this.control,e,s);return this.control}const o=new t({id:this.generateStableId(r,a),selectedKey:`{${s}>${a}}`,enabled:!e.ui?.readOnly,forceSelection:false,change:e=>{const t=e.getParameter("selectedItem");const n=t?t.getKey():"";const i=this.validate();if(this.onChange){this.onChange(i.isValid,this.fieldKey)}}});const c=e.valueHelp&&Array.isArray(e.valueHelp)?e.valueHelp:e.enum?e.enum.map(e=>({key:String(e),text:String(e)})):[];if(c.length>0){o.addItem(new n({key:"",text:"--- Select ---"}));c.forEach(e=>{o.addItem(new n({key:e.key,text:e.text}))})}this.control=o;this.applyCommonDirectives(this.control,e,s);return this.control}getValue(){return this.control?this.control.getSelectedKey():null}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;const e=this.control;e.setEnabled(!this.metadata.ui?.readOnly)}}}var r={__esModule:true};r.DropdownPlugin=s;return r});
1
+ sap.ui.define(["./BasePlugin","sap/m/Select","sap/ui/core/Item","sap/m/Text"],function(e,t,n,a){"use strict";const i=e["BasePlugin"];class s extends i{render(e,i,s="meta",l,r){this.onChange=r;this.metadata=e;if(!this.isEditable){const t=e.valueHelp&&Array.isArray(e.valueHelp)?e.valueHelp:e.enum?e.enum.map(e=>({key:String(e),text:String(e)})):[];this.control=new a({id:this.generateStableId(l,i),text:{path:`${s}>${i}`,formatter:e=>{const n=t.find(t=>t.key===e);return n?n.text:e}}});this.applyCommonDirectives(this.control,e,s);return this.control}const o=new t({id:this.generateStableId(l,i),selectedKey:`{${s}>${i}}`,enabled:!e.ui?.readOnly,forceSelection:false,change:e=>{const t=e.getParameter("selectedItem");const n=t?t.getKey():"";const a=this.validateAndApplyVisualState();if(this.onChange){this.onChange(a.isValid,this.fieldKey)}}});const c=e.valueHelp&&Array.isArray(e.valueHelp)?e.valueHelp:e.enum?e.enum.map(e=>({key:String(e),text:String(e)})):[];if(c.length>0){o.addItem(new n({key:"",text:"--- Select ---"}));c.forEach(e=>{o.addItem(new n({key:e.key,text:e.text}))})}this.control=o;this.applyCommonDirectives(this.control,e,s);return this.control}getValue(){return this.control?this.control.getSelectedKey():null}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;const e=this.control;e.setEnabled(!this.metadata.ui?.readOnly)}}}var l={__esModule:true};l.DropdownPlugin=s;return l});
2
2
  //# sourceMappingURL=DropdownPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownPlugin.js","names":["BasePlugin","___BasePlugin","DropdownPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","valueHelpArray","valueHelp","Array","isArray","enum","map","e","key","String","text","control","TextControl","id","generateStableId","path","formatter","match","find","vh","applyCommonDirectives","select","Select","selectedKey","enabled","ui","readOnly","forceSelection","change","oEvent","item","getParameter","val","getKey","result","validate","isValid","fieldKey","length","addItem","Item","forEach","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["DropdownPlugin.ts"],"sourcesContent":["/**\n * @file DropdownPlugin.ts\n * @description Renders a sap.m.Select utilizing the schema's valueHelp structure.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Select from \"sap/m/Select\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\n\n/**\n * Handles rendering logic for dropdown inputs.\n * Maps the static `valueHelp` schema array to `sap.ui.core.Item` elements.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class DropdownPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Select` component populated with schema-defined value help.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured Select control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n \n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (key: string) => {\n const match = valueHelpArray.find(vh => vh.key === key);\n return match ? match.text : key;\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n const select = new Select({\n id: this.generateStableId(engineScopeId, bindingPath),\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n forceSelection: false,\n change: (oEvent: sap.ui.base.Event) => {\n const item = oEvent.getParameter(\"selectedItem\");\n const val = item ? item.getKey() : \"\";\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n\n if (valueHelpArray.length > 0) {\n // Always add the empty placeholder so that 'required' checks can actually fire if the user hasn't made a choice\n select.addItem(new Item({ key: \"\", text: \"--- Select ---\" }));\n \n valueHelpArray.forEach(vh => {\n select.addItem(new Item({ key: vh.key, text: vh.text }));\n });\n }\n\n this.control = select;\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the currently selected key.\n * @returns {unknown} The selected key.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as Select).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic metadata state (e.g. readOnly) when the ConditionEngine fires.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n const select = this.control as Select;\n select.setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"6GAAA,MAKSA,EAAUC,EAAA,cAcZ,MAAMC,UAAuBF,EAWzBG,OAAOC,EAAmCC,EAAsBC,EAAoB,OAAQC,EAAwBC,GACvHC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAEhB,IAAKK,KAAKE,WAAY,CAGlB,MAAMC,EAAiBR,EAAcS,WAAaC,MAAMC,QAAQX,EAAcS,WACxET,EAAcS,UACbT,EAAcY,KAAOZ,EAAcY,KAAKC,IAAIC,IAAC,CAAOC,IAAKC,OAAOF,GAAIG,KAAMD,OAAOF,MAAS,GAEjGT,KAAKa,QAAU,IAAIC,EAAY,CAC3BC,GAAIf,KAAKgB,iBAAiBlB,EAAeF,GACzCgB,KAAM,CACFK,KAAM,GAAGpB,KAAaD,IACtBsB,UAAYR,IACR,MAAMS,EAAQhB,EAAeiB,KAAKC,GAAMA,EAAGX,MAAQA,GACnD,OAAOS,EAAQA,EAAMP,KAAOF,MAIxCV,KAAKsB,sBAAsBtB,KAAKa,QAASlB,EAAeE,GACxD,OAAOG,KAAKa,OAChB,CAEA,MAAMU,EAAS,IAAIC,EAAO,CACtBT,GAAIf,KAAKgB,iBAAiBlB,EAAeF,GACzC6B,YAAa,IAAI5B,KAAaD,KAC9B8B,SAAU/B,EAAcgC,IAAIC,SAC5BC,eAAgB,MAChBC,OAASC,IACL,MAAMC,EAAOD,EAAOE,aAAa,gBACjC,MAAMC,EAAMF,EAAOA,EAAKG,SAAW,GACnC,MAAMC,EAASpC,KAAKqC,WACpB,GAAIrC,KAAKD,SAAU,CACfC,KAAKD,SAASqC,EAAOE,QAAStC,KAAKuC,SACvC,KAIR,MAAMpC,EAAiBR,EAAcS,WAAaC,MAAMC,QAAQX,EAAcS,WACxET,EAAcS,UACbT,EAAcY,KAAOZ,EAAcY,KAAKC,IAAIC,IAAC,CAAOC,IAAKC,OAAOF,GAAIG,KAAMD,OAAOF,MAAS,GAEjG,GAAIN,EAAeqC,OAAS,EAAG,CAE3BjB,EAAOkB,QAAQ,IAAIC,EAAK,CAAEhC,IAAK,GAAIE,KAAM,oBAEzCT,EAAewC,QAAQtB,IACnBE,EAAOkB,QAAQ,IAAIC,EAAK,CAAEhC,IAAKW,EAAGX,IAAKE,KAAMS,EAAGT,SAExD,CAEAZ,KAAKa,QAAUU,EACfvB,KAAKsB,sBAAsBtB,KAAKa,QAASlB,EAAeE,GACxD,OAAOG,KAAKa,OAChB,CAMU+B,WACN,OAAO5C,KAAKa,QAAWb,KAAKa,QAAmBgC,iBAAmB,IACtE,CAKUC,aACN,GAAI9C,KAAKa,SAAWb,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACtB,MAAMqB,EAASvB,KAAKa,QACpBU,EAAOwB,YAAY/C,KAAKC,SAAS0B,IAAIC,SACzC,CACJ,EACH,IAAAoB,EAAA,CAAAC,WAAA,MAAAD,EAAAvD,iBAAA,OAAAuD,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"DropdownPlugin.js","names":["BasePlugin","___BasePlugin","DropdownPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","valueHelpArray","valueHelp","Array","isArray","enum","map","e","key","String","text","control","TextControl","id","generateStableId","path","formatter","match","find","vh","applyCommonDirectives","select","Select","selectedKey","enabled","ui","readOnly","forceSelection","change","oEvent","item","getParameter","val","getKey","result","validateAndApplyVisualState","isValid","fieldKey","length","addItem","Item","forEach","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["DropdownPlugin.ts"],"sourcesContent":["/**\n * @file DropdownPlugin.ts\n * @description Renders a sap.m.Select utilizing the schema's valueHelp structure.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Select from \"sap/m/Select\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\n\n/**\n * Handles rendering logic for dropdown inputs.\n * Maps the static `valueHelp` schema array to `sap.ui.core.Item` elements.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class DropdownPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.Select` component populated with schema-defined value help.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured Select control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n \n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (key: string) => {\n const match = valueHelpArray.find(vh => vh.key === key);\n return match ? match.text : key;\n }\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n const select = new Select({\n id: this.generateStableId(engineScopeId, bindingPath),\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n forceSelection: false,\n change: (oEvent: sap.ui.base.Event) => {\n const item = oEvent.getParameter(\"selectedItem\");\n const val = item ? item.getKey() : \"\";\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n const valueHelpArray = fieldMetadata.valueHelp && Array.isArray(fieldMetadata.valueHelp) \n ? fieldMetadata.valueHelp \n : (fieldMetadata.enum ? fieldMetadata.enum.map(e => ({ key: String(e), text: String(e) })) : []);\n\n if (valueHelpArray.length > 0) {\n // Always add the empty placeholder so that 'required' checks can actually fire if the user hasn't made a choice\n select.addItem(new Item({ key: \"\", text: \"--- Select ---\" }));\n \n valueHelpArray.forEach(vh => {\n select.addItem(new Item({ key: vh.key, text: vh.text }));\n });\n }\n\n this.control = select;\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the currently selected key.\n * @returns {unknown} The selected key.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as Select).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic metadata state (e.g. readOnly) when the ConditionEngine fires.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n const select = this.control as Select;\n select.setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"6GAAA,MAKSA,EAAUC,EAAA,cAcZ,MAAMC,UAAuBF,EAWzBG,OAAOC,EAAmCC,EAAsBC,EAAoB,OAAQC,EAAwBC,GACvHC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAEhB,IAAKK,KAAKE,WAAY,CAGlB,MAAMC,EAAiBR,EAAcS,WAAaC,MAAMC,QAAQX,EAAcS,WACxET,EAAcS,UACbT,EAAcY,KAAOZ,EAAcY,KAAKC,IAAIC,IAAC,CA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iBAAmB,IACtE,CAKUC,aACN,GAAI9C,KAAKa,SAAWb,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACtB,MAAMqB,EAASvB,KAAKa,QACpBU,EAAOwB,YAAY/C,KAAKC,SAAS0B,IAAIC,SACzC,CACJ,EACH,IAAAoB,EAAA,CAAAC,WAAA,MAAAD,EAAAvD,iBAAA,OAAAuD,CAAA","ignoreList":[]}
@@ -61,7 +61,7 @@ export class DropdownPlugin extends BasePlugin {
61
61
  change: (oEvent: sap.ui.base.Event) => {
62
62
  const item = oEvent.getParameter("selectedItem");
63
63
  const val = item ? item.getKey() : "";
64
- const result = this.validate();
64
+ const result = this.validateAndApplyVisualState();
65
65
  if (this.onChange) {
66
66
  this.onChange(result.isValid, this.fieldKey);
67
67
  }
@@ -45,7 +45,7 @@ sap.ui.define(["./BasePlugin", "sap/ui/unified/FileUploader", "sap/m/Link"], fun
45
45
  width: "100%",
46
46
  change: oEvent => {
47
47
  const val = oEvent.getParameter("newValue");
48
- const result = this.validate();
48
+ const result = this.validateAndApplyVisualState();
49
49
  if (this.onChange) {
50
50
  this.onChange(result.isValid, this.fieldKey);
51
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploaderPlugin-dbg.js","names":["BasePlugin","___BasePlugin","FileUploaderPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","control","LinkControl","id","generateStableId","text","href","target","applyCommonDirectives","FileUploader","value","enabled","ui","readOnly","placeholder","label","width","change","oEvent","val","getParameter","result","validate","isValid","fieldKey","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["FileUploaderPlugin.ts"],"sourcesContent":["/**\n * @file FileUploaderPlugin.ts\n * @description Renders a sap.ui.unified.FileUploader.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport FileUploader from \"sap/ui/unified/FileUploader\";\nimport Control from \"sap/ui/core/Control\";\nimport LinkControl from \"sap/m/Link\";\n\n/**\n * Handles rendering logic for file uploads.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class FileUploaderPlugin extends BasePlugin {\n /**\n * Renders a `sap.ui.unified.FileUploader` component.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured FileUploader control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n this.control = new LinkControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`,\n href: `{${modelName}>${bindingPath}}`, // Assuming the value is a URL to the file\n target: \"_blank\"\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new FileUploader({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: fieldMetadata.ui?.label || \"Choose a file...\",\n width: \"100%\",\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"newValue\");\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the current file path.\n * @returns {unknown} The file value.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as FileUploader).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as FileUploader).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,M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AAC;UAC9B,IAAI,IAAI,CAACxB,QAAQ,EAAE;YACf,IAAI,CAACA,QAAQ,CAACuB,MAAM,CAACE,OAAO,EAAE,IAAI,CAACC,QAAQ,CAAC;UAChD;QACJ;MACJ,CAAC,CAAC;MAEF,IAAI,CAAChB,qBAAqB,CAAC,IAAI,CAACP,OAAO,EAAEP,aAAa,EAAEE,SAAS,CAAC;MAClE,OAAO,IAAI,CAACK,OAAO;IACvB;;IAEA;AACJ;AACA;AACA;IACcwB,QAAQA,CAAA,EAAY;MAC1B,OAAO,IAAI,CAACxB,OAAO,GAAI,IAAI,CAACA,OAAO,CAAkBwB,QAAQ,CAAC,CAAC,GAAG,IAAI;IAC1E;;IAEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACzB,OAAO,IAAI,IAAI,CAACF,QAAQ,EAAE;QAC/B,IAAI,CAAC,IAAI,CAACC,UAAU,EAAE;QACrB,IAAI,CAACC,OAAO,CAAkB0B,UAAU,CAAC,CAAC,IAAI,CAAC5B,QAAQ,CAACa,EAAE,EAAEC,QAAQ,CAAC;MAC1E;IACJ;EACJ;EAAC,IAAAe,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAApC,kBAAA,GAAAA,kBAAA;EAAA,OAAAoC,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"FileUploaderPlugin-dbg.js","names":["BasePlugin","___BasePlugin","FileUploaderPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","control","LinkControl","id","generateStableId","text","href","target","applyCommonDirectives","FileUploader","value","enabled","ui","readOnly","placeholder","label","width","change","oEvent","val","getParameter","result","validateAndApplyVisualState","isValid","fieldKey","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["FileUploaderPlugin.ts"],"sourcesContent":["/**\n * @file FileUploaderPlugin.ts\n * @description Renders a sap.ui.unified.FileUploader.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport FileUploader from \"sap/ui/unified/FileUploader\";\nimport Control from \"sap/ui/core/Control\";\nimport LinkControl from \"sap/m/Link\";\n\n/**\n * Handles rendering logic for file uploads.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class FileUploaderPlugin extends BasePlugin {\n /**\n * Renders a `sap.ui.unified.FileUploader` component.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured FileUploader control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n this.control = new LinkControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`,\n href: `{${modelName}>${bindingPath}}`, // Assuming the value is a URL to the file\n target: \"_blank\"\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new FileUploader({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: fieldMetadata.ui?.label || \"Choose a file...\",\n width: \"100%\",\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"newValue\");\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the current file path.\n * @returns {unknown} The file value.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as FileUploader).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as FileUploader).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAMnB;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,kBAAkB,SAASF,UAAU,CAAC;IAC/C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWG,MAAMA,CAACC,aAAgC,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MAC1L,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACC,QAAQ,GAAGL,aAAa;MAE7B,IAAI,CAAC,IAAI,CAACM,UAAU,EAAE;QAElB,IAAI,CAACC,OAAO,GAAG,IAAIC,WAAW,CAAC;UAC3BC,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACP,aAAa,EAAEF,WAAW,CAAC;UACrDU,IAAI,EAAE,IAAIT,SAAS,IAAID,WAAW,GAAG;UACrCW,IAAI,EAAE,IAAIV,SAAS,IAAID,WAAW,GAAG;UAAE;UACvCY,MAAM,EAAE;QACZ,CAAC,CAAC;QACF,IAAI,CAACC,qBAAqB,CAAC,IAAI,CAACP,OAAO,EAAEP,aAAa,EAAEE,SAAS,CAAC;QAClE,OAAO,IAAI,CAACK,OAAO;MACvB;MAEA,IAAI,CAACA,OAAO,GAAG,IAAIQ,YAAY,CAAC;QAC5BN,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACP,aAAa,EAAEF,WAAW,CAAC;QACrDe,KAAK,EAAE,IAAId,SAAS,IAAID,WAAW,GAAG;QACtCgB,OAAO,EAAE,CAACjB,aAAa,CAACkB,EAAE,EAAEC,QAAQ;QACpCC,WAAW,EAAEpB,aAAa,CAACkB,EAAE,EAAEG,KAAK,IAAI,kBAAkB;QAC1DC,KAAK,EAAE,MAAM;QACbC,MAAM,EAAGC,MAAyB,IAAK;UACnC,MAAMC,GAAG,GAAGD,MAAM,CAACE,YAAY,CAAC,UAAU,CAAC;UAC3C,MAAMC,MAAM,GAAG,IAAI,CAACC,2BAA2B,CAAC,CAAC;UACjD,IAAI,IAAI,CAACxB,QAAQ,EAAE;YACf,IAAI,CAACA,QAAQ,CAACuB,MAAM,CAACE,OAAO,EAAE,IAAI,CAACC,QAAQ,CAAC;UAChD;QACJ;MACJ,CAAC,CAAC;MAEF,IAAI,CAAChB,qBAAqB,CAAC,IAAI,CAACP,OAAO,EAAEP,aAAa,EAAEE,SAAS,CAAC;MAClE,OAAO,IAAI,CAACK,OAAO;IACvB;;IAEA;AACJ;AACA;AACA;IACcwB,QAAQA,CAAA,EAAY;MAC1B,OAAO,IAAI,CAACxB,OAAO,GAAI,IAAI,CAACA,OAAO,CAAkBwB,QAAQ,CAAC,CAAC,GAAG,IAAI;IAC1E;;IAEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACzB,OAAO,IAAI,IAAI,CAACF,QAAQ,EAAE;QAC/B,IAAI,CAAC,IAAI,CAACC,UAAU,EAAE;QACrB,IAAI,CAACC,OAAO,CAAkB0B,UAAU,CAAC,CAAC,IAAI,CAAC5B,QAAQ,CAACa,EAAE,EAAEC,QAAQ,CAAC;MAC1E;IACJ;EACJ;EAAC,IAAAe,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAApC,kBAAA,GAAAA,kBAAA;EAAA,OAAAoC,SAAA;AAAA","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["./BasePlugin","sap/ui/unified/FileUploader","sap/m/Link"],function(t,e,i){"use strict";const a=t["BasePlugin"];class n extends a{render(t,a,n="meta",l,s){this.onChange=s;this.metadata=t;if(!this.isEditable){this.control=new i({id:this.generateStableId(l,a),text:`{${n}>${a}}`,href:`{${n}>${a}}`,target:"_blank"});this.applyCommonDirectives(this.control,t,n);return this.control}this.control=new e({id:this.generateStableId(l,a),value:`{${n}>${a}}`,enabled:!t.ui?.readOnly,placeholder:t.ui?.label||"Choose a file...",width:"100%",change:t=>{const e=t.getParameter("newValue");const i=this.validate();if(this.onChange){this.onChange(i.isValid,this.fieldKey)}}});this.applyCommonDirectives(this.control,t,n);return this.control}getValue(){return this.control?this.control.getValue():null}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;this.control.setEnabled(!this.metadata.ui?.readOnly)}}}var l={__esModule:true};l.FileUploaderPlugin=n;return l});
1
+ sap.ui.define(["./BasePlugin","sap/ui/unified/FileUploader","sap/m/Link"],function(t,e,i){"use strict";const a=t["BasePlugin"];class n extends a{render(t,a,n="meta",l,s){this.onChange=s;this.metadata=t;if(!this.isEditable){this.control=new i({id:this.generateStableId(l,a),text:`{${n}>${a}}`,href:`{${n}>${a}}`,target:"_blank"});this.applyCommonDirectives(this.control,t,n);return this.control}this.control=new e({id:this.generateStableId(l,a),value:`{${n}>${a}}`,enabled:!t.ui?.readOnly,placeholder:t.ui?.label||"Choose a file...",width:"100%",change:t=>{const e=t.getParameter("newValue");const i=this.validateAndApplyVisualState();if(this.onChange){this.onChange(i.isValid,this.fieldKey)}}});this.applyCommonDirectives(this.control,t,n);return this.control}getValue(){return this.control?this.control.getValue():null}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;this.control.setEnabled(!this.metadata.ui?.readOnly)}}}var l={__esModule:true};l.FileUploaderPlugin=n;return l});
2
2
  //# sourceMappingURL=FileUploaderPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploaderPlugin.js","names":["BasePlugin","___BasePlugin","FileUploaderPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","control","LinkControl","id","generateStableId","text","href","target","applyCommonDirectives","FileUploader","value","enabled","ui","readOnly","placeholder","label","width","change","oEvent","val","getParameter","result","validate","isValid","fieldKey","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["FileUploaderPlugin.ts"],"sourcesContent":["/**\n * @file FileUploaderPlugin.ts\n * @description Renders a sap.ui.unified.FileUploader.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport FileUploader from \"sap/ui/unified/FileUploader\";\nimport Control from \"sap/ui/core/Control\";\nimport LinkControl from \"sap/m/Link\";\n\n/**\n * Handles rendering logic for file uploads.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class FileUploaderPlugin extends BasePlugin {\n /**\n * Renders a `sap.ui.unified.FileUploader` component.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured FileUploader control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n this.control = new LinkControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`,\n href: `{${modelName}>${bindingPath}}`, // Assuming the value is a URL to the file\n target: \"_blank\"\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new FileUploader({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: fieldMetadata.ui?.label || \"Choose a file...\",\n width: \"100%\",\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"newValue\");\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the current file path.\n * @returns {unknown} The file value.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as FileUploader).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as FileUploader).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"uGAAA,MAKSA,EAAUC,EAAA,cAYZ,MAAMC,UAA2BF,EAW7BG,OAAOC,EAAmCC,EAAsBC,EAAoB,OAAQC,EAAwBC,GACvHC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAEhB,IAAKK,KAAKE,WAAY,CAElBF,KAAKG,QAAU,IAAIC,EAAY,CAC3BC,GAAIL,KAAKM,iBAAiBR,EAAeF,GACzCW,KAAM,IAAIV,KAAaD,KACvBY,KAAM,IAAIX,KAAaD,KACvBa,OAAQ,WAEZT,KAAKU,sBAAsBV,KAAKG,QAASR,EAAeE,GACxD,OAAOG,KAAKG,OAChB,CAEAH,KAAKG,QAAU,IAAIQ,EAAa,CAC5BN,GAAIL,KAAKM,iBAAiBR,EAAeF,GACzCgB,MAAO,IAAIf,KAAaD,KACxBiB,SAAUlB,EAAcmB,IAAIC,SAC5BC,YAAarB,EAAcmB,IAAIG,OAAS,mBACxCC,MAAO,OACPC,OAASC,IACL,MAAMC,EAAMD,EAAOE,aAAa,YAChC,MAAMC,EAASvB,KAAKwB,WACpB,GAAIxB,KAAKD,SAAU,CACfC,KAAKD,SAASwB,EAAOE,QAASzB,KAAK0B,SACvC,KAIR1B,KAAKU,sBAAsBV,KAAKG,QAASR,EAAeE,GACxD,OAAOG,KAAKG,OAChB,CAMUwB,WACN,OAAO3B,KAAKG,QAAWH,KAAKG,QAAyBwB,WAAa,IACtE,CAKUC,aACN,GAAI5B,KAAKG,SAAWH,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACrBF,KAAKG,QAAyB0B,YAAY7B,KAAKC,SAASa,IAAIC,SACjE,CACJ,EACH,IAAAe,EAAA,CAAAC,WAAA,MAAAD,EAAArC,qBAAA,OAAAqC,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"FileUploaderPlugin.js","names":["BasePlugin","___BasePlugin","FileUploaderPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","this","metadata","isEditable","control","LinkControl","id","generateStableId","text","href","target","applyCommonDirectives","FileUploader","value","enabled","ui","readOnly","placeholder","label","width","change","oEvent","val","getParameter","result","validateAndApplyVisualState","isValid","fieldKey","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["FileUploaderPlugin.ts"],"sourcesContent":["/**\n * @file FileUploaderPlugin.ts\n * @description Renders a sap.ui.unified.FileUploader.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport FileUploader from \"sap/ui/unified/FileUploader\";\nimport Control from \"sap/ui/core/Control\";\nimport LinkControl from \"sap/m/Link\";\n\n/**\n * Handles rendering logic for file uploads.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class FileUploaderPlugin extends BasePlugin {\n /**\n * Renders a `sap.ui.unified.FileUploader` component.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured FileUploader control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n \n this.control = new LinkControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`,\n href: `{${modelName}>${bindingPath}}`, // Assuming the value is a URL to the file\n target: \"_blank\"\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n this.control = new FileUploader({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: fieldMetadata.ui?.label || \"Choose a file...\",\n width: \"100%\",\n change: (oEvent: sap.ui.base.Event) => {\n const val = oEvent.getParameter(\"newValue\");\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the current file path.\n * @returns {unknown} The file value.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as FileUploader).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as FileUploader).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"uGAAA,MAKSA,EAAUC,EAAA,cAYZ,MAAMC,UAA2BF,EAW7BG,OAAOC,EAAmCC,EAAsBC,EAAoB,OAAQC,EAAwBC,GACvHC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAEhB,IAAKK,KAAKE,WAAY,CAElBF,KAAKG,QAAU,IAAIC,EAAY,CAC3BC,GAAIL,KAAKM,iBAAiBR,EAAeF,GACzCW,KAAM,IAAIV,KAAaD,KACvBY,KAAM,IAAIX,KAAaD,KACvBa,OAAQ,WAEZT,KAAKU,sBAAsBV,KAAKG,QAASR,EAAeE,GACxD,OAAOG,KAAKG,OAChB,CAEAH,KAAKG,QAAU,IAAIQ,EAAa,CAC5BN,GAAIL,KAAKM,iBAAiBR,EAAeF,GACzCgB,MAAO,IAAIf,KAAaD,KACxBiB,SAAUlB,EAAcmB,IAAIC,SAC5BC,YAAarB,EAAcmB,IAAIG,OAAS,mBACxCC,MAAO,OACPC,OAASC,IACL,MAAMC,EAAMD,EAAOE,aAAa,YAChC,MAAMC,EAASvB,KAAKwB,8BACpB,GAAIxB,KAAKD,SAAU,CACfC,KAAKD,SAASwB,EAAOE,QAASzB,KAAK0B,SACvC,KAIR1B,KAAKU,sBAAsBV,KAAKG,QAASR,EAAeE,GACxD,OAAOG,KAAKG,OAChB,CAMUwB,WACN,OAAO3B,KAAKG,QAAWH,KAAKG,QAAyBwB,WAAa,IACtE,CAKUC,aACN,GAAI5B,KAAKG,SAAWH,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACrBF,KAAKG,QAAyB0B,YAAY7B,KAAKC,SAASa,IAAIC,SACjE,CACJ,EACH,IAAAe,EAAA,CAAAC,WAAA,MAAAD,EAAArC,qBAAA,OAAAqC,CAAA","ignoreList":[]}
@@ -50,7 +50,7 @@ export class FileUploaderPlugin extends BasePlugin {
50
50
  width: "100%",
51
51
  change: (oEvent: sap.ui.base.Event) => {
52
52
  const val = oEvent.getParameter("newValue");
53
- const result = this.validate();
53
+ const result = this.validateAndApplyVisualState();
54
54
  if (this.onChange) {
55
55
  this.onChange(result.isValid, this.fieldKey);
56
56
  }
@@ -41,7 +41,7 @@ sap.ui.define(["../controls/BasePlugin", "../../controls/GeolocationControl", "s
41
41
  });
42
42
  this.applyCommonDirectives(this.control, metadata, modelName);
43
43
  this.control.attachCapture(() => {
44
- const result = this.validate();
44
+ const result = this.validateAndApplyVisualState();
45
45
  if (this.onChange) {
46
46
  this.onChange(result.isValid, this.fieldKey);
47
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GeolocationPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","GeolocationControl","_interopRequireDefault","__GeolocationControl","GeolocationPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","path","formatter","val","lat","undefined","lng","applyCommonDirectives","value","schemaMetadata","readOnly","ui","attachCapture","result","validate","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["GeolocationPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport GeolocationControl from \"../../controls/GeolocationControl\";\nimport TextControl from \"sap/m/Text\";\n\nexport class GeolocationPlugin extends BasePlugin {\n /**\n * Renders a `GeolocationControl` component.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured GeolocationControl.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: unknown) => val && val.lat !== undefined && val.lng !== undefined ? `Lat: ${val.lat}, Lng: ${val.lng}` : \"\"\n }\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new GeolocationControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n });\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as GeolocationControl).attachCapture(() => {\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n });\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current geolocation object.\n * @returns {unknown} The geolocation value.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as GeolocationControl).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as sap.ui.core.Control).setProperty(\"readOnly\", !!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;;;;QAASA,UAAU,GAAAC,sBAAA;EAAA,MAGZC,kBAAkB,GAAAC,sBAAA,CA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EAAED;MAC7B,CAAC,CAAC;MAEF,IAAI,CAACH,qBAAqB,CAAC,IAAI,CAACX,OAAO,EAAER,QAAQ,EAAEE,SAAS,CAAC;MAE5D,IAAI,CAACM,OAAO,CAAwBgB,aAAa,CAAC,MAAM;QACrD,MAAMC,MAAM,GAAG,IAAI,CAACC,QAAQ,CAAC,CAAC;QAC1B,IAAI,IAAI,CAACtB,QAAQ,EAAE;UACf,IAAI,CAACA,QAAQ,CAACqB,MAAM,CAACE,OAAO,EAAE,IAAI,CAACtB,QAAQ,CAAC;QAChD;MACR,CAAC,CAAC;MAEF,OAAO,IAAI,CAACG,OAAO;IACvB;;IAEA;AACJ;AACA;AACA;IACcoB,QAAQA,CAAA,EAAY;MAC1B,OAAO,IAAI,CAACpB,OAAO,GAAI,IAAI,CAACA,OAAO,CAAwBoB,QAAQ,CAAC,CAAC,GAAG,IAAI;IAChF;;IAEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACrB,OAAO,IAAI,IAAI,CAACR,QAAQ,EAAE;QAC/B,IAAI,CAAC,IAAI,CAACO,UAAU,EAAE;QACrB,IAAI,CAACC,OAAO,CAAyBsB,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC9B,QAAQ,CAACuB,EAAE,EAAED,QAAQ,CAAC;MAC/F;IACJ;EACJ;EAAC,IAAAS,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAjC,iBAAA,GAAAA,iBAAA;EAAA,OAAAiC,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"GeolocationPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","GeolocationControl","_interopRequireDefault","__GeolocationControl","GeolocationPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","path","formatter","val","lat","undefined","lng","applyCommonDirectives","value","schemaMetadata","readOnly","ui","attachCapture","result","validateAndApplyVisualState","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["GeolocationPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport GeolocationControl from \"../../controls/GeolocationControl\";\nimport TextControl from \"sap/m/Text\";\n\nexport class GeolocationPlugin extends BasePlugin {\n /**\n * Renders a `GeolocationControl` component.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured GeolocationControl.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: unknown) => val && val.lat !== undefined && val.lng !== undefined ? `Lat: ${val.lat}, Lng: ${val.lng}` : \"\"\n }\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new GeolocationControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n });\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as GeolocationControl).attachCapture(() => {\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n });\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current geolocation object.\n * @returns {unknown} The geolocation value.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as GeolocationControl).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as sap.ui.core.Control).setProperty(\"readOnly\", !!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;;;;QAASA,UAAU,GAAAC,sBAAA;EAAA,MAGZC,kBAAkB,GAAAC,sBAAA,CAAAC,oBAAA;EAGlB,MAAMC,iBAAiB,SAASL,UAAU,CAAC;IAC9C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACWM,MAAMA,CAACC,QAA2B,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MACrL,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACJ,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACK,QAAQ,GAAGJ,WAAW,CAACK,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;MAC5C,IAAI,CAACJ,SAAS,GAAGA,SAAS;MAE1B,IAAI,CAAC,IAAI,CAACK,UAAU,EAAE;QAElB,IAAI,CAACC,OAAO,GAAG,IAAIC,WAAW,CAAC;UAC3BC,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACR,aAAa,EAAEF,WAAW,CAAC;UACrDW,IAAI,EAAE;YACFC,IAAI,EAAE,GAAGX,SAAS,IAAID,WAAW,EAAE;YACnCa,SAAS,EAAGC,GAAY,IAAKA,GAAG,IAAIA,GAAG,CAACC,GAAG,KAAKC,SAAS,IAAIF,GAAG,CAACG,GAAG,KAAKD,SAAS,GAAG,QAAQF,GAAG,CAACC,GAAG,UAAUD,GAAG,CAACG,GAAG,EAAE,GAAG;UAC9H;QACJ,CAAC,CAAC;QACF,IAAI,CAACC,qBAAqB,CAAC,IAAI,CAACX,OAAO,EAAER,QAAQ,EAAEE,SAAS,CAAC;QAC7D,OAAO,IAAI,CAACM,OAAO;MACvB;MAEA,IAAI,CAACA,OAAO,GAAG,IAAIb,kBAAkB,CAAC;QAClCe,EAAE,EAAE,IAAI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"use strict";function n(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const a=t["BasePlugin"];const o=n(e);class l extends a{render(t,e,n="meta",a,l){this.onChange=l;this.metadata=t;this.fieldKey=e.replace("/","");this.modelName=n;if(!this.isEditable){this.control=new i({id:this.generateStableId(a,e),text:{path:`${n}>${e}`,formatter:t=>t&&t.lat!==undefined&&t.lng!==undefined?`Lat: ${t.lat}, Lng: ${t.lng}`:""}});this.applyCommonDirectives(this.control,t,n);return this.control}this.control=new o({id:this.generateStableId(a,e),value:`{${n}>${e}}`,schemaMetadata:t,readOnly:!!t.ui?.readOnly});this.applyCommonDirectives(this.control,t,n);this.control.attachCapture(()=>{const t=this.validate();if(this.onChange){this.onChange(t.isValid,this.fieldKey)}});return this.control}getValue(){return this.control?this.control.getValue():null}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;this.control.setProperty("readOnly",!!this.metadata.ui?.readOnly)}}}var s={__esModule:true};s.GeolocationPlugin=l;return s});
1
+ sap.ui.define(["../controls/BasePlugin","../../controls/GeolocationControl","sap/m/Text"],function(t,e,i){"use strict";function n(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const a=t["BasePlugin"];const l=n(e);class o extends a{render(t,e,n="meta",a,o){this.onChange=o;this.metadata=t;this.fieldKey=e.replace("/","");this.modelName=n;if(!this.isEditable){this.control=new i({id:this.generateStableId(a,e),text:{path:`${n}>${e}`,formatter:t=>t&&t.lat!==undefined&&t.lng!==undefined?`Lat: ${t.lat}, Lng: ${t.lng}`:""}});this.applyCommonDirectives(this.control,t,n);return this.control}this.control=new l({id:this.generateStableId(a,e),value:`{${n}>${e}}`,schemaMetadata:t,readOnly:!!t.ui?.readOnly});this.applyCommonDirectives(this.control,t,n);this.control.attachCapture(()=>{const t=this.validateAndApplyVisualState();if(this.onChange){this.onChange(t.isValid,this.fieldKey)}});return this.control}getValue(){return this.control?this.control.getValue():null}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;this.control.setProperty("readOnly",!!this.metadata.ui?.readOnly)}}}var s={__esModule:true};s.GeolocationPlugin=o;return s});
2
2
  //# sourceMappingURL=GeolocationPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GeolocationPlugin.js","names":["BasePlugin","___controls_BasePlugin","GeolocationControl","_interopRequireDefault","__GeolocationControl","GeolocationPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","path","formatter","val","lat","undefined","lng","applyCommonDirectives","value","schemaMetadata","readOnly","ui","attachCapture","result","validate","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["GeolocationPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport GeolocationControl from \"../../controls/GeolocationControl\";\nimport TextControl from \"sap/m/Text\";\n\nexport class GeolocationPlugin extends BasePlugin {\n /**\n * Renders a `GeolocationControl` component.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured GeolocationControl.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: unknown) => val && val.lat !== undefined && val.lng !== undefined ? `Lat: ${val.lat}, Lng: ${val.lng}` : \"\"\n }\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new GeolocationControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n });\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as GeolocationControl).attachCapture(() => {\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n });\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current geolocation object.\n * @returns {unknown} The geolocation value.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as GeolocationControl).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as sap.ui.core.Control).setProperty(\"readOnly\", !!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"8MAASA,EAAUC,EAAA,oBAGZC,EAAkBC,EAAAC,GAGlB,MAAMC,UAA0BL,EAW5BM,OAAOC,EAA8BC,EAAsBC,EAAoB,OAAQC,EAAwBC,GAClHC,KAAKD,SAAWA,EAChBC,KAAKL,SAAWA,EAChBK,KAAKC,SAAWL,EAAYM,QAAQ,IAAK,IACzCF,KAAKH,UAAYA,EAEjB,IAAKG,KAAKG,WAAY,CAElBH,KAAKI,QAAU,IAAIC,EAAY,CAC3BC,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCY,KAAM,CACFC,KAAM,GAAGZ,KAAaD,IACtBc,UAAYC,GAAiBA,GAAOA,EAAIC,MAAQC,WAAaF,EAAIG,MAAQD,UAAY,QAAQF,EAAIC,aAAaD,EAAIG,MAAQ,MAGlId,KAAKe,sBAAsBf,KAAKI,QAAST,EAAUE,GACnD,OAAOG,KAAKI,OAChB,CAEAJ,KAAKI,QAAU,IAAId,EAAmB,CAClCgB,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCoB,MAAO,IAAInB,KAAaD,KACxBqB,eAAgBtB,EAChBuB,WAAYvB,EAASwB,IAAID,WAG7BlB,KAAKe,sBAAsBf,KAAKI,QAAST,EAAUE,GAElDG,KAAKI,QAA+BgB,cAAc,KAC/C,MAAMC,EAASrB,KAAKsB,WAChB,GAAItB,KAAKD,SAAU,CACfC,KAAKD,SAASsB,EAAOE,QAASvB,KAAKC,SACvC,IAGR,OAAOD,KAAKI,OAChB,CAMUoB,WACN,OAAOxB,KAAKI,QAAWJ,KAAKI,QAA+BoB,WAAa,IAC5E,CAKUC,aACN,GAAIzB,KAAKI,SAAWJ,KAAKL,SAAU,CAC/B,IAAKK,KAAKG,WAAY,OACrBH,KAAKI,QAAgCsB,YAAY,aAAc1B,KAAKL,SAASwB,IAAID,SACtF,CACJ,EACH,IAAAS,EAAA,CAAAC,WAAA,MAAAD,EAAAlC,oBAAA,OAAAkC,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"GeolocationPlugin.js","names":["BasePlugin","___controls_BasePlugin","GeolocationControl","_interopRequireDefault","__GeolocationControl","GeolocationPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","path","formatter","val","lat","undefined","lng","applyCommonDirectives","value","schemaMetadata","readOnly","ui","attachCapture","result","validateAndApplyVisualState","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["GeolocationPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport GeolocationControl from \"../../controls/GeolocationControl\";\nimport TextControl from \"sap/m/Text\";\n\nexport class GeolocationPlugin extends BasePlugin {\n /**\n * Renders a `GeolocationControl` component.\n * \n * @param metadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured GeolocationControl.\n */\n public render(metadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = metadata;\n this.fieldKey = bindingPath.replace('/', '');\n this.modelName = modelName;\n\n if (!this.isEditable) {\n \n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: unknown) => val && val.lat !== undefined && val.lng !== undefined ? `Lat: ${val.lat}, Lng: ${val.lng}` : \"\"\n }\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new GeolocationControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n });\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as GeolocationControl).attachCapture(() => {\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n });\n\n return this.control as Control;\n }\n\n /**\n * Retrieves the current geolocation object.\n * @returns {unknown} The geolocation value.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as GeolocationControl).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as sap.ui.core.Control).setProperty(\"readOnly\", !!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"8MAASA,EAAUC,EAAA,oBAGZC,EAAkBC,EAAAC,GAGlB,MAAMC,UAA0BL,EAW5BM,OAAOC,EAA8BC,EAAsBC,EAAoB,OAAQC,EAAwBC,GAClHC,KAAKD,SAAWA,EAChBC,KAAKL,SAAWA,EAChBK,KAAKC,SAAWL,EAAYM,QAAQ,IAAK,IACzCF,KAAKH,UAAYA,EAEjB,IAAKG,KAAKG,WAAY,CAElBH,KAAKI,QAAU,IAAIC,EAAY,CAC3BC,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCY,KAAM,CACFC,KAAM,GAAGZ,KAAaD,IACtBc,UAAYC,GAAiBA,GAAOA,EAAIC,MAAQC,WAAaF,EAAIG,MAAQD,UAAY,QAAQF,EAAIC,aAAaD,EAAIG,MAAQ,MAGlId,KAAKe,sBAAsBf,KAAKI,QAAST,EAAUE,GACnD,OAAOG,KAAKI,OAChB,CAEAJ,KAAKI,QAAU,IAAId,EAAmB,CAClCgB,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCoB,MAAO,IAAInB,KAAaD,KACxBqB,eAAgBtB,EAChBuB,WAAYvB,EAASwB,IAAID,WAG7BlB,KAAKe,sBAAsBf,KAAKI,QAAST,EAAUE,GAElDG,KAAKI,QAA+BgB,cAAc,KAC/C,MAAMC,EAASrB,KAAKsB,8BAChB,GAAItB,KAAKD,SAAU,CACfC,KAAKD,SAASsB,EAAOE,QAASvB,KAAKC,SACvC,IAGR,OAAOD,KAAKI,OAChB,CAMUoB,WACN,OAAOxB,KAAKI,QAAWJ,KAAKI,QAA+BoB,WAAa,IAC5E,CAKUC,aACN,GAAIzB,KAAKI,SAAWJ,KAAKL,SAAU,CAC/B,IAAKK,KAAKG,WAAY,OACrBH,KAAKI,QAAgCsB,YAAY,aAAc1B,KAAKL,SAASwB,IAAID,SACtF,CACJ,EACH,IAAAS,EAAA,CAAAC,WAAA,MAAAD,EAAAlC,oBAAA,OAAAkC,CAAA","ignoreList":[]}
@@ -44,7 +44,7 @@ export class GeolocationPlugin extends BasePlugin {
44
44
  this.applyCommonDirectives(this.control, metadata, modelName);
45
45
 
46
46
  (this.control as GeolocationControl).attachCapture(() => {
47
- const result = this.validate();
47
+ const result = this.validateAndApplyVisualState();
48
48
  if (this.onChange) {
49
49
  this.onChange(result.isValid, this.fieldKey);
50
50
  }
@@ -0,0 +1,130 @@
1
+ sap.ui.define(["./BasePlugin", "sap/m/MultiInput", "sap/m/Token", "sap/m/Text"], function (___BasePlugin, MultiInput, Token, TextControl) {
2
+ "use strict";
3
+
4
+ /**
5
+ * @file MultiInputPlugin.ts
6
+ * @description Renders a sap.m.MultiInput for primitive arrays (e.g. arrays of strings).
7
+ */
8
+ const BasePlugin = ___BasePlugin["BasePlugin"];
9
+ /**
10
+ * Handles rendering logic for arrays of primitive strings.
11
+ * Users can type custom strings and press Enter to add them as tokens.
12
+ *
13
+ * @namespace nz.co.siliconst.ui5.metaui.plugins.controls
14
+ * @public
15
+ */
16
+ class MultiInputPlugin extends BasePlugin {
17
+ /**
18
+ * Renders a `sap.m.MultiInput` component.
19
+ *
20
+ * @param fieldMetadata The specific JSON schema properties for this field.
21
+ * @param bindingPath The JSON path bound to this control.
22
+ * @param modelName The UI5 JSONModel name.
23
+ * @param engineScopeId The deterministic scope ID.
24
+ * @param onChange The callback fired on value change.
25
+ * @returns {Control} The configured MultiInput control.
26
+ */
27
+ render(fieldMetadata, bindingPath, modelName = "meta", engineScopeId, onChange) {
28
+ this.onChange = onChange;
29
+ this.metadata = fieldMetadata;
30
+ if (!this.isEditable) {
31
+ this.control = new TextControl({
32
+ id: this.generateStableId(engineScopeId, bindingPath),
33
+ text: {
34
+ path: `${modelName}>${bindingPath}`,
35
+ formatter: val => Array.isArray(val) ? val.join(", ") : ""
36
+ }
37
+ });
38
+ this.applyCommonDirectives(this.control, fieldMetadata, modelName);
39
+ return this.control;
40
+ }
41
+ const mi = new MultiInput({
42
+ id: this.generateStableId(engineScopeId, bindingPath),
43
+ enabled: !fieldMetadata.ui?.readOnly,
44
+ placeholder: fieldMetadata.ui?.label || "Type and press Enter...",
45
+ showValueHelp: false,
46
+ // We don't have a list of options for primitive tags
47
+ tokenUpdate: oEvent => {
48
+ const params = oEvent.getParameters();
49
+ const type = params.type;
50
+ const model = mi.getModel(modelName);
51
+
52
+ // Get current array from model
53
+ const rawArr = model.getProperty(bindingPath);
54
+ const arr = Array.isArray(rawArr) ? [...rawArr] : [];
55
+ if (type === "added") {
56
+ const addedTokens = params.addedTokens;
57
+ addedTokens.forEach(t => arr.push(t.getText()));
58
+ } else if (type === "removed") {
59
+ const removedTokens = params.removedTokens;
60
+ removedTokens.forEach(t => {
61
+ const text = t.getText();
62
+ const idx = arr.indexOf(text);
63
+ if (idx > -1) {
64
+ arr.splice(idx, 1);
65
+ }
66
+ });
67
+ }
68
+
69
+ // Update model
70
+ model.setProperty(bindingPath, arr);
71
+
72
+ // Trigger engine validation/extraction
73
+ const result = this.validateAndApplyVisualState();
74
+ if (this.onChange) {
75
+ this.onChange(result.isValid, this.fieldKey);
76
+ }
77
+ }
78
+ });
79
+
80
+ // Add validator to instantly accept typed text as a token
81
+ mi.addValidator(args => {
82
+ return new Token({
83
+ key: args.text,
84
+ text: args.text
85
+ });
86
+ });
87
+
88
+ // Bind existing strings to tokens using a factory function
89
+ mi.bindAggregation("tokens", {
90
+ path: `${modelName}>${bindingPath}`,
91
+ factory: (sId, oContext) => {
92
+ const text = oContext.getObject() || "";
93
+ return new Token(sId, {
94
+ key: text,
95
+ text: text
96
+ });
97
+ }
98
+ });
99
+ this.control = mi;
100
+ this.applyCommonDirectives(this.control, fieldMetadata, modelName);
101
+ return this.control;
102
+ }
103
+
104
+ /**
105
+ * Retrieves the current primitive array from the model.
106
+ * @returns {unknown} The array of string tokens.
107
+ */
108
+ getValue() {
109
+ if (!this.control) return [];
110
+ const tokens = this.control.getTokens();
111
+ return tokens.map(t => t.getText());
112
+ }
113
+
114
+ /**
115
+ * Applies dynamic read-only state.
116
+ */
117
+ applyState() {
118
+ if (this.control && this.metadata) {
119
+ if (!this.isEditable) return;
120
+ this.control.setEnabled(!this.metadata.ui?.readOnly);
121
+ }
122
+ }
123
+ }
124
+ var __exports = {
125
+ __esModule: true
126
+ };
127
+ __exports.MultiInputPlugin = MultiInputPlugin;
128
+ return __exports;
129
+ });
130
+ //# sourceMappingURL=MultiInputPlugin-dbg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiInputPlugin-dbg.js","names":["BasePlugin","___BasePlugin","MultiInputPlugin","render","fieldMetadata","bindingPath","modelName","engineScopeId","onChange","metadata","isEditable","control","TextControl","id","generateStableId","text","path","formatter","val","Array","isArray","join","applyCommonDirectives","mi","MultiInput","enabled","ui","readOnly","placeholder","label","showValueHelp","tokenUpdate","oEvent","params","getParameters","type","model","getModel","rawArr","getProperty","arr","addedTokens","forEach","t","push","getText","removedTokens","idx","indexOf","splice","setProperty","result","validateAndApplyVisualState","isValid","fieldKey","addValidator","args","Token","key","bindAggregation","factory","sId","oContext","getObject","getValue","tokens","getTokens","map","applyState","setEnabled","__exports","__esModule"],"sources":["MultiInputPlugin.ts"],"sourcesContent":["/**\n * @file MultiInputPlugin.ts\n * @description Renders a sap.m.MultiInput for primitive arrays (e.g. arrays of strings).\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport MultiInput from \"sap/m/MultiInput\";\nimport Token from \"sap/m/Token\";\nimport Control from \"sap/ui/core/Control\";\nimport TextControl from \"sap/m/Text\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport Event from \"sap/ui/base/Event\";\nimport Context from \"sap/ui/model/Context\";\n\n/**\n * Handles rendering logic for arrays of primitive strings.\n * Users can type custom strings and press Enter to add them as tokens.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.controls\n * @public\n */\nexport class MultiInputPlugin extends BasePlugin {\n /**\n * Renders a `sap.m.MultiInput` component.\n * \n * @param fieldMetadata The specific JSON schema properties for this field.\n * @param bindingPath The JSON path bound to this control.\n * @param modelName The UI5 JSONModel name.\n * @param engineScopeId The deterministic scope ID.\n * @param onChange The callback fired on value change.\n * @returns {Control} The configured MultiInput control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = fieldMetadata;\n\n if (!this.isEditable) {\n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: {\n path: `${modelName}>${bindingPath}`,\n formatter: (val: unknown[]) => Array.isArray(val) ? val.join(\", \") : \"\"\n }\n });\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n \n const mi = new MultiInput({\n id: this.generateStableId(engineScopeId, bindingPath),\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: fieldMetadata.ui?.label || \"Type and press Enter...\",\n showValueHelp: false, // We don't have a list of options for primitive tags\n tokenUpdate: (oEvent: Event) => {\n const params = oEvent.getParameters();\n const type = params.type;\n const model = mi.getModel(modelName) as JSONModel;\n \n // Get current array from model\n const rawArr = model.getProperty(bindingPath);\n const arr: string[] = Array.isArray(rawArr) ? [...rawArr] : [];\n \n if (type === \"added\") {\n const addedTokens = params.addedTokens as Token[];\n addedTokens.forEach(t => arr.push(t.getText()));\n } else if (type === \"removed\") {\n const removedTokens = params.removedTokens as Token[];\n removedTokens.forEach(t => {\n const text = t.getText();\n const idx = arr.indexOf(text);\n if (idx > -1) {\n arr.splice(idx, 1);\n }\n });\n }\n \n // Update model\n model.setProperty(bindingPath, arr);\n \n // Trigger engine validation/extraction\n const result = this.validateAndApplyVisualState();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n\n // Add validator to instantly accept typed text as a token\n mi.addValidator((args: { text: string }) => {\n return new Token({ key: args.text, text: args.text });\n });\n\n // Bind existing strings to tokens using a factory function\n mi.bindAggregation(\"tokens\", {\n path: `${modelName}>${bindingPath}`,\n factory: (sId: string, oContext: Context) => {\n const text = (oContext.getObject() as string) || \"\";\n return new Token(sId, { key: text, text: text });\n }\n });\n\n this.control = mi;\n this.applyCommonDirectives(this.control, fieldMetadata, modelName);\n return this.control as Control;\n }\n\n /**\n * Retrieves the current primitive array from the model.\n * @returns {unknown} The array of string tokens.\n */\n protected getValue(): unknown {\n if (!this.control) return [];\n const tokens = (this.control as MultiInput).getTokens();\n return tokens.map(t => t.getText());\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as MultiInput).setEnabled(!this.metadata.ui?.readOnly);\n }\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IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAApE,gBAAA,GAAAA,gBAAA;EAAA,OAAAoE,SAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,39 @@
1
+ declare module "nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin" {
2
+ /**
3
+ * @file MultiInputPlugin.ts
4
+ * @description Renders a sap.m.MultiInput for primitive arrays (e.g. arrays of strings).
5
+ */
6
+ import { BasePlugin } from "nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin";
7
+ import { IPropertyMetadata } from "nz/co/siliconst/ui5/metaui/interfaces/ISchema";
8
+ import Control from "sap/ui/core/Control";
9
+ /**
10
+ * Handles rendering logic for arrays of primitive strings.
11
+ * Users can type custom strings and press Enter to add them as tokens.
12
+ *
13
+ * @namespace nz.co.siliconst.ui5.metaui.plugins.controls
14
+ * @public
15
+ */
16
+ export class MultiInputPlugin extends BasePlugin {
17
+ /**
18
+ * Renders a `sap.m.MultiInput` component.
19
+ *
20
+ * @param fieldMetadata The specific JSON schema properties for this field.
21
+ * @param bindingPath The JSON path bound to this control.
22
+ * @param modelName The UI5 JSONModel name.
23
+ * @param engineScopeId The deterministic scope ID.
24
+ * @param onChange The callback fired on value change.
25
+ * @returns {Control} The configured MultiInput control.
26
+ */
27
+ render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;
28
+ /**
29
+ * Retrieves the current primitive array from the model.
30
+ * @returns {unknown} The array of string tokens.
31
+ */
32
+ protected getValue(): unknown;
33
+ /**
34
+ * Applies dynamic read-only state.
35
+ */
36
+ protected applyState(): void;
37
+ }
38
+ }
39
+ //# sourceMappingURL=MultiInputPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiInputPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,8DAA8D,CAAC;IAC9E;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;IACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;IAGlF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAM1C;;;;;;OAMG;IACH,MAAa,gBAAiB,SAAQ,UAAU;QAC5C;;;;;;;;;WASG;QACI,MAAM,CAAC,aAAa,EAAE,iBAAiB,EAAG,WAAW,EAAE,MAAM,EAAG,SAAS,GAAE,MAAe,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO;QA0E7L;;;WAGG;QACH,SAAS,CAAC,QAAQ,IAAI,OAAO;QAM7B;;WAEG;QACH,SAAS,CAAC,UAAU,IAAI,IAAI;KAM/B;CAEA"}
@@ -0,0 +1,2 @@
1
+ sap.ui.define(["./BasePlugin","sap/m/MultiInput","sap/m/Token","sap/m/Text"],function(t,e,n,s){"use strict";const i=t["BasePlugin"];class a extends i{render(t,i,a="meta",o,r){this.onChange=r;this.metadata=t;if(!this.isEditable){this.control=new s({id:this.generateStableId(o,i),text:{path:`${a}>${i}`,formatter:t=>Array.isArray(t)?t.join(", "):""}});this.applyCommonDirectives(this.control,t,a);return this.control}const l=new e({id:this.generateStableId(o,i),enabled:!t.ui?.readOnly,placeholder:t.ui?.label||"Type and press Enter...",showValueHelp:false,tokenUpdate:t=>{const e=t.getParameters();const n=e.type;const s=l.getModel(a);const o=s.getProperty(i);const r=Array.isArray(o)?[...o]:[];if(n==="added"){const t=e.addedTokens;t.forEach(t=>r.push(t.getText()))}else if(n==="removed"){const t=e.removedTokens;t.forEach(t=>{const e=t.getText();const n=r.indexOf(e);if(n>-1){r.splice(n,1)}})}s.setProperty(i,r);const d=this.validateAndApplyVisualState();if(this.onChange){this.onChange(d.isValid,this.fieldKey)}}});l.addValidator(t=>new n({key:t.text,text:t.text}));l.bindAggregation("tokens",{path:`${a}>${i}`,factory:(t,e)=>{const s=e.getObject()||"";return new n(t,{key:s,text:s})}});this.control=l;this.applyCommonDirectives(this.control,t,a);return this.control}getValue(){if(!this.control)return[];const t=this.control.getTokens();return t.map(t=>t.getText())}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;this.control.setEnabled(!this.metadata.ui?.readOnly)}}}var o={__esModule:true};o.MultiInputPlugin=a;return o});
2
+ //# sourceMappingURL=MultiInputPlugin.js.map