@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":"VoiceInputPlugin.js","names":["BasePlugin","___controls_BasePlugin","VoiceInputControl","_interopRequireDefault","__VoiceInputControl","VoiceInputPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","path","formatter","val","applyCommonDirectives","value","schemaMetadata","readOnly","ui","attachCapture","result","validate","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["VoiceInputPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport VoiceInputControl from \"../../controls/VoiceInputControl\";\nimport TextControl from \"sap/m/Text\";\n\nexport class VoiceInputPlugin extends BasePlugin {\n /**\n * Renders a `VoiceInputControl` 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 VoiceInputControl.\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) => {\n if (!val || val === \"undefined\" || val === \"null\") return \"\";\n return val;\n }\n }\n }) as Control;\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new VoiceInputControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n }) as Control;\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as VoiceInputControl).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 voice transcription text.\n * @returns {unknown} The text string.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as VoiceInputControl).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":"6MAASA,EAAUC,EAAA,oBAGZC,EAAiBC,EAAAC,GAGjB,MAAMC,UAAyBL,EAW3BM,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,IACR,IAAKA,GAAOA,IAAQ,aAAeA,IAAQ,OAAQ,MAAO,GAC1D,OAAOA,MAInBX,KAAKY,sBAAsBZ,KAAKI,QAAST,EAAUE,GACnD,OAAOG,KAAKI,OAChB,CAEAJ,KAAKI,QAAU,IAAId,EAAkB,CACjCgB,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCiB,MAAO,IAAIhB,KAAaD,KACxBkB,eAAgBnB,EAChBoB,WAAYpB,EAASqB,IAAID,WAG7Bf,KAAKY,sBAAsBZ,KAAKI,QAAST,EAAUE,GAElDG,KAAKI,QAA8Ba,cAAc,KAC9C,MAAMC,EAASlB,KAAKmB,WAChB,GAAInB,KAAKD,SAAU,CACfC,KAAKD,SAASmB,EAAOE,QAASpB,KAAKC,SACvC,IAGR,OAAOD,KAAKI,OAChB,CAMUiB,WACN,OAAOrB,KAAKI,QAAWJ,KAAKI,QAA8BiB,WAAa,IAC3E,CAKUC,aACN,GAAItB,KAAKI,SAAWJ,KAAKL,SAAU,CAC/B,IAAKK,KAAKG,WAAY,OACrBH,KAAKI,QAAgCmB,YAAY,aAAcvB,KAAKL,SAASqB,IAAID,SACtF,CACJ,EACH,IAAAS,EAAA,CAAAC,WAAA,MAAAD,EAAA/B,mBAAA,OAAA+B,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"VoiceInputPlugin.js","names":["BasePlugin","___controls_BasePlugin","VoiceInputControl","_interopRequireDefault","__VoiceInputControl","VoiceInputPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","control","TextControl","id","generateStableId","text","path","formatter","val","applyCommonDirectives","value","schemaMetadata","readOnly","ui","attachCapture","result","validateAndApplyVisualState","isValid","getValue","applyState","setProperty","__exports","__esModule"],"sources":["VoiceInputPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport VoiceInputControl from \"../../controls/VoiceInputControl\";\nimport TextControl from \"sap/m/Text\";\n\nexport class VoiceInputPlugin extends BasePlugin {\n /**\n * Renders a `VoiceInputControl` 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 VoiceInputControl.\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) => {\n if (!val || val === \"undefined\" || val === \"null\") return \"\";\n return val;\n }\n }\n }) as Control;\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.control = new VoiceInputControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n value: `{${modelName}>${bindingPath}}`,\n schemaMetadata: metadata,\n readOnly: !!metadata.ui?.readOnly\n }) as Control;\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n (this.control as VoiceInputControl).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 voice transcription text.\n * @returns {unknown} The text string.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as VoiceInputControl).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":"6MAASA,EAAUC,EAAA,oBAGZC,EAAiBC,EAAAC,GAGjB,MAAMC,UAAyBL,EAW3BM,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,IACR,IAAKA,GAAOA,IAAQ,aAAeA,IAAQ,OAAQ,MAAO,GAC1D,OAAOA,MAInBX,KAAKY,sBAAsBZ,KAAKI,QAAST,EAAUE,GACnD,OAAOG,KAAKI,OAChB,CAEAJ,KAAKI,QAAU,IAAId,EAAkB,CACjCgB,GAAIN,KAAKO,iBAAiBT,EAAeF,GACzCiB,MAAO,IAAIhB,KAAaD,KACxBkB,eAAgBnB,EAChBoB,WAAYpB,EAASqB,IAAID,WAG7Bf,KAAKY,sBAAsBZ,KAAKI,QAAST,EAAUE,GAElDG,KAAKI,QAA8Ba,cAAc,KAC9C,MAAMC,EAASlB,KAAKmB,8BAChB,GAAInB,KAAKD,SAAU,CACfC,KAAKD,SAASmB,EAAOE,QAASpB,KAAKC,SACvC,IAGR,OAAOD,KAAKI,OAChB,CAMUiB,WACN,OAAOrB,KAAKI,QAAWJ,KAAKI,QAA8BiB,WAAa,IAC3E,CAKUC,aACN,GAAItB,KAAKI,SAAWJ,KAAKL,SAAU,CAC/B,IAAKK,KAAKG,WAAY,OACrBH,KAAKI,QAAgCmB,YAAY,aAAcvB,KAAKL,SAASqB,IAAID,SACtF,CACJ,EACH,IAAAS,EAAA,CAAAC,WAAA,MAAAD,EAAA/B,mBAAA,OAAA+B,CAAA","ignoreList":[]}
@@ -47,7 +47,7 @@ export class VoiceInputPlugin extends BasePlugin {
47
47
  this.applyCommonDirectives(this.control, metadata, modelName);
48
48
 
49
49
  (this.control as VoiceInputControl).attachCapture(() => {
50
- const result = this.validate();
50
+ const result = this.validateAndApplyVisualState();
51
51
  if (this.onChange) {
52
52
  this.onChange(result.isValid, this.fieldKey);
53
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LiveSearchPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","LiveSearchPlugin","render","fieldMetadata","bindingPath","modelName","metadata","input","Input","value","enabled","ui","readOnly","placeholder","showSuggestion","suggest","oEvent","query","getParameter","fetchSuggestions","change","validate","control","vhConfig","valueHelp","url","error","removeAllSuggestionItems","setBusy","fetch","then","res","json","data","keyPath","textPath","lowerQuery","toLowerCase","filteredData","filter","item","textValue","String","includes","forEach","itemData","addSuggestionItem","Item","key","text","catch","err","message","finally","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["LiveSearchPlugin.ts"],"sourcesContent":["/**\n * @file LiveSearchPlugin.ts\n * @description A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport Input from \"sap/m/Input\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n * As the user types, it fetches suggestions from a remote endpoint.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class LiveSearchPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const input = new Input({\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Type to search...\",\n showSuggestion: true,\n suggest: (oEvent: sap.ui.base.Event) => {\n const query = (oEvent as sap.ui.base.Event).getParameter(\"suggestValue\");\n this.fetchSuggestions(input, query);\n },\n change: (oEvent: sap.ui.base.Event) => {\n this.validate();\n }\n });\n\n this.control = input;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for suggestions based on a query. Can be overridden by mock subclasses.\n * @param input The UI5 Input to populate with suggestions.\n * @param query The text typed by the user.\n */\n protected fetchSuggestions(input: Input, query: string): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"LiveSearchPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"LiveSearchPlugin\");\n return;\n }\n\n if (!query) {\n input.removeAllSuggestionItems();\n return;\n }\n \n input.setBusy(true);\n \n // In a real application, the query parameter would be passed to the backend (e.g. ?q=query)\n // Here, we simulate fetching and filter locally, but subclasses can override this entirely.\n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: unknown[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n input.removeAllSuggestionItems();\n\n // Simple client-side filter for demonstration\n const lowerQuery = query.toLowerCase();\n const filteredData = data.filter(item => {\n const textValue = String(item[textPath] || item[keyPath]).toLowerCase();\n return textValue.includes(lowerQuery);\n });\n \n filteredData.forEach(itemData => {\n input.addSuggestionItem(new Item({ \n key: itemData[keyPath], \n text: itemData[textPath] || itemData[keyPath]\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"LiveSearchPlugin\");\n })\n .finally(() => {\n input.setBusy(false);\n });\n }\n\n /**\n * Retrieves the current input value.\n * @returns {unknown} The input text.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as Input).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as Input).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,sBAAA;EAAA,MAKVC,MAAM,GAAAC,gBAAA;EAEf;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,gBAAgB,SAASJ,UAAU,CAAC;IACtCK,MAAMA,CAACC,aAAgC,EAAEC,WAAmB,EAAEC,SAAiB,GAAG,MAAM,EAAW;MACtG,IAAI,CAACC,QAAQ,GAAGH,aAAa;MAE7B,MAAMI,KAAK,GAAG,IAAIC,KAAK,CAAC;QACpBC,KAAK,EAAE,IAAIJ,SAAS,IAAID,WAAW,GAAG;QACtCM,OAAO,EAAE,CAACP,aAAa,CAACQ,EAAE,EAAEC,QAAQ;QACpCC,WAAW,EAAE,mBAAmB;QAChCC,cAAc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"file":"LiveSearchPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","LiveSearchPlugin","render","fieldMetadata","bindingPath","modelName","metadata","input","Input","value","enabled","ui","readOnly","placeholder","showSuggestion","suggest","oEvent","query","getParameter","fetchSuggestions","change","validate","control","vhConfig","valueHelp","url","error","removeAllSuggestionItems","setBusy","fetch","then","res","json","data","keyPath","textPath","lowerQuery","toLowerCase","filteredData","filter","item","textValue","String","includes","forEach","itemData","addSuggestionItem","Item","key","text","catch","err","message","finally","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["LiveSearchPlugin.ts"],"sourcesContent":["/**\n * @file LiveSearchPlugin.ts\n * @description A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport Input from \"sap/m/Input\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n * As the user types, it fetches suggestions from a remote endpoint.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class LiveSearchPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const input = new Input({\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Type to search...\",\n showSuggestion: true,\n suggest: (oEvent: sap.ui.base.Event) => {\n const query = (oEvent as sap.ui.base.Event).getParameter(\"suggestValue\");\n this.fetchSuggestions(input, query);\n },\n change: (oEvent: sap.ui.base.Event) => {\n this.validate();\n }\n });\n\n this.control = input;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for suggestions based on a query. Can be overridden by mock subclasses.\n * @param input The UI5 Input to populate with suggestions.\n * @param query The text typed by the user.\n */\n protected fetchSuggestions(input: Input, query: string): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"LiveSearchPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"LiveSearchPlugin\");\n return;\n }\n\n if (!query) {\n input.removeAllSuggestionItems();\n return;\n }\n \n input.setBusy(true);\n \n // In a real application, the query parameter would be passed to the backend (e.g. ?q=query)\n // Here, we simulate fetching and filter locally, but subclasses can override this entirely.\n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: Record<string, unknown>[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n input.removeAllSuggestionItems();\n\n // Simple client-side filter for demonstration\n const lowerQuery = query.toLowerCase();\n const filteredData = data.filter(item => {\n const textValue = String(item[textPath] || item[keyPath]).toLowerCase();\n return textValue.includes(lowerQuery);\n });\n \n filteredData.forEach(itemData => {\n input.addSuggestionItem(new Item({ \n key: itemData[keyPath], \n text: itemData[textPath] || itemData[keyPath]\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"LiveSearchPlugin\");\n })\n .finally(() => {\n input.setBusy(false);\n });\n }\n\n /**\n * Retrieves the current input value.\n * @returns {unknown} The input text.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as Input).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as Input).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,sBAAA;EAAA,MAKVC,MAAM,GAAAC,gBAAA;EAEf;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,gBAAgB,SAASJ,UAAU,CAAC;IACtCK,MAAMA,CAACC,aAAgC,EAAEC,WAAmB,EAAEC,SAAiB,GAAG,MAAM,E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gB,OAAO,CAAWkC,UAAU,CAAC,CAAC,IAAI,CAAClD,QAAQ,CAACK,EAAE,EAAEC,QAAQ,CAAC;MACnE;IACJ;EACJ;EAAC,IAAA6C,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAxD,gBAAA,GAAAA,gBAAA;EAAA,OAAAwD,SAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"LiveSearchPlugin.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","LiveSearchPlugin","render","fieldMetadata","bindingPath","modelName","this","metadata","input","Input","value","enabled","ui","readOnly","placeholder","showSuggestion","suggest","oEvent","query","getParameter","fetchSuggestions","change","validate","control","vhConfig","valueHelp","url","error","removeAllSuggestionItems","setBusy","fetch","then","res","json","data","keyPath","textPath","lowerQuery","toLowerCase","filteredData","filter","item","textValue","String","includes","forEach","itemData","addSuggestionItem","Item","key","text","catch","err","message","finally","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["LiveSearchPlugin.ts"],"sourcesContent":["/**\n * @file LiveSearchPlugin.ts\n * @description A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport Input from \"sap/m/Input\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n * As the user types, it fetches suggestions from a remote endpoint.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class LiveSearchPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const input = new Input({\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Type to search...\",\n showSuggestion: true,\n suggest: (oEvent: sap.ui.base.Event) => {\n const query = (oEvent as sap.ui.base.Event).getParameter(\"suggestValue\");\n this.fetchSuggestions(input, query);\n },\n change: (oEvent: sap.ui.base.Event) => {\n this.validate();\n }\n });\n\n this.control = input;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for suggestions based on a query. Can be overridden by mock subclasses.\n * @param input The UI5 Input to populate with suggestions.\n * @param query The text typed by the user.\n */\n protected fetchSuggestions(input: Input, query: string): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"LiveSearchPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"LiveSearchPlugin\");\n return;\n }\n\n if (!query) {\n input.removeAllSuggestionItems();\n return;\n }\n \n input.setBusy(true);\n \n // In a real application, the query parameter would be passed to the backend (e.g. ?q=query)\n // Here, we simulate fetching and filter locally, but subclasses can override this entirely.\n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: unknown[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n input.removeAllSuggestionItems();\n\n // Simple client-side filter for demonstration\n const lowerQuery = query.toLowerCase();\n const filteredData = data.filter(item => {\n const textValue = String(item[textPath] || item[keyPath]).toLowerCase();\n return textValue.includes(lowerQuery);\n });\n \n filteredData.forEach(itemData => {\n input.addSuggestionItem(new Item({ \n key: itemData[keyPath], \n text: itemData[textPath] || itemData[keyPath]\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"LiveSearchPlugin\");\n })\n .finally(() => {\n input.setBusy(false);\n });\n }\n\n /**\n * Retrieves the current input value.\n * @returns {unknown} The input text.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as Input).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as Input).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n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WAAa,IAC/D,CAKUC,aACN,GAAIlD,KAAKiB,SAAWjB,KAAKC,SAAU,CAC9BD,KAAKiB,QAAkBkC,YAAYnD,KAAKC,SAASK,IAAIC,SAC1D,CACJ,EACH,IAAA6C,EAAA,CAAAC,WAAA,MAAAD,EAAAzD,mBAAA,OAAAyD,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"LiveSearchPlugin.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","LiveSearchPlugin","render","fieldMetadata","bindingPath","modelName","this","metadata","input","Input","value","enabled","ui","readOnly","placeholder","showSuggestion","suggest","oEvent","query","getParameter","fetchSuggestions","change","validate","control","vhConfig","valueHelp","url","error","removeAllSuggestionItems","setBusy","fetch","then","res","json","data","keyPath","textPath","lowerQuery","toLowerCase","filteredData","filter","item","textValue","String","includes","forEach","itemData","addSuggestionItem","Item","key","text","catch","err","message","finally","getValue","applyState","setEnabled","__exports","__esModule"],"sources":["LiveSearchPlugin.ts"],"sourcesContent":["/**\n * @file LiveSearchPlugin.ts\n * @description A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport Input from \"sap/m/Input\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that provides asynchronous live search (autocomplete) functionality.\n * As the user types, it fetches suggestions from a remote endpoint.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class LiveSearchPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const input = new Input({\n value: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Type to search...\",\n showSuggestion: true,\n suggest: (oEvent: sap.ui.base.Event) => {\n const query = (oEvent as sap.ui.base.Event).getParameter(\"suggestValue\");\n this.fetchSuggestions(input, query);\n },\n change: (oEvent: sap.ui.base.Event) => {\n this.validate();\n }\n });\n\n this.control = input;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for suggestions based on a query. Can be overridden by mock subclasses.\n * @param input The UI5 Input to populate with suggestions.\n * @param query The text typed by the user.\n */\n protected fetchSuggestions(input: Input, query: string): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"LiveSearchPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"LiveSearchPlugin\");\n return;\n }\n\n if (!query) {\n input.removeAllSuggestionItems();\n return;\n }\n \n input.setBusy(true);\n \n // In a real application, the query parameter would be passed to the backend (e.g. ?q=query)\n // Here, we simulate fetching and filter locally, but subclasses can override this entirely.\n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: Record<string, unknown>[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n input.removeAllSuggestionItems();\n\n // Simple client-side filter for demonstration\n const lowerQuery = query.toLowerCase();\n const filteredData = data.filter(item => {\n const textValue = String(item[textPath] || item[keyPath]).toLowerCase();\n return textValue.includes(lowerQuery);\n });\n \n filteredData.forEach(itemData => {\n input.addSuggestionItem(new Item({ \n key: itemData[keyPath], \n text: itemData[textPath] || itemData[keyPath]\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"LiveSearchPlugin\");\n })\n .finally(() => {\n input.setBusy(false);\n });\n }\n\n /**\n * Retrieves the current input value.\n * @returns {unknown} The input text.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as Input).getValue() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as Input).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"8HAAA,MAK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aACN,GAAIlD,KAAKiB,SAAWjB,KAAKC,SAAU,CAC9BD,KAAKiB,QAAkBkC,YAAYnD,KAAKC,SAASK,IAAIC,SAC1D,CACJ,EACH,IAAA6C,EAAA,CAAAC,WAAA,MAAAD,EAAAzD,mBAAA,OAAAyD,CAAA","ignoreList":[]}
@@ -62,7 +62,7 @@ export class LiveSearchPlugin extends BasePlugin {
62
62
  // Here, we simulate fetching and filter locally, but subclasses can override this entirely.
63
63
  fetch(vhConfig.url)
64
64
  .then(res => res.json())
65
- .then((data: unknown[]) => {
65
+ .then((data: Record<string, unknown>[]) => {
66
66
  const keyPath = vhConfig.keyPath || "key";
67
67
  const textPath = vhConfig.textPath || "text";
68
68
 
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteValueHelpPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","RemoteValueHelpPlugin","isLoaded","render","fieldMetadata","bindingPath","modelName","metadata","comboBox","ComboBox","selectedKey","enabled","ui","readOnly","placeholder","change","oEvent","item","getParameter","val","getKey","validate","attachEventOnce","fetchData","control","vhConfig","valueHelp","url","error","setBusy","fetch","then","res","json","data","keyPath","textPath","forEach","itemData","addItem","Item","key","text","catch","err","message","finally","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["RemoteValueHelpPlugin.ts"],"sourcesContent":["/**\n * @file RemoteValueHelpPlugin.ts\n * @description A custom datasource plugin that simulates fetching data from a remote server.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport ComboBox from \"sap/m/ComboBox\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that simulates fetching data from a remote server.\n * Proves out custom data sources that dynamically load value help.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class RemoteValueHelpPlugin extends BasePlugin {\n private isLoaded = false;\n\n /**\n * Renders a `ComboBox` that simulates fetching data from a remote server.\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 * @returns {Control} The configured ComboBox control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const comboBox = new ComboBox({\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Select a country...\",\n change: (oEvent: sap.ui.base.Event) => {\n const item = (oEvent as sap.ui.base.Event).getParameter(\"selectedItem\");\n const val = item ? item.getKey() : (oEvent as sap.ui.base.Event).getParameter(\"value\"); // Allow free text as well\n this.validate();\n }\n });\n\n // Perform an async load against the REST endpoint\n comboBox.attachEventOnce(\"loadItems\", () => {\n this.fetchData(comboBox);\n });\n\n this.control = comboBox;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for data.\n * @param comboBox The UI5 ComboBox to populate.\n */\n protected fetchData(comboBox: ComboBox): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"RemoteValueHelpPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"RemoteValueHelpPlugin\");\n return;\n }\n \n comboBox.setBusy(true);\n \n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: unknown[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n data.forEach(itemData => {\n comboBox.addItem(new Item({ \n key: itemData[keyPath], \n text: itemData[textPath] || itemData[keyPath]\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"RemoteValueHelpPlugin\");\n })\n .finally(() => {\n comboBox.setBusy(false);\n this.isLoaded = true;\n });\n }\n\n /**\n * Retrieves the current selected key.\n * @returns {unknown} The selected key.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as ComboBox).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as ComboBox).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,sBAAA;EAAA,MAKVC,MAAM,GAAAC,gBAAA;EAEf;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,qBAAqB,SAASJ,UAAU,CAAC;IAC1CK,QAAQ,GAAG,KAAK;;IAExB;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;IACWC,MAAMA,CAACC,aAAgC,EAAEC,WAAmB,EAAEC,SAAiB,GAAG,MAAM,EAAW;MACtG,IAAI,CAACC,QAAQ,GAAGH,aAAa;MAE7B,MAAMI,QAAQ,GAAG,IAAIC,QAAQ,CAAC;QAC1BC,WAAW,EAAE,IAAIJ,SAAS,IAAID,WAAW,GAAG;QAC5CM,OAAO,EAAE,CAACP,aAAa,CAACQ,EAAE,EAAEC,QAAQ;QACpCC,WAAW,EAAE,qBAAqB;QAClCC,MAAM,EAAGC,MAAyB,IAAK;UACnC,MAAMC,IAAI,GAAID,MAAM,CAAuBE,YAAY,CAAC,cAAc,CAAC;UACvE,MAAMC,GAAG,GAAGF,IAAI,GAAGA,IAAI,CAACG,MAAM,CAAC,CAAC,GAAIJ,MAAM,CAAuBE,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;UACxF,IAAI,CAACG,QAAQ,CAAC,CAAC;QACnB;MACJ,CAAC,CAAC;;MAEF;MACAb,QAAQ,CAACc,eAAe,CAAC,WAAW,EAAE,MAAM;QACxC,IAAI,CAACC,SAAS,CAACf,QAAQ,CAAC;MAC5B,CAAC,CAAC;MAEF,IAAI,CAACgB,OAAO,GAAGhB,QAAQ;MACvB,OAAO,IAAI,CAACgB,OAAO;IACvB;;IAEA;AACJ;AACA;AACA;IACcD,SAASA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AcwB,cAAc,CAAC,CAAC,GAAG,IAAI;IAC5E;;IAEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACzB,OAAO,IAAI,IAAI,CAACjB,QAAQ,EAAE;QAC9B,IAAI,CAACiB,OAAO,CAAc0B,UAAU,CAAC,CAAC,IAAI,CAAC3C,QAAQ,CAACK,EAAE,EAAEC,QAAQ,CAAC;MACtE;IACJ;EACJ;EAAC,IAAAsC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAlD,qBAAA,GAAAA,qBAAA;EAAA,OAAAkD,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"RemoteValueHelpPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","RemoteValueHelpPlugin","isLoaded","render","fieldMetadata","bindingPath","modelName","metadata","comboBox","ComboBox","selectedKey","enabled","ui","readOnly","placeholder","change","oEvent","item","getParameter","val","getKey","validate","attachEventOnce","fetchData","control","vhConfig","valueHelp","url","error","setBusy","fetch","then","res","json","data","keyPath","textPath","forEach","itemData","addItem","Item","key","text","catch","err","message","finally","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["RemoteValueHelpPlugin.ts"],"sourcesContent":["/**\n * @file RemoteValueHelpPlugin.ts\n * @description A custom datasource plugin that simulates fetching data from a remote server.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport ComboBox from \"sap/m/ComboBox\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that simulates fetching data from a remote server.\n * Proves out custom data sources that dynamically load value help.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class RemoteValueHelpPlugin extends BasePlugin {\n private isLoaded = false;\n\n /**\n * Renders a `ComboBox` that simulates fetching data from a remote server.\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 * @returns {Control} The configured ComboBox control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const comboBox = new ComboBox({\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Select a country...\",\n change: (oEvent: sap.ui.base.Event) => {\n const item = (oEvent as sap.ui.base.Event).getParameter(\"selectedItem\");\n const val = item ? item.getKey() : (oEvent as sap.ui.base.Event).getParameter(\"value\"); // Allow free text as well\n this.validate();\n }\n });\n\n // Perform an async load against the REST endpoint\n comboBox.attachEventOnce(\"loadItems\", () => {\n this.fetchData(comboBox);\n });\n\n this.control = comboBox;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for data.\n * @param comboBox The UI5 ComboBox to populate.\n */\n protected fetchData(comboBox: ComboBox): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"RemoteValueHelpPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"RemoteValueHelpPlugin\");\n return;\n }\n \n comboBox.setBusy(true);\n \n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: Record<string, unknown>[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n data.forEach(itemData => {\n comboBox.addItem(new Item({ \n key: itemData[keyPath], \n text: itemData[textPath] || itemData[keyPath]\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"RemoteValueHelpPlugin\");\n })\n .finally(() => {\n comboBox.setBusy(false);\n this.isLoaded = true;\n });\n }\n\n /**\n * Retrieves the current selected key.\n * @returns {unknown} The selected key.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as ComboBox).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as ComboBox).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,sBAAA;EAAA,MAKVC,MAAM,GAAAC,gBAAA;EAEf;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,qBAAqB,SAASJ,UAAU,CAAC;IAC1CK,QAAQ,GAAG,KAAK;;IAExB;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;IACWC,MAAMA,CAACC,aAAgC,EAAEC,WAAmB,EAAEC,SAAiB,GAAG,MAAM,EAAW;MACtG,IAAI,CAACC,QAAQ,GAAGH,aAAa;MAE7B,MAAMI,QAAQ,GAAG,IAAIC,QAAQ,CAAC;QAC1BC,WAAW,EAAE,IAAIJ,SAAS,IAAID,WAAW,GAAG;QAC5CM,OAAO,EAAE,CAACP,aAAa,CAACQ,EAAE,EAAEC,QAAQ;QACpCC,WAAW,EAAE,qBAAqB;QAClCC,MAAM,EAAGC,MAAyB,IAAK;UACnC,MAAMC,IAAI,GAAID,MAAM,CAAuBE,YAAY,CAAC,cAAc,CAAC;UACvE,MAAMC,GAAG,GAAGF,IAAI,GAAGA,IAAI,CAACG,MAAM,CAAC,CAAC,GAAIJ,MAAM,CAAuBE,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;UACxF,IAAI,CAACG,QAAQ,CAAC,CAAC;QACnB;MACJ,CAAC,CAAC;;MAEF;MACAb,QAAQ,CAACc,eAAe,CAAC,WAAW,EAAE,MAAM;QACxC,IAAI,CAACC,SAAS,CAACf,QAAQ,CAAC;MAC5B,CAAC,CAAC;MAEF,IAAI,CAACgB,OAAO,GAAGhB,QAAQ;MACvB,OAAO,IAAI,CAACgB,OAAO;IACvB;;IAEA;AACJ;AACA;AACA;IACcD,SAASA,CAACf,QAAkB,EAAQ;MAC1C,MAAMiB,QAAQ,GA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AEA;AACJ;AACA;IACcC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACzB,OAAO,IAAI,IAAI,CAACjB,QAAQ,EAAE;QAC9B,IAAI,CAACiB,OAAO,CAAc0B,UAAU,CAAC,CAAC,IAAI,CAAC3C,QAAQ,CAACK,EAAE,EAAEC,QAAQ,CAAC;MACtE;IACJ;EACJ;EAAC,IAAAsC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAlD,qBAAA,GAAAA,qBAAA;EAAA,OAAAkD,SAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteValueHelpPlugin.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","RemoteValueHelpPlugin","isLoaded","render","fieldMetadata","bindingPath","modelName","this","metadata","comboBox","ComboBox","selectedKey","enabled","ui","readOnly","placeholder","change","oEvent","item","getParameter","val","getKey","validate","attachEventOnce","fetchData","control","vhConfig","valueHelp","url","error","setBusy","fetch","then","res","json","data","keyPath","textPath","forEach","itemData","addItem","Item","key","text","catch","err","message","finally","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["RemoteValueHelpPlugin.ts"],"sourcesContent":["/**\n * @file RemoteValueHelpPlugin.ts\n * @description A custom datasource plugin that simulates fetching data from a remote server.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport ComboBox from \"sap/m/ComboBox\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that simulates fetching data from a remote server.\n * Proves out custom data sources that dynamically load value help.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class RemoteValueHelpPlugin extends BasePlugin {\n private isLoaded = false;\n\n /**\n * Renders a `ComboBox` that simulates fetching data from a remote server.\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 * @returns {Control} The configured ComboBox control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const comboBox = new ComboBox({\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Select a country...\",\n change: (oEvent: sap.ui.base.Event) => {\n const item = (oEvent as sap.ui.base.Event).getParameter(\"selectedItem\");\n const val = item ? item.getKey() : (oEvent as sap.ui.base.Event).getParameter(\"value\"); // Allow free text as well\n this.validate();\n }\n });\n\n // Perform an async load against the REST endpoint\n comboBox.attachEventOnce(\"loadItems\", () => {\n this.fetchData(comboBox);\n });\n\n this.control = comboBox;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for data.\n * @param comboBox The UI5 ComboBox to populate.\n */\n protected fetchData(comboBox: ComboBox): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"RemoteValueHelpPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"RemoteValueHelpPlugin\");\n return;\n }\n \n comboBox.setBusy(true);\n \n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: unknown[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n data.forEach(itemData => {\n comboBox.addItem(new Item({ \n key: itemData[keyPath], \n text: itemData[textPath] || itemData[keyPath]\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"RemoteValueHelpPlugin\");\n })\n .finally(() => {\n comboBox.setBusy(false);\n this.isLoaded = true;\n });\n }\n\n /**\n * Retrieves the current selected key.\n * @returns {unknown} The selected key.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as ComboBox).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as ComboBox).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"iIAAA,MAKSA,EAAUC,EAAA,oBAKVC,EAAMC,EAAA,UASR,MAAMC,UAA8BJ,EAC/BK,SAAW,MAUZC,OAAOC,EAAkCC,EAAqBC,EAAoB,QACrFC,KAAKC,SAAWJ,EAEhB,MAAMK,EAAW,IAAIC,EAAS,CAC1BC,YAAa,IAAIL,KAAaD,KAC9BO,SAAUR,EAAcS,IAAIC,SAC5BC,YAAa,sBACbC,OAASC,IACL,MAAMC,EAAQD,EAA6BE,aAAa,gBACxD,MAAMC,EAAMF,EAAOA,EAAKG,SAAYJ,EAA6BE,aAAa,SAC9EZ,KAAKe,cAKbb,EAASc,gBAAgB,YAAa,KAClChB,KAAKiB,UAAUf,KAGnBF,KAAKkB,QAAUhB,EACf,OAAOF,KAAKkB,OAChB,CAMUD,UAAUf,GAChB,MAAMiB,EAAWnB,KAAKC,UAAUmB,UAChC,IAAKD,IAAaA,EAASE,IAAK,CAC5B7B,EAAO8B,MAAM,6EAA8E,GAAI,yBAC/F,MACJ,CAEApB,EAASqB,QAAQ,MAEjBC,MAAML,EAASE,KACVI,KAAKC,GAAOA,EAAIC,QAChBF,KAAMG,IACH,MAAMC,EAAUV,EAASU,SAAW,MACpC,MAAMC,EAAWX,EAASW,UAAY,OAEtCF,EAAKG,QAAQC,IACT9B,EAAS+B,QAAQ,IAAIC,EAAK,CACtBC,IAAKH,EAASH,GACdO,KAAMJ,EAASF,IAAaE,EAASH,UAIhDQ,MAAMC,IACH9C,EAAO8B,MAAM,kCAAoCH,EAASE,IAAKiB,EAAIC,QAAS,2BAE/EC,QAAQ,KACLtC,EAASqB,QAAQ,OACjBvB,KAAKL,SAAW,MAE5B,CAMU8C,WACN,OAAOzC,KAAKkB,QAAWlB,KAAKkB,QAAqBwB,iBAAmB,IACxE,CAKUC,aACN,GAAI3C,KAAKkB,SAAWlB,KAAKC,SAAU,CAC9BD,KAAKkB,QAAqB0B,YAAY5C,KAAKC,SAASK,IAAIC,SAC7D,CACJ,EACH,IAAAsC,EAAA,CAAAC,WAAA,MAAAD,EAAAnD,wBAAA,OAAAmD,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"RemoteValueHelpPlugin.js","names":["BasePlugin","___controls_BasePlugin","Logger","____utils_Logger","RemoteValueHelpPlugin","isLoaded","render","fieldMetadata","bindingPath","modelName","this","metadata","comboBox","ComboBox","selectedKey","enabled","ui","readOnly","placeholder","change","oEvent","item","getParameter","val","getKey","validate","attachEventOnce","fetchData","control","vhConfig","valueHelp","url","error","setBusy","fetch","then","res","json","data","keyPath","textPath","forEach","itemData","addItem","Item","key","text","catch","err","message","finally","getValue","getSelectedKey","applyState","setEnabled","__exports","__esModule"],"sources":["RemoteValueHelpPlugin.ts"],"sourcesContent":["/**\n * @file RemoteValueHelpPlugin.ts\n * @description A custom datasource plugin that simulates fetching data from a remote server.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata, IRemoteValueHelpConfig } from \"../../interfaces/ISchema\";\nimport ComboBox from \"sap/m/ComboBox\";\nimport Item from \"sap/ui/core/Item\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../utils/Logger\";\n\n/**\n * A custom datasource plugin that simulates fetching data from a remote server.\n * Proves out custom data sources that dynamically load value help.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.datasources\n * @public\n */\nexport class RemoteValueHelpPlugin extends BasePlugin {\n private isLoaded = false;\n\n /**\n * Renders a `ComboBox` that simulates fetching data from a remote server.\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 * @returns {Control} The configured ComboBox control.\n */\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n const comboBox = new ComboBox({\n selectedKey: `{${modelName}>${bindingPath}}`,\n enabled: !fieldMetadata.ui?.readOnly,\n placeholder: \"Select a country...\",\n change: (oEvent: sap.ui.base.Event) => {\n const item = (oEvent as sap.ui.base.Event).getParameter(\"selectedItem\");\n const val = item ? item.getKey() : (oEvent as sap.ui.base.Event).getParameter(\"value\"); // Allow free text as well\n this.validate();\n }\n });\n\n // Perform an async load against the REST endpoint\n comboBox.attachEventOnce(\"loadItems\", () => {\n this.fetchData(comboBox);\n });\n\n this.control = comboBox;\n return this.control as Control;\n }\n\n /**\n * Executes the REST fetch for data.\n * @param comboBox The UI5 ComboBox to populate.\n */\n protected fetchData(comboBox: ComboBox): void {\n const vhConfig = this.metadata?.valueHelp as IRemoteValueHelpConfig;\n if (!vhConfig || !vhConfig.url) {\n Logger.error(\"RemoteValueHelpPlugin requires a valid valueHelp configuration with a URL.\", \"\", \"RemoteValueHelpPlugin\");\n return;\n }\n \n comboBox.setBusy(true);\n \n fetch(vhConfig.url)\n .then(res => res.json())\n .then((data: Record<string, unknown>[]) => {\n const keyPath = vhConfig.keyPath || \"key\";\n const textPath = vhConfig.textPath || \"text\";\n \n data.forEach(itemData => {\n comboBox.addItem(new Item({ \n key: itemData[keyPath], \n text: itemData[textPath] || itemData[keyPath]\n }));\n });\n })\n .catch(err => {\n Logger.error(\"Failed to load value help from \" + vhConfig.url, err.message, \"RemoteValueHelpPlugin\");\n })\n .finally(() => {\n comboBox.setBusy(false);\n this.isLoaded = true;\n });\n }\n\n /**\n * Retrieves the current selected key.\n * @returns {unknown} The selected key.\n */\n protected getValue(): unknown {\n return this.control ? (this.control as ComboBox).getSelectedKey() : null;\n }\n\n /**\n * Applies dynamic read-only state.\n */\n protected applyState(): void {\n if (this.control && this.metadata) {\n (this.control as ComboBox).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"iIAAA,MAKSA,EAAUC,EAAA,oBAKVC,EAAMC,EAAA,UASR,MAAMC,UAA8BJ,EAC/BK,SAAW,MAUZC,OAAOC,EAAkCC,EAAqBC,E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67
67
  fetch(vhConfig.url)
68
68
  .then(res => res.json())
69
- .then((data: unknown[]) => {
69
+ .then((data: Record<string, unknown>[]) => {
70
70
  const keyPath = vhConfig.keyPath || "key";
71
71
  const textPath = vhConfig.textPath || "text";
72
72
 
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyFormatterPlugin-dbg.js","names":["CurrencyFormatterPlugin","constructor","currencyFormat","NumberFormat","getCurrencyInstance","showMeasure","format","rawValue","args","undefined","__exports","__esModule"],"sources":["CurrencyFormatterPlugin.ts"],"sourcesContent":["/**\n * @file CurrencyFormatterPlugin.ts\n * @description Standard data formatter for currency values.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\nimport NumberFormat from \"sap/ui/core/format/NumberFormat\";\n\n/**\n * Standard data formatter for currency values.\n * Uses sap.ui.core.format.NumberFormat to format raw numbers into localized currency strings.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class CurrencyFormatterPlugin implements IFormatter {\n private currencyFormat: NumberFormat;\n\n constructor() {\n this.currencyFormat = NumberFormat.getCurrencyInstance({\n showMeasure: false\n });\n }\n\n /**\n * Formats raw JSON model data into a UI-friendly currency string.\n * @param rawValue The raw numeric value from the JSON payload.\n * @returns The formatted string for the UI control.\n */\n public format(rawValue: string | number, args?: Record<string, string>): string {\n if (rawValue === null || rawValue === undefined) {\n return \"\";\n }\n return \"$\" + this.currencyFormat.format(rawValue);\n }\n}\n"],"mappings":";;;EAQA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,uBAAuB,CAAuB;IAGvDC,WAAWA,CAAA,EAAG;MACV,IAAI,CAACC,cAAc,GAAGC,YAAY,CAACC,mBAAmB,CAAC;QACnDC,WAAW,EAAE;MACjB,CAAC,CAAC;IACN;;IAEA;AACJ;AACA;AACA;AACA;IACWC,MAAMA,CAACC,QAAyB,EAAEC,IAA6B,EAAU;MAC5E,IAAID,QAAQ,KAAK,IAAI,IAAIA,QAAQ,KAAKE,SAAS,EAAE;QAC7C,OAAO,EAAE;MACb;MACA,OAAO,GAAG,GAAG,IAAI,CAACP,cAAc,CAACI,MAAM,CAACC,QAAQ,CAAC;IACrD;EACJ;EAAC,IAAAG,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAV,uBAAA,GAAAA,uBAAA;EAAA,OAAAU,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"CurrencyFormatterPlugin-dbg.js","names":["CurrencyFormatterPlugin","constructor","currencyFormat","NumberFormat","getCurrencyInstance","showMeasure","format","rawValue","args","undefined","__exports","__esModule"],"sources":["CurrencyFormatterPlugin.ts"],"sourcesContent":["/**\n * @file CurrencyFormatterPlugin.ts\n * @description Standard data formatter for currency values.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\nimport NumberFormat from \"sap/ui/core/format/NumberFormat\";\n\n/**\n * Standard data formatter for currency values.\n * Uses sap.ui.core.format.NumberFormat to format raw numbers into localized currency strings.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class CurrencyFormatterPlugin implements IFormatter {\n private currencyFormat: NumberFormat;\n\n constructor() {\n this.currencyFormat = NumberFormat.getCurrencyInstance({\n showMeasure: false\n });\n }\n\n /**\n * Formats raw JSON model data into a UI-friendly currency string.\n * @param rawValue The raw numeric value from the JSON payload.\n * @returns The formatted string for the UI control.\n */\n public format(rawValue: unknown, args?: unknown): string {\n if (rawValue === null || rawValue === undefined) {\n return \"\";\n }\n return \"$\" + this.currencyFormat.format(rawValue as number);\n }\n}\n"],"mappings":";;;EAQA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,uBAAuB,CAAuB;IAGvDC,WAAWA,CAAA,EAAG;MACV,IAAI,CAACC,cAAc,GAAGC,YAAY,CAACC,mBAAmB,CAAC;QACnDC,WAAW,EAAE;MACjB,CAAC,CAAC;IACN;;IAEA;AACJ;AACA;AACA;AACA;IACWC,MAAMA,CAACC,QAAiB,EAAEC,IAAc,EAAU;MACrD,IAAID,QAAQ,KAAK,IAAI,IAAIA,QAAQ,KAAKE,SAAS,EAAE;QAC7C,OAAO,EAAE;MACb;MACA,OAAO,GAAG,GAAG,IAAI,CAACP,cAAc,CAACI,MAAM,CAACC,QAAkB,CAAC;IAC/D;EACJ;EAAC,IAAAG,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAV,uBAAA,GAAAA,uBAAA;EAAA,OAAAU,SAAA;AAAA","ignoreList":[]}
@@ -19,7 +19,7 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterP
19
19
  * @param rawValue The raw numeric value from the JSON payload.
20
20
  * @returns The formatted string for the UI control.
21
21
  */
22
- format(rawValue: string | number, args?: Record<string, string>): string;
22
+ format(rawValue: unknown, args?: unknown): string;
23
23
  }
24
24
  }
25
25
  //# sourceMappingURL=CurrencyFormatterPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyFormatterPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,uEAAuE,CAAC;IACvF;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;IAG7E;;;;;;OAMG;IACH,MAAa,uBAAwB,YAAW,UAAU;QACtD,OAAO,CAAC,cAAc,CAAe;;QAQrC;;;;WAIG;QACI,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM;KAMlF;CAEA"}
1
+ {"version":3,"file":"CurrencyFormatterPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/formatters/CurrencyFormatterPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,uEAAuE,CAAC;IACvF;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;IAG7E;;;;;;OAMG;IACH,MAAa,uBAAwB,YAAW,UAAU;QACtD,OAAO,CAAC,cAAc,CAAe;;QAQrC;;;;WAIG;QACI,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM;KAM3D;CAEA"}
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyFormatterPlugin.js","names":["CurrencyFormatterPlugin","constructor","this","currencyFormat","NumberFormat","getCurrencyInstance","showMeasure","format","rawValue","args","undefined","__exports","__esModule"],"sources":["CurrencyFormatterPlugin.ts"],"sourcesContent":["/**\n * @file CurrencyFormatterPlugin.ts\n * @description Standard data formatter for currency values.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\nimport NumberFormat from \"sap/ui/core/format/NumberFormat\";\n\n/**\n * Standard data formatter for currency values.\n * Uses sap.ui.core.format.NumberFormat to format raw numbers into localized currency strings.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class CurrencyFormatterPlugin implements IFormatter {\n private currencyFormat: NumberFormat;\n\n constructor() {\n this.currencyFormat = NumberFormat.getCurrencyInstance({\n showMeasure: false\n });\n }\n\n /**\n * Formats raw JSON model data into a UI-friendly currency string.\n * @param rawValue The raw numeric value from the JSON payload.\n * @returns The formatted string for the UI control.\n */\n public format(rawValue: string | number, args?: Record<string, string>): string {\n if (rawValue === null || rawValue === undefined) {\n return \"\";\n }\n return \"$\" + this.currencyFormat.format(rawValue);\n }\n}\n"],"mappings":"2EAeO,MAAMA,EAGTC,cACIC,KAAKC,eAAiBC,EAAaC,oBAAoB,CACnDC,YAAa,OAErB,CAOOC,OAAOC,EAA2BC,GACrC,GAAID,IAAa,MAAQA,IAAaE,UAAW,CAC7C,MAAO,EACX,CACA,MAAO,IAAMR,KAAKC,eAAeI,OAAOC,EAC5C,EACH,IAAAG,EAAA,CAAAC,WAAA,MAAAD,EAAAX,0BAAA,OAAAW,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"CurrencyFormatterPlugin.js","names":["CurrencyFormatterPlugin","constructor","this","currencyFormat","NumberFormat","getCurrencyInstance","showMeasure","format","rawValue","args","undefined","__exports","__esModule"],"sources":["CurrencyFormatterPlugin.ts"],"sourcesContent":["/**\n * @file CurrencyFormatterPlugin.ts\n * @description Standard data formatter for currency values.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\nimport NumberFormat from \"sap/ui/core/format/NumberFormat\";\n\n/**\n * Standard data formatter for currency values.\n * Uses sap.ui.core.format.NumberFormat to format raw numbers into localized currency strings.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class CurrencyFormatterPlugin implements IFormatter {\n private currencyFormat: NumberFormat;\n\n constructor() {\n this.currencyFormat = NumberFormat.getCurrencyInstance({\n showMeasure: false\n });\n }\n\n /**\n * Formats raw JSON model data into a UI-friendly currency string.\n * @param rawValue The raw numeric value from the JSON payload.\n * @returns The formatted string for the UI control.\n */\n public format(rawValue: unknown, args?: unknown): string {\n if (rawValue === null || rawValue === undefined) {\n return \"\";\n }\n return \"$\" + this.currencyFormat.format(rawValue as number);\n }\n}\n"],"mappings":"2EAeO,MAAMA,EAGTC,cACIC,KAAKC,eAAiBC,EAAaC,oBAAoB,CACnDC,YAAa,OAErB,CAOOC,OAAOC,EAAmBC,GAC7B,GAAID,IAAa,MAAQA,IAAaE,UAAW,CAC7C,MAAO,EACX,CACA,MAAO,IAAMR,KAAKC,eAAeI,OAAOC,EAC5C,EACH,IAAAG,EAAA,CAAAC,WAAA,MAAAD,EAAAX,0BAAA,OAAAW,CAAA","ignoreList":[]}
@@ -27,10 +27,10 @@ export class CurrencyFormatterPlugin implements IFormatter {
27
27
  * @param rawValue The raw numeric value from the JSON payload.
28
28
  * @returns The formatted string for the UI control.
29
29
  */
30
- public format(rawValue: string | number, args?: Record<string, string>): string {
30
+ public format(rawValue: unknown, args?: unknown): string {
31
31
  if (rawValue === null || rawValue === undefined) {
32
32
  return "";
33
33
  }
34
- return "$" + this.currencyFormat.format(rawValue);
34
+ return "$" + this.currencyFormat.format(rawValue as number);
35
35
  }
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DateFormatterPlugin-dbg.js","names":["DateFormatterPlugin","constructor","dateFormat","DateFormat","getDateInstance","style","format","rawValue","args","dateObj","Date","e","__exports","__esModule"],"sources":["DateFormatterPlugin.ts"],"sourcesContent":["/**\n * @file DateFormatterPlugin.ts\n * @description Standard data formatter for dates.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\nimport DateFormat from \"sap/ui/core/format/DateFormat\";\n\n/**\n * Formats ISO date strings to localized Medium formats (e.g., \"Oct 15, 2026\").\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class DateFormatterPlugin implements IFormatter {\n private dateFormat: DateFormat;\n\n constructor() {\n this.dateFormat = DateFormat.getDateInstance({ style: \"medium\" });\n }\n\n /**\n * Formats raw JSON model data into a medium-style date string.\n * @param rawValue The raw date string.\n * @returns The formatted string for the UI control.\n */\n public format(rawValue: string | number, args?: Record<string, string>): string {\n if (!rawValue) return \"\";\n try {\n const dateObj = new Date(rawValue as string);\n return this.dateFormat.format(dateObj);\n } catch (e) {\n return rawValue as string; // Fallback to raw string if invalid date\n }\n }\n}\n"],"mappings":";;;EAQA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,mBAAmB,CAAuB;IAGnDC,WAAWA,CAAA,EAAG;MACV,IAAI,CAACC,UAAU,GAAGC,UAAU,CAACC,eAAe,CAAC;QAAEC,KAAK,EAAE;MAAS,CAAC,CAAC;IACrE;;IAEA;AACJ;AACA;AACA;AACA;IACWC,MAAMA,CAACC,QAAyB,EAAEC,IAA6B,EAAU;MAC5E,IAAI,CAACD,QAAQ,EAAE,OAAO,EAAE;MACxB,IAAI;QACA,MAAME,OAAO,GAAG,IAAIC,IAAI,CAACH,QAAkB,CAAC;QAC5C,OAAO,IAAI,CAACL,UAAU,CAACI,MAAM,CAACG,OAAO,CAAC;MAC1C,CAAC,CAAC,OAAOE,CAAC,EAAE;QACR,OAAOJ,QAAQ,CAAW,CAAC;MAC/B;IACJ;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAZ,mBAAA,GAAAA,mBAAA;EAAA,OAAAY,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"DateFormatterPlugin-dbg.js","names":["DateFormatterPlugin","constructor","dateFormat","DateFormat","getDateInstance","style","format","rawValue","args","dateObj","Date","e","__exports","__esModule"],"sources":["DateFormatterPlugin.ts"],"sourcesContent":["/**\n * @file DateFormatterPlugin.ts\n * @description Standard data formatter for dates.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\nimport DateFormat from \"sap/ui/core/format/DateFormat\";\n\n/**\n * Formats ISO date strings to localized Medium formats (e.g., \"Oct 15, 2026\").\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class DateFormatterPlugin implements IFormatter {\n private dateFormat: DateFormat;\n\n constructor() {\n this.dateFormat = DateFormat.getDateInstance({ style: \"medium\" });\n }\n\n /**\n * Formats raw JSON model data into a medium-style date string.\n * @param rawValue The raw date string.\n * @returns The formatted string for the UI control.\n */\n public format(rawValue: unknown, args?: unknown): string {\n if (!rawValue) return \"\";\n try {\n const dateObj = new Date(rawValue as string);\n return this.dateFormat.format(dateObj);\n } catch (e) {\n return rawValue as string; // Fallback to raw string if invalid date\n }\n }\n}\n"],"mappings":";;;EAQA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,mBAAmB,CAAuB;IAGnDC,WAAWA,CAAA,EAAG;MACV,IAAI,CAACC,UAAU,GAAGC,UAAU,CAACC,eAAe,CAAC;QAAEC,KAAK,EAAE;MAAS,CAAC,CAAC;IACrE;;IAEA;AACJ;AACA;AACA;AACA;IACWC,MAAMA,CAACC,QAAiB,EAAEC,IAAc,EAAU;MACrD,IAAI,CAACD,QAAQ,EAAE,OAAO,EAAE;MACxB,IAAI;QACA,MAAME,OAAO,GAAG,IAAIC,IAAI,CAACH,QAAkB,CAAC;QAC5C,OAAO,IAAI,CAACL,UAAU,CAACI,MAAM,CAACG,OAAO,CAAC;MAC1C,CAAC,CAAC,OAAOE,CAAC,EAAE;QACR,OAAOJ,QAAQ,CAAW,CAAC;MAC/B;IACJ;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAZ,mBAAA,GAAAA,mBAAA;EAAA,OAAAY,SAAA;AAAA","ignoreList":[]}
@@ -18,7 +18,7 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugi
18
18
  * @param rawValue The raw date string.
19
19
  * @returns The formatted string for the UI control.
20
20
  */
21
- format(rawValue: string | number, args?: Record<string, string>): string;
21
+ format(rawValue: unknown, args?: unknown): string;
22
22
  }
23
23
  }
24
24
  //# sourceMappingURL=DateFormatterPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateFormatterPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,mEAAmE,CAAC;IACnF;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;IAG7E;;;;;OAKG;IACH,MAAa,mBAAoB,YAAW,UAAU;QAClD,OAAO,CAAC,UAAU,CAAa;;QAM/B;;;;WAIG;QACI,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM;KASlF;CAEA"}
1
+ {"version":3,"file":"DateFormatterPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/formatters/DateFormatterPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,mEAAmE,CAAC;IACnF;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;IAG7E;;;;;OAKG;IACH,MAAa,mBAAoB,YAAW,UAAU;QAClD,OAAO,CAAC,UAAU,CAAa;;QAM/B;;;;WAIG;QACI,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM;KAS3D;CAEA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DateFormatterPlugin.js","names":["DateFormatterPlugin","constructor","this","dateFormat","DateFormat","getDateInstance","style","format","rawValue","args","dateObj","Date","e","__exports","__esModule"],"sources":["DateFormatterPlugin.ts"],"sourcesContent":["/**\n * @file DateFormatterPlugin.ts\n * @description Standard data formatter for dates.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\nimport DateFormat from \"sap/ui/core/format/DateFormat\";\n\n/**\n * Formats ISO date strings to localized Medium formats (e.g., \"Oct 15, 2026\").\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class DateFormatterPlugin implements IFormatter {\n private dateFormat: DateFormat;\n\n constructor() {\n this.dateFormat = DateFormat.getDateInstance({ style: \"medium\" });\n }\n\n /**\n * Formats raw JSON model data into a medium-style date string.\n * @param rawValue The raw date string.\n * @returns The formatted string for the UI control.\n */\n public format(rawValue: string | number, args?: Record<string, string>): string {\n if (!rawValue) return \"\";\n try {\n const dateObj = new Date(rawValue as string);\n return this.dateFormat.format(dateObj);\n } catch (e) {\n return rawValue as string; // Fallback to raw string if invalid date\n }\n }\n}\n"],"mappings":"yEAcO,MAAMA,EAGTC,cACIC,KAAKC,WAAaC,EAAWC,gBAAgB,CAAEC,MAAO,UAC1D,CAOOC,OAAOC,EAA2BC,GACrC,IAAKD,EAAU,MAAO,GACtB,IACI,MAAME,EAAU,IAAIC,KAAKH,GACzB,OAAON,KAAKC,WAAWI,OAAOG,EAClC,CAAE,MAAOE,GACL,OAAOJ,CACX,CACJ,EACH,IAAAK,EAAA,CAAAC,WAAA,MAAAD,EAAAb,sBAAA,OAAAa,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"DateFormatterPlugin.js","names":["DateFormatterPlugin","constructor","this","dateFormat","DateFormat","getDateInstance","style","format","rawValue","args","dateObj","Date","e","__exports","__esModule"],"sources":["DateFormatterPlugin.ts"],"sourcesContent":["/**\n * @file DateFormatterPlugin.ts\n * @description Standard data formatter for dates.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\nimport DateFormat from \"sap/ui/core/format/DateFormat\";\n\n/**\n * Formats ISO date strings to localized Medium formats (e.g., \"Oct 15, 2026\").\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class DateFormatterPlugin implements IFormatter {\n private dateFormat: DateFormat;\n\n constructor() {\n this.dateFormat = DateFormat.getDateInstance({ style: \"medium\" });\n }\n\n /**\n * Formats raw JSON model data into a medium-style date string.\n * @param rawValue The raw date string.\n * @returns The formatted string for the UI control.\n */\n public format(rawValue: unknown, args?: unknown): string {\n if (!rawValue) return \"\";\n try {\n const dateObj = new Date(rawValue as string);\n return this.dateFormat.format(dateObj);\n } catch (e) {\n return rawValue as string; // Fallback to raw string if invalid date\n }\n }\n}\n"],"mappings":"yEAcO,MAAMA,EAGTC,cACIC,KAAKC,WAAaC,EAAWC,gBAAgB,CAAEC,MAAO,UAC1D,CAOOC,OAAOC,EAAmBC,GAC7B,IAAKD,EAAU,MAAO,GACtB,IACI,MAAME,EAAU,IAAIC,KAAKH,GACzB,OAAON,KAAKC,WAAWI,OAAOG,EAClC,CAAE,MAAOE,GACL,OAAOJ,CACX,CACJ,EACH,IAAAK,EAAA,CAAAC,WAAA,MAAAD,EAAAb,sBAAA,OAAAa,CAAA","ignoreList":[]}
@@ -24,7 +24,7 @@ export class DateFormatterPlugin implements IFormatter {
24
24
  * @param rawValue The raw date string.
25
25
  * @returns The formatted string for the UI control.
26
26
  */
27
- public format(rawValue: string | number, args?: Record<string, string>): string {
27
+ public format(rawValue: unknown, args?: unknown): string {
28
28
  if (!rawValue) return "";
29
29
  try {
30
30
  const dateObj = new Date(rawValue as string);
@@ -19,7 +19,7 @@ sap.ui.define([], function () {
19
19
  * @returns The formatted string for the UI control.
20
20
  */
21
21
  format(rawValue, args) {
22
- if (!rawValue || typeof rawValue !== "string") return rawValue || "";
22
+ if (!rawValue || typeof rawValue !== "string") return String(rawValue || "");
23
23
  const cleaned = ('' + rawValue).replace(/\D/g, '');
24
24
  const match = cleaned.match(/^(\d{3})(\d{3})(\d{4})$/);
25
25
  if (match) {
@@ -1 +1 @@
1
- {"version":3,"file":"PhoneFormatterPlugin-dbg.js","names":["PhoneFormatterPlugin","format","rawValue","args","cleaned","replace","match","__exports","__esModule"],"sources":["PhoneFormatterPlugin.ts"],"sourcesContent":["/**\n * @file PhoneFormatterPlugin.ts\n * @description Standard data formatter for phone numbers.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\n\n/**\n * Simple mask for 10-digit phone numbers (e.g. 5551234567 -> (555) 123-4567).\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class PhoneFormatterPlugin implements IFormatter {\n /**\n * Formats raw JSON model data into a masked phone number.\n * @param rawValue The raw phone string.\n * @returns The formatted string for the UI control.\n */\n public format(rawValue: string | number, args?: Record<string, string>): string {\n if (!rawValue || typeof rawValue !== \"string\") return rawValue || \"\";\n \n const cleaned = ('' + rawValue).replace(/\\D/g, '');\n const match = cleaned.match(/^(\\d{3})(\\d{3})(\\d{4})$/);\n \n if (match) {\n return '(' + match[1] + ') ' + match[2] + '-' + match[3];\n }\n \n return rawValue as string;\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;;EAIA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,oBAAoB,CAAuB;IACpD;AACJ;AACA;AACA;AACA;IACWC,MAAMA,CAACC,QAAyB,EAAEC,IAA6B,EAAU;MAC5E,IAAI,CAACD,QAAQ,IAAI,OAAOA,QAAQ,KAAK,QAAQ,EAAE,OAAOA,QAAQ,IAAI,EAAE;MAEpE,MAAME,OAAO,GAAG,CAAC,EAAE,GAAGF,QAAQ,EAAEG,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;MAClD,MAAMC,KAAK,GAAGF,OAAO,CAACE,KAAK,CAAC,yBAAyB,CAAC;MAEtD,IAAIA,KAAK,EAAE;QACP,OAAO,GAAG,GAAGA,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAGA,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAGA,KAAK,CAAC,CAAC,CAAC;MAC5D;MAEA,OAAOJ,QAAQ;IACnB;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAP,oBAAA,GAAAA,oBAAA;EAAA,OAAAO,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"PhoneFormatterPlugin-dbg.js","names":["PhoneFormatterPlugin","format","rawValue","args","String","cleaned","replace","match","__exports","__esModule"],"sources":["PhoneFormatterPlugin.ts"],"sourcesContent":["/**\n * @file PhoneFormatterPlugin.ts\n * @description Standard data formatter for phone numbers.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\n\n/**\n * Simple mask for 10-digit phone numbers (e.g. 5551234567 -> (555) 123-4567).\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class PhoneFormatterPlugin implements IFormatter {\n /**\n * Formats raw JSON model data into a masked phone number.\n * @param rawValue The raw phone string.\n * @returns The formatted string for the UI control.\n */\n public format(rawValue: unknown, args?: unknown): string {\n if (!rawValue || typeof rawValue !== \"string\") return String(rawValue || \"\");\n \n const cleaned = ('' + rawValue).replace(/\\D/g, '');\n const match = cleaned.match(/^(\\d{3})(\\d{3})(\\d{4})$/);\n \n if (match) {\n return '(' + match[1] + ') ' + match[2] + '-' + match[3];\n }\n \n return rawValue as string;\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;;EAIA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,oBAAoB,CAAuB;IACpD;AACJ;AACA;AACA;AACA;IACWC,MAAMA,CAACC,QAAiB,EAAEC,IAAc,EAAU;MACrD,IAAI,CAACD,QAAQ,IAAI,OAAOA,QAAQ,KAAK,QAAQ,EAAE,OAAOE,MAAM,CAACF,QAAQ,IAAI,EAAE,CAAC;MAE5E,MAAMG,OAAO,GAAG,CAAC,EAAE,GAAGH,QAAQ,EAAEI,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;MAClD,MAAMC,KAAK,GAAGF,OAAO,CAACE,KAAK,CAAC,yBAAyB,CAAC;MAEtD,IAAIA,KAAK,EAAE;QACP,OAAO,GAAG,GAAGA,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAGA,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAGA,KAAK,CAAC,CAAC,CAAC;MAC5D;MAEA,OAAOL,QAAQ;IACnB;EACJ;EAAC,IAAAM,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAR,oBAAA,GAAAA,oBAAA;EAAA,OAAAQ,SAAA;AAAA","ignoreList":[]}
@@ -16,7 +16,7 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlug
16
16
  * @param rawValue The raw phone string.
17
17
  * @returns The formatted string for the UI control.
18
18
  */
19
- format(rawValue: string | number, args?: Record<string, string>): string;
19
+ format(rawValue: unknown, args?: unknown): string;
20
20
  }
21
21
  }
22
22
  //# sourceMappingURL=PhoneFormatterPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PhoneFormatterPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,oEAAoE,CAAC;IACpF;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;IAE7E;;;;;OAKG;IACH,MAAa,oBAAqB,YAAW,UAAU;QACnD;;;;WAIG;QACI,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM;KAYlF;CAEA"}
1
+ {"version":3,"file":"PhoneFormatterPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/formatters/PhoneFormatterPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,oEAAoE,CAAC;IACpF;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;IAE7E;;;;;OAKG;IACH,MAAa,oBAAqB,YAAW,UAAU;QACnD;;;;WAIG;QACI,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM;KAY3D;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define([],function(){"use strict";class r{format(r,t){if(!r||typeof r!=="string")return r||"";const e=(""+r).replace(/\D/g,"");const n=e.match(/^(\d{3})(\d{3})(\d{4})$/);if(n){return"("+n[1]+") "+n[2]+"-"+n[3]}return r}}var t={__esModule:true};t.PhoneFormatterPlugin=r;return t});
1
+ sap.ui.define([],function(){"use strict";class r{format(r,t){if(!r||typeof r!=="string")return String(r||"");const e=(""+r).replace(/\D/g,"");const n=e.match(/^(\d{3})(\d{3})(\d{4})$/);if(n){return"("+n[1]+") "+n[2]+"-"+n[3]}return r}}var t={__esModule:true};t.PhoneFormatterPlugin=r;return t});
2
2
  //# sourceMappingURL=PhoneFormatterPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PhoneFormatterPlugin.js","names":["PhoneFormatterPlugin","format","rawValue","args","cleaned","replace","match","__exports","__esModule"],"sources":["PhoneFormatterPlugin.ts"],"sourcesContent":["/**\n * @file PhoneFormatterPlugin.ts\n * @description Standard data formatter for phone numbers.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\n\n/**\n * Simple mask for 10-digit phone numbers (e.g. 5551234567 -> (555) 123-4567).\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class PhoneFormatterPlugin implements IFormatter {\n /**\n * Formats raw JSON model data into a masked phone number.\n * @param rawValue The raw phone string.\n * @returns The formatted string for the UI control.\n */\n public format(rawValue: string | number, args?: Record<string, string>): string {\n if (!rawValue || typeof rawValue !== \"string\") return rawValue || \"\";\n \n const cleaned = ('' + rawValue).replace(/\\D/g, '');\n const match = cleaned.match(/^(\\d{3})(\\d{3})(\\d{4})$/);\n \n if (match) {\n return '(' + match[1] + ') ' + match[2] + '-' + match[3];\n }\n \n return rawValue as string;\n }\n}\n"],"mappings":"yCAaO,MAAMA,EAMFC,OAAOC,EAA2BC,GACrC,IAAKD,UAAmBA,IAAa,SAAU,OAAOA,GAAY,GAElE,MAAME,GAAW,GAAKF,GAAUG,QAAQ,MAAO,IAC/C,MAAMC,EAAQF,EAAQE,MAAM,2BAE5B,GAAIA,EAAO,CACP,MAAO,IAAMA,EAAM,GAAK,KAAOA,EAAM,GAAK,IAAMA,EAAM,EAC1D,CAEA,OAAOJ,CACX,EACH,IAAAK,EAAA,CAAAC,WAAA,MAAAD,EAAAP,uBAAA,OAAAO,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"PhoneFormatterPlugin.js","names":["PhoneFormatterPlugin","format","rawValue","args","String","cleaned","replace","match","__exports","__esModule"],"sources":["PhoneFormatterPlugin.ts"],"sourcesContent":["/**\n * @file PhoneFormatterPlugin.ts\n * @description Standard data formatter for phone numbers.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\n\n/**\n * Simple mask for 10-digit phone numbers (e.g. 5551234567 -> (555) 123-4567).\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class PhoneFormatterPlugin implements IFormatter {\n /**\n * Formats raw JSON model data into a masked phone number.\n * @param rawValue The raw phone string.\n * @returns The formatted string for the UI control.\n */\n public format(rawValue: unknown, args?: unknown): string {\n if (!rawValue || typeof rawValue !== \"string\") return String(rawValue || \"\");\n \n const cleaned = ('' + rawValue).replace(/\\D/g, '');\n const match = cleaned.match(/^(\\d{3})(\\d{3})(\\d{4})$/);\n \n if (match) {\n return '(' + match[1] + ') ' + match[2] + '-' + match[3];\n }\n \n return rawValue as string;\n }\n}\n"],"mappings":"yCAaO,MAAMA,EAMFC,OAAOC,EAAmBC,GAC7B,IAAKD,UAAmBA,IAAa,SAAU,OAAOE,OAAOF,GAAY,IAEzE,MAAMG,GAAW,GAAKH,GAAUI,QAAQ,MAAO,IAC/C,MAAMC,EAAQF,EAAQE,MAAM,2BAE5B,GAAIA,EAAO,CACP,MAAO,IAAMA,EAAM,GAAK,KAAOA,EAAM,GAAK,IAAMA,EAAM,EAC1D,CAEA,OAAOL,CACX,EACH,IAAAM,EAAA,CAAAC,WAAA,MAAAD,EAAAR,uBAAA,OAAAQ,CAAA","ignoreList":[]}
@@ -17,8 +17,8 @@ export class PhoneFormatterPlugin implements IFormatter {
17
17
  * @param rawValue The raw phone string.
18
18
  * @returns The formatted string for the UI control.
19
19
  */
20
- public format(rawValue: string | number, args?: Record<string, string>): string {
21
- if (!rawValue || typeof rawValue !== "string") return rawValue || "";
20
+ public format(rawValue: unknown, args?: unknown): string {
21
+ if (!rawValue || typeof rawValue !== "string") return String(rawValue || "");
22
22
 
23
23
  const cleaned = ('' + rawValue).replace(/\D/g, '');
24
24
  const match = cleaned.match(/^(\d{3})(\d{3})(\d{4})$/);
@@ -20,7 +20,7 @@ sap.ui.define([], function () {
20
20
  * @returns The uppercase formatted string for the UI control.
21
21
  */
22
22
  format(rawValue, args) {
23
- if (typeof rawValue !== "string") return rawValue || "";
23
+ if (typeof rawValue !== "string") return String(rawValue || "");
24
24
 
25
25
  // Default to uppercase if no specific arg could be easily parsed by simple formatter
26
26
  // (could be enhanced to support schema args if formatters allowed args).
@@ -1 +1 @@
1
- {"version":3,"file":"TextCaseFormatterPlugin-dbg.js","names":["TextCaseFormatterPlugin","format","rawValue","args","toUpperCase","__exports","__esModule"],"sources":["TextCaseFormatterPlugin.ts"],"sourcesContent":["/**\n * @file TextCaseFormatterPlugin.ts\n * @description Standard data formatter for text casing.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\n\n/**\n * Transforms text to UPPERCASE, lowercase, or Title Case.\n * Defaults to uppercase.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class TextCaseFormatterPlugin implements IFormatter {\n /**\n * Formats raw JSON model data into uppercase.\n * @param rawValue The raw string.\n * @returns The uppercase formatted string for the UI control.\n */\n public format(rawValue: string | number, args?: Record<string, string>): string {\n if (typeof rawValue !== \"string\") return rawValue || \"\";\n \n // Default to uppercase if no specific arg could be easily parsed by simple formatter \n // (could be enhanced to support schema args if formatters allowed args).\n return rawValue.toUpperCase();\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;;EAIA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,uBAAuB,CAAuB;IACvD;AACJ;AACA;AACA;AACA;IACWC,MAAMA,CAACC,QAAyB,EAAEC,IAA6B,EAAU;MAC5E,IAAI,OAAOD,QAAQ,KAAK,QAAQ,EAAE,OAAOA,QAAQ,IAAI,EAAE;;MAEvD;MACA;MACA,OAAOA,QAAQ,CAACE,WAAW,CAAC,CAAC;IACjC;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAL,uBAAA,GAAAA,uBAAA;EAAA,OAAAK,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"TextCaseFormatterPlugin-dbg.js","names":["TextCaseFormatterPlugin","format","rawValue","args","String","toUpperCase","__exports","__esModule"],"sources":["TextCaseFormatterPlugin.ts"],"sourcesContent":["/**\n * @file TextCaseFormatterPlugin.ts\n * @description Standard data formatter for text casing.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\n\n/**\n * Transforms text to UPPERCASE, lowercase, or Title Case.\n * Defaults to uppercase.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class TextCaseFormatterPlugin implements IFormatter {\n /**\n * Formats raw JSON model data into uppercase.\n * @param rawValue The raw string.\n * @returns The uppercase formatted string for the UI control.\n */\n public format(rawValue: unknown, args?: unknown): string {\n if (typeof rawValue !== \"string\") return String(rawValue || \"\");\n \n // Default to uppercase if no specific arg could be easily parsed by simple formatter \n // (could be enhanced to support schema args if formatters allowed args).\n return rawValue.toUpperCase();\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;;EAIA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,uBAAuB,CAAuB;IACvD;AACJ;AACA;AACA;AACA;IACWC,MAAMA,CAACC,QAAiB,EAAEC,IAAc,EAAU;MACrD,IAAI,OAAOD,QAAQ,KAAK,QAAQ,EAAE,OAAOE,MAAM,CAACF,QAAQ,IAAI,EAAE,CAAC;;MAE/D;MACA;MACA,OAAOA,QAAQ,CAACG,WAAW,CAAC,CAAC;IACjC;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAN,uBAAA,GAAAA,uBAAA;EAAA,OAAAM,SAAA;AAAA","ignoreList":[]}
@@ -17,7 +17,7 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterP
17
17
  * @param rawValue The raw string.
18
18
  * @returns The uppercase formatted string for the UI control.
19
19
  */
20
- format(rawValue: string | number, args?: Record<string, string>): string;
20
+ format(rawValue: unknown, args?: unknown): string;
21
21
  }
22
22
  }
23
23
  //# sourceMappingURL=TextCaseFormatterPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextCaseFormatterPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,uEAAuE,CAAC;IACvF;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;IAE7E;;;;;;OAMG;IACH,MAAa,uBAAwB,YAAW,UAAU;QACtD;;;;WAIG;QACI,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM;KAOlF;CAEA"}
1
+ {"version":3,"file":"TextCaseFormatterPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/formatters/TextCaseFormatterPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,uEAAuE,CAAC;IACvF;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;IAE7E;;;;;;OAMG;IACH,MAAa,uBAAwB,YAAW,UAAU;QACtD;;;;WAIG;QACI,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM;KAO3D;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define([],function(){"use strict";class e{format(e,r){if(typeof e!=="string")return e||"";return e.toUpperCase()}}var r={__esModule:true};r.TextCaseFormatterPlugin=e;return r});
1
+ sap.ui.define([],function(){"use strict";class e{format(e,r){if(typeof e!=="string")return String(e||"");return e.toUpperCase()}}var r={__esModule:true};r.TextCaseFormatterPlugin=e;return r});
2
2
  //# sourceMappingURL=TextCaseFormatterPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextCaseFormatterPlugin.js","names":["TextCaseFormatterPlugin","format","rawValue","args","toUpperCase","__exports","__esModule"],"sources":["TextCaseFormatterPlugin.ts"],"sourcesContent":["/**\n * @file TextCaseFormatterPlugin.ts\n * @description Standard data formatter for text casing.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\n\n/**\n * Transforms text to UPPERCASE, lowercase, or Title Case.\n * Defaults to uppercase.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class TextCaseFormatterPlugin implements IFormatter {\n /**\n * Formats raw JSON model data into uppercase.\n * @param rawValue The raw string.\n * @returns The uppercase formatted string for the UI control.\n */\n public format(rawValue: string | number, args?: Record<string, string>): string {\n if (typeof rawValue !== \"string\") return rawValue || \"\";\n \n // Default to uppercase if no specific arg could be easily parsed by simple formatter \n // (could be enhanced to support schema args if formatters allowed args).\n return rawValue.toUpperCase();\n }\n}\n"],"mappings":"yCAcO,MAAMA,EAMFC,OAAOC,EAA2BC,GACrC,UAAWD,IAAa,SAAU,OAAOA,GAAY,GAIrD,OAAOA,EAASE,aACpB,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAAL,0BAAA,OAAAK,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"TextCaseFormatterPlugin.js","names":["TextCaseFormatterPlugin","format","rawValue","args","String","toUpperCase","__exports","__esModule"],"sources":["TextCaseFormatterPlugin.ts"],"sourcesContent":["/**\n * @file TextCaseFormatterPlugin.ts\n * @description Standard data formatter for text casing.\n */\n\nimport { IFormatter } from \"../../interfaces/IPipeline\";\n\n/**\n * Transforms text to UPPERCASE, lowercase, or Title Case.\n * Defaults to uppercase.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.formatters\n * @public\n */\nexport class TextCaseFormatterPlugin implements IFormatter {\n /**\n * Formats raw JSON model data into uppercase.\n * @param rawValue The raw string.\n * @returns The uppercase formatted string for the UI control.\n */\n public format(rawValue: unknown, args?: unknown): string {\n if (typeof rawValue !== \"string\") return String(rawValue || \"\");\n \n // Default to uppercase if no specific arg could be easily parsed by simple formatter \n // (could be enhanced to support schema args if formatters allowed args).\n return rawValue.toUpperCase();\n }\n}\n"],"mappings":"yCAcO,MAAMA,EAMFC,OAAOC,EAAmBC,GAC7B,UAAWD,IAAa,SAAU,OAAOE,OAAOF,GAAY,IAI5D,OAAOA,EAASG,aACpB,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAAN,0BAAA,OAAAM,CAAA","ignoreList":[]}
@@ -18,8 +18,8 @@ export class TextCaseFormatterPlugin implements IFormatter {
18
18
  * @param rawValue The raw string.
19
19
  * @returns The uppercase formatted string for the UI control.
20
20
  */
21
- public format(rawValue: string | number, args?: Record<string, string>): string {
22
- if (typeof rawValue !== "string") return rawValue || "";
21
+ public format(rawValue: unknown, args?: unknown): string {
22
+ if (typeof rawValue !== "string") return String(rawValue || "");
23
23
 
24
24
  // Default to uppercase if no specific arg could be easily parsed by simple formatter
25
25
  // (could be enhanced to support schema args if formatters allowed args).
@@ -25,7 +25,7 @@ sap.ui.define([], function () {
25
25
  isValid: true
26
26
  }; // Let RequiredValidator handle empty
27
27
  const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
28
- if (!emailRegex.test(parsedValue)) {
28
+ if (typeof parsedValue !== "string" || !emailRegex.test(parsedValue)) {
29
29
  return {
30
30
  isValid: false,
31
31
  errorMessage: "Please enter a valid email address."
@@ -1 +1 @@
1
- {"version":3,"file":"EmailValidatorPlugin-dbg.js","names":["EmailValidatorPlugin","validate","parsedValue","args","isValid","emailRegex","test","errorMessage","__exports","__esModule"],"sources":["EmailValidatorPlugin.ts"],"sourcesContent":["/**\n * @file EmailValidatorPlugin.ts\n * @description Standard business logic validator for email addresses.\n */\n\nimport { IValidator, IValidationResult } from \"../../interfaces/IPipeline\";\n\n/**\n * Standard business logic validator for email addresses.\n * Extracts the email regex validation logic into a standalone, modular plugin.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.validators\n * @public\n */\nexport class EmailValidatorPlugin implements IValidator {\n /**\n * Validates parsed data before it enters the JSON model.\n * @param parsedValue The cleaned data to validate.\n * @param args Optional arguments provided in the schema.\n * @returns IValidationResult containing status and optional error message.\n */\n public validate(parsedValue: string | number | boolean, args?: Record<string, string>): IValidationResult {\n if (!parsedValue as string) return { isValid: true }; // Let RequiredValidator handle empty\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(parsedValue as string)) {\n return { isValid: false, errorMessage: \"Please enter a valid email address.\" };\n }\n return { isValid: true };\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;;EAIA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,oBAAoB,CAAuB;IACpD;AACJ;AACA;AACA;AACA;AACA;IACWC,QAAQA,CAACC,WAAsC,EAAEC,IAA6B,EAAqB;MACtG,IAAI,CAACD,WAAW,EAAY,OAAO;QAAEE,OAAO,EAAE;MAAK,CAAC,CAAC,CAAC;MACtD,MAAMC,UAAU,GAAG,4BAA4B;MAC/C,IAAI,CAACA,UAAU,CAACC,IAAI,CAACJ,WAAqB,CAAC,EAAE;QACzC,OAAO;UAAEE,OAAO,EAAE,KAAK;UAAEG,YAAY,EAAE;QAAsC,CAAC;MAClF;MACA,OAAO;QAAEH,OAAO,EAAE;MAAK,CAAC;IAC5B;EACJ;EAAC,IAAAI,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAR,oBAAA,GAAAA,oBAAA;EAAA,OAAAQ,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"EmailValidatorPlugin-dbg.js","names":["EmailValidatorPlugin","validate","parsedValue","args","isValid","emailRegex","test","errorMessage","__exports","__esModule"],"sources":["EmailValidatorPlugin.ts"],"sourcesContent":["/**\n * @file EmailValidatorPlugin.ts\n * @description Standard business logic validator for email addresses.\n */\n\nimport { IValidator, IValidationResult } from \"../../interfaces/IPipeline\";\n\n/**\n * Standard business logic validator for email addresses.\n * Extracts the email regex validation logic into a standalone, modular plugin.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.validators\n * @public\n */\nexport class EmailValidatorPlugin implements IValidator {\n /**\n * Validates parsed data before it enters the JSON model.\n * @param parsedValue The cleaned data to validate.\n * @param args Optional arguments provided in the schema.\n * @returns IValidationResult containing status and optional error message.\n */\n public validate(parsedValue: unknown, args?: unknown): IValidationResult {\n if (!parsedValue) return { isValid: true }; // Let RequiredValidator handle empty\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (typeof parsedValue !== \"string\" || !emailRegex.test(parsedValue)) {\n return { isValid: false, errorMessage: \"Please enter a valid email address.\" };\n }\n return { isValid: true };\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;;EAIA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,oBAAoB,CAAuB;IACpD;AACJ;AACA;AACA;AACA;AACA;IACWC,QAAQA,CAACC,WAAoB,EAAEC,IAAc,EAAqB;MACrE,IAAI,CAACD,WAAW,EAAE,OAAO;QAAEE,OAAO,EAAE;MAAK,CAAC,CAAC,CAAC;MAC5C,MAAMC,UAAU,GAAG,4BAA4B;MAC/C,IAAI,OAAOH,WAAW,KAAK,QAAQ,IAAI,CAACG,UAAU,CAACC,IAAI,CAACJ,WAAW,CAAC,EAAE;QAClE,OAAO;UAAEE,OAAO,EAAE,KAAK;UAAEG,YAAY,EAAE;QAAsC,CAAC;MAClF;MACA,OAAO;QAAEH,OAAO,EAAE;MAAK,CAAC;IAC5B;EACJ;EAAC,IAAAI,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAR,oBAAA,GAAAA,oBAAA;EAAA,OAAAQ,SAAA;AAAA","ignoreList":[]}
@@ -18,7 +18,7 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlug
18
18
  * @param args Optional arguments provided in the schema.
19
19
  * @returns IValidationResult containing status and optional error message.
20
20
  */
21
- validate(parsedValue: string | number | boolean, args?: Record<string, string>): IValidationResult;
21
+ validate(parsedValue: unknown, args?: unknown): IValidationResult;
22
22
  }
23
23
  }
24
24
  //# sourceMappingURL=EmailValidatorPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmailValidatorPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,oEAAoE,CAAC;IACpF;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;IAEhG;;;;;;OAMG;IACH,MAAa,oBAAqB,YAAW,UAAU;QACnD;;;;;WAKG;QACI,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,iBAAiB;KAQ5G;CAEA"}
1
+ {"version":3,"file":"EmailValidatorPlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/plugins/validators/EmailValidatorPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,oEAAoE,CAAC;IACpF;;;OAGG;IAEH,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;IAEhG;;;;;;OAMG;IACH,MAAa,oBAAqB,YAAW,UAAU;QACnD;;;;;WAKG;QACI,QAAQ,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,iBAAiB;KAQ3E;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define([],function(){"use strict";class e{validate(e,s){if(!e)return{isValid:true};const r=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;if(!r.test(e)){return{isValid:false,errorMessage:"Please enter a valid email address."}}return{isValid:true}}}var s={__esModule:true};s.EmailValidatorPlugin=e;return s});
1
+ sap.ui.define([],function(){"use strict";class e{validate(e,s){if(!e)return{isValid:true};const r=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;if(typeof e!=="string"||!r.test(e)){return{isValid:false,errorMessage:"Please enter a valid email address."}}return{isValid:true}}}var s={__esModule:true};s.EmailValidatorPlugin=e;return s});
2
2
  //# sourceMappingURL=EmailValidatorPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmailValidatorPlugin.js","names":["EmailValidatorPlugin","validate","parsedValue","args","isValid","emailRegex","test","errorMessage","__exports","__esModule"],"sources":["EmailValidatorPlugin.ts"],"sourcesContent":["/**\n * @file EmailValidatorPlugin.ts\n * @description Standard business logic validator for email addresses.\n */\n\nimport { IValidator, IValidationResult } from \"../../interfaces/IPipeline\";\n\n/**\n * Standard business logic validator for email addresses.\n * Extracts the email regex validation logic into a standalone, modular plugin.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.validators\n * @public\n */\nexport class EmailValidatorPlugin implements IValidator {\n /**\n * Validates parsed data before it enters the JSON model.\n * @param parsedValue The cleaned data to validate.\n * @param args Optional arguments provided in the schema.\n * @returns IValidationResult containing status and optional error message.\n */\n public validate(parsedValue: string | number | boolean, args?: Record<string, string>): IValidationResult {\n if (!parsedValue as string) return { isValid: true }; // Let RequiredValidator handle empty\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(parsedValue as string)) {\n return { isValid: false, errorMessage: \"Please enter a valid email address.\" };\n }\n return { isValid: true };\n }\n}\n"],"mappings":"yCAcO,MAAMA,EAOFC,SAASC,EAAwCC,GACpD,IAAKD,EAAuB,MAAO,CAAEE,QAAS,MAC9C,MAAMC,EAAa,6BACnB,IAAKA,EAAWC,KAAKJ,GAAwB,CACzC,MAAO,CAAEE,QAAS,MAAOG,aAAc,sCAC3C,CACA,MAAO,CAAEH,QAAS,KACtB,EACH,IAAAI,EAAA,CAAAC,WAAA,MAAAD,EAAAR,uBAAA,OAAAQ,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"EmailValidatorPlugin.js","names":["EmailValidatorPlugin","validate","parsedValue","args","isValid","emailRegex","test","errorMessage","__exports","__esModule"],"sources":["EmailValidatorPlugin.ts"],"sourcesContent":["/**\n * @file EmailValidatorPlugin.ts\n * @description Standard business logic validator for email addresses.\n */\n\nimport { IValidator, IValidationResult } from \"../../interfaces/IPipeline\";\n\n/**\n * Standard business logic validator for email addresses.\n * Extracts the email regex validation logic into a standalone, modular plugin.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.validators\n * @public\n */\nexport class EmailValidatorPlugin implements IValidator {\n /**\n * Validates parsed data before it enters the JSON model.\n * @param parsedValue The cleaned data to validate.\n * @param args Optional arguments provided in the schema.\n * @returns IValidationResult containing status and optional error message.\n */\n public validate(parsedValue: unknown, args?: unknown): IValidationResult {\n if (!parsedValue) return { isValid: true }; // Let RequiredValidator handle empty\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (typeof parsedValue !== \"string\" || !emailRegex.test(parsedValue)) {\n return { isValid: false, errorMessage: \"Please enter a valid email address.\" };\n }\n return { isValid: true };\n }\n}\n"],"mappings":"yCAcO,MAAMA,EAOFC,SAASC,EAAsBC,GAClC,IAAKD,EAAa,MAAO,CAAEE,QAAS,MACpC,MAAMC,EAAa,6BACnB,UAAWH,IAAgB,WAAaG,EAAWC,KAAKJ,GAAc,CAClE,MAAO,CAAEE,QAAS,MAAOG,aAAc,sCAC3C,CACA,MAAO,CAAEH,QAAS,KACtB,EACH,IAAAI,EAAA,CAAAC,WAAA,MAAAD,EAAAR,uBAAA,OAAAQ,CAAA","ignoreList":[]}
@@ -19,10 +19,10 @@ export class EmailValidatorPlugin implements IValidator {
19
19
  * @param args Optional arguments provided in the schema.
20
20
  * @returns IValidationResult containing status and optional error message.
21
21
  */
22
- public validate(parsedValue: string | number | boolean, args?: Record<string, string>): IValidationResult {
23
- if (!parsedValue as string) return { isValid: true }; // Let RequiredValidator handle empty
22
+ public validate(parsedValue: unknown, args?: unknown): IValidationResult {
23
+ if (!parsedValue) return { isValid: true }; // Let RequiredValidator handle empty
24
24
  const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
25
- if (!emailRegex.test(parsedValue as string)) {
25
+ if (typeof parsedValue !== "string" || !emailRegex.test(parsedValue)) {
26
26
  return { isValid: false, errorMessage: "Please enter a valid email address." };
27
27
  }
28
28
  return { isValid: true };
@@ -1 +1 @@
1
- {"version":3,"file":"IbanValidatorPlugin-dbg.js","names":["IbanValidatorPlugin","validate","parsedValue","args","isValid","ibanRegex","test","replace","toUpperCase","errorMessage","__exports","__esModule"],"sources":["IbanValidatorPlugin.ts"],"sourcesContent":["/**\n * @file IbanValidatorPlugin.ts\n * @description Standard business logic validator for International Bank Account Numbers.\n */\n\nimport { IValidator, IValidationResult } from \"../../interfaces/IPipeline\";\n\n/**\n * Validates a standard IBAN string.\n * This provides a simplified check for demonstration (starts with 2 chars, followed by digits/chars).\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.validators\n * @public\n */\nexport class IbanValidatorPlugin implements IValidator {\n /**\n * Validates parsed data before it enters the JSON model.\n * @param parsedValue The cleaned data to validate.\n * @param args Optional arguments provided in the schema.\n * @returns IValidationResult containing status and optional error message.\n */\n public validate(parsedValue: string | number | boolean, args?: Record<string, string>): IValidationResult {\n if (!parsedValue) return { isValid: true }; // Let RequiredValidator handle empty\n \n // Very basic IBAN structure regex (e.g. DE89370400440532013000)\n // A true IBAN check requires modulo 97 arithmetic which is out of scope for a basic mock.\n const ibanRegex = /^[A-Z]{2}\\d{2}[A-Z0-9]{1,30}$/;\n \n if (typeof parsedValue !== \"string\" || !ibanRegex.test(parsedValue.replace(/\\s+/g, '').toUpperCase())) {\n return { isValid: false, errorMessage: \"Please enter a valid IBAN.\" };\n }\n \n return { isValid: true };\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;;EAIA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,mBAAmB,CAAuB;IACnD;AACJ;AACA;AACA;AACA;AACA;IACWC,QAAQA,CAACC,WAAsC,EAAEC,IAA6B,EAAqB;MACtG,IAAI,CAACD,WAAW,EAAE,OAAO;QAAEE,OAAO,EAAE;MAAK,CAAC,CAAC,CAAC;;MAE5C;MACA;MACA,MAAMC,SAAS,GAAG,+BAA+B;MAEjD,IAAI,OAAOH,WAAW,KAAK,QAAQ,IAAI,CAACG,SAAS,CAACC,IAAI,CAACJ,WAAW,CAACK,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAACC,WAAW,CAAC,CAAC,CAAC,EAAE;QACnG,OAAO;UAAEJ,OAAO,EAAE,KAAK;UAAEK,YAAY,EAAE;QAA6B,CAAC;MACzE;MAEA,OAAO;QAAEL,OAAO,EAAE;MAAK,CAAC;IAC5B;EACJ;EAAC,IAAAM,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAV,mBAAA,GAAAA,mBAAA;EAAA,OAAAU,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"IbanValidatorPlugin-dbg.js","names":["IbanValidatorPlugin","validate","parsedValue","args","isValid","ibanRegex","test","replace","toUpperCase","errorMessage","__exports","__esModule"],"sources":["IbanValidatorPlugin.ts"],"sourcesContent":["/**\n * @file IbanValidatorPlugin.ts\n * @description Standard business logic validator for International Bank Account Numbers.\n */\n\nimport { IValidator, IValidationResult } from \"../../interfaces/IPipeline\";\n\n/**\n * Validates a standard IBAN string.\n * This provides a simplified check for demonstration (starts with 2 chars, followed by digits/chars).\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.validators\n * @public\n */\nexport class IbanValidatorPlugin implements IValidator {\n /**\n * Validates parsed data before it enters the JSON model.\n * @param parsedValue The cleaned data to validate.\n * @param args Optional arguments provided in the schema.\n * @returns IValidationResult containing status and optional error message.\n */\n public validate(parsedValue: unknown, args?: unknown): IValidationResult {\n if (!parsedValue) return { isValid: true }; // Let RequiredValidator handle empty\n \n // Very basic IBAN structure regex (e.g. DE89370400440532013000)\n // A true IBAN check requires modulo 97 arithmetic which is out of scope for a basic mock.\n const ibanRegex = /^[A-Z]{2}\\d{2}[A-Z0-9]{1,30}$/;\n \n if (typeof parsedValue !== \"string\" || !ibanRegex.test(parsedValue.replace(/\\s+/g, '').toUpperCase())) {\n return { isValid: false, errorMessage: \"Please enter a valid IBAN.\" };\n }\n \n return { isValid: true };\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;;EAIA;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMA,mBAAmB,CAAuB;IACnD;AACJ;AACA;AACA;AACA;AACA;IACWC,QAAQA,CAACC,WAAoB,EAAEC,IAAc,EAAqB;MACrE,IAAI,CAACD,WAAW,EAAE,OAAO;QAAEE,OAAO,EAAE;MAAK,CAAC,CAAC,CAAC;;MAE5C;MACA;MACA,MAAMC,SAAS,GAAG,+BAA+B;MAEjD,IAAI,OAAOH,WAAW,KAAK,QAAQ,IAAI,CAACG,SAAS,CAACC,IAAI,CAACJ,WAAW,CAACK,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAACC,WAAW,CAAC,CAAC,CAAC,EAAE;QACnG,OAAO;UAAEJ,OAAO,EAAE,KAAK;UAAEK,YAAY,EAAE;QAA6B,CAAC;MACzE;MAEA,OAAO;QAAEL,OAAO,EAAE;MAAK,CAAC;IAC5B;EACJ;EAAC,IAAAM,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAV,mBAAA,GAAAA,mBAAA;EAAA,OAAAU,SAAA;AAAA","ignoreList":[]}
@@ -18,7 +18,7 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/validators/IbanValidatorPlugi
18
18
  * @param args Optional arguments provided in the schema.
19
19
  * @returns IValidationResult containing status and optional error message.
20
20
  */
21
- validate(parsedValue: string | number | boolean, args?: Record<string, string>): IValidationResult;
21
+ validate(parsedValue: unknown, args?: unknown): IValidationResult;
22
22
  }
23
23
  }
24
24
  //# sourceMappingURL=IbanValidatorPlugin.d.ts.map