@siliconst/metaui 1.4.4 → 1.4.6

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 (204) hide show
  1. package/package.json +1 -1
  2. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +42 -3
  3. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js.map +1 -1
  4. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts +7 -1
  5. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +1 -1
  6. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js +1 -1
  7. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js.map +1 -1
  8. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts +45 -1
  9. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +5 -5
  10. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js.map +1 -1
  11. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts +1 -1
  12. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js +1 -1
  13. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js.map +1 -1
  14. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.ts +4 -4
  15. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate-dbg.js +122 -0
  16. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate-dbg.js.map +1 -0
  17. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts +49 -0
  18. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.d.ts.map +1 -0
  19. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.js +2 -0
  20. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.js.map +1 -0
  21. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ODataDelegate.ts +118 -0
  22. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js +24 -8
  23. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator-dbg.js.map +1 -1
  24. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.d.ts +1 -0
  25. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.d.ts.map +1 -1
  26. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js +1 -1
  27. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.js.map +1 -1
  28. package/src/nz/co/siliconst/ui5/metaui/core/DefaultLayoutGenerator.ts +26 -9
  29. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js +5 -5
  30. package/src/nz/co/siliconst/ui5/metaui/core/Engine-dbg.js.map +1 -1
  31. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts +3 -3
  32. package/src/nz/co/siliconst/ui5/metaui/core/Engine.d.ts.map +1 -1
  33. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js +1 -1
  34. package/src/nz/co/siliconst/ui5/metaui/core/Engine.js.map +1 -1
  35. package/src/nz/co/siliconst/ui5/metaui/core/Engine.ts +5 -5
  36. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +45 -1
  37. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -1
  38. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +10 -1
  39. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
  40. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js +1 -1
  41. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
  42. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +45 -2
  43. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin-dbg.js.map +1 -1
  44. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts +3 -3
  45. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.d.ts.map +1 -1
  46. package/src/nz/co/siliconst/ui5/metaui/interfaces/IPlugin.ts +3 -3
  47. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout-dbg.js +10 -6
  48. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout-dbg.js.map +1 -1
  49. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.d.ts.map +1 -1
  50. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.js +1 -1
  51. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.js.map +1 -1
  52. package/src/nz/co/siliconst/ui5/metaui/layouts/CompactLayout.ts +5 -5
  53. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js +10 -6
  54. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js.map +1 -1
  55. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts.map +1 -1
  56. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js +1 -1
  57. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js.map +1 -1
  58. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.ts +5 -5
  59. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js +24 -31
  60. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout-dbg.js.map +1 -1
  61. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.d.ts.map +1 -1
  62. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js +1 -1
  63. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.js.map +1 -1
  64. package/src/nz/co/siliconst/ui5/metaui/layouts/TableLayout.ts +20 -31
  65. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout-dbg.js +8 -4
  66. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout-dbg.js.map +1 -1
  67. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.d.ts.map +1 -1
  68. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.js +1 -1
  69. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.js.map +1 -1
  70. package/src/nz/co/siliconst/ui5/metaui/layouts/WizardLayout.ts +3 -3
  71. package/src/nz/co/siliconst/ui5/metaui/library-preload.js +36 -35
  72. package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
  73. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin-dbg.js +2 -2
  74. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin-dbg.js.map +1 -1
  75. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.js +1 -1
  76. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.js.map +1 -1
  77. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/ClearFormActionPlugin.ts +2 -2
  78. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin-dbg.js +2 -2
  79. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin-dbg.js.map +1 -1
  80. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.js +1 -1
  81. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.js.map +1 -1
  82. package/src/nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin.ts +2 -2
  83. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js +5 -5
  84. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin-dbg.js.map +1 -1
  85. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js +1 -1
  86. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.js.map +1 -1
  87. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin.ts +5 -5
  88. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js +2 -2
  89. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin-dbg.js.map +1 -1
  90. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js +1 -1
  91. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.js.map +1 -1
  92. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin.ts +2 -2
  93. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js +6 -6
  94. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js.map +1 -1
  95. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts +5 -5
  96. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts.map +1 -1
  97. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js +1 -1
  98. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js.map +1 -1
  99. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +6 -6
  100. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +2 -2
  101. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
  102. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js +1 -1
  103. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
  104. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +2 -2
  105. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js +2 -2
  106. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin-dbg.js.map +1 -1
  107. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js +1 -1
  108. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.js.map +1 -1
  109. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin.ts +2 -2
  110. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js +2 -2
  111. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin-dbg.js.map +1 -1
  112. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js +1 -1
  113. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.js.map +1 -1
  114. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin.ts +2 -2
  115. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +2 -2
  116. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
  117. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
  118. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
  119. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +2 -2
  120. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +2 -2
  121. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
  122. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
  123. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
  124. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +2 -2
  125. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +2 -2
  126. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
  127. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js +1 -1
  128. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
  129. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +2 -2
  130. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +2 -2
  131. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
  132. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
  133. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
  134. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +2 -2
  135. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js +2 -2
  136. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin-dbg.js.map +1 -1
  137. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js +1 -1
  138. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.js.map +1 -1
  139. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin.ts +2 -2
  140. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +2 -2
  141. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js.map +1 -1
  142. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js +1 -1
  143. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js.map +1 -1
  144. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +2 -2
  145. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +2 -2
  146. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
  147. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
  148. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
  149. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +2 -2
  150. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js +5 -5
  151. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin-dbg.js.map +1 -1
  152. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js +1 -1
  153. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.js.map +1 -1
  154. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin.ts +5 -5
  155. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +2 -2
  156. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
  157. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
  158. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
  159. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +2 -2
  160. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js +2 -2
  161. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin-dbg.js.map +1 -1
  162. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js +1 -1
  163. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.js.map +1 -1
  164. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin.ts +2 -2
  165. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js +2 -2
  166. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin-dbg.js.map +1 -1
  167. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js +1 -1
  168. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.js.map +1 -1
  169. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin.ts +2 -2
  170. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +2 -2
  171. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
  172. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
  173. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
  174. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +2 -2
  175. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js +2 -2
  176. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin-dbg.js.map +1 -1
  177. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js +1 -1
  178. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.js.map +1 -1
  179. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin.ts +2 -2
  180. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +2 -2
  181. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js.map +1 -1
  182. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js +1 -1
  183. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js.map +1 -1
  184. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +2 -2
  185. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js +2 -2
  186. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin-dbg.js.map +1 -1
  187. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js +1 -1
  188. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.js.map +1 -1
  189. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin.ts +2 -2
  190. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +2 -2
  191. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
  192. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
  193. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
  194. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +2 -2
  195. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js +2 -2
  196. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin-dbg.js.map +1 -1
  197. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js +1 -1
  198. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.js.map +1 -1
  199. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin.ts +2 -2
  200. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin-dbg.js +2 -2
  201. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin-dbg.js.map +1 -1
  202. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.js +1 -1
  203. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.js.map +1 -1
  204. package/src/nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin.ts +2 -2
@@ -16,7 +16,7 @@ sap.ui.define(["../controls/BasePlugin", "sap/m/Button"], function (___controls_
16
16
  class ClearFormActionPlugin extends BasePlugin {
17
17
  render(fieldMetadata, bindingPath, modelName = "meta") {
18
18
  this.metadata = fieldMetadata;
19
- if (this.isDisplayMode) {
19
+ if (!this.isEditable) {
20
20
  sap.ui.requireSync("sap/m/Text");
21
21
  const TextControl = sap.ui.require("sap/m/Text");
22
22
  this.control = new TextControl({
@@ -44,7 +44,7 @@ sap.ui.define(["../controls/BasePlugin", "sap/m/Button"], function (___controls_
44
44
  }
45
45
  applyState() {
46
46
  if (this.control && this.metadata) {
47
- if (this.isDisplayMode) return;
47
+ if (!this.isEditable) return;
48
48
  this.control.setEnabled(!this.metadata.ui?.readOnly);
49
49
  }
50
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ClearFormActionPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","ClearFormActionPlugin","render","fieldMetadata","bindingPath","modelName","metadata","isDisplayMode","sap","ui","requireSync","TextControl","require","control","visible","Button","text","label","type","icon","press","oEvent","btn","getSource","model","getModel","setProperty","getValue","applyState","setEnabled","readOnly","__exports","__esModule"],"sources":["ClearFormActionPlugin.ts"],"sourcesContent":["/**\n * @file ClearFormActionPlugin.ts\n * @description A custom action plugin that renders a Button to reset the model data.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\n/**\n * A custom action plugin that renders a Button to reset the model data.\n * Demonstrates how to create functional action plugins that interact with the bound model.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.actions\n * @public\n */\nexport class ClearFormActionPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n if (this.isDisplayMode) {\n sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\n this.control = new TextControl({ visible: false });\n return this.control as Control;\n }\n \n this.control = new Button({\n text: fieldMetadata.ui?.label || \"Clear Data\",\n type: \"Reject\",\n icon: \"sap-icon://delete\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const model = btn.getModel(modelName) as JSONModel;\n if (model) {\n // Reset the entire model payload to an empty object\n model.setProperty(\"/\", {});\n }\n }\n });\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return null; // Actions do not store scalar values\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (this.isDisplayMode) return;\n (this.control as Button).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,sBAAA;EAMnB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,qBAAqB,SAASF,UAAU,CAAC;IAC3CG,MAAMA,CAACC,aAAgC,EAAEC,WAAmB,EAAEC,SAAiB,GAAG,MAAM,EAAW;MACtG,IAAI,CAACC,QAAQ,GAAGH,aAAa;MAE7B,IAAI,IAAI,CAACI,aAAa,EAAE;QACpBC,GAAG,CAACC,EAAE,CAACC,WAAW,CAAC,YAAY,CAAC;QAChC,MAAMC,WAAW,GAAGH,GAAG,CAACC,EAAE,CAACG,OAAO,CAAC,YAAY,CAAC;QAChD,IAAI,CAACC,OAAO,GAAG,IAAIF,WAAW,CAAC;UAAEG,OAAO,EAAE;QAAM,CAAC,CAAC;QAClD,OAAO,IAAI,CAACD,OAAO;MACvB;MAEA,IAAI,CAACA,OAAO,GAAG,IAAIE,MAAM,CAAC;QACtBC,IAAI,EAAEb,aAAa,CAACM,EAAE,EAAEQ,KAAK,IAAI,YAAY;QAC7CC,IAAI,EAAE,QAAQ;QACdC,IAAI,EAAE,mBAAmB;QACzBC,KAAK,EAAGC,MAAyB,IAAK;UAClC,MAAMC,GAAG,GAAGD,MAAM,CAACE,SAAS,CAAC,CAAW;UACxC,MAAMC,KAAK,GAAGF,GAAG,CAACG,QAAQ,CAACpB,SAAS,CAAc;UAClD,IAAImB,KAAK,EAAE;YACP;YACAA,KAAK,CAACE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;UAC9B;QACJ;MACJ,CAAC,CAAC;MAEF,OAAO,IAAI,CAACb,OAAO;IACvB;IAEUc,QAAQA,CAAA,EAAQ;MACtB,OAAO,IAAI,CAAC,CAAC;IACjB;IAEUC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACf,OAAO,IAAI,IAAI,CAACP,QAAQ,EAAE;QAC/B,IAAI,IAAI,CAACC,aAAa,EAAE;QACvB,IAAI,CAACM,OAAO,CAAYgB,UAAU,CAAC,CAAC,IAAI,CAACvB,QAAQ,CAACG,EAAE,EAAEqB,QAAQ,CAAC;MACpE;IACJ;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA9B,qBAAA,GAAAA,qBAAA;EAAA,OAAA8B,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"ClearFormActionPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","ClearFormActionPlugin","render","fieldMetadata","bindingPath","modelName","metadata","isEditable","sap","ui","requireSync","TextControl","require","control","visible","Button","text","label","type","icon","press","oEvent","btn","getSource","model","getModel","setProperty","getValue","applyState","setEnabled","readOnly","__exports","__esModule"],"sources":["ClearFormActionPlugin.ts"],"sourcesContent":["/**\n * @file ClearFormActionPlugin.ts\n * @description A custom action plugin that renders a Button to reset the model data.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\n/**\n * A custom action plugin that renders a Button to reset the model data.\n * Demonstrates how to create functional action plugins that interact with the bound model.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.actions\n * @public\n */\nexport class ClearFormActionPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\n this.control = new TextControl({ visible: false });\n return this.control as Control;\n }\n \n this.control = new Button({\n text: fieldMetadata.ui?.label || \"Clear Data\",\n type: \"Reject\",\n icon: \"sap-icon://delete\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const model = btn.getModel(modelName) as JSONModel;\n if (model) {\n // Reset the entire model payload to an empty object\n model.setProperty(\"/\", {});\n }\n }\n });\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return null; // Actions do not store scalar values\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as Button).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,sBAAA;EAMnB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,qBAAqB,SAASF,UAAU,CAAC;IAC3CG,MAAMA,CAACC,aAAgC,EAAEC,WAAmB,EAAEC,SAAiB,GAAG,MAAM,EAAW;MACtG,IAAI,CAACC,QAAQ,GAAGH,aAAa;MAE7B,IAAI,CAAC,IAAI,CAACI,UAAU,EAAE;QAClBC,GAAG,CAACC,EAAE,CAACC,WAAW,CAAC,YAAY,CAAC;QAChC,MAAMC,WAAW,GAAGH,GAAG,CAACC,EAAE,CAACG,OAAO,CAAC,YAAY,CAAC;QAChD,IAAI,CAACC,OAAO,GAAG,IAAIF,WAAW,CAAC;UAAEG,OAAO,EAAE;QAAM,CAAC,CAAC;QAClD,OAAO,IAAI,CAACD,OAAO;MACvB;MAEA,IAAI,CAACA,OAAO,GAAG,IAAIE,MAAM,CAAC;QACtBC,IAAI,EAAEb,aAAa,CAACM,EAAE,EAAEQ,KAAK,IAAI,YAAY;QAC7CC,IAAI,EAAE,QAAQ;QACdC,IAAI,EAAE,mBAAmB;QACzBC,KAAK,EAAGC,MAAyB,IAAK;UAClC,MAAMC,GAAG,GAAGD,MAAM,CAACE,SAAS,CAAC,CAAW;UACxC,MAAMC,KAAK,GAAGF,GAAG,CAACG,QAAQ,CAACpB,SAAS,CAAc;UAClD,IAAImB,KAAK,EAAE;YACP;YACAA,KAAK,CAACE,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;UAC9B;QACJ;MACJ,CAAC,CAAC;MAEF,OAAO,IAAI,CAACb,OAAO;IACvB;IAEUc,QAAQA,CAAA,EAAQ;MACtB,OAAO,IAAI,CAAC,CAAC;IACjB;IAEUC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACf,OAAO,IAAI,IAAI,CAACP,QAAQ,EAAE;QAC/B,IAAI,CAAC,IAAI,CAACC,UAAU,EAAE;QACrB,IAAI,CAACM,OAAO,CAAYgB,UAAU,CAAC,CAAC,IAAI,CAACvB,QAAQ,CAACG,EAAE,EAAEqB,QAAQ,CAAC;MACpE;IACJ;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA9B,qBAAA,GAAAA,qBAAA;EAAA,OAAA8B,SAAA;AAAA","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["../controls/BasePlugin","sap/m/Button"],function(t,e){"use strict";const s=t["BasePlugin"];class i extends s{render(t,s,i="meta"){this.metadata=t;if(this.isDisplayMode){sap.ui.requireSync("sap/m/Text");const t=sap.ui.require("sap/m/Text");this.control=new t({visible:false});return this.control}this.control=new e({text:t.ui?.label||"Clear Data",type:"Reject",icon:"sap-icon://delete",press:t=>{const e=t.getSource();const s=e.getModel(i);if(s){s.setProperty("/",{})}}});return this.control}getValue(){return null}applyState(){if(this.control&&this.metadata){if(this.isDisplayMode)return;this.control.setEnabled(!this.metadata.ui?.readOnly)}}}var a={__esModule:true};a.ClearFormActionPlugin=i;return a});
1
+ sap.ui.define(["../controls/BasePlugin","sap/m/Button"],function(t,e){"use strict";const s=t["BasePlugin"];class i extends s{render(t,s,i="meta"){this.metadata=t;if(!this.isEditable){sap.ui.requireSync("sap/m/Text");const t=sap.ui.require("sap/m/Text");this.control=new t({visible:false});return this.control}this.control=new e({text:t.ui?.label||"Clear Data",type:"Reject",icon:"sap-icon://delete",press:t=>{const e=t.getSource();const s=e.getModel(i);if(s){s.setProperty("/",{})}}});return this.control}getValue(){return null}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;this.control.setEnabled(!this.metadata.ui?.readOnly)}}}var a={__esModule:true};a.ClearFormActionPlugin=i;return a});
2
2
  //# sourceMappingURL=ClearFormActionPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClearFormActionPlugin.js","names":["BasePlugin","___controls_BasePlugin","ClearFormActionPlugin","render","fieldMetadata","bindingPath","modelName","this","metadata","isDisplayMode","sap","ui","requireSync","TextControl","require","control","visible","Button","text","label","type","icon","press","oEvent","btn","getSource","model","getModel","setProperty","getValue","applyState","setEnabled","readOnly","__exports","__esModule"],"sources":["ClearFormActionPlugin.ts"],"sourcesContent":["/**\n * @file ClearFormActionPlugin.ts\n * @description A custom action plugin that renders a Button to reset the model data.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\n/**\n * A custom action plugin that renders a Button to reset the model data.\n * Demonstrates how to create functional action plugins that interact with the bound model.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.actions\n * @public\n */\nexport class ClearFormActionPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n if (this.isDisplayMode) {\n sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\n this.control = new TextControl({ visible: false });\n return this.control as Control;\n }\n \n this.control = new Button({\n text: fieldMetadata.ui?.label || \"Clear Data\",\n type: \"Reject\",\n icon: \"sap-icon://delete\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const model = btn.getModel(modelName) as JSONModel;\n if (model) {\n // Reset the entire model payload to an empty object\n model.setProperty(\"/\", {});\n }\n }\n });\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return null; // Actions do not store scalar values\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (this.isDisplayMode) return;\n (this.control as Button).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"mFAAA,MAKSA,EAAUC,EAAA,cAaZ,MAAMC,UAA8BF,EAChCG,OAAOC,EAAkCC,EAAqBC,EAAoB,QACrFC,KAAKC,SAAWJ,EAEhB,GAAIG,KAAKE,cAAe,CACpBC,IAAIC,GAAGC,YAAY,cACnB,MAAMC,EAAcH,IAAIC,GAAGG,QAAQ,cACnCP,KAAKQ,QAAU,IAAIF,EAAY,CAAEG,QAAS,QAC1C,OAAOT,KAAKQ,OAChB,CAEAR,KAAKQ,QAAU,IAAIE,EAAO,CACtBC,KAAMd,EAAcO,IAAIQ,OAAS,aACjCC,KAAM,SACNC,KAAM,oBACNC,MAAQC,IACJ,MAAMC,EAAMD,EAAOE,YACnB,MAAMC,EAAQF,EAAIG,SAASrB,GAC3B,GAAIoB,EAAO,CAEPA,EAAME,YAAY,IAAK,CAAC,EAC5B,KAIR,OAAOrB,KAAKQ,OAChB,CAEUc,WACN,OAAO,IACX,CAEUC,aACN,GAAIvB,KAAKQ,SAAWR,KAAKC,SAAU,CAC/B,GAAID,KAAKE,cAAe,OACvBF,KAAKQ,QAAmBgB,YAAYxB,KAAKC,SAASG,IAAIqB,SAC3D,CACJ,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAA/B,wBAAA,OAAA+B,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"ClearFormActionPlugin.js","names":["BasePlugin","___controls_BasePlugin","ClearFormActionPlugin","render","fieldMetadata","bindingPath","modelName","this","metadata","isEditable","sap","ui","requireSync","TextControl","require","control","visible","Button","text","label","type","icon","press","oEvent","btn","getSource","model","getModel","setProperty","getValue","applyState","setEnabled","readOnly","__exports","__esModule"],"sources":["ClearFormActionPlugin.ts"],"sourcesContent":["/**\n * @file ClearFormActionPlugin.ts\n * @description A custom action plugin that renders a Button to reset the model data.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\n/**\n * A custom action plugin that renders a Button to reset the model data.\n * Demonstrates how to create functional action plugins that interact with the bound model.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.actions\n * @public\n */\nexport class ClearFormActionPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\n this.control = new TextControl({ visible: false });\n return this.control as Control;\n }\n \n this.control = new Button({\n text: fieldMetadata.ui?.label || \"Clear Data\",\n type: \"Reject\",\n icon: \"sap-icon://delete\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const model = btn.getModel(modelName) as JSONModel;\n if (model) {\n // Reset the entire model payload to an empty object\n model.setProperty(\"/\", {});\n }\n }\n });\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return null; // Actions do not store scalar values\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as Button).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"mFAAA,MAKSA,EAAUC,EAAA,cAaZ,MAAMC,UAA8BF,EAChCG,OAAOC,EAAkCC,EAAqBC,EAAoB,QACrFC,KAAKC,SAAWJ,EAEhB,IAAKG,KAAKE,WAAY,CAClBC,IAAIC,GAAGC,YAAY,cACnB,MAAMC,EAAcH,IAAIC,GAAGG,QAAQ,cACnCP,KAAKQ,QAAU,IAAIF,EAAY,CAAEG,QAAS,QAC1C,OAAOT,KAAKQ,OAChB,CAEAR,KAAKQ,QAAU,IAAIE,EAAO,CACtBC,KAAMd,EAAcO,IAAIQ,OAAS,aACjCC,KAAM,SACNC,KAAM,oBACNC,MAAQC,IACJ,MAAMC,EAAMD,EAAOE,YACnB,MAAMC,EAAQF,EAAIG,SAASrB,GAC3B,GAAIoB,EAAO,CAEPA,EAAME,YAAY,IAAK,CAAC,EAC5B,KAIR,OAAOrB,KAAKQ,OAChB,CAEUc,WACN,OAAO,IACX,CAEUC,aACN,GAAIvB,KAAKQ,SAAWR,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACrBF,KAAKQ,QAAmBgB,YAAYxB,KAAKC,SAASG,IAAIqB,SAC3D,CACJ,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAA/B,wBAAA,OAAA+B,CAAA","ignoreList":[]}
@@ -20,7 +20,7 @@ export class ClearFormActionPlugin extends BasePlugin {
20
20
  public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = "meta"): Control {
21
21
  this.metadata = fieldMetadata;
22
22
 
23
- if (this.isDisplayMode) {
23
+ if (!this.isEditable) {
24
24
  sap.ui.requireSync("sap/m/Text");
25
25
  const TextControl = sap.ui.require("sap/m/Text");
26
26
  this.control = new TextControl({ visible: false });
@@ -50,7 +50,7 @@ export class ClearFormActionPlugin extends BasePlugin {
50
50
 
51
51
  protected applyState(): void {
52
52
  if (this.control && this.metadata) {
53
- if (this.isDisplayMode) return;
53
+ if (!this.isEditable) return;
54
54
  (this.control as Button).setEnabled(!this.metadata.ui?.readOnly);
55
55
  }
56
56
  }
@@ -15,7 +15,7 @@ sap.ui.define(["../controls/BasePlugin", "sap/m/Button", "sap/ui/core/Core"], fu
15
15
  class SubmitFormActionPlugin extends BasePlugin {
16
16
  render(fieldMetadata, bindingPath, modelName = "meta") {
17
17
  this.metadata = fieldMetadata;
18
- if (this.isDisplayMode) {
18
+ if (!this.isEditable) {
19
19
  sap.ui.requireSync("sap/m/Text");
20
20
  const TextControl = sap.ui.require("sap/m/Text");
21
21
  this.control = new TextControl({
@@ -41,7 +41,7 @@ sap.ui.define(["../controls/BasePlugin", "sap/m/Button", "sap/ui/core/Core"], fu
41
41
  }
42
42
  applyState() {
43
43
  if (this.control && this.metadata) {
44
- if (this.isDisplayMode) return;
44
+ if (!this.isEditable) return;
45
45
  this.control.setEnabled(!this.metadata.ui?.readOnly);
46
46
  }
47
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SubmitFormActionPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","SubmitFormActionPlugin","render","fieldMetadata","bindingPath","modelName","metadata","isDisplayMode","sap","ui","requireSync","TextControl","require","control","visible","Button","text","label","type","icon","press","Core","getEventBus","publish","getValue","applyState","setEnabled","readOnly","__exports","__esModule"],"sources":["SubmitFormActionPlugin.ts"],"sourcesContent":["/**\n * @file SubmitFormActionPlugin.ts\n * @description A custom action plugin that triggers form submission.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport Core from \"sap/ui/core/Core\";\n\n/**\n * Renders a Button that requests the host container to execute its submit flow.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.actions\n * @public\n */\nexport class SubmitFormActionPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n if (this.isDisplayMode) {\n sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\n this.control = new TextControl({ visible: false });\n return this.control as Control;\n }\n \n this.control = new Button({\n text: fieldMetadata.ui?.label || \"Submit\",\n type: \"Emphasized\",\n icon: \"sap-icon://save\",\n press: () => {\n // Fire an event that the GeneratorHost or LayoutManager listens to\n // Suppressing TS error as UI5 1.118+ EventBus signature changed but still requires global bust cast\n // @ts-ignore\n (Core as unknown).getEventBus().publish(\"MetaUI\", \"TriggerSubmit\", {});\n }\n });\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return null;\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (this.isDisplayMode) return;\n (this.control as Button).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,sBAAA;EAMnB;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,sBAAsB,SAASF,UAAU,CAAC;IAC5CG,MAAMA,CAACC,aAAgC,EAAEC,WAAmB,EAAEC,SAAiB,GAAG,MAAM,EAAW;MACtG,IAAI,CAACC,QAAQ,GAAGH,aAAa;MAE7B,IAAI,IAAI,CAACI,aAAa,EAAE;QACpBC,GAAG,CAACC,EAAE,CAACC,WAAW,CAAC,YAAY,CAAC;QAChC,MAAMC,WAAW,GAAGH,GAAG,CAACC,EAAE,CAACG,OAAO,CAAC,YAAY,CAAC;QAChD,IAAI,CAACC,OAAO,GAAG,IAAIF,WAAW,CAAC;UAAEG,OAAO,EAAE;QAAM,CAAC,CAAC;QAClD,OAAO,IAAI,CAACD,OAAO;MACvB;MAEA,IAAI,CAACA,OAAO,GAAG,IAAIE,MAAM,CAAC;QACtBC,IAAI,EAAEb,aAAa,CAACM,EAAE,EAAEQ,KAAK,IAAI,QAAQ;QACzCC,IAAI,EAAE,YAAY;QAClBC,IAAI,EAAE,iBAAiB;QACvBC,KAAK,EAAEA,CAAA,KAAM;UACT;UACA;UACA;UACCC,IAAI,CAAaC,WAAW,CAAC,CAAC,CAACC,OAAO,CAAC,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;QAC1E;MACJ,CAAC,CAAC;MAEF,OAAO,IAAI,CAACV,OAAO;IACvB;IAEUW,QAAQA,CAAA,EAAQ;MACtB,OAAO,IAAI;IACf;IAEUC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACZ,OAAO,IAAI,IAAI,CAACP,QAAQ,EAAE;QAC/B,IAAI,IAAI,CAACC,aAAa,EAAE;QACvB,IAAI,CAACM,OAAO,CAAYa,UAAU,CAAC,CAAC,IAAI,CAACpB,QAAQ,CAACG,EAAE,EAAEkB,QAAQ,CAAC;MACpE;IACJ;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA3B,sBAAA,GAAAA,sBAAA;EAAA,OAAA2B,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"SubmitFormActionPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","SubmitFormActionPlugin","render","fieldMetadata","bindingPath","modelName","metadata","isEditable","sap","ui","requireSync","TextControl","require","control","visible","Button","text","label","type","icon","press","Core","getEventBus","publish","getValue","applyState","setEnabled","readOnly","__exports","__esModule"],"sources":["SubmitFormActionPlugin.ts"],"sourcesContent":["/**\n * @file SubmitFormActionPlugin.ts\n * @description A custom action plugin that triggers form submission.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport Core from \"sap/ui/core/Core\";\n\n/**\n * Renders a Button that requests the host container to execute its submit flow.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.actions\n * @public\n */\nexport class SubmitFormActionPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\n this.control = new TextControl({ visible: false });\n return this.control as Control;\n }\n \n this.control = new Button({\n text: fieldMetadata.ui?.label || \"Submit\",\n type: \"Emphasized\",\n icon: \"sap-icon://save\",\n press: () => {\n // Fire an event that the GeneratorHost or LayoutManager listens to\n // Suppressing TS error as UI5 1.118+ EventBus signature changed but still requires global bust cast\n // @ts-ignore\n (Core as unknown).getEventBus().publish(\"MetaUI\", \"TriggerSubmit\", {});\n }\n });\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return null;\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as Button).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,sBAAA;EAMnB;AACA;AACA;AACA;AACA;AACA;EACO,MAAMC,sBAAsB,SAASF,UAAU,CAAC;IAC5CG,MAAMA,CAACC,aAAgC,EAAEC,WAAmB,EAAEC,SAAiB,GAAG,MAAM,EAAW;MACtG,IAAI,CAACC,QAAQ,GAAGH,aAAa;MAE7B,IAAI,CAAC,IAAI,CAACI,UAAU,EAAE;QAClBC,GAAG,CAACC,EAAE,CAACC,WAAW,CAAC,YAAY,CAAC;QAChC,MAAMC,WAAW,GAAGH,GAAG,CAACC,EAAE,CAACG,OAAO,CAAC,YAAY,CAAC;QAChD,IAAI,CAACC,OAAO,GAAG,IAAIF,WAAW,CAAC;UAAEG,OAAO,EAAE;QAAM,CAAC,CAAC;QAClD,OAAO,IAAI,CAACD,OAAO;MACvB;MAEA,IAAI,CAACA,OAAO,GAAG,IAAIE,MAAM,CAAC;QACtBC,IAAI,EAAEb,aAAa,CAACM,EAAE,EAAEQ,KAAK,IAAI,QAAQ;QACzCC,IAAI,EAAE,YAAY;QAClBC,IAAI,EAAE,iBAAiB;QACvBC,KAAK,EAAEA,CAAA,KAAM;UACT;UACA;UACA;UACCC,IAAI,CAAaC,WAAW,CAAC,CAAC,CAACC,OAAO,CAAC,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;QAC1E;MACJ,CAAC,CAAC;MAEF,OAAO,IAAI,CAACV,OAAO;IACvB;IAEUW,QAAQA,CAAA,EAAQ;MACtB,OAAO,IAAI;IACf;IAEUC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACZ,OAAO,IAAI,IAAI,CAACP,QAAQ,EAAE;QAC/B,IAAI,CAAC,IAAI,CAACC,UAAU,EAAE;QACrB,IAAI,CAACM,OAAO,CAAYa,UAAU,CAAC,CAAC,IAAI,CAACpB,QAAQ,CAACG,EAAE,EAAEkB,QAAQ,CAAC;MACpE;IACJ;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA3B,sBAAA,GAAAA,sBAAA;EAAA,OAAA2B,SAAA;AAAA","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["../controls/BasePlugin","sap/m/Button","sap/ui/core/Core"],function(t,e,i){"use strict";const s=t["BasePlugin"];class a extends s{render(t,s,a="meta"){this.metadata=t;if(this.isDisplayMode){sap.ui.requireSync("sap/m/Text");const t=sap.ui.require("sap/m/Text");this.control=new t({visible:false});return this.control}this.control=new e({text:t.ui?.label||"Submit",type:"Emphasized",icon:"sap-icon://save",press:()=>{i.getEventBus().publish("MetaUI","TriggerSubmit",{})}});return this.control}getValue(){return null}applyState(){if(this.control&&this.metadata){if(this.isDisplayMode)return;this.control.setEnabled(!this.metadata.ui?.readOnly)}}}var n={__esModule:true};n.SubmitFormActionPlugin=a;return n});
1
+ sap.ui.define(["../controls/BasePlugin","sap/m/Button","sap/ui/core/Core"],function(t,e,i){"use strict";const s=t["BasePlugin"];class a extends s{render(t,s,a="meta"){this.metadata=t;if(!this.isEditable){sap.ui.requireSync("sap/m/Text");const t=sap.ui.require("sap/m/Text");this.control=new t({visible:false});return this.control}this.control=new e({text:t.ui?.label||"Submit",type:"Emphasized",icon:"sap-icon://save",press:()=>{i.getEventBus().publish("MetaUI","TriggerSubmit",{})}});return this.control}getValue(){return null}applyState(){if(this.control&&this.metadata){if(!this.isEditable)return;this.control.setEnabled(!this.metadata.ui?.readOnly)}}}var n={__esModule:true};n.SubmitFormActionPlugin=a;return n});
2
2
  //# sourceMappingURL=SubmitFormActionPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SubmitFormActionPlugin.js","names":["BasePlugin","___controls_BasePlugin","SubmitFormActionPlugin","render","fieldMetadata","bindingPath","modelName","this","metadata","isDisplayMode","sap","ui","requireSync","TextControl","require","control","visible","Button","text","label","type","icon","press","Core","getEventBus","publish","getValue","applyState","setEnabled","readOnly","__exports","__esModule"],"sources":["SubmitFormActionPlugin.ts"],"sourcesContent":["/**\n * @file SubmitFormActionPlugin.ts\n * @description A custom action plugin that triggers form submission.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport Core from \"sap/ui/core/Core\";\n\n/**\n * Renders a Button that requests the host container to execute its submit flow.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.actions\n * @public\n */\nexport class SubmitFormActionPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n if (this.isDisplayMode) {\n sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\n this.control = new TextControl({ visible: false });\n return this.control as Control;\n }\n \n this.control = new Button({\n text: fieldMetadata.ui?.label || \"Submit\",\n type: \"Emphasized\",\n icon: \"sap-icon://save\",\n press: () => {\n // Fire an event that the GeneratorHost or LayoutManager listens to\n // Suppressing TS error as UI5 1.118+ EventBus signature changed but still requires global bust cast\n // @ts-ignore\n (Core as unknown).getEventBus().publish(\"MetaUI\", \"TriggerSubmit\", {});\n }\n });\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return null;\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (this.isDisplayMode) return;\n (this.control as Button).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"wGAAA,MAKSA,EAAUC,EAAA,cAYZ,MAAMC,UAA+BF,EACjCG,OAAOC,EAAkCC,EAAqBC,EAAoB,QACrFC,KAAKC,SAAWJ,EAEhB,GAAIG,KAAKE,cAAe,CACpBC,IAAIC,GAAGC,YAAY,cACnB,MAAMC,EAAcH,IAAIC,GAAGG,QAAQ,cACnCP,KAAKQ,QAAU,IAAIF,EAAY,CAAEG,QAAS,QAC1C,OAAOT,KAAKQ,OAChB,CAEAR,KAAKQ,QAAU,IAAIE,EAAO,CACtBC,KAAMd,EAAcO,IAAIQ,OAAS,SACjCC,KAAM,aACNC,KAAM,kBACNC,MAAOA,KAIFC,EAAiBC,cAAcC,QAAQ,SAAU,gBAAiB,CAAC,MAI5E,OAAOlB,KAAKQ,OAChB,CAEUW,WACN,OAAO,IACX,CAEUC,aACN,GAAIpB,KAAKQ,SAAWR,KAAKC,SAAU,CAC/B,GAAID,KAAKE,cAAe,OACvBF,KAAKQ,QAAmBa,YAAYrB,KAAKC,SAASG,IAAIkB,SAC3D,CACJ,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAA5B,yBAAA,OAAA4B,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"SubmitFormActionPlugin.js","names":["BasePlugin","___controls_BasePlugin","SubmitFormActionPlugin","render","fieldMetadata","bindingPath","modelName","this","metadata","isEditable","sap","ui","requireSync","TextControl","require","control","visible","Button","text","label","type","icon","press","Core","getEventBus","publish","getValue","applyState","setEnabled","readOnly","__exports","__esModule"],"sources":["SubmitFormActionPlugin.ts"],"sourcesContent":["/**\n * @file SubmitFormActionPlugin.ts\n * @description A custom action plugin that triggers form submission.\n */\n\nimport { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport Core from \"sap/ui/core/Core\";\n\n/**\n * Renders a Button that requests the host container to execute its submit flow.\n * \n * @namespace nz.co.siliconst.ui5.metaui.plugins.actions\n * @public\n */\nexport class SubmitFormActionPlugin extends BasePlugin {\n public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\"): Control {\n this.metadata = fieldMetadata;\n \n if (!this.isEditable) {\n sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\n this.control = new TextControl({ visible: false });\n return this.control as Control;\n }\n \n this.control = new Button({\n text: fieldMetadata.ui?.label || \"Submit\",\n type: \"Emphasized\",\n icon: \"sap-icon://save\",\n press: () => {\n // Fire an event that the GeneratorHost or LayoutManager listens to\n // Suppressing TS error as UI5 1.118+ EventBus signature changed but still requires global bust cast\n // @ts-ignore\n (Core as unknown).getEventBus().publish(\"MetaUI\", \"TriggerSubmit\", {});\n }\n });\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return null;\n }\n\n protected applyState(): void {\n if (this.control && this.metadata) {\n if (!this.isEditable) return;\n (this.control as Button).setEnabled(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"wGAAA,MAKSA,EAAUC,EAAA,cAYZ,MAAMC,UAA+BF,EACjCG,OAAOC,EAAkCC,EAAqBC,EAAoB,QACrFC,KAAKC,SAAWJ,EAEhB,IAAKG,KAAKE,WAAY,CAClBC,IAAIC,GAAGC,YAAY,cACnB,MAAMC,EAAcH,IAAIC,GAAGG,QAAQ,cACnCP,KAAKQ,QAAU,IAAIF,EAAY,CAAEG,QAAS,QAC1C,OAAOT,KAAKQ,OAChB,CAEAR,KAAKQ,QAAU,IAAIE,EAAO,CACtBC,KAAMd,EAAcO,IAAIQ,OAAS,SACjCC,KAAM,aACNC,KAAM,kBACNC,MAAOA,KAIFC,EAAiBC,cAAcC,QAAQ,SAAU,gBAAiB,CAAC,MAI5E,OAAOlB,KAAKQ,OAChB,CAEUW,WACN,OAAO,IACX,CAEUC,aACN,GAAIpB,KAAKQ,SAAWR,KAAKC,SAAU,CAC/B,IAAKD,KAAKE,WAAY,OACrBF,KAAKQ,QAAmBa,YAAYrB,KAAKC,SAASG,IAAIkB,SAC3D,CACJ,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAA5B,yBAAA,OAAA4B,CAAA","ignoreList":[]}
@@ -19,7 +19,7 @@ export class SubmitFormActionPlugin extends BasePlugin {
19
19
  public render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName: string = "meta"): Control {
20
20
  this.metadata = fieldMetadata;
21
21
 
22
- if (this.isDisplayMode) {
22
+ if (!this.isEditable) {
23
23
  sap.ui.requireSync("sap/m/Text");
24
24
  const TextControl = sap.ui.require("sap/m/Text");
25
25
  this.control = new TextControl({ visible: false });
@@ -47,7 +47,7 @@ export class SubmitFormActionPlugin extends BasePlugin {
47
47
 
48
48
  protected applyState(): void {
49
49
  if (this.control && this.metadata) {
50
- if (this.isDisplayMode) return;
50
+ if (!this.isEditable) return;
51
51
  (this.control as Button).setEnabled(!this.metadata.ui?.readOnly);
52
52
  }
53
53
  }
@@ -24,8 +24,8 @@ sap.ui.define(["./BasePlugin", "sap/m/Button"], function (___BasePlugin, Button)
24
24
  }
25
25
  this.control = new Button({
26
26
  id: this.generateStableId(engineScopeId, bindingPath),
27
- text: this.isDisplayMode ? "View Records" : "Edit Records",
28
- icon: this.isDisplayMode ? "sap-icon://display" : "sap-icon://list",
27
+ text: !this.isEditable ? "View Records" : "Edit Records",
28
+ icon: !this.isEditable ? "sap-icon://display" : "sap-icon://list",
29
29
  press: oEvent => {
30
30
  const btn = oEvent.getSource();
31
31
  const parentModel = btn.getModel(modelName);
@@ -41,17 +41,17 @@ sap.ui.define(["./BasePlugin", "sap/m/Button"], function (___BasePlugin, Button)
41
41
  const host = new GeneratorHost({
42
42
  schemaDefinition: subSchema,
43
43
  data: nestedData,
44
- displayMode: this.isDisplayMode // Pass the display mode down to the child Engine!
44
+ editable: this.isEditable // Pass the display mode down to the child Engine!
45
45
  });
46
46
 
47
47
  // Only attach submit event if we are not in display mode
48
- if (!this.isDisplayMode) {
48
+ if (!!this.isEditable) {
49
49
  host.attachSubmit(e => {
50
50
  const payload = e.getParameter("payload");
51
51
  parentModel.setProperty(updatePath, payload);
52
52
  });
53
53
  }
54
- const buttonText = field.ui?.dialogButtonText || (this.isDisplayMode ? "Close" : "OK");
54
+ const buttonText = field.ui?.dialogButtonText || (!this.isEditable ? "Close" : "OK");
55
55
  host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);
56
56
  });
57
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayPlugin-dbg.js","names":["BasePlugin","___BasePlugin","ArrayPlugin","render","field","bindingPath","modelName","engineScopeId","onChange","metadata","propKey","startsWith","substring","subSchema","type","title","ui","label","items","properties","uiLayout","control","Button","id","generateStableId","text","isDisplayMode","icon","press","oEvent","btn","getSource","parentModel","getModel","bindingContext","getBindingContext","updatePath","ctxPath","getPath","endsWith","nestedData","getProperty","sap","require","GeneratorHost","host","schemaDefinition","data","displayMode","attachSubmit","e","payload","getParameter","setProperty","buttonText","dialogButtonText","openInDialog","getValue","applyState","__exports","__esModule"],"sources":["ArrayPlugin.ts"],"sourcesContent":["/**\n * @file ArrayPlugin.ts\n * @description Renders a button that drills down into a nested table (array) via a recursive Dialog using v2 schema.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport Button from \"sap/m/Button\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nexport class ArrayPlugin extends BasePlugin {\n public render(field: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = field;\n const propKey = bindingPath.startsWith(\"/\") ? bindingPath.substring(1) : bindingPath;\n \n const subSchema: any = {\n type: \"array\",\n title: field.ui?.label || propKey,\n items: field.items || {\n type: \"object\",\n properties: {} // inference will handle it if empty\n }\n };\n\n if (field.uiLayout) {\n subSchema.uiLayout = field.uiLayout;\n }\n\n this.control = new Button({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: this.isDisplayMode ? \"View Records\" : \"Edit Records\",\n icon: this.isDisplayMode ? \"sap-icon://display\" : \"sap-icon://list\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const parentModel = btn.getModel(modelName) as JSONModel;\n if (!parentModel) return;\n \n const bindingContext = btn.getBindingContext(modelName);\n let updatePath = bindingPath;\n if (bindingContext && !bindingPath.startsWith(\"/\")) {\n const ctxPath = bindingContext.getPath();\n updatePath = ctxPath.endsWith(\"/\") ? ctxPath + bindingPath : (ctxPath === \"/\" ? \"/\" + bindingPath : ctxPath + \"/\" + bindingPath);\n }\n \n const nestedData = parentModel.getProperty(updatePath) || [];\n\n sap.ui.require([\"nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost\"], (GeneratorHost: any) => {\n const host = new GeneratorHost({\n schemaDefinition: subSchema,\n data: nestedData,\n displayMode: this.isDisplayMode // Pass the display mode down to the child Engine!\n });\n\n // Only attach submit event if we are not in display mode\n if (!this.isDisplayMode) {\n host.attachSubmit((e: any) => {\n const payload = e.getParameter(\"payload\");\n parentModel.setProperty(updatePath, payload);\n });\n }\n\n const buttonText = field.ui?.dialogButtonText || (this.isDisplayMode ? \"Close\" : \"OK\");\n host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);\n });\n }\n });\n \n return this.control as Control;\n }\n\n protected getValue(): any {\n return null;\n }\n\n protected applyState(): void {\n // dynamic state changes\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAMZ,MAAMC,WAAW,SAASF,UAAU,CAAC;IACjCG,MAAMA,CAACC,KAAwB,EAAGC,WAAmB,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SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAzD,WAAA,GAAAA,WAAA;EAAA,OAAAyD,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"ArrayPlugin-dbg.js","names":["BasePlugin","___BasePlugin","ArrayPlugin","render","field","bindingPath","modelName","engineScopeId","onChange","metadata","propKey","startsWith","substring","subSchema","type","title","ui","label","items","properties","uiLayout","control","Button","id","generateStableId","text","isEditable","icon","press","oEvent","btn","getSource","parentModel","getModel","bindingContext","getBindingContext","updatePath","ctxPath","getPath","endsWith","nestedData","getProperty","sap","require","GeneratorHost","host","schemaDefinition","data","editable","attachSubmit","e","payload","getParameter","setProperty","buttonText","dialogButtonText","openInDialog","getValue","applyState","__exports","__esModule"],"sources":["ArrayPlugin.ts"],"sourcesContent":["/**\n * @file ArrayPlugin.ts\n * @description Renders a button that drills down into a nested table (array) via a recursive Dialog using v2 schema.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport Button from \"sap/m/Button\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nexport class ArrayPlugin extends BasePlugin {\n public render(field: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = field;\n const propKey = bindingPath.startsWith(\"/\") ? bindingPath.substring(1) : bindingPath;\n \n const subSchema: any = {\n type: \"array\",\n title: field.ui?.label || propKey,\n items: field.items || {\n type: \"object\",\n properties: {} // inference will handle it if empty\n }\n };\n\n if (field.uiLayout) {\n subSchema.uiLayout = field.uiLayout;\n }\n\n this.control = new Button({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: !this.isEditable ? \"View Records\" : \"Edit Records\",\n icon: !this.isEditable ? \"sap-icon://display\" : \"sap-icon://list\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const parentModel = btn.getModel(modelName) as JSONModel;\n if (!parentModel) return;\n \n const bindingContext = btn.getBindingContext(modelName);\n let updatePath = bindingPath;\n if (bindingContext && !bindingPath.startsWith(\"/\")) {\n const ctxPath = bindingContext.getPath();\n updatePath = ctxPath.endsWith(\"/\") ? ctxPath + bindingPath : (ctxPath === \"/\" ? \"/\" + bindingPath : ctxPath + \"/\" + bindingPath);\n }\n \n const nestedData = parentModel.getProperty(updatePath) || [];\n\n sap.ui.require([\"nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost\"], (GeneratorHost: any) => {\n const host = new GeneratorHost({\n schemaDefinition: subSchema,\n data: nestedData,\n editable: this.isEditable // Pass the display mode down to the child Engine!\n });\n\n // Only attach submit event if we are not in display mode\n if (!!this.isEditable) {\n host.attachSubmit((e: any) => {\n const payload = e.getParameter(\"payload\");\n parentModel.setProperty(updatePath, payload);\n });\n }\n\n const buttonText = field.ui?.dialogButtonText || (!this.isEditable ? \"Close\" : \"OK\");\n host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);\n });\n }\n });\n \n return this.control as Control;\n }\n\n protected getValue(): any {\n return null;\n }\n\n protected applyState(): void {\n // dynamic state changes\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAKSA,UAAU,GAAAC,aAAA;EAMZ,MAAMC,WAAW,SAASF,UAAU,CAAC;IACjCG,MAAMA,CAACC,KAAwB,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MAClL,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACC,QAAQ,GAAGL,KAAK;MACrB,MAAMM,OAAO,GAAGL,WAAW,CAACM,UAAU,CAAC,GAAG,CAAC,GAAGN,WAAW,CAACO,SAAS,CAAC,CAAC,CAAC,GAAGP,WAAW;MAEpF,MAAMQ,SAAc,GAAG;QACnBC,IAAI,EAAE,OAAO;QACbC,KAAK,EAAEX,KAAK,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AAC1B,EAAE,CAAC2B,OAAO,CAAC,CAAC,wDAAwD,CAAC,EAAGC,aAAkB,IAAK;YAC/F,MAAMC,IAAI,GAAG,IAAID,aAAa,CAAC;cAC3BE,gBAAgB,EAAEjC,SAAS;cAC3BkC,IAAI,EAAEP,UAAU;cAChBQ,QAAQ,EAAE,IAAI,CAACtB,UAAU,CAAC;YAC9B,CAAC,CAAC;;YAEF;YACA,IAAI,CAAC,CAAC,IAAI,CAACA,UAAU,EAAE;cACnBmB,IAAI,CAACI,YAAY,CAAEC,CAAM,IAAK;gBAC1B,MAAMC,OAAO,GAAGD,CAAC,CAACE,YAAY,CAAC,SAAS,CAAC;gBACzCpB,WAAW,CAACqB,WAAW,CAACjB,UAAU,EAAEe,OAAO,CAAC;cAChD,CAAC,CAAC;YACN;YAEA,MAAMG,UAAU,GAAGlD,KAAK,CAACY,EAAE,EAAEuC,gBAAgB,KAAK,CAAC,IAAI,CAAC7B,UAAU,GAAG,OAAO,GAAG,IAAI,CAAC;YACpFmB,IAAI,CAACW,YAAY,CAAC,mBAAmBpD,KAAK,CAACY,EAAE,EAAEC,KAAK,IAAIP,OAAO,EAAE,EAAE4C,UAAU,CAAC;UAClF,CAAC,CAAC;QACN;MACJ,CAAC,CAAC;MAEF,OAAO,IAAI,CAACjC,OAAO;IACvB;IAEUoC,QAAQA,CAAA,EAAQ;MACtB,OAAO,IAAI;IACf;IAEUC,UAAUA,CAAA,EAAS;MACzB;IAAA;EAER;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAzD,WAAA,GAAAA,WAAA;EAAA,OAAAyD,SAAA;AAAA","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["./BasePlugin","sap/m/Button"],function(t,e){"use strict";const s=t["BasePlugin"];class i extends s{render(t,s,i="meta",o,a){this.onChange=a;this.metadata=t;const n=s.startsWith("/")?s.substring(1):s;const r={type:"array",title:t.ui?.label||n,items:t.items||{type:"object",properties:{}}};if(t.uiLayout){r.uiLayout=t.uiLayout}this.control=new e({id:this.generateStableId(o,s),text:this.isDisplayMode?"View Records":"Edit Records",icon:this.isDisplayMode?"sap-icon://display":"sap-icon://list",press:e=>{const o=e.getSource();const a=o.getModel(i);if(!a)return;const l=o.getBindingContext(i);let u=s;if(l&&!s.startsWith("/")){const t=l.getPath();u=t.endsWith("/")?t+s:t==="/"?"/"+s:t+"/"+s}const c=a.getProperty(u)||[];sap.ui.require(["nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost"],e=>{const s=new e({schemaDefinition:r,data:c,displayMode:this.isDisplayMode});if(!this.isDisplayMode){s.attachSubmit(t=>{const e=t.getParameter("payload");a.setProperty(u,e)})}const i=t.ui?.dialogButtonText||(this.isDisplayMode?"Close":"OK");s.openInDialog(`Nested Records: ${t.ui?.label||n}`,i)})}});return this.control}getValue(){return null}applyState(){}}var o={__esModule:true};o.ArrayPlugin=i;return o});
1
+ sap.ui.define(["./BasePlugin","sap/m/Button"],function(t,e){"use strict";const i=t["BasePlugin"];class s extends i{render(t,i,s="meta",a,n){this.onChange=n;this.metadata=t;const o=i.startsWith("/")?i.substring(1):i;const r={type:"array",title:t.ui?.label||o,items:t.items||{type:"object",properties:{}}};if(t.uiLayout){r.uiLayout=t.uiLayout}this.control=new e({id:this.generateStableId(a,i),text:!this.isEditable?"View Records":"Edit Records",icon:!this.isEditable?"sap-icon://display":"sap-icon://list",press:e=>{const a=e.getSource();const n=a.getModel(s);if(!n)return;const l=a.getBindingContext(s);let u=i;if(l&&!i.startsWith("/")){const t=l.getPath();u=t.endsWith("/")?t+i:t==="/"?"/"+i:t+"/"+i}const c=n.getProperty(u)||[];sap.ui.require(["nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost"],e=>{const i=new e({schemaDefinition:r,data:c,editable:this.isEditable});if(!!this.isEditable){i.attachSubmit(t=>{const e=t.getParameter("payload");n.setProperty(u,e)})}const s=t.ui?.dialogButtonText||(!this.isEditable?"Close":"OK");i.openInDialog(`Nested Records: ${t.ui?.label||o}`,s)})}});return this.control}getValue(){return null}applyState(){}}var a={__esModule:true};a.ArrayPlugin=s;return a});
2
2
  //# sourceMappingURL=ArrayPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayPlugin.js","names":["BasePlugin","___BasePlugin","ArrayPlugin","render","field","bindingPath","modelName","engineScopeId","onChange","this","metadata","propKey","startsWith","substring","subSchema","type","title","ui","label","items","properties","uiLayout","control","Button","id","generateStableId","text","isDisplayMode","icon","press","oEvent","btn","getSource","parentModel","getModel","bindingContext","getBindingContext","updatePath","ctxPath","getPath","endsWith","nestedData","getProperty","sap","require","GeneratorHost","host","schemaDefinition","data","displayMode","attachSubmit","e","payload","getParameter","setProperty","buttonText","dialogButtonText","openInDialog","getValue","applyState","__exports","__esModule"],"sources":["ArrayPlugin.ts"],"sourcesContent":["/**\n * @file ArrayPlugin.ts\n * @description Renders a button that drills down into a nested table (array) via a recursive Dialog using v2 schema.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport Button from \"sap/m/Button\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nexport class ArrayPlugin extends BasePlugin {\n public render(field: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = field;\n const propKey = bindingPath.startsWith(\"/\") ? bindingPath.substring(1) : bindingPath;\n \n const subSchema: any = {\n type: \"array\",\n title: field.ui?.label || propKey,\n items: field.items || {\n type: \"object\",\n properties: {} // inference will handle it if empty\n }\n };\n\n if (field.uiLayout) {\n subSchema.uiLayout = field.uiLayout;\n }\n\n this.control = new Button({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: this.isDisplayMode ? \"View Records\" : \"Edit Records\",\n icon: this.isDisplayMode ? \"sap-icon://display\" : \"sap-icon://list\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const parentModel = btn.getModel(modelName) as JSONModel;\n if (!parentModel) return;\n \n const bindingContext = btn.getBindingContext(modelName);\n let updatePath = bindingPath;\n if (bindingContext && !bindingPath.startsWith(\"/\")) {\n const ctxPath = bindingContext.getPath();\n updatePath = ctxPath.endsWith(\"/\") ? ctxPath + bindingPath : (ctxPath === \"/\" ? \"/\" + bindingPath : ctxPath + \"/\" + bindingPath);\n }\n \n const nestedData = parentModel.getProperty(updatePath) || [];\n\n sap.ui.require([\"nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost\"], (GeneratorHost: any) => {\n const host = new GeneratorHost({\n schemaDefinition: subSchema,\n data: nestedData,\n displayMode: this.isDisplayMode // Pass the display mode down to the child Engine!\n });\n\n // Only attach submit event if we are not in display mode\n if (!this.isDisplayMode) {\n host.attachSubmit((e: any) => {\n const payload = e.getParameter(\"payload\");\n parentModel.setProperty(updatePath, payload);\n });\n }\n\n const buttonText = field.ui?.dialogButtonText || (this.isDisplayMode ? \"Close\" : \"OK\");\n host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);\n });\n }\n });\n \n return this.control as Control;\n }\n\n protected getValue(): any {\n return null;\n }\n\n protected applyState(): void {\n // dynamic state changes\n }\n}\n"],"mappings":"yEAAA,MAKSA,EAAUC,EAAA,cAMZ,MAAMC,UAAoBF,EACtBG,OAAOC,EAA2BC,EAAsBC,EAAoB,OAAQC,EAAwBC,GAC/GC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAChB,MAAMO,EAAUN,EAAYO,WAAW,KAAOP,EAAYQ,UAAU,GAAKR,EAEzE,MAAMS,EAAiB,CACnBC,KAAM,QACNC,MAAOZ,EAAMa,IAAIC,OAASP,EAC1BQ,MAAOf,EAAMe,OAAS,CAClBJ,KAAM,SACNK,WAAY,CAAC,IAIrB,GAAIhB,EAAMiB,SAAU,CAChBP,EAAUO,SAAWjB,EAAMiB,QAC/B,CAEAZ,KAAKa,QAAU,IAAIC,EAAO,CACtBC,GAAIf,KAAKgB,iBAAiBlB,EAAeF,GACzCqB,KAAMjB,KAAKkB,cAAgB,eAAiB,eAC5CC,KAAMnB,KAAKkB,cAAgB,qBAAuB,kBAClDE,MAAQC,IACJ,MAAMC,EAAMD,EAAOE,YACnB,MAAMC,EAAcF,EAAIG,SAAS5B,GACjC,IAAK2B,EAAa,OAElB,MAAME,EAAiBJ,EAAIK,kBAAkB9B,GAC7C,IAAI+B,EAAahC,EACjB,GAAI8B,IAAmB9B,EAAYO,WAAW,KAAM,CAChD,MAAM0B,EAAUH,EAAeI,UAC/BF,EAAaC,EAAQE,SAAS,KAAOF,EAAUjC,EAAeiC,IAAY,IAAM,IAAMjC,EAAciC,EAAU,IAAMjC,CACxH,CAEA,MAAMoC,EAAaR,EAAYS,YAAYL,IAAe,GAE1DM,IAAI1B,GAAG2B,QAAQ,CAAC,0DAA4DC,IACxE,MAAMC,EAAO,IAAID,EAAc,CAC3BE,iBAAkBjC,EAClBkC,KAAMP,EACNQ,YAAaxC,KAAKkB,gBAItB,IAAKlB,KAAKkB,cAAe,CACrBmB,EAAKI,aAAcC,IACf,MAAMC,EAAUD,EAAEE,aAAa,WAC/BpB,EAAYqB,YAAYjB,EAAYe,IAE5C,CAEA,MAAMG,EAAanD,EAAMa,IAAIuC,mBAAqB/C,KAAKkB,cAAgB,QAAU,MACjFmB,EAAKW,aAAa,mBAAmBrD,EAAMa,IAAIC,OAASP,IAAW4C,QAK/E,OAAO9C,KAAKa,OAChB,CAEUoC,WACN,OAAO,IACX,CAEUC,aACN,EAEP,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAA1D,cAAA,OAAA0D,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"ArrayPlugin.js","names":["BasePlugin","___BasePlugin","ArrayPlugin","render","field","bindingPath","modelName","engineScopeId","onChange","this","metadata","propKey","startsWith","substring","subSchema","type","title","ui","label","items","properties","uiLayout","control","Button","id","generateStableId","text","isEditable","icon","press","oEvent","btn","getSource","parentModel","getModel","bindingContext","getBindingContext","updatePath","ctxPath","getPath","endsWith","nestedData","getProperty","sap","require","GeneratorHost","host","schemaDefinition","data","editable","attachSubmit","e","payload","getParameter","setProperty","buttonText","dialogButtonText","openInDialog","getValue","applyState","__exports","__esModule"],"sources":["ArrayPlugin.ts"],"sourcesContent":["/**\n * @file ArrayPlugin.ts\n * @description Renders a button that drills down into a nested table (array) via a recursive Dialog using v2 schema.\n */\n\nimport { BasePlugin } from \"./BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport Button from \"sap/m/Button\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\nexport class ArrayPlugin extends BasePlugin {\n public render(field: IPropertyMetadata, bindingPath: string, modelName: string = \"meta\", engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control {\n this.onChange = onChange;\n this.metadata = field;\n const propKey = bindingPath.startsWith(\"/\") ? bindingPath.substring(1) : bindingPath;\n \n const subSchema: any = {\n type: \"array\",\n title: field.ui?.label || propKey,\n items: field.items || {\n type: \"object\",\n properties: {} // inference will handle it if empty\n }\n };\n\n if (field.uiLayout) {\n subSchema.uiLayout = field.uiLayout;\n }\n\n this.control = new Button({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: !this.isEditable ? \"View Records\" : \"Edit Records\",\n icon: !this.isEditable ? \"sap-icon://display\" : \"sap-icon://list\",\n press: (oEvent: sap.ui.base.Event) => {\n const btn = oEvent.getSource() as Button;\n const parentModel = btn.getModel(modelName) as JSONModel;\n if (!parentModel) return;\n \n const bindingContext = btn.getBindingContext(modelName);\n let updatePath = bindingPath;\n if (bindingContext && !bindingPath.startsWith(\"/\")) {\n const ctxPath = bindingContext.getPath();\n updatePath = ctxPath.endsWith(\"/\") ? ctxPath + bindingPath : (ctxPath === \"/\" ? \"/\" + bindingPath : ctxPath + \"/\" + bindingPath);\n }\n \n const nestedData = parentModel.getProperty(updatePath) || [];\n\n sap.ui.require([\"nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost\"], (GeneratorHost: any) => {\n const host = new GeneratorHost({\n schemaDefinition: subSchema,\n data: nestedData,\n editable: this.isEditable // Pass the display mode down to the child Engine!\n });\n\n // Only attach submit event if we are not in display mode\n if (!!this.isEditable) {\n host.attachSubmit((e: any) => {\n const payload = e.getParameter(\"payload\");\n parentModel.setProperty(updatePath, payload);\n });\n }\n\n const buttonText = field.ui?.dialogButtonText || (!this.isEditable ? \"Close\" : \"OK\");\n host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);\n });\n }\n });\n \n return this.control as Control;\n }\n\n protected getValue(): any {\n return null;\n }\n\n protected applyState(): void {\n // dynamic state changes\n }\n}\n"],"mappings":"yEAAA,MAKSA,EAAUC,EAAA,cAMZ,MAAMC,UAAoBF,EACtBG,OAAOC,EAA2BC,EAAsBC,EAAoB,OAAQC,EAAwBC,GAC/GC,KAAKD,SAAWA,EAChBC,KAAKC,SAAWN,EAChB,MAAMO,EAAUN,EAAYO,WAAW,KAAOP,EAAYQ,UAAU,GAAKR,EAEzE,MAAMS,EAAiB,CACnBC,KAAM,QACNC,MAAOZ,EAAMa,IAAIC,OAASP,EAC1BQ,MAAOf,EAAMe,OAAS,CAClBJ,KAAM,SACNK,WAAY,CAAC,IAIrB,GAAIhB,EAAMiB,SAAU,CAChBP,EAAUO,SAAWjB,EAAMiB,QAC/B,CAEAZ,KAAKa,QAAU,IAAIC,EAAO,CACtBC,GAAIf,KAAKgB,iBAAiBlB,EAAeF,GACzCqB,MAAOjB,KAAKkB,WAAa,eAAiB,eAC1CC,MAAOnB,KAAKkB,WAAa,qBAAuB,kBAChDE,MAAQC,IACJ,MAAMC,EAAMD,EAAOE,YACnB,MAAMC,EAAcF,EAAIG,SAAS5B,GACjC,IAAK2B,EAAa,OAElB,MAAME,EAAiBJ,EAAIK,kBAAkB9B,GAC7C,IAAI+B,EAAahC,EACjB,GAAI8B,IAAmB9B,EAAYO,WAAW,KAAM,CAChD,MAAM0B,EAAUH,EAAeI,UAC/BF,EAAaC,EAAQE,SAAS,KAAOF,EAAUjC,EAAeiC,IAAY,IAAM,IAAMjC,EAAciC,EAAU,IAAMjC,CACxH,CAEA,MAAMoC,EAAaR,EAAYS,YAAYL,IAAe,GAE1DM,IAAI1B,GAAG2B,QAAQ,CAAC,0DAA4DC,IACxE,MAAMC,EAAO,IAAID,EAAc,CAC3BE,iBAAkBjC,EAClBkC,KAAMP,EACNQ,SAAUxC,KAAKkB,aAInB,KAAMlB,KAAKkB,WAAY,CACnBmB,EAAKI,aAAcC,IACf,MAAMC,EAAUD,EAAEE,aAAa,WAC/BpB,EAAYqB,YAAYjB,EAAYe,IAE5C,CAEA,MAAMG,EAAanD,EAAMa,IAAIuC,oBAAsB/C,KAAKkB,WAAa,QAAU,MAC/EmB,EAAKW,aAAa,mBAAmBrD,EAAMa,IAAIC,OAASP,IAAW4C,QAK/E,OAAO9C,KAAKa,OAChB,CAEUoC,WACN,OAAO,IACX,CAEUC,aACN,EAEP,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAA1D,cAAA,OAAA0D,CAAA","ignoreList":[]}
@@ -30,8 +30,8 @@ export class ArrayPlugin extends BasePlugin {
30
30
 
31
31
  this.control = new Button({
32
32
  id: this.generateStableId(engineScopeId, bindingPath),
33
- text: this.isDisplayMode ? "View Records" : "Edit Records",
34
- icon: this.isDisplayMode ? "sap-icon://display" : "sap-icon://list",
33
+ text: !this.isEditable ? "View Records" : "Edit Records",
34
+ icon: !this.isEditable ? "sap-icon://display" : "sap-icon://list",
35
35
  press: (oEvent: sap.ui.base.Event) => {
36
36
  const btn = oEvent.getSource() as Button;
37
37
  const parentModel = btn.getModel(modelName) as JSONModel;
@@ -50,18 +50,18 @@ export class ArrayPlugin extends BasePlugin {
50
50
  const host = new GeneratorHost({
51
51
  schemaDefinition: subSchema,
52
52
  data: nestedData,
53
- displayMode: this.isDisplayMode // Pass the display mode down to the child Engine!
53
+ editable: this.isEditable // Pass the display mode down to the child Engine!
54
54
  });
55
55
 
56
56
  // Only attach submit event if we are not in display mode
57
- if (!this.isDisplayMode) {
57
+ if (!!this.isEditable) {
58
58
  host.attachSubmit((e: any) => {
59
59
  const payload = e.getParameter("payload");
60
60
  parentModel.setProperty(updatePath, payload);
61
61
  });
62
62
  }
63
63
 
64
- const buttonText = field.ui?.dialogButtonText || (this.isDisplayMode ? "Close" : "OK");
64
+ const buttonText = field.ui?.dialogButtonText || (!this.isEditable ? "Close" : "OK");
65
65
  host.openInDialog(`Nested Records: ${field.ui?.label || propKey}`, buttonText);
66
66
  });
67
67
  }
@@ -8,7 +8,7 @@ sap.ui.define(["../controls/BasePlugin", "sap/m/HBox", "sap/m/Input", "sap/ndc/B
8
8
  this.metadata = metadata;
9
9
  this.fieldKey = bindingPath.replace('/', '');
10
10
  this.modelName = modelName;
11
- if (this.isDisplayMode) {
11
+ if (!this.isEditable) {
12
12
  sap.ui.requireSync("sap/m/Text");
13
13
  const TextControl = sap.ui.require("sap/m/Text");
14
14
  this.control = new TextControl({
@@ -61,7 +61,7 @@ sap.ui.define(["../controls/BasePlugin", "sap/m/HBox", "sap/m/Input", "sap/ndc/B
61
61
  }
62
62
  applyState() {
63
63
  if (this.inputControl && this.metadata) {
64
- if (this.isDisplayMode) return;
64
+ if (!this.isEditable) return;
65
65
  this.inputControl.setEditable(!this.metadata.ui?.readOnly);
66
66
  }
67
67
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BarcodeScannerPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","fieldKey","replace","isDisplayMode","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","applyCommonDirectives","inputControl","Input","value","editable","readOnly","width","change","result","validate","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","model","getModel","setProperty","HBox","items","addStyleClass","getValue","applyState","setEditable","__exports","__esModule"],"sources":["BarcodeScannerPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport HBox from \"sap/m/HBox\";\nimport Input from \"sap/m/Input\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n// @ts-ignore\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\n\nexport class BarcodeScannerPlugin extends BasePlugin {\n private inputControl!: Input;\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.isDisplayMode) {\n sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.inputControl = new Input({\n id: this.generateStableId(engineScopeId, bindingPath + \"-input\"),\n value: `{${modelName}>${bindingPath}}`,\n editable: !metadata.ui?.readOnly,\n width: \"100%\",\n change: () => {\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n \n const scannerBtn = new BarcodeScannerButton({\n id: this.generateStableId(engineScopeId, bindingPath + \"-btn\"),\n scanSuccess: (oEvent: sap.ui.base.Event) => {\n const text = oEvent.getParameter(\"text\");\n if (text) {\n this.inputControl.setValue(text);\n // Update model explicitly since setValue doesn't always trigger two-way binding immediately\n const model = this.inputControl.getModel(this.modelName) as JSONModel;\n if (model) {\n model.setProperty(bindingPath, text);\n }\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n }\n });\n\n this.control = new HBox({\n id: this.generateStableId(engineScopeId, bindingPath),\n items: [this.inputControl, scannerBtn],\n width: \"100%\"\n }).addStyleClass(\"sapUiSmallMarginBottom\");\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return this.inputControl ? this.inputControl.getValue() : null;\n }\n\n protected applyState(): void {\n if (this.inputControl && this.metadata) {\n if (this.isDisplayMode) return;\n this.inputControl.setEditable(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;QAASA,UAAU,GAAAC,sBAAA;EASZ,MAAMC,oBAAoB,SAASF,UAAU,CAAC;IAG1CG,MAAMA,CAACC,QAA2B,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MACrL,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACJ,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACK,QAAQ,GAAGJ,WAAW,CAACK,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;MAC5C,IAAI,CAACJ,SAAS,GAAGA,SAAS;MAE1B,IAAI,IAAI,CAACK,aAAa,EAAE;QACpBC,GAAG,CAACC,EAAE,CAACC,WAAW,CAAC,YAAY,CAAC;QAChC,MAAMC,WAAW,GAAGH,GAAG,CAACC,EAAE,CAACG,OAAO,CAAC,YAAY,CAAC;QAChD,IAAI,CAACC,OAAO,GAAG,IAAIF,WAAW,CAAC;UAC3BG,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACZ,aAAa,EAAEF,WAAW,CAAC;UACrDe,IAAI,EAAE,IAAId,SAAS,IAAID,WAAW;QACtC,CAAC,CAAC;QACF,IAAI,CAACgB,qBAAqB,CAAC,IAAI,CAACJ,OAAO,EAAEb,QAAQ,EAAEE,SAAS,CAAC;QAC7D,OAAO,IAAI,CAACW,OAAO;MACvB;MAEA,IAAI,CAACK,YAAY,GAAG,IAAIC,KAAK,CAAC;QAC1BL,EAAE,EAAE,IAAI,CAACC,gBAAgB,C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aAAa,EAAEF,WAAW,CAAC;QACrDqC,KAAK,EAAE,CAAC,IAAI,CAACpB,YAAY,EAAEU,UAAU,CAAC;QACtCL,KAAK,EAAE;MACX,CAAC,CAAC,CAACgB,aAAa,CAAC,wBAAwB,CAAC;MAE1C,IAAI,CAACtB,qBAAqB,CAAC,IAAI,CAACJ,OAAO,EAAEb,QAAQ,EAAEE,SAAS,CAAC;MAE7D,OAAO,IAAI,CAACW,OAAO;IACvB;IAEU2B,QAAQA,CAAA,EAAQ;MACtB,OAAO,IAAI,CAACtB,YAAY,GAAG,IAAI,CAACA,YAAY,CAACsB,QAAQ,CAAC,CAAC,GAAG,IAAI;IAClE;IAEUC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACvB,YAAY,IAAI,IAAI,CAAClB,QAAQ,EAAE;QACpC,IAAI,IAAI,CAACO,aAAa,EAAE;QACxB,IAAI,CAACW,YAAY,CAACwB,WAAW,CAAC,CAAC,IAAI,CAAC1C,QAAQ,CAACS,EAAE,EAAEa,QAAQ,CAAC;MAC9D;IACJ;EACJ;EAAC,IAAAqB,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA7C,oBAAA,GAAAA,oBAAA;EAAA,OAAA6C,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"BarcodeScannerPlugin-dbg.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","fieldKey","replace","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","applyCommonDirectives","inputControl","Input","value","editable","readOnly","width","change","result","validate","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","model","getModel","setProperty","HBox","items","addStyleClass","getValue","applyState","setEditable","__exports","__esModule"],"sources":["BarcodeScannerPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport HBox from \"sap/m/HBox\";\nimport Input from \"sap/m/Input\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n// @ts-ignore\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\n\nexport class BarcodeScannerPlugin extends BasePlugin {\n private inputControl!: Input;\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 sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.inputControl = new Input({\n id: this.generateStableId(engineScopeId, bindingPath + \"-input\"),\n value: `{${modelName}>${bindingPath}}`,\n editable: !metadata.ui?.readOnly,\n width: \"100%\",\n change: () => {\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n \n const scannerBtn = new BarcodeScannerButton({\n id: this.generateStableId(engineScopeId, bindingPath + \"-btn\"),\n scanSuccess: (oEvent: sap.ui.base.Event) => {\n const text = oEvent.getParameter(\"text\");\n if (text) {\n this.inputControl.setValue(text);\n // Update model explicitly since setValue doesn't always trigger two-way binding immediately\n const model = this.inputControl.getModel(this.modelName) as JSONModel;\n if (model) {\n model.setProperty(bindingPath, text);\n }\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n }\n });\n\n this.control = new HBox({\n id: this.generateStableId(engineScopeId, bindingPath),\n items: [this.inputControl, scannerBtn],\n width: \"100%\"\n }).addStyleClass(\"sapUiSmallMarginBottom\");\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return this.inputControl ? this.inputControl.getValue() : null;\n }\n\n protected applyState(): void {\n if (this.inputControl && this.metadata) {\n if (!this.isEditable) return;\n this.inputControl.setEditable(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":";;;QAASA,UAAU,GAAAC,sBAAA;EASZ,MAAMC,oBAAoB,SAASF,UAAU,CAAC;IAG1CG,MAAMA,CAACC,QAA2B,EAAGC,WAAmB,EAAGC,SAAiB,GAAG,MAAM,EAAEC,aAAsB,EAAEC,QAAwD,EAAW;MACrL,IAAI,CAACA,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACJ,QAAQ,GAAGA,QAAQ;MACxB,IAAI,CAACK,QAAQ,GAAGJ,WAAW,CAACK,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;MAC5C,IAAI,CAACJ,SAAS,GAAGA,SAAS;MAE1B,IAAI,CAAC,IAAI,CAACK,UAAU,EAAE;QAClBC,GAAG,CAACC,EAAE,CAACC,WAAW,CAAC,YAAY,CAAC;QAChC,MAAMC,WAAW,GAAGH,GAAG,CAACC,EAAE,CAACG,OAAO,CAAC,YAAY,CAAC;QAChD,IAAI,CAACC,OAAO,GAAG,IAAIF,WAAW,CAAC;UAC3BG,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACZ,aAAa,EAAEF,WAAW,CAAC;UACrDe,IAAI,EAAE,IAAId,SAAS,IAAID,WAAW;QACtC,CAAC,CAAC;QACF,IAAI,CAACgB,qBAAqB,CAAC,IAAI,CAACJ,OAAO,EAAEb,QAAQ,EAAEE,SAAS,CAAC;QAC7D,OAAO,IAAI,CAACW,OAAO;MACvB;MAEA,IAAI,CAACK,YAAY,GAAG,IAAIC,KAAK,CAAC;QAC1BL,EAAE,EAAE,IAAI,CAACC,gBAAgB,CAACZ,aAAa,EAAEF,WAAW,GAAG,QAAQ,CAAC;QAChEmB,KAAK,EAAE,IAAIlB,SAAS,IAAID,WAAW,GAAG;QACtCoB,QAAQ,EAAE,CAACrB,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CAACgB,aAAa,CAAC,wBAAwB,CAAC;MAE1C,IAAI,CAACtB,qBAAqB,CAAC,IAAI,CAACJ,OAAO,EAAEb,QAAQ,EAAEE,SAAS,CAAC;MAE7D,OAAO,IAAI,CAACW,OAAO;IACvB;IAEU2B,QAAQA,CAAA,EAAQ;MACtB,OAAO,IAAI,CAACtB,YAAY,GAAG,IAAI,CAACA,YAAY,CAACsB,QAAQ,CAAC,CAAC,GAAG,IAAI;IAClE;IAEUC,UAAUA,CAAA,EAAS;MACzB,IAAI,IAAI,CAACvB,YAAY,IAAI,IAAI,CAAClB,QAAQ,EAAE;QACpC,IAAI,CAAC,IAAI,CAACO,UAAU,EAAE;QACtB,IAAI,CAACW,YAAY,CAACwB,WAAW,CAAC,CAAC,IAAI,CAAC1C,QAAQ,CAACS,EAAE,EAAEa,QAAQ,CAAC;MAC9D;IACJ;EACJ;EAAC,IAAAqB,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA7C,oBAAA,GAAAA,oBAAA;EAAA,OAAA6C,SAAA;AAAA","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["../controls/BasePlugin","sap/m/HBox","sap/m/Input","sap/ndc/BarcodeScannerButton"],function(t,e,i,n){"use strict";const s=t["BasePlugin"];class a extends s{render(t,s,a="meta",o,l){this.onChange=l;this.metadata=t;this.fieldKey=s.replace("/","");this.modelName=a;if(this.isDisplayMode){sap.ui.requireSync("sap/m/Text");const e=sap.ui.require("sap/m/Text");this.control=new e({id:this.generateStableId(o,s),text:`{${a}>${s}}`});this.applyCommonDirectives(this.control,t,a);return this.control}this.inputControl=new i({id:this.generateStableId(o,s+"-input"),value:`{${a}>${s}}`,editable:!t.ui?.readOnly,width:"100%",change:()=>{const t=this.validate();if(this.onChange){this.onChange(t.isValid,this.fieldKey)}}});const r=new n({id:this.generateStableId(o,s+"-btn"),scanSuccess:t=>{const e=t.getParameter("text");if(e){this.inputControl.setValue(e);const t=this.inputControl.getModel(this.modelName);if(t){t.setProperty(s,e)}const i=this.validate();if(this.onChange){this.onChange(i.isValid,this.fieldKey)}}}});this.control=new e({id:this.generateStableId(o,s),items:[this.inputControl,r],width:"100%"}).addStyleClass("sapUiSmallMarginBottom");this.applyCommonDirectives(this.control,t,a);return this.control}getValue(){return this.inputControl?this.inputControl.getValue():null}applyState(){if(this.inputControl&&this.metadata){if(this.isDisplayMode)return;this.inputControl.setEditable(!this.metadata.ui?.readOnly)}}}var o={__esModule:true};o.BarcodeScannerPlugin=a;return o});
1
+ sap.ui.define(["../controls/BasePlugin","sap/m/HBox","sap/m/Input","sap/ndc/BarcodeScannerButton"],function(t,e,i,n){"use strict";const s=t["BasePlugin"];class a extends s{render(t,s,a="meta",o,l){this.onChange=l;this.metadata=t;this.fieldKey=s.replace("/","");this.modelName=a;if(!this.isEditable){sap.ui.requireSync("sap/m/Text");const e=sap.ui.require("sap/m/Text");this.control=new e({id:this.generateStableId(o,s),text:`{${a}>${s}}`});this.applyCommonDirectives(this.control,t,a);return this.control}this.inputControl=new i({id:this.generateStableId(o,s+"-input"),value:`{${a}>${s}}`,editable:!t.ui?.readOnly,width:"100%",change:()=>{const t=this.validate();if(this.onChange){this.onChange(t.isValid,this.fieldKey)}}});const r=new n({id:this.generateStableId(o,s+"-btn"),scanSuccess:t=>{const e=t.getParameter("text");if(e){this.inputControl.setValue(e);const t=this.inputControl.getModel(this.modelName);if(t){t.setProperty(s,e)}const i=this.validate();if(this.onChange){this.onChange(i.isValid,this.fieldKey)}}}});this.control=new e({id:this.generateStableId(o,s),items:[this.inputControl,r],width:"100%"}).addStyleClass("sapUiSmallMarginBottom");this.applyCommonDirectives(this.control,t,a);return this.control}getValue(){return this.inputControl?this.inputControl.getValue():null}applyState(){if(this.inputControl&&this.metadata){if(!this.isEditable)return;this.inputControl.setEditable(!this.metadata.ui?.readOnly)}}}var o={__esModule:true};o.BarcodeScannerPlugin=a;return o});
2
2
  //# sourceMappingURL=BarcodeScannerPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BarcodeScannerPlugin.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isDisplayMode","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","applyCommonDirectives","inputControl","Input","value","editable","readOnly","width","change","result","validate","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","model","getModel","setProperty","HBox","items","addStyleClass","getValue","applyState","setEditable","__exports","__esModule"],"sources":["BarcodeScannerPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport HBox from \"sap/m/HBox\";\nimport Input from \"sap/m/Input\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n// @ts-ignore\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\n\nexport class BarcodeScannerPlugin extends BasePlugin {\n private inputControl!: Input;\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.isDisplayMode) {\n sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.inputControl = new Input({\n id: this.generateStableId(engineScopeId, bindingPath + \"-input\"),\n value: `{${modelName}>${bindingPath}}`,\n editable: !metadata.ui?.readOnly,\n width: \"100%\",\n change: () => {\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n \n const scannerBtn = new BarcodeScannerButton({\n id: this.generateStableId(engineScopeId, bindingPath + \"-btn\"),\n scanSuccess: (oEvent: sap.ui.base.Event) => {\n const text = oEvent.getParameter(\"text\");\n if (text) {\n this.inputControl.setValue(text);\n // Update model explicitly since setValue doesn't always trigger two-way binding immediately\n const model = this.inputControl.getModel(this.modelName) as JSONModel;\n if (model) {\n model.setProperty(bindingPath, text);\n }\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n }\n });\n\n this.control = new HBox({\n id: this.generateStableId(engineScopeId, bindingPath),\n items: [this.inputControl, scannerBtn],\n width: \"100%\"\n }).addStyleClass(\"sapUiSmallMarginBottom\");\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return this.inputControl ? this.inputControl.getValue() : null;\n }\n\n protected applyState(): void {\n if (this.inputControl && this.metadata) {\n if (this.isDisplayMode) return;\n this.inputControl.setEditable(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"wIAASA,EAAUC,EAAA,cASZ,MAAMC,UAA6BF,EAG/BG,OAAOC,EAA8BC,EAAsBC,EAAoB,OAAQC,EAAwBC,GAClHC,KAAKD,SAAWA,EAChBC,KAAKL,SAAWA,EAChBK,KAAKC,SAAWL,EAAYM,QAAQ,IAAK,IACzCF,KAAKH,UAAYA,EAEjB,GAAIG,KAAKG,cAAe,CACpBC,IAAIC,GAAGC,YAAY,cACnB,MAAMC,EAAcH,IAAIC,GAAGG,QAAQ,cACnCR,KAAKS,QAAU,IAAIF,EAAY,CAC3BG,GAAIV,KAAKW,iBAAiBb,EAAeF,GACzCgB,KAAM,IAAIf,KAAaD,OAE3BI,KAAKa,sBAAsBb,KAAKS,QAASd,EAAUE,GACnD,OAAOG,KAAKS,OAChB,CAEAT,KAAKc,aAAe,IAAIC,EAAM,CAC1BL,GAAIV,KAAKW,iBAAiBb,EAAeF,EAAc,UACvDoB,MAAO,IAAInB,KAAaD,KACxBqB,UAAWtB,EAASU,IAAIa,SACxBC,MAAO,OACPC,OAAQA,KACJ,MAAMC,EAASrB,KAAKsB,WACpB,GAAItB,KAAKD,SAAU,CACfC,KAAKD,SAASsB,EAAOE,QAASvB,KAAKC,SACvC,KAIR,MAAMuB,EAAa,IAAIC,EAAqB,CACxCf,GAAIV,KAAKW,iBAAiBb,EAAeF,EAAc,QACvD8B,YAAcC,IACV,MAAMf,EAAOe,EAAOC,aAAa,QACjC,GAAIhB,EAAM,CACNZ,KAAKc,aAAae,SAASjB,GAE3B,MAAMkB,EAAQ9B,KAAKc,aAAaiB,SAAS/B,KAAKH,WAC9C,GAAIiC,EAAO,CACPA,EAAME,YAAYpC,EAAagB,EACnC,CACA,MAAMS,EAASrB,KAAKsB,WACxB,GAAItB,KAAKD,SAAU,CACfC,KAAKD,SAASsB,EAAOE,QAASvB,KAAKC,SACvC,CACA,KAIRD,KAAKS,QAAU,IAAIwB,EAAK,CACpBvB,GAAIV,KAAKW,iBAAiBb,EAAeF,GACzCsC,MAAO,CAAClC,KAAKc,aAAcU,GAC3BL,MAAO,SACRgB,cAAc,0BAEjBnC,KAAKa,sBAAsBb,KAAKS,QAASd,EAAUE,GAEnD,OAAOG,KAAKS,OAChB,CAEU2B,WACN,OAAOpC,KAAKc,aAAed,KAAKc,aAAasB,WAAa,IAC9D,CAEUC,aACN,GAAIrC,KAAKc,cAAgBd,KAAKL,SAAU,CACpC,GAAIK,KAAKG,cAAe,OACxBH,KAAKc,aAAawB,aAAatC,KAAKL,SAASU,IAAIa,SACrD,CACJ,EACH,IAAAqB,EAAA,CAAAC,WAAA,MAAAD,EAAA9C,uBAAA,OAAA8C,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"BarcodeScannerPlugin.js","names":["BasePlugin","___controls_BasePlugin","BarcodeScannerPlugin","render","metadata","bindingPath","modelName","engineScopeId","onChange","this","fieldKey","replace","isEditable","sap","ui","requireSync","TextControl","require","control","id","generateStableId","text","applyCommonDirectives","inputControl","Input","value","editable","readOnly","width","change","result","validate","isValid","scannerBtn","BarcodeScannerButton","scanSuccess","oEvent","getParameter","setValue","model","getModel","setProperty","HBox","items","addStyleClass","getValue","applyState","setEditable","__exports","__esModule"],"sources":["BarcodeScannerPlugin.ts"],"sourcesContent":["import { BasePlugin } from \"../controls/BasePlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport HBox from \"sap/m/HBox\";\nimport Input from \"sap/m/Input\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n// @ts-ignore\nimport BarcodeScannerButton from \"sap/ndc/BarcodeScannerButton\";\n\nexport class BarcodeScannerPlugin extends BasePlugin {\n private inputControl!: Input;\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 sap.ui.requireSync(\"sap/m/Text\");\n const TextControl = sap.ui.require(\"sap/m/Text\");\n this.control = new TextControl({\n id: this.generateStableId(engineScopeId, bindingPath),\n text: `{${modelName}>${bindingPath}}`\n });\n this.applyCommonDirectives(this.control, metadata, modelName);\n return this.control as Control;\n }\n\n this.inputControl = new Input({\n id: this.generateStableId(engineScopeId, bindingPath + \"-input\"),\n value: `{${modelName}>${bindingPath}}`,\n editable: !metadata.ui?.readOnly,\n width: \"100%\",\n change: () => {\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n });\n \n const scannerBtn = new BarcodeScannerButton({\n id: this.generateStableId(engineScopeId, bindingPath + \"-btn\"),\n scanSuccess: (oEvent: sap.ui.base.Event) => {\n const text = oEvent.getParameter(\"text\");\n if (text) {\n this.inputControl.setValue(text);\n // Update model explicitly since setValue doesn't always trigger two-way binding immediately\n const model = this.inputControl.getModel(this.modelName) as JSONModel;\n if (model) {\n model.setProperty(bindingPath, text);\n }\n const result = this.validate();\n if (this.onChange) {\n this.onChange(result.isValid, this.fieldKey);\n }\n }\n }\n });\n\n this.control = new HBox({\n id: this.generateStableId(engineScopeId, bindingPath),\n items: [this.inputControl, scannerBtn],\n width: \"100%\"\n }).addStyleClass(\"sapUiSmallMarginBottom\");\n\n this.applyCommonDirectives(this.control, metadata, modelName);\n\n return this.control as Control;\n }\n\n protected getValue(): any {\n return this.inputControl ? this.inputControl.getValue() : null;\n }\n\n protected applyState(): void {\n if (this.inputControl && this.metadata) {\n if (!this.isEditable) return;\n this.inputControl.setEditable(!this.metadata.ui?.readOnly);\n }\n }\n}\n"],"mappings":"wIAASA,EAAUC,EAAA,cASZ,MAAMC,UAA6BF,EAG/BG,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,CAClBC,IAAIC,GAAGC,YAAY,cACnB,MAAMC,EAAcH,IAAIC,GAAGG,QAAQ,cACnCR,KAAKS,QAAU,IAAIF,EAAY,CAC3BG,GAAIV,KAAKW,iBAAiBb,EAAeF,GACzCgB,KAAM,IAAIf,KAAaD,OAE3BI,KAAKa,sBAAsBb,KAAKS,QAASd,EAAUE,GACnD,OAAOG,KAAKS,OAChB,CAEAT,KAAKc,aAAe,IAAIC,EAAM,CAC1BL,GAAIV,KAAKW,iBAAiBb,EAAeF,EAAc,UACvDoB,MAAO,IAAInB,KAAaD,KACxBqB,UAAWtB,EAASU,IAAIa,SACxBC,MAAO,OACPC,OAAQA,KACJ,MAAMC,EAASrB,KAAKsB,WACpB,GAAItB,KAAKD,SAAU,CACfC,KAAKD,SAASsB,EAAOE,QAASvB,KAAKC,SACvC,KAIR,MAAMuB,EAAa,IAAIC,EAAqB,CACxCf,GAAIV,KAAKW,iBAAiBb,EAAeF,EAAc,QACvD8B,YAAcC,IACV,MAAMf,EAAOe,EAAOC,aAAa,QACjC,GAAIhB,EAAM,CACNZ,KAAKc,aAAae,SAASjB,GAE3B,MAAMkB,EAAQ9B,KAAKc,aAAaiB,SAAS/B,KAAKH,WAC9C,GAAIiC,EAAO,CACPA,EAAME,YAAYpC,EAAagB,EACnC,CACA,MAAMS,EAASrB,KAAKsB,WACxB,GAAItB,KAAKD,SAAU,CACfC,KAAKD,SAASsB,EAAOE,QAASvB,KAAKC,SACvC,CACA,KAIRD,KAAKS,QAAU,IAAIwB,EAAK,CACpBvB,GAAIV,KAAKW,iBAAiBb,EAAeF,GACzCsC,MAAO,CAAClC,KAAKc,aAAcU,GAC3BL,MAAO,SACRgB,cAAc,0BAEjBnC,KAAKa,sBAAsBb,KAAKS,QAASd,EAAUE,GAEnD,OAAOG,KAAKS,OAChB,CAEU2B,WACN,OAAOpC,KAAKc,aAAed,KAAKc,aAAasB,WAAa,IAC9D,CAEUC,aACN,GAAIrC,KAAKc,cAAgBd,KAAKL,SAAU,CACpC,IAAKK,KAAKG,WAAY,OACtBH,KAAKc,aAAawB,aAAatC,KAAKL,SAASU,IAAIa,SACrD,CACJ,EACH,IAAAqB,EAAA,CAAAC,WAAA,MAAAD,EAAA9C,uBAAA,OAAA8C,CAAA","ignoreList":[]}
@@ -16,7 +16,7 @@ export class BarcodeScannerPlugin extends BasePlugin {
16
16
  this.fieldKey = bindingPath.replace('/', '');
17
17
  this.modelName = modelName;
18
18
 
19
- if (this.isDisplayMode) {
19
+ if (!this.isEditable) {
20
20
  sap.ui.requireSync("sap/m/Text");
21
21
  const TextControl = sap.ui.require("sap/m/Text");
22
22
  this.control = new TextControl({
@@ -76,7 +76,7 @@ export class BarcodeScannerPlugin extends BasePlugin {
76
76
 
77
77
  protected applyState(): void {
78
78
  if (this.inputControl && this.metadata) {
79
- if (this.isDisplayMode) return;
79
+ if (!this.isEditable) return;
80
80
  this.inputControl.setEditable(!this.metadata.ui?.readOnly);
81
81
  }
82
82
  }
@@ -26,17 +26,17 @@ sap.ui.define(["../../core/PipelineManager"], function (____core_PipelineManager
26
26
  /** The UI5 JSONModel name used for absolute binding paths. */
27
27
  modelName = "meta";
28
28
 
29
- /** Indicates if the engine is enforcing a read-only display mode. */
30
- isDisplayMode = false;
29
+ /** Indicates if the engine is enforcing an editable mode. */
30
+ isEditable = true;
31
31
 
32
32
  /** Internal callback provided by GeneratorHost to signal validation/data changes upwards */
33
33
 
34
34
  /**
35
- * Injects the global display mode context into the plugin before rendering.
36
- * @param mode True if the plugin should render in a read-only display mode.
35
+ * Injects the global editable mode context into the plugin before rendering.
36
+ * @param editable True if the plugin should render in editable mode.
37
37
  */
38
- setDisplayMode(mode) {
39
- this.isDisplayMode = mode;
38
+ setEditable(editable) {
39
+ this.isEditable = editable;
40
40
  }
41
41
 
42
42
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"BasePlugin-dbg.js","names":["GlobalPipeline","____core_PipelineManager","BasePlugin","control","metadata","fieldKey","modelName","isDisplayMode","setDisplayMode","mode","generateStableId","engineScopeId","bindingPath","undefined","safePath","replace","validate","isValid","getVisible","validatorsToRun","argsMap","maxLength","required","push","ui","validators","v","name","args","length","errorMessage","val","getValue","result","executeValidation","onStateChange","newMetadata","applyState","applyCommonDirectives","readOnly","setEditable","visibleOn","expr","bindProperty","parts","path","formatter","enabledOn","setEnabled","destroy","__exports","__esModule"],"sources":["BasePlugin.ts"],"sourcesContent":["/**\n * @file BasePlugin.ts\n * @description Abstract foundation for all MetaUI plugins, enforcing lifecycle hooks for v2 Schema.\n */\n\nimport { IPlugin } from \"../../interfaces/IPlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport { GlobalPipeline } from \"../../core/PipelineManager\";\n\n/**\n * Abstract class representing a standard MetaUI Plugin.\n * Enforces the required rendering, state extraction, and validation contracts.\n * \n * @abstract\n * @public\n */\nexport abstract class BasePlugin implements IPlugin {\n /** The instantiated UI5 control for this plugin. */\n protected control: Control | null = null;\n \n /** The metadata schema defining the field rules. */\n protected metadata: IPropertyMetadata | null = null;\n \n /** The internal JSON path of the field relative to its parent payload. */\n protected fieldKey: string = \"\";\n \n /** The UI5 JSONModel name used for absolute binding paths. */\n protected modelName: string = \"meta\";\n\n /** Indicates if the engine is enforcing a read-only display mode. */\n protected isDisplayMode: boolean = false;\n \n /** Internal callback provided by GeneratorHost to signal validation/data changes upwards */\n protected onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void;\n\n /**\n * Injects the global display mode context into the plugin before rendering.\n * @param mode True if the plugin should render in a read-only display mode.\n */\n public setDisplayMode(mode: boolean): void {\n this.isDisplayMode = mode;\n }\n\n /**\n * Instantiates the raw UI5 control and binds it to the model.\n * \n * @param fieldMetadata The JSON Schema for the field.\n * @param bindingPath The JSON path to bind to.\n * @param modelName The UI5 model name.\n * @param engineScopeId The deterministic scope ID provided by the Engine to prevent cloning collisions.\n * @param onChange The callback fired natively when a field value blur/change occurs.\n * @returns {Control} The generated UI5 control.\n */\n public abstract render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;\n\n /**\n * Generates a deterministic, globally unique ID for this control.\n * Prefixes the sanitized binding path with the Engine's scoped ID.\n */\n protected generateStableId(engineScopeId: string | undefined, bindingPath: string): string | undefined {\n if (!engineScopeId) return undefined;\n // Strip leading slash and replace internal slashes with hyphens\n const safePath = bindingPath.replace(/^\\//, '').replace(/\\//g, '-');\n return `${engineScopeId}--${safePath}`;\n }\n\n /**\n * Extracts the current raw value from the underlying UI5 control.\n */\n protected abstract getValue(): any;\n\n /**\n * Universal pipeline validation.\n */\n public validate(): import(\"../../interfaces/IPlugin\").IPluginValidationResult {\n if (!this.control || !this.metadata) return { isValid: true };\n \n // Skip validation for hidden fields (e.g. hidden by ConditionEngine visibleOn)\n if (typeof (this.control as unknown).getVisible === \"function\") {\n if (!(this.control as unknown).getVisible()) {\n return { isValid: true };\n }\n }\n \n const validatorsToRun: string[] = [];\n const argsMap: Record<string, any> = {\n \"maxLength\": this.metadata.maxLength\n };\n\n if (this.metadata.required) {\n validatorsToRun.push(\"required\");\n }\n if (this.metadata.maxLength) validatorsToRun.push(\"maxLength\");\n \n if (this.metadata.ui?.validators) {\n for (const v of this.metadata.ui.validators) {\n if (typeof v === \"string\") {\n validatorsToRun.push(v);\n } else if (v && v.name) {\n validatorsToRun.push(v.name);\n if (v.args !== undefined) {\n argsMap[v.name] = v.args;\n }\n }\n }\n }\n\n if (validatorsToRun.length === 0) {\n return { isValid: true, errorMessage: undefined, fieldKey: this.fieldKey };\n }\n\n const val = this.getValue();\n const result = GlobalPipeline.executeValidation(val, validatorsToRun, argsMap);\n return { isValid: result.isValid, errorMessage: result.errorMessage, fieldKey: this.fieldKey };\n }\n\n /**\n * Executes when the condition engine pushes new schema metadata to this field (e.g. readOnly changing).\n * @param newMetadata The mutated schema metadata.\n */\n public onStateChange(newMetadata: IPropertyMetadata): void {\n this.metadata = newMetadata;\n this.applyState();\n }\n\n /**\n * Abstract hook for the plugin to apply state changes to its specific UI5 control (e.g. placeholders, labels).\n */\n protected abstract applyState(): void;\n\n /**\n * Helper to apply common UI directives (like readOnly, visibleOn) directly to any control.\n */\n protected applyCommonDirectives(control: any, metadata: IPropertyMetadata, modelName: string = \"meta\"): void {\n if (metadata.ui?.readOnly !== undefined && typeof control.setEditable === \"function\") {\n control.setEditable(!metadata.ui.readOnly);\n }\n\n if (metadata.ui?.visibleOn) {\n const expr = `{= ${metadata.ui.visibleOn.replace(/\\$root\\./g, `${modelName}>/`).replace(/\\./g, '/')} }`;\n control.bindProperty(\"visible\", { parts: [{ path: \"meta>/\" }], formatter: () => false });\n // The ConditionEngine handles actual binding injection, but here we can set a fallback or natively bind if we bypass ConditionEngine.\n control.bindProperty(\"visible\", expr);\n }\n \n if (metadata.ui?.enabledOn && typeof control.setEnabled === \"function\") {\n const expr = `{= ${metadata.ui.enabledOn.replace(/\\$root\\./g, `${modelName}>/`).replace(/\\./g, '/')} }`;\n control.bindProperty(\"enabled\", expr);\n }\n }\n\n\n\n /**\n * Natively destroys the instantiated UI5 control to prevent memory leaks.\n * Can be overridden by subclasses if they manage secondary controls or custom models.\n */\n public destroy(): void {\n if (this.control && typeof this.control.destroy === \"function\") {\n this.control.destroy();\n this.control = null;\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAQSA,cAAc,GAAAC,wBAAA;EAEvB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAeC,UAAU,CAAoB;IAChD;IACUC,OAAO,GAAmB,IAAI;;IAExC;IACUC,QAAQ,GAA6B,IAAI;;IAEnD;IACUC,QAAQ,GAAW,EAAE;;IAE/B;IACUC,SAAS,GAAW,MAAM;;IAEpC;IACUC,aAAa,GAAY,KAAK;;IAExC;;IAGA;AACJ;AACA;AACA;IACWC,cAAcA,CAACC,IAAa,EAAQ;MACvC,IAAI,CAACF,aAAa,GAAGE,IAAI;IAC7B;;IAEA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IAGI;AACJ;AACA;AACA;IACcC,gBAAgBA,CAACC,aAAiC,EAAEC,WAAmB,EAAsB;MACnG,IAAI,CAACD,aAAa,EAAE,OAAOE,SAAS;MACpC;MACA,MAAMC,QAAQ,GAAGF,WAAW,CAACG,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;MACnE,OAAO,GAAGJ,aAAa,KAAKG,QAAQ,EAAE;IAC1C;;IAEA;AACJ;AACA;;IAGI;AACJ;AACA;IACWE,QAAQA,CAAA,EAA+D;MAC1E,IAAI,CAAC,IAAI,CAACb,OAAO,IAAI,CAAC,IAAI,CAACC,QAAQ,EAAE,OAAO;QAAEa,OAAO,EAAE;MAAK,CAAC;;MAE7D;MACA,IAAI,OAAQ,IAAI,CAACd,OAAO,CAAae,UAAU,KAAK,UAAU,EAAE;QAC5D,I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S,CAAChC,OAAO,CAAC,WAAW,EAAE,GAAGT,SAAS,IAAI,CAAC,CAACS,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI;QACvGZ,OAAO,CAACwC,YAAY,CAAC,SAAS,EAAED,IAAI,CAAC;MACzC;IACJ;;IAIA;AACJ;AACA;AACA;IACWO,OAAOA,CAAA,EAAS;MACnB,IAAI,IAAI,CAAC9C,OAAO,IAAI,OAAO,IAAI,CAACA,OAAO,CAAC8C,OAAO,KAAK,UAAU,EAAE;QAC5D,IAAI,CAAC9C,OAAO,CAAC8C,OAAO,CAAC,CAAC;QACtB,IAAI,CAAC9C,OAAO,GAAG,IAAI;MACvB;IACJ;EACJ;EAAC,IAAA+C,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAhD,UAAA,GAAAA,UAAA;EAAA,OAAAgD,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"BasePlugin-dbg.js","names":["GlobalPipeline","____core_PipelineManager","BasePlugin","control","metadata","fieldKey","modelName","isEditable","setEditable","editable","generateStableId","engineScopeId","bindingPath","undefined","safePath","replace","validate","isValid","getVisible","validatorsToRun","argsMap","maxLength","required","push","ui","validators","v","name","args","length","errorMessage","val","getValue","result","executeValidation","onStateChange","newMetadata","applyState","applyCommonDirectives","readOnly","visibleOn","expr","bindProperty","parts","path","formatter","enabledOn","setEnabled","destroy","__exports","__esModule"],"sources":["BasePlugin.ts"],"sourcesContent":["/**\n * @file BasePlugin.ts\n * @description Abstract foundation for all MetaUI plugins, enforcing lifecycle hooks for v2 Schema.\n */\n\nimport { IPlugin } from \"../../interfaces/IPlugin\";\nimport { IPropertyMetadata } from \"../../interfaces/ISchema\";\nimport Control from \"sap/ui/core/Control\";\nimport { GlobalPipeline } from \"../../core/PipelineManager\";\n\n/**\n * Abstract class representing a standard MetaUI Plugin.\n * Enforces the required rendering, state extraction, and validation contracts.\n * \n * @abstract\n * @public\n */\nexport abstract class BasePlugin implements IPlugin {\n /** The instantiated UI5 control for this plugin. */\n protected control: Control | null = null;\n \n /** The metadata schema defining the field rules. */\n protected metadata: IPropertyMetadata | null = null;\n \n /** The internal JSON path of the field relative to its parent payload. */\n protected fieldKey: string = \"\";\n \n /** The UI5 JSONModel name used for absolute binding paths. */\n protected modelName: string = \"meta\";\n\n /** Indicates if the engine is enforcing an editable mode. */\n protected isEditable: boolean = true;\n \n /** Internal callback provided by GeneratorHost to signal validation/data changes upwards */\n protected onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void;\n\n /**\n * Injects the global editable mode context into the plugin before rendering.\n * @param editable True if the plugin should render in editable mode.\n */\n public setEditable(editable: boolean): void {\n this.isEditable = editable;\n }\n\n /**\n * Instantiates the raw UI5 control and binds it to the model.\n * \n * @param fieldMetadata The JSON Schema for the field.\n * @param bindingPath The JSON path to bind to.\n * @param modelName The UI5 model name.\n * @param engineScopeId The deterministic scope ID provided by the Engine to prevent cloning collisions.\n * @param onChange The callback fired natively when a field value blur/change occurs.\n * @returns {Control} The generated UI5 control.\n */\n public abstract render(fieldMetadata: IPropertyMetadata, bindingPath: string, modelName?: string, engineScopeId?: string, onChange?: (isValid: boolean, fieldKey?: string) => void): Control;\n\n /**\n * Generates a deterministic, globally unique ID for this control.\n * Prefixes the sanitized binding path with the Engine's scoped ID.\n */\n protected generateStableId(engineScopeId: string | undefined, bindingPath: string): string | undefined {\n if (!engineScopeId) return undefined;\n // Strip leading slash and replace internal slashes with hyphens\n const safePath = bindingPath.replace(/^\\//, '').replace(/\\//g, '-');\n return `${engineScopeId}--${safePath}`;\n }\n\n /**\n * Extracts the current raw value from the underlying UI5 control.\n */\n protected abstract getValue(): any;\n\n /**\n * Universal pipeline validation.\n */\n public validate(): import(\"../../interfaces/IPlugin\").IPluginValidationResult {\n if (!this.control || !this.metadata) return { isValid: true };\n \n // Skip validation for hidden fields (e.g. hidden by ConditionEngine visibleOn)\n if (typeof (this.control as unknown).getVisible === \"function\") {\n if (!(this.control as unknown).getVisible()) {\n return { isValid: true };\n }\n }\n \n const validatorsToRun: string[] = [];\n const argsMap: Record<string, any> = {\n \"maxLength\": this.metadata.maxLength\n };\n\n if (this.metadata.required) {\n validatorsToRun.push(\"required\");\n }\n if (this.metadata.maxLength) validatorsToRun.push(\"maxLength\");\n \n if (this.metadata.ui?.validators) {\n for (const v of this.metadata.ui.validators) {\n if (typeof v === \"string\") {\n validatorsToRun.push(v);\n } else if (v && v.name) {\n validatorsToRun.push(v.name);\n if (v.args !== undefined) {\n argsMap[v.name] = v.args;\n }\n }\n }\n }\n\n if (validatorsToRun.length === 0) {\n return { isValid: true, errorMessage: undefined, fieldKey: this.fieldKey };\n }\n\n const val = this.getValue();\n const result = GlobalPipeline.executeValidation(val, validatorsToRun, argsMap);\n return { isValid: result.isValid, errorMessage: result.errorMessage, fieldKey: this.fieldKey };\n }\n\n /**\n * Executes when the condition engine pushes new schema metadata to this field (e.g. readOnly changing).\n * @param newMetadata The mutated schema metadata.\n */\n public onStateChange(newMetadata: IPropertyMetadata): void {\n this.metadata = newMetadata;\n this.applyState();\n }\n\n /**\n * Abstract hook for the plugin to apply state changes to its specific UI5 control (e.g. placeholders, labels).\n */\n protected abstract applyState(): void;\n\n /**\n * Helper to apply common UI directives (like readOnly, visibleOn) directly to any control.\n */\n protected applyCommonDirectives(control: any, metadata: IPropertyMetadata, modelName: string = \"meta\"): void {\n if (metadata.ui?.readOnly !== undefined && typeof control.setEditable === \"function\") {\n control.setEditable(!metadata.ui.readOnly);\n }\n\n if (metadata.ui?.visibleOn) {\n const expr = `{= ${metadata.ui.visibleOn.replace(/\\$root\\./g, `${modelName}>/`).replace(/\\./g, '/')} }`;\n control.bindProperty(\"visible\", { parts: [{ path: \"meta>/\" }], formatter: () => false });\n // The ConditionEngine handles actual binding injection, but here we can set a fallback or natively bind if we bypass ConditionEngine.\n control.bindProperty(\"visible\", expr);\n }\n \n if (metadata.ui?.enabledOn && typeof control.setEnabled === \"function\") {\n const expr = `{= ${metadata.ui.enabledOn.replace(/\\$root\\./g, `${modelName}>/`).replace(/\\./g, '/')} }`;\n control.bindProperty(\"enabled\", expr);\n }\n }\n\n\n\n /**\n * Natively destroys the instantiated UI5 control to prevent memory leaks.\n * Can be overridden by subclasses if they manage secondary controls or custom models.\n */\n public destroy(): void {\n if (this.control && typeof this.control.destroy === \"function\") {\n this.control.destroy();\n this.control = null;\n }\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAQSA,cAAc,GAAAC,wBAAA;EAEvB;AACA;AACA;AACA;AACA;AACA;AACA;EACO,MAAeC,UAAU,CAAoB;IAChD;IACUC,OAAO,GAAmB,IAAI;;IAExC;IACUC,QAAQ,GAA6B,IAAI;;IAEnD;IACUC,QAAQ,GAAW,EAAE;;IAE/B;IACUC,SAAS,GAAW,MAAM;;IAEpC;IACUC,UAAU,GAAY,IAAI;;IAEpC;;IAGA;AACJ;AACA;AACA;IACWC,WAAWA,CAACC,QAAiB,EAAQ;MACxC,IAAI,CAACF,UAAU,GAAGE,QAAQ;IAC9B;;IAEA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IAGI;AACJ;AACA;AACA;IACcC,gBAAgBA,CAACC,aAAiC,EAAEC,WAAmB,EAAsB;MACnG,IAAI,CAACD,aAAa,EAAE,OAAOE,SAAS;MACpC;MACA,MAAMC,QAAQ,GAAGF,WAAW,CAACG,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;MACnE,OAAO,GAAGJ,aAAa,KAAKG,QAAQ,EAAE;IAC1C;;IAEA;AACJ;AACA;;IAGI;AACJ;AACA;IACWE,QAAQA,CAAA,EAA+D;MAC1E,IAAI,CAAC,IAAI,CAACb,OAAO,IAAI,CAAC,IAAI,CAACC,QAAQ,EAAE,OAAO;QAAEa,OAAO,EAAE;MAAK,CAAC;;MAE7D;MACA,IAAI,OAAQ,IAAI,CAACd,OAAO,CAAae,UAAU,KAAK,UAAU,EA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ACsB,SAAS,CAAC/B,OAAO,CAAC,WAAW,EAAE,GAAGT,SAAS,IAAI,CAAC,CAACS,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI;QACvGZ,OAAO,CAACuC,YAAY,CAAC,SAAS,EAAED,IAAI,CAAC;MACzC;IACJ;;IAIA;AACJ;AACA;AACA;IACWO,OAAOA,CAAA,EAAS;MACnB,IAAI,IAAI,CAAC7C,OAAO,IAAI,OAAO,IAAI,CAACA,OAAO,CAAC6C,OAAO,KAAK,UAAU,EAAE;QAC5D,IAAI,CAAC7C,OAAO,CAAC6C,OAAO,CAAC,CAAC;QACtB,IAAI,CAAC7C,OAAO,GAAG,IAAI;MACvB;IACJ;EACJ;EAAC,IAAA8C,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA/C,UAAA,GAAAA,UAAA;EAAA,OAAA+C,SAAA;AAAA","ignoreList":[]}
@@ -22,15 +22,15 @@ declare module "nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin" {
22
22
  protected fieldKey: string;
23
23
  /** The UI5 JSONModel name used for absolute binding paths. */
24
24
  protected modelName: string;
25
- /** Indicates if the engine is enforcing a read-only display mode. */
26
- protected isDisplayMode: boolean;
25
+ /** Indicates if the engine is enforcing an editable mode. */
26
+ protected isEditable: boolean;
27
27
  /** Internal callback provided by GeneratorHost to signal validation/data changes upwards */
28
28
  protected onChange?: (isValid: boolean, fieldKey?: string, errorMessage?: string, controlId?: string) => void;
29
29
  /**
30
- * Injects the global display mode context into the plugin before rendering.
31
- * @param mode True if the plugin should render in a read-only display mode.
30
+ * Injects the global editable mode context into the plugin before rendering.
31
+ * @param editable True if the plugin should render in editable mode.
32
32
  */
33
- setDisplayMode(mode: boolean): void;
33
+ setEditable(editable: boolean): void;
34
34
  /**
35
35
  * Instantiates the raw UI5 control and binds it to the model.
36
36
  *
@@ -1 +1 @@
1
- {"version":3,"file":"BasePlugin.d.ts","sourceRoot":"../../../../../../../../..","sources":["src/nz/co/siliconst/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AAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;QAE9G;;;WAGG;QACI,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;QAI3C;;;;;;;;;WASG;iBACa,MAAM,CAAC,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO;QAE5L;;;WAGG;QACH,SAAS,CAAC,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;QAOtG;;WAEG;QACH,SAAS,CAAC,QAAQ,CAAC,QAAQ,IAAI,GAAG;QAElC;;WAEG;QACI,QAAQ,IAAI,OAAO,+CAA+C,EAAE,uBAAuB;QA0ClG;;;WAGG;QACI,aAAa,CAAC,WAAW,EAAE,iBAAiB,GAAG,IAAI;QAK1D;;WAEG;QACH,SAAS,CAAC,QAAQ,CAAC,UAAU,IAAI,IAAI;QAErC;;WAEG;QACH,SAAS,CAAC,qBAAqB,CAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,iBAAiB,EAAE,SAAS,GAAE,MAAe,GAAG,IAAI;QAoB5G;;;WAGG;QACI,OAAO,IAAI,IAAI;KAMzB;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["../../core/PipelineManager"],function(e){"use strict";const t=e["GlobalPipeline"];class i{control=null;metadata=null;fieldKey="";modelName="meta";isDisplayMode=false;setDisplayMode(e){this.isDisplayMode=e}generateStableId(e,t){if(!e)return undefined;const i=t.replace(/^\//,"").replace(/\//g,"-");return`${e}--${i}`}validate(){if(!this.control||!this.metadata)return{isValid:true};if(typeof this.control.getVisible==="function"){if(!this.control.getVisible()){return{isValid:true}}}const e=[];const i={maxLength:this.metadata.maxLength};if(this.metadata.required){e.push("required")}if(this.metadata.maxLength)e.push("maxLength");if(this.metadata.ui?.validators){for(const t of this.metadata.ui.validators){if(typeof t==="string"){e.push(t)}else if(t&&t.name){e.push(t.name);if(t.args!==undefined){i[t.name]=t.args}}}}if(e.length===0){return{isValid:true,errorMessage:undefined,fieldKey:this.fieldKey}}const a=this.getValue();const s=t.executeValidation(a,e,i);return{isValid:s.isValid,errorMessage:s.errorMessage,fieldKey:this.fieldKey}}onStateChange(e){this.metadata=e;this.applyState()}applyCommonDirectives(e,t,i="meta"){if(t.ui?.readOnly!==undefined&&typeof e.setEditable==="function"){e.setEditable(!t.ui.readOnly)}if(t.ui?.visibleOn){const a=`{= ${t.ui.visibleOn.replace(/\$root\./g,`${i}>/`).replace(/\./g,"/")} }`;e.bindProperty("visible",{parts:[{path:"meta>/"}],formatter:()=>false});e.bindProperty("visible",a)}if(t.ui?.enabledOn&&typeof e.setEnabled==="function"){const a=`{= ${t.ui.enabledOn.replace(/\$root\./g,`${i}>/`).replace(/\./g,"/")} }`;e.bindProperty("enabled",a)}}destroy(){if(this.control&&typeof this.control.destroy==="function"){this.control.destroy();this.control=null}}}var a={__esModule:true};a.BasePlugin=i;return a});
1
+ sap.ui.define(["../../core/PipelineManager"],function(e){"use strict";const t=e["GlobalPipeline"];class i{control=null;metadata=null;fieldKey="";modelName="meta";isEditable=true;setEditable(e){this.isEditable=e}generateStableId(e,t){if(!e)return undefined;const i=t.replace(/^\//,"").replace(/\//g,"-");return`${e}--${i}`}validate(){if(!this.control||!this.metadata)return{isValid:true};if(typeof this.control.getVisible==="function"){if(!this.control.getVisible()){return{isValid:true}}}const e=[];const i={maxLength:this.metadata.maxLength};if(this.metadata.required){e.push("required")}if(this.metadata.maxLength)e.push("maxLength");if(this.metadata.ui?.validators){for(const t of this.metadata.ui.validators){if(typeof t==="string"){e.push(t)}else if(t&&t.name){e.push(t.name);if(t.args!==undefined){i[t.name]=t.args}}}}if(e.length===0){return{isValid:true,errorMessage:undefined,fieldKey:this.fieldKey}}const a=this.getValue();const n=t.executeValidation(a,e,i);return{isValid:n.isValid,errorMessage:n.errorMessage,fieldKey:this.fieldKey}}onStateChange(e){this.metadata=e;this.applyState()}applyCommonDirectives(e,t,i="meta"){if(t.ui?.readOnly!==undefined&&typeof e.setEditable==="function"){e.setEditable(!t.ui.readOnly)}if(t.ui?.visibleOn){const a=`{= ${t.ui.visibleOn.replace(/\$root\./g,`${i}>/`).replace(/\./g,"/")} }`;e.bindProperty("visible",{parts:[{path:"meta>/"}],formatter:()=>false});e.bindProperty("visible",a)}if(t.ui?.enabledOn&&typeof e.setEnabled==="function"){const a=`{= ${t.ui.enabledOn.replace(/\$root\./g,`${i}>/`).replace(/\./g,"/")} }`;e.bindProperty("enabled",a)}}destroy(){if(this.control&&typeof this.control.destroy==="function"){this.control.destroy();this.control=null}}}var a={__esModule:true};a.BasePlugin=i;return a});
2
2
  //# sourceMappingURL=BasePlugin.js.map