@siliconst/metaui 1.4.13 → 1.4.17

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 (184) hide show
  1. package/package.json +1 -1
  2. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +50 -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 +1 -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 +57 -4
  9. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +44 -2
  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 +4 -0
  12. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts.map +1 -1
  13. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js +1 -1
  14. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js.map +1 -1
  15. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.ts +51 -4
  16. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js +42 -5
  17. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js.map +1 -1
  18. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts +9 -2
  19. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts.map +1 -1
  20. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js +1 -1
  21. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js.map +1 -1
  22. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts +44 -5
  23. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js.map +1 -1
  24. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js.map +1 -1
  25. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts +2 -2
  26. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js +1 -0
  27. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry-dbg.js.map +1 -1
  28. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.d.ts.map +1 -1
  29. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js +1 -1
  30. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.js.map +1 -1
  31. package/src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts +1 -0
  32. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry-dbg.js +47 -0
  33. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry-dbg.js.map +1 -0
  34. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.d.ts +23 -0
  35. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.d.ts.map +1 -0
  36. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.js +2 -0
  37. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.js.map +1 -0
  38. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.ts +45 -0
  39. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +17 -0
  40. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -1
  41. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +10 -1
  42. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
  43. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js +1 -1
  44. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
  45. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +19 -1
  46. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema-dbg.js.map +1 -1
  47. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts +7 -0
  48. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts.map +1 -1
  49. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts +9 -0
  50. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin-dbg.js +2 -0
  51. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin-dbg.js.map +1 -0
  52. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.d.ts +23 -0
  53. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.d.ts.map +1 -0
  54. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.js +2 -0
  55. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.js.map +1 -0
  56. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.ts +23 -0
  57. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js +6 -1
  58. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js.map +1 -1
  59. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts.map +1 -1
  60. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js +1 -1
  61. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js.map +1 -1
  62. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.ts +6 -1
  63. package/src/nz/co/siliconst/ui5/metaui/library-preload.js +29 -20
  64. package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
  65. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js +3 -20
  66. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin-dbg.js.map +1 -1
  67. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.d.ts.map +1 -1
  68. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js +1 -1
  69. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.js.map +1 -1
  70. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BasePlugin.ts +3 -3
  71. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js +1 -0
  72. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin-dbg.js.map +1 -1
  73. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.d.ts.map +1 -1
  74. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js +1 -1
  75. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.js.map +1 -1
  76. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin.ts +1 -0
  77. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js +1 -0
  78. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin-dbg.js.map +1 -1
  79. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.d.ts.map +1 -1
  80. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js +1 -1
  81. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.js.map +1 -1
  82. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin.ts +1 -0
  83. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js +1 -0
  84. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin-dbg.js.map +1 -1
  85. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.d.ts.map +1 -1
  86. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js +1 -1
  87. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.js.map +1 -1
  88. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin.ts +1 -0
  89. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js +1 -0
  90. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin-dbg.js.map +1 -1
  91. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.d.ts.map +1 -1
  92. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js +1 -1
  93. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.js.map +1 -1
  94. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin.ts +1 -0
  95. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js +1 -0
  96. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin-dbg.js.map +1 -1
  97. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.d.ts.map +1 -1
  98. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js +1 -1
  99. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.js.map +1 -1
  100. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin.ts +1 -0
  101. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js +1 -0
  102. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin-dbg.js.map +1 -1
  103. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.d.ts.map +1 -1
  104. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.js +1 -1
  105. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.js.map +1 -1
  106. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin.ts +1 -0
  107. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js +30 -17
  108. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js.map +1 -1
  109. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts.map +1 -1
  110. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js +1 -1
  111. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js.map +1 -1
  112. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts +33 -15
  113. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js +1 -0
  114. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin-dbg.js.map +1 -1
  115. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.d.ts.map +1 -1
  116. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js +1 -1
  117. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.js.map +1 -1
  118. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin.ts +1 -0
  119. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js +35 -11
  120. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin-dbg.js.map +1 -1
  121. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.d.ts +4 -4
  122. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.d.ts.map +1 -1
  123. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js +1 -1
  124. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.js.map +1 -1
  125. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin.ts +38 -14
  126. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js +1 -0
  127. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin-dbg.js.map +1 -1
  128. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.d.ts.map +1 -1
  129. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js +1 -1
  130. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.js.map +1 -1
  131. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin.ts +1 -0
  132. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js +1 -0
  133. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin-dbg.js.map +1 -1
  134. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.d.ts.map +1 -1
  135. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js +1 -1
  136. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.js.map +1 -1
  137. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin.ts +1 -0
  138. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin-dbg.js +79 -0
  139. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin-dbg.js.map +1 -0
  140. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.d.ts +35 -0
  141. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.d.ts.map +1 -0
  142. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.js +2 -0
  143. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.js.map +1 -0
  144. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin.ts +80 -0
  145. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js +1 -0
  146. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin-dbg.js.map +1 -1
  147. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.d.ts.map +1 -1
  148. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js +1 -1
  149. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.js.map +1 -1
  150. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin.ts +1 -0
  151. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js +1 -0
  152. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin-dbg.js.map +1 -1
  153. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.d.ts.map +1 -1
  154. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js +1 -1
  155. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.js.map +1 -1
  156. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin.ts +1 -0
  157. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder-dbg.js +226 -0
  158. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder-dbg.js.map +1 -0
  159. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.d.ts +63 -0
  160. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.d.ts.map +1 -0
  161. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.js +2 -0
  162. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.js.map +1 -0
  163. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.ts +233 -0
  164. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver-dbg.js +43 -0
  165. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver-dbg.js.map +1 -0
  166. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.d.ts +15 -0
  167. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.d.ts.map +1 -0
  168. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.js +2 -0
  169. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.js.map +1 -0
  170. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.ts +37 -0
  171. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper-dbg.js +37 -0
  172. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper-dbg.js.map +1 -0
  173. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.d.ts +18 -0
  174. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.d.ts.map +1 -0
  175. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.js +2 -0
  176. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.js.map +1 -0
  177. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.ts +28 -0
  178. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper-dbg.js +84 -0
  179. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper-dbg.js.map +1 -0
  180. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.d.ts +27 -0
  181. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.d.ts.map +1 -0
  182. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.js +2 -0
  183. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.js.map +1 -0
  184. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.ts +80 -0
@@ -1,4 +1,4 @@
1
- sap.ui.define(["sap/m/Dialog", "sap/m/Button", "../../../utils/Logger"], function (Dialog, Button, _____utils_Logger) {
1
+ sap.ui.define(["sap/m/Dialog", "sap/m/Button", "sap/m/BusyDialog", "../../../utils/Logger"], function (Dialog, Button, BusyDialog, _____utils_Logger) {
2
2
  "use strict";
3
3
 
4
4
  const Logger = _____utils_Logger["Logger"];
@@ -6,6 +6,10 @@ sap.ui.define(["sap/m/Dialog", "sap/m/Button", "../../../utils/Logger"], functio
6
6
  * Extracts all popup and dialog generation logic from the Host control.
7
7
  */
8
8
  class DialogDelegate {
9
+ activeDialog = null;
10
+ requestedWidth = "auto";
11
+ calculatedOptimalWidth = "auto";
12
+
9
13
  /**
10
14
  * Initializes a new DialogDelegate to handle dialog-based rendering.
11
15
  * @param host The parent DynamicHost or GeneratorHost control.
@@ -18,13 +22,33 @@ sap.ui.define(["sap/m/Dialog", "sap/m/Button", "../../../utils/Logger"], functio
18
22
  * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.
19
23
  * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.
20
24
  */
21
- openInDialog(title = "Form", submitButtonText = "OK", isGenerated, cancelButtonText = "Cancel", dialogWidth = "800px", parentView) {
22
- // UI5 PURITY: Do not manually force generate() here.
23
- // Opening the dialog mounts the host, natively firing onBeforeRendering() which triggers generation cleanly.
25
+ async openInDialog(title = "Form", submitButtonText = "OK", isGenerated, cancelButtonText = "Cancel", dialogWidth = "auto", parentView) {
26
+ this.requestedWidth = dialogWidth;
27
+ this.calculatedOptimalWidth = dialogWidth; // Default fallback
28
+
29
+ // Mask the complex asynchronous rendering to prevent visual snapping
30
+ const busyDialog = new BusyDialog({
31
+ text: "Building Form..."
32
+ });
33
+ busyDialog.open();
34
+ try {
35
+ // Force manual generation BEFORE mounting the dialog so the optimal width is perfectly calculated first
36
+ const genResult = this.host.generate();
37
+ if (genResult instanceof Promise) {
38
+ await genResult;
39
+ }
40
+ } catch (err) {
41
+ busyDialog.close();
42
+ Logger.error("[MetaUI] Catastrophic error during pre-generation of dialog content", err.message, "DialogDelegate");
43
+ return;
44
+ }
45
+ busyDialog.close();
24
46
 
47
+ // The Engine heuristically updated `calculatedOptimalWidth` during `generate()`. Apply it on frame 1.
48
+ const finalWidth = this.requestedWidth === "auto" && this.calculatedOptimalWidth !== "auto" ? this.calculatedOptimalWidth : this.requestedWidth;
25
49
  const dialog = new Dialog({
26
50
  title: title,
27
- contentWidth: dialogWidth,
51
+ contentWidth: finalWidth,
28
52
  content: [this.host],
29
53
  // Mount host inside the dialog
30
54
  beginButton: new Button({
@@ -53,14 +77,27 @@ sap.ui.define(["sap/m/Dialog", "sap/m/Button", "../../../utils/Logger"], functio
53
77
  }
54
78
  }),
55
79
  afterClose: () => {
80
+ this.activeDialog = null;
56
81
  dialog.destroy();
57
82
  }
58
83
  });
84
+ this.activeDialog = dialog;
59
85
  if (parentView && typeof parentView.addDependent === "function") {
60
86
  parentView.addDependent(dialog);
61
87
  }
62
88
  dialog.open();
63
89
  }
90
+
91
+ /**
92
+ * Allows the Engine to retroactively expand the dialog once the schema is fully parsed.
93
+ */
94
+ updateDialogWidthDynamically(optimalWidth) {
95
+ this.calculatedOptimalWidth = optimalWidth;
96
+ // Only dynamically stretch if the dialog is ALREADY open (e.g., hybrid inference late-loading)
97
+ if (this.activeDialog && this.requestedWidth === "auto" && optimalWidth !== "auto") {
98
+ this.activeDialog.setContentWidth(optimalWidth);
99
+ }
100
+ }
64
101
  }
65
102
  var __exports = {
66
103
  __esModule: true
@@ -1 +1 @@
1
- {"version":3,"file":"DialogDelegate-dbg.js","names":["Logger","_____utils_Logger","DialogDelegate","constructor","host","openInDialog","title","submitButtonText","isGenerated","cancelButtonText","dialogWidth","parentView","dialog","Dialog","contentWidth","content","beginButton","Button","text","type","press","success","triggerSubmit","close","err","error","message","fireEvent","fieldPath","endButton","afterClose","destroy","addDependent","open","__exports","__esModule"],"sources":["DialogDelegate.ts"],"sourcesContent":["import Dialog from \"sap/m/Dialog\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../../utils/Logger\";\n\nexport interface IHostDialog {\n generate(): void;\n triggerSubmit(): boolean;\n fireEvent(eventName: string, parameters?: Record<string, unknown>): this;\n}\n\n/**\n * Extracts all popup and dialog generation logic from the Host control.\n */\nexport class DialogDelegate {\n private host: IHostDialog & Control;\n\n /**\n * Initializes a new DialogDelegate to handle dialog-based rendering.\n * @param host The parent DynamicHost or GeneratorHost control.\n */\n constructor(host: IHostDialog & Control) {\n this.host = host;\n }\n\n /**\n * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.\n * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.\n */\n public openInDialog(title: string = \"Form\", submitButtonText: string = \"OK\", isGenerated: boolean, cancelButtonText: string = \"Cancel\", dialogWidth: string = \"800px\", parentView?: Control): void {\n // UI5 PURITY: Do not manually force generate() here.\n // Opening the dialog mounts the host, natively firing onBeforeRendering() which triggers generation cleanly.\n\n const dialog = new Dialog({\n title: title,\n contentWidth: dialogWidth,\n content: [this.host], // Mount host inside the dialog\n beginButton: new Button({\n text: submitButtonText,\n type: \"Emphasized\",\n press: () => {\n try {\n const success = this.host.triggerSubmit();\n if (success) {\n dialog.close();\n }\n } catch (err) {\n Logger.error(\"[MetaUI] Catastrophic error during validation/submit pipeline\", (err as Error).message, \"DialogDelegate\");\n this.host.fireEvent(\"validationError\", { fieldPath: \"root\", message: (err as Error).message });\n }\n }\n }),\n endButton: new Button({\n text: cancelButtonText,\n press: () => {\n this.host.fireEvent(\"cancel\");\n dialog.close();\n }\n }),\n afterClose: () => {\n dialog.destroy();\n }\n });\n\n if (parentView && typeof parentView.addDependent === \"function\") {\n parentView.addDependent(dialog);\n }\n\n dialog.open();\n }\n}\n"],"mappings":";;;QAGSA,MAAM,GAAAC,iBAAA;EAQf;AACA;AACA;EACO,MAA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,CAAC,CAAC;QACFO,UAAU,EAAEA,CAAA,KAAM;UACdlB,MAAM,CAACmB,OAAO,CAAC,CAAC;QACpB;MACJ,CAAC,CAAC;MAEF,IAAIpB,UAAU,IAAI,OAAOA,UAAU,CAACqB,YAAY,KAAK,UAAU,EAAE;QAC7DrB,UAAU,CAACqB,YAAY,CAACpB,MAAM,CAAC;MACnC;MAEAA,MAAM,CAACqB,IAAI,CAAC,CAAC;IACjB;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAhC,cAAA,GAAAA,cAAA;EAAA,OAAAgC,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"DialogDelegate-dbg.js","names":["Logger","_____utils_Logger","DialogDelegate","activeDialog","requestedWidth","calculatedOptimalWidth","constructor","host","openInDialog","title","submitButtonText","isGenerated","cancelButtonText","dialogWidth","parentView","busyDialog","BusyDialog","text","open","genResult","generate","Promise","err","close","error","message","finalWidth","dialog","Dialog","contentWidth","content","beginButton","Button","type","press","success","triggerSubmit","fireEvent","fieldPath","endButton","afterClose","destroy","addDependent","updateDialogWidthDynamically","optimalWidth","setContentWidth","__exports","__esModule"],"sources":["DialogDelegate.ts"],"sourcesContent":["import Dialog from \"sap/m/Dialog\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport BusyDialog from \"sap/m/BusyDialog\";\nimport { Logger } from \"../../../utils/Logger\";\n\nexport interface IHostDialog {\n generate(): Promise<void> | void;\n triggerSubmit(): boolean;\n fireEvent(eventName: string, parameters?: Record<string, unknown>): this;\n}\n\n/**\n * Extracts all popup and dialog generation logic from the Host control.\n */\nexport class DialogDelegate {\n private host: IHostDialog & Control;\n private activeDialog: Dialog | null = null;\n private requestedWidth: string = \"auto\";\n private calculatedOptimalWidth: string = \"auto\";\n\n /**\n * Initializes a new DialogDelegate to handle dialog-based rendering.\n * @param host The parent DynamicHost or GeneratorHost control.\n */\n constructor(host: IHostDialog & Control) {\n this.host = host;\n }\n\n /**\n * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.\n * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.\n */\n public async openInDialog(title: string = \"Form\", submitButtonText: string = \"OK\", isGenerated: boolean, cancelButtonText: string = \"Cancel\", dialogWidth: string = \"auto\", parentView?: Control): Promise<void> {\n this.requestedWidth = dialogWidth;\n this.calculatedOptimalWidth = dialogWidth; // Default fallback\n\n // Mask the complex asynchronous rendering to prevent visual snapping\n const busyDialog = new BusyDialog({ text: \"Building Form...\" });\n busyDialog.open();\n\n try {\n // Force manual generation BEFORE mounting the dialog so the optimal width is perfectly calculated first\n const genResult = this.host.generate();\n if (genResult instanceof Promise) {\n await genResult;\n }\n } catch (err) {\n busyDialog.close();\n Logger.error(\"[MetaUI] Catastrophic error during pre-generation of dialog content\", (err as Error).message, \"DialogDelegate\");\n return;\n }\n\n busyDialog.close();\n\n // The Engine heuristically updated `calculatedOptimalWidth` during `generate()`. Apply it on frame 1.\n const finalWidth = this.requestedWidth === \"auto\" && this.calculatedOptimalWidth !== \"auto\" ? this.calculatedOptimalWidth : this.requestedWidth;\n\n const dialog = new Dialog({\n title: title,\n contentWidth: finalWidth,\n content: [this.host], // Mount host inside the dialog\n beginButton: new Button({\n text: submitButtonText,\n type: \"Emphasized\",\n press: () => {\n try {\n const success = this.host.triggerSubmit();\n if (success) {\n dialog.close();\n }\n } catch (err) {\n Logger.error(\"[MetaUI] Catastrophic error during validation/submit pipeline\", (err as Error).message, \"DialogDelegate\");\n this.host.fireEvent(\"validationError\", { fieldPath: \"root\", message: (err as Error).message });\n }\n }\n }),\n endButton: new Button({\n text: cancelButtonText,\n press: () => {\n this.host.fireEvent(\"cancel\");\n dialog.close();\n }\n }),\n afterClose: () => {\n this.activeDialog = null;\n dialog.destroy();\n }\n });\n\n this.activeDialog = dialog;\n\n if (parentView && typeof parentView.addDependent === \"function\") {\n parentView.addDependent(dialog);\n }\n\n dialog.open();\n }\n\n /**\n * Allows the Engine to retroactively expand the dialog once the schema is fully parsed.\n */\n public updateDialogWidthDynamically(optimalWidth: string): void {\n this.calculatedOptimalWidth = optimalWidth;\n // Only dynamically stretch if the dialog is ALREADY open (e.g., hybrid inference late-loading)\n if (this.activeDialog && this.requestedWidth === \"auto\" && optimalWidth !== \"auto\") {\n this.activeDialog.setContentWidth(optimalWidth);\n }\n }\n}\n"],"mappings":";;;QAISA,MAAM,GAAAC,iBAAA;EAQf;AACA;AACA;EACO,MAAMC,cAAc,CAAC;IAEhBC,YAAY,GAAkB,IAAI;IAClCC,cAAc,GAAW,MAAM;IAC/BC,sBAAsB,GAAW,MAAM;;IAE/C;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,IAA2B,EAAE;MACrC,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;AACA;IACI,MAAaC,YAAYA,CAACC,KAAa,GAAG,MAAM,EAAEC,gBAAwB,GAAG,IAAI,EAAEC,WAAoB,EAAEC,gBAAwB,GAAG,QAAQ,EAAEC,WAAmB,GAAG,MAAM,EAAEC,UAAoB,EAAiB;MAC7M,IAAI,CAACV,cAAc,GAAGS,WAAW;MACjC,IAAI,CAACR,sBAAsB,GAAGQ,WAAW,CAAC,CAAC;;MAE3C;MACA,MAAME,UAAU,GAAG,IAAIC,UAAU,CAAC;QAAEC,IAAI,EAAE;MAAmB,CAAC,CAAC;MAC/DF,UAAU,CAACG,IAAI,CAAC,CAAC;MAEjB,IAAI;QACA;QACA,MAAMC,SAAS,GAAG,IAAI,CAACZ,IAAI,CAACa,QAAQ,CAAC,CAAC;QACtC,IAAID,SAAS,YAAYE,OAAO,EAAE;UAC9B,MAAMF,SAAS;QACnB;MACJ,CAAC,CAAC,OAAOG,GAAG,EAAE;QACVP,UAAU,CAACQ,KAAK,CAAC,CAAC;QAClBvB,MAAM,CAACwB,KAAK,CAAC,qEAAqE,EAAGF,GAAG,CAAWG,OAAO,EAAE,gBAAgB,CAAC;QAC7H;MACJ;MAEAV,U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AAC,CAAC;QACpB;MACJ,CAAC,CAAC;MAEF,IAAI,CAACtC,YAAY,GAAGwB,MAAM;MAE1B,IAAIb,UAAU,IAAI,OAAOA,UAAU,CAAC4B,YAAY,KAAK,UAAU,EAAE;QAC7D5B,UAAU,CAAC4B,YAAY,CAACf,MAAM,CAAC;MACnC;MAEAA,MAAM,CAACT,IAAI,CAAC,CAAC;IACjB;;IAEA;AACJ;AACA;IACWyB,4BAA4BA,CAACC,YAAoB,EAAQ;MAC5D,IAAI,CAACvC,sBAAsB,GAAGuC,YAAY;MAC1C;MACA,IAAI,IAAI,CAACzC,YAAY,IAAI,IAAI,CAACC,cAAc,KAAK,MAAM,IAAIwC,YAAY,KAAK,MAAM,EAAE;QAChF,IAAI,CAACzC,YAAY,CAAC0C,eAAe,CAACD,YAAY,CAAC;MACnD;IACJ;EACJ;EAAC,IAAAE,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA5C,cAAA,GAAAA,cAAA;EAAA,OAAA4C,SAAA;AAAA","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  declare module "nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate" {
2
2
  import Control from "sap/ui/core/Control";
3
3
  export interface IHostDialog {
4
- generate(): void;
4
+ generate(): Promise<void> | void;
5
5
  triggerSubmit(): boolean;
6
6
  fireEvent(eventName: string, parameters?: Record<string, unknown>): this;
7
7
  }
@@ -10,6 +10,9 @@ declare module "nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegat
10
10
  */
11
11
  export class DialogDelegate {
12
12
  private host;
13
+ private activeDialog;
14
+ private requestedWidth;
15
+ private calculatedOptimalWidth;
13
16
  /**
14
17
  * Initializes a new DialogDelegate to handle dialog-based rendering.
15
18
  * @param host The parent DynamicHost or GeneratorHost control.
@@ -19,7 +22,11 @@ declare module "nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegat
19
22
  * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.
20
23
  * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.
21
24
  */
22
- openInDialog(title: string, submitButtonText: string, isGenerated: boolean, cancelButtonText?: string, dialogWidth?: string, parentView?: Control): void;
25
+ openInDialog(title: string, submitButtonText: string, isGenerated: boolean, cancelButtonText?: string, dialogWidth?: string, parentView?: Control): Promise<void>;
26
+ /**
27
+ * Allows the Engine to retroactively expand the dialog once the schema is fully parsed.
28
+ */
29
+ updateDialogWidthDynamically(optimalWidth: string): void;
23
30
  }
24
31
  }
25
32
  //# sourceMappingURL=DialogDelegate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DialogDelegate.d.ts","sourceRoot":"../../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,mEAAmE,CAAC;IAGnF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAG1C,UAAiB,WAAW;QACxB,QAAQ,IAAI,IAAI,CAAC;QACjB,aAAa,IAAI,OAAO,CAAC;QACzB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;KAC5E;IAED;;OAEG;IACH,MAAa,cAAc;QACvB,OAAO,CAAC,IAAI,CAAwB;QAEpC;;;WAGG;oBACS,IAAI,EAAE,WAAW,GAAG,OAAO;QAIvC;;;WAGG;QACI,YAAY,CAAC,KAAK,EAAE,MAAe,EAAE,gBAAgB,EAAE,MAAa,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,GAAE,MAAiB,EAAE,WAAW,GAAE,MAAgB,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI;KAyCrM;CAEA"}
1
+ {"version":3,"file":"DialogDelegate.d.ts","sourceRoot":"../../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,mEAAmE,CAAC;IAGnF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAI1C,UAAiB,WAAW;QACxB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QACjC,aAAa,IAAI,OAAO,CAAC;QACzB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;KAC5E;IAED;;OAEG;IACH,MAAa,cAAc;QACvB,OAAO,CAAC,IAAI,CAAwB;QACpC,OAAO,CAAC,YAAY,CAAuB;QAC3C,OAAO,CAAC,cAAc,CAAkB;QACxC,OAAO,CAAC,sBAAsB,CAAkB;QAEhD;;;WAGG;oBACS,IAAI,EAAE,WAAW,GAAG,OAAO;QAIvC;;;WAGG;QACU,YAAY,CAAC,KAAK,EAAE,MAAe,EAAE,gBAAgB,EAAE,MAAa,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,GAAE,MAAiB,EAAE,WAAW,GAAE,MAAe,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;QAkEhN;;WAEG;QACI,4BAA4B,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;KAOlE;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["sap/m/Dialog","sap/m/Button","../../../utils/Logger"],function(e,t,o){"use strict";const s=o["Logger"];class n{constructor(e){this.host=e}openInDialog(o="Form",n="OK",i,r="Cancel",a="800px",c){const l=new e({title:o,contentWidth:a,content:[this.host],beginButton:new t({text:n,type:"Emphasized",press:()=>{try{const e=this.host.triggerSubmit();if(e){l.close()}}catch(e){s.error("[MetaUI] Catastrophic error during validation/submit pipeline",e.message,"DialogDelegate");this.host.fireEvent("validationError",{fieldPath:"root",message:e.message})}}}),endButton:new t({text:r,press:()=>{this.host.fireEvent("cancel");l.close()}}),afterClose:()=>{l.destroy()}});if(c&&typeof c.addDependent==="function"){c.addDependent(l)}l.open()}}var i={__esModule:true};i.DialogDelegate=n;return i});
1
+ sap.ui.define(["sap/m/Dialog","sap/m/Button","sap/m/BusyDialog","../../../utils/Logger"],function(t,e,i,a){"use strict";const o=a["Logger"];class s{activeDialog=null;requestedWidth="auto";calculatedOptimalWidth="auto";constructor(t){this.host=t}async openInDialog(a="Form",s="OK",n,l="Cancel",r="auto",c){this.requestedWidth=r;this.calculatedOptimalWidth=r;const h=new i({text:"Building Form..."});h.open();try{const t=this.host.generate();if(t instanceof Promise){await t}}catch(t){h.close();o.error("[MetaUI] Catastrophic error during pre-generation of dialog content",t.message,"DialogDelegate");return}h.close();const d=this.requestedWidth==="auto"&&this.calculatedOptimalWidth!=="auto"?this.calculatedOptimalWidth:this.requestedWidth;const u=new t({title:a,contentWidth:d,content:[this.host],beginButton:new e({text:s,type:"Emphasized",press:()=>{try{const t=this.host.triggerSubmit();if(t){u.close()}}catch(t){o.error("[MetaUI] Catastrophic error during validation/submit pipeline",t.message,"DialogDelegate");this.host.fireEvent("validationError",{fieldPath:"root",message:t.message})}}}),endButton:new e({text:l,press:()=>{this.host.fireEvent("cancel");u.close()}}),afterClose:()=>{this.activeDialog=null;u.destroy()}});this.activeDialog=u;if(c&&typeof c.addDependent==="function"){c.addDependent(u)}u.open()}updateDialogWidthDynamically(t){this.calculatedOptimalWidth=t;if(this.activeDialog&&this.requestedWidth==="auto"&&t!=="auto"){this.activeDialog.setContentWidth(t)}}}var n={__esModule:true};n.DialogDelegate=s;return n});
2
2
  //# sourceMappingURL=DialogDelegate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DialogDelegate.js","names":["Logger","_____utils_Logger","DialogDelegate","constructor","host","this","openInDialog","title","submitButtonText","isGenerated","cancelButtonText","dialogWidth","parentView","dialog","Dialog","contentWidth","content","beginButton","Button","text","type","press","success","triggerSubmit","close","err","error","message","fireEvent","fieldPath","endButton","afterClose","destroy","addDependent","open","__exports","__esModule"],"sources":["DialogDelegate.ts"],"sourcesContent":["import Dialog from \"sap/m/Dialog\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../../utils/Logger\";\n\nexport interface IHostDialog {\n generate(): void;\n triggerSubmit(): boolean;\n fireEvent(eventName: string, parameters?: Record<string, unknown>): this;\n}\n\n/**\n * Extracts all popup and dialog generation logic from the Host control.\n */\nexport class DialogDelegate {\n private host: IHostDialog & Control;\n\n /**\n * Initializes a new DialogDelegate to handle dialog-based rendering.\n * @param host The parent DynamicHost or GeneratorHost control.\n */\n constructor(host: IHostDialog & Control) {\n this.host = host;\n }\n\n /**\n * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.\n * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.\n */\n public openInDialog(title: string = \"Form\", submitButtonText: string = \"OK\", isGenerated: boolean, cancelButtonText: string = \"Cancel\", dialogWidth: string = \"800px\", parentView?: Control): void {\n // UI5 PURITY: Do not manually force generate() here.\n // Opening the dialog mounts the host, natively firing onBeforeRendering() which triggers generation cleanly.\n\n const dialog = new Dialog({\n title: title,\n contentWidth: dialogWidth,\n content: [this.host], // Mount host inside the dialog\n beginButton: new Button({\n text: submitButtonText,\n type: \"Emphasized\",\n press: () => {\n try {\n const success = this.host.triggerSubmit();\n if (success) {\n dialog.close();\n }\n } catch (err) {\n Logger.error(\"[MetaUI] Catastrophic error during validation/submit pipeline\", (err as Error).message, \"DialogDelegate\");\n this.host.fireEvent(\"validationError\", { fieldPath: \"root\", message: (err as Error).message });\n }\n }\n }),\n endButton: new Button({\n text: cancelButtonText,\n press: () => {\n this.host.fireEvent(\"cancel\");\n dialog.close();\n }\n }),\n afterClose: () => {\n dialog.destroy();\n }\n });\n\n if (parentView && typeof parentView.addDependent === \"function\") {\n parentView.addDependent(dialog);\n }\n\n dialog.open();\n }\n}\n"],"mappings":"yGAGSA,EAAMC,EAAA,UAWR,MAAMC,EAOTC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAMOE,aAAaC,EAAgB,OAAQC,EAA2B,KAAMC,EAAsBC,EAA2B,SAAUC,EAAsB,QAASC,GAInK,MAAMC,EAAS,IAAIC,EAAO,CACtBP,MAAOA,EACPQ,aAAcJ,EACdK,QAAS,CAACX,KAAKD,MACfa,YAAa,IAAIC,EAAO,CACpBC,KAAMX,EACNY,KAAM,aACNC,MAAOA,KACH,IACI,MAAMC,EAAUjB,KAAKD,KAAKmB,gBAC1B,GAAID,EAAS,CACTT,EAAOW,OACX,CACJ,CAAE,MAAOC,GACLzB,EAAO0B,MAAM,gEAAkED,EAAcE,QAAS,kBACtGtB,KAAKD,KAAKwB,UAAU,kBAAmB,CAAEC,UAAW,OAAQF,QAAUF,EAAcE,SACxF,KAGRG,UAAW,IAAIZ,EAAO,CAClBC,KAAMT,EACNW,MAAOA,KACHhB,KAAKD,KAAKwB,UAAU,UACpBf,EAAOW,WAGfO,WAAYA,KACRlB,EAAOmB,aAIf,GAAIpB,UAAqBA,EAAWqB,eAAiB,WAAY,CAC7DrB,EAAWqB,aAAapB,EAC5B,CAEAA,EAAOqB,MACX,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAAjC,iBAAA,OAAAiC,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"DialogDelegate.js","names":["Logger","_____utils_Logger","DialogDelegate","activeDialog","requestedWidth","calculatedOptimalWidth","constructor","host","this","openInDialog","title","submitButtonText","isGenerated","cancelButtonText","dialogWidth","parentView","busyDialog","BusyDialog","text","open","genResult","generate","Promise","err","close","error","message","finalWidth","dialog","Dialog","contentWidth","content","beginButton","Button","type","press","success","triggerSubmit","fireEvent","fieldPath","endButton","afterClose","destroy","addDependent","updateDialogWidthDynamically","optimalWidth","setContentWidth","__exports","__esModule"],"sources":["DialogDelegate.ts"],"sourcesContent":["import Dialog from \"sap/m/Dialog\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport BusyDialog from \"sap/m/BusyDialog\";\nimport { Logger } from \"../../../utils/Logger\";\n\nexport interface IHostDialog {\n generate(): Promise<void> | void;\n triggerSubmit(): boolean;\n fireEvent(eventName: string, parameters?: Record<string, unknown>): this;\n}\n\n/**\n * Extracts all popup and dialog generation logic from the Host control.\n */\nexport class DialogDelegate {\n private host: IHostDialog & Control;\n private activeDialog: Dialog | null = null;\n private requestedWidth: string = \"auto\";\n private calculatedOptimalWidth: string = \"auto\";\n\n /**\n * Initializes a new DialogDelegate to handle dialog-based rendering.\n * @param host The parent DynamicHost or GeneratorHost control.\n */\n constructor(host: IHostDialog & Control) {\n this.host = host;\n }\n\n /**\n * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.\n * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.\n */\n public async openInDialog(title: string = \"Form\", submitButtonText: string = \"OK\", isGenerated: boolean, cancelButtonText: string = \"Cancel\", dialogWidth: string = \"auto\", parentView?: Control): Promise<void> {\n this.requestedWidth = dialogWidth;\n this.calculatedOptimalWidth = dialogWidth; // Default fallback\n\n // Mask the complex asynchronous rendering to prevent visual snapping\n const busyDialog = new BusyDialog({ text: \"Building Form...\" });\n busyDialog.open();\n\n try {\n // Force manual generation BEFORE mounting the dialog so the optimal width is perfectly calculated first\n const genResult = this.host.generate();\n if (genResult instanceof Promise) {\n await genResult;\n }\n } catch (err) {\n busyDialog.close();\n Logger.error(\"[MetaUI] Catastrophic error during pre-generation of dialog content\", (err as Error).message, \"DialogDelegate\");\n return;\n }\n\n busyDialog.close();\n\n // The Engine heuristically updated `calculatedOptimalWidth` during `generate()`. Apply it on frame 1.\n const finalWidth = this.requestedWidth === \"auto\" && this.calculatedOptimalWidth !== \"auto\" ? this.calculatedOptimalWidth : this.requestedWidth;\n\n const dialog = new Dialog({\n title: title,\n contentWidth: finalWidth,\n content: [this.host], // Mount host inside the dialog\n beginButton: new Button({\n text: submitButtonText,\n type: \"Emphasized\",\n press: () => {\n try {\n const success = this.host.triggerSubmit();\n if (success) {\n dialog.close();\n }\n } catch (err) {\n Logger.error(\"[MetaUI] Catastrophic error during validation/submit pipeline\", (err as Error).message, \"DialogDelegate\");\n this.host.fireEvent(\"validationError\", { fieldPath: \"root\", message: (err as Error).message });\n }\n }\n }),\n endButton: new Button({\n text: cancelButtonText,\n press: () => {\n this.host.fireEvent(\"cancel\");\n dialog.close();\n }\n }),\n afterClose: () => {\n this.activeDialog = null;\n dialog.destroy();\n }\n });\n\n this.activeDialog = dialog;\n\n if (parentView && typeof parentView.addDependent === \"function\") {\n parentView.addDependent(dialog);\n }\n\n dialog.open();\n }\n\n /**\n * Allows the Engine to retroactively expand the dialog once the schema is fully parsed.\n */\n public updateDialogWidthDynamically(optimalWidth: string): void {\n this.calculatedOptimalWidth = optimalWidth;\n // Only dynamically stretch if the dialog is ALREADY open (e.g., hybrid inference late-loading)\n if (this.activeDialog && this.requestedWidth === \"auto\" && optimalWidth !== \"auto\") {\n this.activeDialog.setContentWidth(optimalWidth);\n }\n }\n}\n"],"mappings":"8HAISA,EAAMC,EAAA,UAWR,MAAMC,EAEDC,aAA8B,KAC9BC,eAAyB,OACzBC,uBAAiC,OAMzCC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAMA,kBAAaE,CAAaC,EAAgB,OAAQC,EAA2B,KAAMC,EAAsBC,EAA2B,SAAUC,EAAsB,OAAQC,GACxKP,KAAKJ,eAAiBU,EACtBN,KAAKH,uBAAyBS,EAG9B,MAAME,EAAa,IAAIC,EAAW,CAAEC,KAAM,qBAC1CF,EAAWG,OAEX,IAEI,MAAMC,EAAYZ,KAAKD,KAAKc,WAC5B,GAAID,aAAqBE,QAAS,OACxBF,CACV,CACJ,CAAE,MAAOG,GACLP,EAAWQ,QACXxB,EAAOyB,MAAM,sEAAwEF,EAAcG,QAAS,kBAC5G,MACJ,CAEAV,EAAWQ,QAGX,MAAMG,EAAanB,KAAKJ,iBAAmB,QAAUI,KAAKH,yBAA2B,OAASG,KAAKH,uBAAyBG,KAAKJ,eAEjI,MAAMwB,EAAS,IAAIC,EAAO,CACtBnB,MAAOA,EACPoB,aAAcH,EACdI,QAAS,CAACvB,KAAKD,MACfyB,YAAa,IAAIC,EAAO,CACpBf,KAAMP,EACNuB,KAAM,aACNC,MAAOA,KACH,IACI,MAAMC,EAAU5B,KAAKD,KAAK8B,gBAC1B,GAAID,EAAS,CACTR,EAAOJ,OACX,CACJ,CAAE,MAAOD,GACLvB,EAAOyB,MAAM,gEAAkEF,EAAcG,QAAS,kBACtGlB,KAAKD,KAAK+B,UAAU,kBAAmB,CAAEC,UAAW,OAAQb,QAAUH,EAAcG,SACxF,KAGRc,UAAW,IAAIP,EAAO,CAClBf,KAAML,EACNsB,MAAOA,KACH3B,KAAKD,KAAK+B,UAAU,UACpBV,EAAOJ,WAGfiB,WAAYA,KACRjC,KAAKL,aAAe,KACpByB,EAAOc,aAIflC,KAAKL,aAAeyB,EAEpB,GAAIb,UAAqBA,EAAW4B,eAAiB,WAAY,CAC7D5B,EAAW4B,aAAaf,EAC5B,CAEAA,EAAOT,MACX,CAKOyB,6BAA6BC,GAChCrC,KAAKH,uBAAyBwC,EAE9B,GAAIrC,KAAKL,cAAgBK,KAAKJ,iBAAmB,QAAUyC,IAAiB,OAAQ,CAChFrC,KAAKL,aAAa2C,gBAAgBD,EACtC,CACJ,EACH,IAAAE,EAAA,CAAAC,WAAA,MAAAD,EAAA7C,iBAAA,OAAA6C,CAAA","ignoreList":[]}
@@ -1,10 +1,11 @@
1
1
  import Dialog from "sap/m/Dialog";
2
2
  import Button from "sap/m/Button";
3
3
  import Control from "sap/ui/core/Control";
4
+ import BusyDialog from "sap/m/BusyDialog";
4
5
  import { Logger } from "../../../utils/Logger";
5
6
 
6
7
  export interface IHostDialog {
7
- generate(): void;
8
+ generate(): Promise<void> | void;
8
9
  triggerSubmit(): boolean;
9
10
  fireEvent(eventName: string, parameters?: Record<string, unknown>): this;
10
11
  }
@@ -14,6 +15,9 @@ export interface IHostDialog {
14
15
  */
15
16
  export class DialogDelegate {
16
17
  private host: IHostDialog & Control;
18
+ private activeDialog: Dialog | null = null;
19
+ private requestedWidth: string = "auto";
20
+ private calculatedOptimalWidth: string = "auto";
17
21
 
18
22
  /**
19
23
  * Initializes a new DialogDelegate to handle dialog-based rendering.
@@ -27,13 +31,34 @@ export class DialogDelegate {
27
31
  * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.
28
32
  * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.
29
33
  */
30
- public openInDialog(title: string = "Form", submitButtonText: string = "OK", isGenerated: boolean, cancelButtonText: string = "Cancel", dialogWidth: string = "800px", parentView?: Control): void {
31
- // UI5 PURITY: Do not manually force generate() here.
32
- // Opening the dialog mounts the host, natively firing onBeforeRendering() which triggers generation cleanly.
34
+ public async openInDialog(title: string = "Form", submitButtonText: string = "OK", isGenerated: boolean, cancelButtonText: string = "Cancel", dialogWidth: string = "auto", parentView?: Control): Promise<void> {
35
+ this.requestedWidth = dialogWidth;
36
+ this.calculatedOptimalWidth = dialogWidth; // Default fallback
37
+
38
+ // Mask the complex asynchronous rendering to prevent visual snapping
39
+ const busyDialog = new BusyDialog({ text: "Building Form..." });
40
+ busyDialog.open();
41
+
42
+ try {
43
+ // Force manual generation BEFORE mounting the dialog so the optimal width is perfectly calculated first
44
+ const genResult = this.host.generate();
45
+ if (genResult instanceof Promise) {
46
+ await genResult;
47
+ }
48
+ } catch (err) {
49
+ busyDialog.close();
50
+ Logger.error("[MetaUI] Catastrophic error during pre-generation of dialog content", (err as Error).message, "DialogDelegate");
51
+ return;
52
+ }
53
+
54
+ busyDialog.close();
55
+
56
+ // The Engine heuristically updated `calculatedOptimalWidth` during `generate()`. Apply it on frame 1.
57
+ const finalWidth = this.requestedWidth === "auto" && this.calculatedOptimalWidth !== "auto" ? this.calculatedOptimalWidth : this.requestedWidth;
33
58
 
34
59
  const dialog = new Dialog({
35
60
  title: title,
36
- contentWidth: dialogWidth,
61
+ contentWidth: finalWidth,
37
62
  content: [this.host], // Mount host inside the dialog
38
63
  beginButton: new Button({
39
64
  text: submitButtonText,
@@ -58,14 +83,28 @@ export class DialogDelegate {
58
83
  }
59
84
  }),
60
85
  afterClose: () => {
86
+ this.activeDialog = null;
61
87
  dialog.destroy();
62
88
  }
63
89
  });
64
90
 
91
+ this.activeDialog = dialog;
92
+
65
93
  if (parentView && typeof parentView.addDependent === "function") {
66
94
  parentView.addDependent(dialog);
67
95
  }
68
96
 
69
97
  dialog.open();
70
98
  }
99
+
100
+ /**
101
+ * Allows the Engine to retroactively expand the dialog once the schema is fully parsed.
102
+ */
103
+ public updateDialogWidthDynamically(optimalWidth: string): void {
104
+ this.calculatedOptimalWidth = optimalWidth;
105
+ // Only dynamically stretch if the dialog is ALREADY open (e.g., hybrid inference late-loading)
106
+ if (this.activeDialog && this.requestedWidth === "auto" && optimalWidth !== "auto") {
107
+ this.activeDialog.setContentWidth(optimalWidth);
108
+ }
109
+ }
71
110
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationDelegate-dbg.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","registerObject","control","unregisterObject","removeAllMessages","stateManager","getStateManager","getProperty","messageManager","Messaging","messages","getMessageModel","getData","messagesToRemove","filter","m","getMessageProcessor","getId","getModel","length","removeMessages","pushMessage","path","text","targetPath","replace","displayText","warn","addMessages","Message","message","type","coreLibrary","MessageType","Error","target","processor","addCustomError","fieldPath","code","clearCustomError","processorId","getTarget","getCode","mountCrashBoundary","error","errorPage","IllustratedMessage","title","description","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import IllustratedMessage from \"sap/m/IllustratedMessage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n /**\n * Initializes the ValidationDelegate for registering controls to the global MessageManager.\n * @param host The parent host interface.\n */\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages \n * on every keystroke. MetaUI handles valueState manually via plugins).\n */\n public registerObject(control: Control): void {\n // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n // Do nothing\n }\n\n public removeAllMessages(): void {\n const stateManager = this.host.getStateManager();\n if (stateManager && this.host.getProperty(\"useMessageManager\")) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>\n m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messagesToRemove && messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\") === true) {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new Message({\n message: displayText,\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n * Uses a specific 'CustomError' code to distinguish it from internal schema validations.\n * \n * @param fieldPath The internal JSON path of the field to highlight.\n * @param message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n Messaging.addMessages(new Message({\n message: message,\n type: coreLibrary.MessageType.Error,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel(),\n code: \"CustomError\"\n }));\n }\n\n /**\n * Reverts a custom error state on a field, safely ignoring native schema validations.\n * \n * @param fieldPath The internal JSON path of the field to clear.\n */\n public clearCustomError(fieldPath: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n const processorId = stateManager.getModel().getId();\n const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];\n\n const messagesToRemove = messages.filter(m => \n m.getTarget() === target && \n m.getCode() === \"CustomError\" &&\n m.getMessageProcessor()?.getId() === processorId\n );\n\n if (messagesToRemove.length > 0) {\n Messaging.removeMessages(messagesToRemove);\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new IllustratedMessage({\n title: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":";;;QAISA,MAAM,GAAAC,iBAAA;EAUf;AACA;AACA;EACO,MAAMC,kBAAkB,CAAC;IAG5B;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,IAAqB,EAAE;MAC/B,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;AACA;AACA;IACWC,cAAcA,CAACC,OAAgB,EAAQ;MAC1C;IAAA;;IAGJ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8B,MAAM,GAAG,IAAIG,SAAS,CAACb,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE;MACjD,MAAMgB,WAAW,GAAGpC,YAAY,CAACa,QAAQ,CAAC,CAAC,CAACD,KAAK,CAAC,CAAC;MACnD,MAAMP,QAAQ,GAAGD,SAAS,CAACE,eAAe,CAAC,CAAC,CAACC,OAAO,CAAC,CAAkC;MAEvF,MAAMC,gBAAgB,GAAGH,QAAQ,CAACI,MAAM,CAACC,CAAC,IACtCA,CAAC,CAAC2B,SAAS,CAAC,CAAC,KAAKP,MAAM,IACxBpB,CAAC,CAAC4B,OAAO,CAAC,CAAC,KAAK,aAAa,IAC7B5B,CAAC,CAACC,mBAAmB,CAAC,CAAC,EAAEC,KAAK,CAAC,CAAC,KAAKwB,WACzC,CAAC;MAED,IAAI5B,gBAAgB,CAACM,MAAM,GAAG,CAAC,EAAE;QAC7BV,SAAS,CAACW,cAAc,CAACP,gBAAgB,CAAC;MAC9C;IACJ;;IAEA;AACJ;AACA;IACW+B,kBAAkBA,CAACC,KAAY,EAAQ;MAC1CjD,MAAM,CAACiD,KAAK,CAAC,wEAAwE,EAAEA,KAAK,CAACf,OAAO,EAAE,oBAAoB,CAAC;MAE3H,MAAMgB,SAAS,GAAG,IAAIC,kBAAkB,CAAC;QACrCC,KAAK,EAAE,sBAAsB;QAC7BC,WAAW,EAAE;MACjB,CAAC,CAAC;MAEF,IAAI,CAACjD,IAAI,CAACkD,cAAc,CAAC,UAAU,EAAEJ,SAAS,CAAC;IACnD;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAArD,kBAAA,GAAAA,kBAAA;EAAA,OAAAqD,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"ValidationDelegate-dbg.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","registerObject","control","unregisterObject","removeAllMessages","stateManager","getStateManager","getProperty","messageManager","Messaging","messages","getMessageModel","getData","messagesToRemove","filter","m","getMessageProcessor","getId","getModel","length","removeMessages","pushMessage","path","text","targetPath","replace","displayText","warn","addMessages","Message","message","type","coreLibrary","MessageType","Error","target","processor","addCustomError","fieldPath","code","clearCustomError","processorId","getTarget","getCode","mountCrashBoundary","error","errorPage","IllustratedMessage","title","description","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import IllustratedMessage from \"sap/m/IllustratedMessage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n /**\n * Initializes the ValidationDelegate for registering controls to the global MessageManager.\n * @param host The parent host interface.\n */\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages \n * on every keystroke. MetaUI handles valueState manually via plugins).\n */\n public registerObject(control: Control): void {\n // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n // Do nothing\n }\n\n public removeAllMessages(): void {\n const stateManager = this.host.getStateManager();\n if (stateManager && this.host.getProperty(\"useMessageManager\")) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>\n m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messagesToRemove && messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\") === true) {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new Message({\n message: displayText,\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n * Uses a specific 'CustomError' code to distinguish it from internal schema validations.\n * \n * @param fieldPath The internal JSON path of the field to highlight.\n * @param message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n Messaging.addMessages(new Message({\n message: message,\n type: coreLibrary.MessageType.Error,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel(),\n code: \"CustomError\"\n }));\n }\n\n /**\n * Reverts a custom error state on a field, safely ignoring native schema validations.\n * \n * @param fieldPath The internal JSON path of the field to clear.\n */\n public clearCustomError(fieldPath: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n const processorId = stateManager.getModel().getId();\n const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];\n\n const messagesToRemove = messages.filter(m =>\n m.getTarget() === target &&\n m.getCode() === \"CustomError\" &&\n m.getMessageProcessor()?.getId() === processorId\n );\n\n if (messagesToRemove.length > 0) {\n Messaging.removeMessages(messagesToRemove);\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new IllustratedMessage({\n title: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":";;;QAISA,MAAM,GAAAC,iBAAA;EAUf;AACA;AACA;EACO,MAAMC,kBAAkB,CAAC;IAG5B;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,IAAqB,EAAE;MAC/B,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;AACA;AACA;IACWC,cAAcA,CAACC,OAAgB,EAAQ;MAC1C;IAAA;;IAGJ;AACJ;AACA;IACWC,gBAAgBA,CAACD,OAAgB,EAAQ;MAC5C;IAAA;IAGGE,iBAAiBA,CAAA,EAAS;MAC7B,MAAMC,YAAY,GAAG,IAAI,CAACL,IAAI,CAACM,eAAe,CAAC,CAAC;MAChD,IAAID,YAAY,IAAI,IAAI,CAACL,IAAI,CAACO,WAAW,CAAC,mBAAmB,CAAC,EAAE;QAC5D,MAAMC,cAAc,GAAGC,SAAS;QAChC,MAAMC,QAAQ,GAAGF,cAAc,CAACG,eAAe,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;QAC3D,MAAMC,gBAAgB,GAAGH,QAAQ,CAACI,MAAM,CAAEC,CAA8B,IACpEA,CAAC,CAACC,mBAAmB,CAAC,CAAC,IAAID,CAAC,CAACC,mBAAmB,CAAC,CAAC,CAACC,KAAK,CAAC,CAAC,KAAKZ,YAAY,CAACa,QAAQ,CAAC,CAAC,CAACD,KAAK,CAAC,CACjG,CAAC;QACD,IAAIJ,gBAAgB,IAAIA,gBAAgB,CAACM,MAAM,GAAG,CAAC,EAAE;UACjDX,cAAc,CAACY,cAAc,CAACP,gBAAgB,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,wEAAwE,EAAEA,KAAK,CAACf,OAAO,EAAE,oBAAoB,CAAC;MAE3H,MAAMgB,SAAS,GAAG,IAAIC,kBAAkB,CAAC;QACrCC,KAAK,EAAE,sBAAsB;QAC7BC,WAAW,EAAE;MACjB,CAAC,CAAC;MAEF,IAAI,CAACjD,IAAI,CAACkD,cAAc,CAAC,UAAU,EAAEJ,SAAS,CAAC;IACnD;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAArD,kBAAA,GAAAA,kBAAA;EAAA,OAAAqD,SAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationDelegate.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","this","registerObject","control","unregisterObject","removeAllMessages","stateManager","getStateManager","getProperty","messageManager","Messaging","messages","getMessageModel","getData","messagesToRemove","filter","m","getMessageProcessor","getId","getModel","length","removeMessages","pushMessage","path","text","targetPath","replace","displayText","warn","addMessages","Message","message","type","coreLibrary","MessageType","Error","target","processor","addCustomError","fieldPath","code","clearCustomError","processorId","getTarget","getCode","mountCrashBoundary","error","errorPage","IllustratedMessage","title","description","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import IllustratedMessage from \"sap/m/IllustratedMessage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n /**\n * Initializes the ValidationDelegate for registering controls to the global MessageManager.\n * @param host The parent host interface.\n */\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages \n * on every keystroke. MetaUI handles valueState manually via plugins).\n */\n public registerObject(control: Control): void {\n // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n // Do nothing\n }\n\n public removeAllMessages(): void {\n const stateManager = this.host.getStateManager();\n if (stateManager && this.host.getProperty(\"useMessageManager\")) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>\n m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messagesToRemove && messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\") === true) {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new Message({\n message: displayText,\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n * Uses a specific 'CustomError' code to distinguish it from internal schema validations.\n * \n * @param fieldPath The internal JSON path of the field to highlight.\n * @param message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n Messaging.addMessages(new Message({\n message: message,\n type: coreLibrary.MessageType.Error,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel(),\n code: \"CustomError\"\n }));\n }\n\n /**\n * Reverts a custom error state on a field, safely ignoring native schema validations.\n * \n * @param fieldPath The internal JSON path of the field to clear.\n */\n public clearCustomError(fieldPath: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n const processorId = stateManager.getModel().getId();\n const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];\n\n const messagesToRemove = messages.filter(m => \n m.getTarget() === target && \n m.getCode() === \"CustomError\" &&\n m.getMessageProcessor()?.getId() === processorId\n );\n\n if (messagesToRemove.length > 0) {\n Messaging.removeMessages(messagesToRemove);\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new IllustratedMessage({\n title: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":"sLAISA,EAAMC,EAAA,UAaR,MAAMC,EAOTC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAOOE,eAAeC,GAClB,CAMGC,iBAAiBD,GACpB,CAGGE,oBACH,MAAMC,EAAeL,KAAKD,KAAKO,kBAC/B,GAAID,GAAgBL,KAAKD,KAAKQ,YAAY,qBAAsB,CAC5D,MAAMC,EAAiBC,EACvB,MAAMC,EAAWF,EAAeG,kBAAkBC,UAClD,MAAMC,EAAmBH,EAASI,OAAQC,GACtCA,EAAEC,uBAAyBD,EAAEC,sBAAsBC,UAAYZ,EAAaa,WAAWD,SAE3F,GAAIJ,GAAoBA,EAAiBM,OAAS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C,GAAI5B,EAAiBM,OAAS,EAAG,CAC7BV,EAAUW,eAAeP,EAC7B,CACJ,CAKO+B,mBAAmBC,GACtBlD,EAAOkD,MAAM,yEAA0EA,EAAMf,QAAS,sBAEtG,MAAMgB,EAAY,IAAIC,EAAmB,CACrCC,MAAO,uBACPC,YAAa,kGAGjBjD,KAAKD,KAAKmD,eAAe,WAAYJ,EACzC,EACH,IAAAK,EAAA,CAAAC,WAAA,MAAAD,EAAAtD,qBAAA,OAAAsD,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"ValidationDelegate.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","this","registerObject","control","unregisterObject","removeAllMessages","stateManager","getStateManager","getProperty","messageManager","Messaging","messages","getMessageModel","getData","messagesToRemove","filter","m","getMessageProcessor","getId","getModel","length","removeMessages","pushMessage","path","text","targetPath","replace","displayText","warn","addMessages","Message","message","type","coreLibrary","MessageType","Error","target","processor","addCustomError","fieldPath","code","clearCustomError","processorId","getTarget","getCode","mountCrashBoundary","error","errorPage","IllustratedMessage","title","description","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import IllustratedMessage from \"sap/m/IllustratedMessage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n /**\n * Initializes the ValidationDelegate for registering controls to the global MessageManager.\n * @param host The parent host interface.\n */\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages \n * on every keystroke. MetaUI handles valueState manually via plugins).\n */\n public registerObject(control: Control): void {\n // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n // Do nothing\n }\n\n public removeAllMessages(): void {\n const stateManager = this.host.getStateManager();\n if (stateManager && this.host.getProperty(\"useMessageManager\")) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>\n m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messagesToRemove && messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\") === true) {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new Message({\n message: displayText,\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n * Uses a specific 'CustomError' code to distinguish it from internal schema validations.\n * \n * @param fieldPath The internal JSON path of the field to highlight.\n * @param message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n Messaging.addMessages(new Message({\n message: message,\n type: coreLibrary.MessageType.Error,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel(),\n code: \"CustomError\"\n }));\n }\n\n /**\n * Reverts a custom error state on a field, safely ignoring native schema validations.\n * \n * @param fieldPath The internal JSON path of the field to clear.\n */\n public clearCustomError(fieldPath: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n const processorId = stateManager.getModel().getId();\n const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];\n\n const messagesToRemove = messages.filter(m =>\n m.getTarget() === target &&\n m.getCode() === \"CustomError\" &&\n m.getMessageProcessor()?.getId() === processorId\n );\n\n if (messagesToRemove.length > 0) {\n Messaging.removeMessages(messagesToRemove);\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new IllustratedMessage({\n title: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":"sLAISA,EAAMC,EAAA,UAaR,MAAMC,EAOTC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAOOE,eAAeC,GAClB,CAMGC,iBAAiBD,GACpB,CAGGE,oBACH,MAAMC,EAAeL,KAAKD,KAAKO,kBAC/B,GAAID,GAAgBL,KAAKD,KAAKQ,YAAY,qBAAsB,CAC5D,MAAMC,EAAiBC,EACvB,MAAMC,EAAWF,EAAeG,kBAAkBC,UAClD,MAAMC,EAAmBH,EAASI,OAAQC,GACtCA,EAAEC,uBAAyBD,EAAEC,sBAAsBC,UAAYZ,EAAaa,WAAWD,SAE3F,GAAIJ,GAAoBA,EAAiBM,OAAS,EAAG,CACjDX,EAAeY,eAAeP,EAClC,CACJ,CACJ,CAKOQ,YAAYC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CACJ,CAKO+B,mBAAmBC,GACtBlD,EAAOkD,MAAM,yEAA0EA,EAAMf,QAAS,sBAEtG,MAAMgB,EAAY,IAAIC,EAAmB,CACrCC,MAAO,uBACPC,YAAa,kGAGjBjD,KAAKD,KAAKmD,eAAe,WAAYJ,EACzC,EACH,IAAAK,EAAA,CAAAC,WAAA,MAAAD,EAAAtD,qBAAA,OAAAsD,CAAA","ignoreList":[]}
@@ -126,8 +126,8 @@ export class ValidationDelegate {
126
126
  const processorId = stateManager.getModel().getId();
127
127
  const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];
128
128
 
129
- const messagesToRemove = messages.filter(m =>
130
- m.getTarget() === target &&
129
+ const messagesToRemove = messages.filter(m =>
130
+ m.getTarget() === target &&
131
131
  m.getCode() === "CustomError" &&
132
132
  m.getMessageProcessor()?.getId() === processorId
133
133
  );
@@ -27,6 +27,7 @@ sap.ui.define(["../utils/Logger"], function (___utils_Logger) {
27
27
  this.registerPluginPath("string", "time", "nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin");
28
28
  this.registerPluginPath("string", "datetime", "nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin");
29
29
  this.registerPluginPath("boolean", "switch", "nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin");
30
+ this.registerPluginPath("number", "step", "nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin");
30
31
  this.registerPluginPath("string", "select", "nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin");
31
32
  this.registerPluginPath("string", "textArea", "nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin");
32
33
  this.registerPluginPath("string", "codeEditor", "nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin");
@@ -1 +1 @@
1
- {"version":3,"file":"PluginRegistry-dbg.js","names":["Logger","___utils_Logger","PluginRegistry","fieldIndex","actionIndex","layoutIndex","activePromises","constructor","registerPluginPath","undefined","registerLayoutPath","getInstance","instance","type","widgetName","path","key","registerActionPath","actionName","strategy","getFieldPath","Error","getLayoutPath","getPathsToLoad","schema","pathsToLoad","Set","layoutStrategy","add","scanProperties","props","prop","ui","widget","e","msg","message","error","properties","items","preloadDependencies","promises","Array","from","map","Promise","resolve","reject","sap","require","Module","err","all","extractConstructor","default","keys","Object","getPlugin","PluginClass","getLayout","LayoutClass","__exports","__esModule"],"sources":["PluginRegistry.ts"],"sourcesContent":["/**\n * @file PluginRegistry.ts\n * @description Centralized hub for mapping UI5 controls to SAP schema data types.\n * Enforces the Registry Pattern to decouple the core engine from specific UI5 control implementations.\n * NOW WITH UNIVERSAL LAZY LOADING.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { FieldType, ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\n\nexport class PluginRegistry {\n private static instance: PluginRegistry;\n \n private fieldIndex: Record<string, string> = {};\n private actionIndex: Record<string, string> = {};\n private layoutIndex: Record<string, string> = {};\n \n private activePromises: Record<string, Promise<unknown>> = {};\n\n private constructor() {\n // Core Mappings\n this.registerPluginPath(\"string\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin\");\n this.registerPluginPath(\"number\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin\");\n this.registerPluginPath(\"integer\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin\");\n this.registerPluginPath(\"date\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin\");\n this.registerPluginPath(\"boolean\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin\");\n this.registerPluginPath(\"array\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin\");\n this.registerPluginPath(\"object\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin\");\n\n // Widget Overrides\n this.registerPluginPath(\"string\", \"time\", \"nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin\");\n this.registerPluginPath(\"string\", \"datetime\", \"nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin\");\n this.registerPluginPath(\"boolean\", \"switch\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin\");\n this.registerPluginPath(\"string\", \"select\", \"nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin\");\n this.registerPluginPath(\"string\", \"textArea\", \"nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin\");\n this.registerPluginPath(\"string\", \"codeEditor\", \"nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin\");\n \n // Phase 1 Mappings\n this.registerPluginPath(\"string\", \"fileUploader\", \"nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin\");\n this.registerPluginPath(\"array\", \"multiSelect\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin\");\n this.registerPluginPath(\"array\", \"multiInput\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin\");\n this.registerPluginPath(\"number\", \"slider\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin\");\n this.registerPluginPath(\"number\", \"rating\", \"nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin\");\n this.registerPluginPath(\"string\", \"messageStrip\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin\");\n\n // Phase 5 Mappings (Hardware)\n this.registerPluginPath(\"string\", \"camera\", \"nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin\");\n this.registerPluginPath(\"string\", \"signature\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin\");\n this.registerPluginPath(\"object\", \"location\", \"nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin\");\n this.registerPluginPath(\"string\", \"scanner\", \"nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin\");\n this.registerPluginPath(\"string\", \"voiceInput\", \"nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin\");\n this.registerPluginPath(\"string\", \"richText\", \"nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin\");\n\n // Actions & Datasources\n this.registerPluginPath(\"string\", \"urlButton\", \"nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin\");\n this.registerPluginPath(\"string\", \"submitButton\", \"nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin\");\n this.registerPluginPath(\"string\", \"odataSelect\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin\");\n this.registerPluginPath(\"string\", \"remoteDropdown\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin\");\n this.registerPluginPath(\"string\", \"liveSearch\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin\");\n this.registerPluginPath(\"string\", \"remoteValueHelp\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin\");\n\n // Layouts\n this.registerLayoutPath(\"form\", \"nz/co/siliconst/ui5/metaui/layouts/FormLayout\");\n this.registerLayoutPath(\"table\", \"nz/co/siliconst/ui5/metaui/layouts/TableLayout\");\n this.registerLayoutPath(\"wizard\", \"nz/co/siliconst/ui5/metaui/layouts/WizardLayout\");\n this.registerLayoutPath(\"compact\", \"nz/co/siliconst/ui5/metaui/layouts/CompactLayout\");\n }\n\n public static getInstance(): PluginRegistry {\n if (!PluginRegistry.instance) {\n PluginRegistry.instance = new PluginRegistry();\n }\n return PluginRegistry.instance;\n }\n\n public registerPluginPath(type: FieldType, widgetName: string | undefined, path: string): void {\n const key = widgetName ? `${type}:${widgetName}` : type;\n this.fieldIndex[key] = path;\n }\n\n public registerActionPath(actionName: string, path: string): void {\n this.actionIndex[actionName] = path;\n }\n\n public registerLayoutPath(strategy: string, path: string): void {\n this.layoutIndex[strategy] = path;\n }\n\n private getFieldPath(type: FieldType, widgetName?: string): string {\n let path;\n if (widgetName) {\n path = this.fieldIndex[`${type}:${widgetName}`];\n }\n if (!path) {\n path = this.fieldIndex[type];\n }\n if (!path) {\n throw new Error(`No plugin path mapped for FieldType: ${type} (widget: ${widgetName})`);\n }\n return path;\n }\n\n private getLayoutPath(strategy: string): string {\n const path = this.layoutIndex[strategy];\n if (!path) {\n throw new Error(`No layout path mapped for strategy: ${strategy}`);\n }\n return path;\n }\n\n /**\n * Statically traverses the schema structure to identify all required plugins\n * and layouts without actually instantiating them.\n * \n * @param {ISchema} schema The root JSON schema payload to traverse\n * @returns {Set<string>} A distinct set of UI5 module paths required to render the schema\n */\n public getPathsToLoad(schema: ISchema): Set<string> {\n const pathsToLoad = new Set<string>();\n \n // 1. Gather layout strategy\n const strategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n pathsToLoad.add(this.getLayoutPath(strategy));\n\n // 2. Recursively gather field plugins\n const scanProperties = (props: Record<string, IPropertyMetadata>) => {\n for (const key in props) {\n const prop = props[key];\n try {\n pathsToLoad.add(this.getFieldPath(prop.type || \"string\", prop.ui?.widget));\n } catch (e) {\n const msg = `[MetaUI LazyLoad] Could not find mapped plugin for field ${key}: ${(e as Error).message}`;\n Logger.error(msg);\n throw new Error(msg);\n }\n if (prop.properties) scanProperties(prop.properties);\n if (prop.items && prop.items.properties) scanProperties(prop.items.properties);\n if (prop.items && prop.items.type) {\n try {\n pathsToLoad.add(this.getFieldPath(prop.items.type, prop.items.ui?.widget));\n } catch (e) {\n const msg = `[MetaUI LazyLoad] Could not find mapped plugin for array item type ${prop.items.type}: ${(e as Error).message}`;\n Logger.error(msg);\n throw new Error(msg);\n }\n }\n }\n };\n\n if (schema.properties) {\n scanProperties(schema.properties);\n } else if (schema.items && schema.items.properties) {\n scanProperties(schema.items.properties);\n }\n\n return pathsToLoad;\n }\n\n /**\n * Defers the generation of the UI until all required UI5 modules have been\n * downloaded asynchronously. Maintains a cache of active promises to prevent\n * redundant network requests for the same module.\n * \n * @param {ISchema} schema The root JSON schema payload to parse\n * @returns {Promise<void>} Resolves when all dependencies are securely in the UI5 require cache\n */\n public async preloadDependencies(schema: ISchema): Promise<void> {\n const pathsToLoad = this.getPathsToLoad(schema);\n\n // 3. Batch execute sap.ui.require via Promises\n const promises = Array.from(pathsToLoad).map(path => {\n if (!this.activePromises[path]) {\n this.activePromises[path] = new Promise((resolve, reject) => {\n sap.ui.require([path], \n (Module: unknown) => resolve(Module), \n (err: unknown) => {\n Logger.error(`Failed to lazy load module: ${path}`);\n // CRITICAL: Delete from cache so future attempts can retry the network request\n delete this.activePromises[path];\n reject(err);\n }\n );\n });\n }\n return this.activePromises[path];\n });\n\n await Promise.all(promises);\n }\n\n /**\n * Extracts a valid constructor from a dynamically required module.\n */\n private extractConstructor(Module: unknown): new () => IPlugin | ILayoutManager | null {\n if (!Module) return null;\n if (typeof Module === \"function\") return Module as any;\n if ((Module as any).default && typeof (Module as any).default === \"function\") return (Module as any).default;\n \n // Handle namespace exports (e.g. { FormLayout: class... })\n const keys = Object.keys(Module as object);\n for (const key of keys) {\n if (typeof (Module as any)[key] === \"function\") {\n return (Module as any)[key];\n }\n }\n return null;\n }\n\n /**\n * Instantiates the requested plugin for the given field type.\n */\n public getPlugin(type: FieldType, widgetName?: string): IPlugin {\n const path = this.getFieldPath(type, widgetName);\n const Module = sap.ui.require(path);\n const PluginClass = this.extractConstructor(Module);\n \n if (!PluginClass) {\n throw new Error(`[MetaUI Plugin Instantiation] Plugin ${path} was not preloaded or has no constructor!`);\n }\n \n return new PluginClass();\n }\n\n /**\n * Instantiates the requested layout manager for the given strategy.\n */\n public getLayout(strategy: string): ILayoutManager {\n const path = this.getLayoutPath(strategy);\n const Module = sap.ui.require(path);\n const LayoutClass = this.extractConstructor(Module);\n \n if (!LayoutClass) {\n throw new Error(`[MetaUI Layout Instantiation] Layout ${path} was not preloaded or has no constructor!`);\n }\n \n return new LayoutClass();\n }\n}\n"],"mappings":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CAAC;MACnC,MAAM2C,WAAW,GAAG,IAAI,CAACL,kBAAkB,CAACH,MAAM,CAAC;MAEnD,IAAI,CAACQ,WAAW,EAAE;QACd,MAAM,IAAIrC,KAAK,CAAC,wCAAwCN,IAAI,2CAA2C,CAAC;MAC5G;MAEA,OAAO,IAAI2C,WAAW,CAAC,CAAC;IAC5B;;IAEA;AACJ;AACA;IACWC,SAASA,CAACxC,QAAgB,EAAkB;MAC/C,MAAMJ,IAAI,GAAG,IAAI,CAACO,aAAa,CAACH,QAAQ,CAAC;MACzC,MAAM+B,MAAM,GAAGF,GAAG,CAAChB,EAAE,CAACiB,OAAO,CAAClC,IAAI,CAAC;MACnC,MAAM6C,WAAW,GAAG,IAAI,CAACP,kBAAkB,CAACH,MAAM,CAAC;MAEnD,IAAI,CAACU,WAAW,EAAE;QACd,MAAM,IAAIvC,KAAK,CAAC,wCAAwCN,IAAI,2CAA2C,CAAC;MAC5G;MAEA,OAAO,IAAI6C,WAAW,CAAC,CAAC;IAC5B;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA3D,cAAA,GAAAA,cAAA;EAAA,OAAA2D,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"PluginRegistry-dbg.js","names":["Logger","___utils_Logger","PluginRegistry","fieldIndex","actionIndex","layoutIndex","activePromises","constructor","registerPluginPath","undefined","registerLayoutPath","getInstance","instance","type","widgetName","path","key","registerActionPath","actionName","strategy","getFieldPath","Error","getLayoutPath","getPathsToLoad","schema","pathsToLoad","Set","layoutStrategy","add","scanProperties","props","prop","ui","widget","e","msg","message","error","properties","items","preloadDependencies","promises","Array","from","map","Promise","resolve","reject","sap","require","Module","err","all","extractConstructor","default","keys","Object","getPlugin","PluginClass","getLayout","LayoutClass","__exports","__esModule"],"sources":["PluginRegistry.ts"],"sourcesContent":["/**\n * @file PluginRegistry.ts\n * @description Centralized hub for mapping UI5 controls to SAP schema data types.\n * Enforces the Registry Pattern to decouple the core engine from specific UI5 control implementations.\n * NOW WITH UNIVERSAL LAZY LOADING.\n */\n\nimport { IPlugin } from \"../interfaces/IPlugin\";\nimport { FieldType, ISchema, IPropertyMetadata } from \"../interfaces/ISchema\";\nimport { ILayoutManager } from \"../interfaces/ILayoutManager\";\nimport { Logger } from \"../utils/Logger\";\nimport { DefaultLayoutGenerator } from \"./DefaultLayoutGenerator\";\n\nexport class PluginRegistry {\n private static instance: PluginRegistry;\n \n private fieldIndex: Record<string, string> = {};\n private actionIndex: Record<string, string> = {};\n private layoutIndex: Record<string, string> = {};\n \n private activePromises: Record<string, Promise<unknown>> = {};\n\n private constructor() {\n // Core Mappings\n this.registerPluginPath(\"string\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin\");\n this.registerPluginPath(\"number\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin\");\n this.registerPluginPath(\"integer\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin\");\n this.registerPluginPath(\"date\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin\");\n this.registerPluginPath(\"boolean\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin\");\n this.registerPluginPath(\"array\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin\");\n this.registerPluginPath(\"object\", undefined, \"nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin\");\n\n // Widget Overrides\n this.registerPluginPath(\"string\", \"time\", \"nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin\");\n this.registerPluginPath(\"string\", \"datetime\", \"nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin\");\n this.registerPluginPath(\"boolean\", \"switch\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin\");\n this.registerPluginPath(\"number\", \"step\", \"nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin\");\n this.registerPluginPath(\"string\", \"select\", \"nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin\");\n this.registerPluginPath(\"string\", \"textArea\", \"nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin\");\n this.registerPluginPath(\"string\", \"codeEditor\", \"nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin\");\n \n // Phase 1 Mappings\n this.registerPluginPath(\"string\", \"fileUploader\", \"nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin\");\n this.registerPluginPath(\"array\", \"multiSelect\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin\");\n this.registerPluginPath(\"array\", \"multiInput\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin\");\n this.registerPluginPath(\"number\", \"slider\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin\");\n this.registerPluginPath(\"number\", \"rating\", \"nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin\");\n this.registerPluginPath(\"string\", \"messageStrip\", \"nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin\");\n\n // Phase 5 Mappings (Hardware)\n this.registerPluginPath(\"string\", \"camera\", \"nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin\");\n this.registerPluginPath(\"string\", \"signature\", \"nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin\");\n this.registerPluginPath(\"object\", \"location\", \"nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin\");\n this.registerPluginPath(\"string\", \"scanner\", \"nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin\");\n this.registerPluginPath(\"string\", \"voiceInput\", \"nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin\");\n this.registerPluginPath(\"string\", \"richText\", \"nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin\");\n\n // Actions & Datasources\n this.registerPluginPath(\"string\", \"urlButton\", \"nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin\");\n this.registerPluginPath(\"string\", \"submitButton\", \"nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin\");\n this.registerPluginPath(\"string\", \"odataSelect\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin\");\n this.registerPluginPath(\"string\", \"remoteDropdown\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin\");\n this.registerPluginPath(\"string\", \"liveSearch\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin\");\n this.registerPluginPath(\"string\", \"remoteValueHelp\", \"nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin\");\n\n // Layouts\n this.registerLayoutPath(\"form\", \"nz/co/siliconst/ui5/metaui/layouts/FormLayout\");\n this.registerLayoutPath(\"table\", \"nz/co/siliconst/ui5/metaui/layouts/TableLayout\");\n this.registerLayoutPath(\"wizard\", \"nz/co/siliconst/ui5/metaui/layouts/WizardLayout\");\n this.registerLayoutPath(\"compact\", \"nz/co/siliconst/ui5/metaui/layouts/CompactLayout\");\n }\n\n public static getInstance(): PluginRegistry {\n if (!PluginRegistry.instance) {\n PluginRegistry.instance = new PluginRegistry();\n }\n return PluginRegistry.instance;\n }\n\n public registerPluginPath(type: FieldType, widgetName: string | undefined, path: string): void {\n const key = widgetName ? `${type}:${widgetName}` : type;\n this.fieldIndex[key] = path;\n }\n\n public registerActionPath(actionName: string, path: string): void {\n this.actionIndex[actionName] = path;\n }\n\n public registerLayoutPath(strategy: string, path: string): void {\n this.layoutIndex[strategy] = path;\n }\n\n private getFieldPath(type: FieldType, widgetName?: string): string {\n let path;\n if (widgetName) {\n path = this.fieldIndex[`${type}:${widgetName}`];\n }\n if (!path) {\n path = this.fieldIndex[type];\n }\n if (!path) {\n throw new Error(`No plugin path mapped for FieldType: ${type} (widget: ${widgetName})`);\n }\n return path;\n }\n\n private getLayoutPath(strategy: string): string {\n const path = this.layoutIndex[strategy];\n if (!path) {\n throw new Error(`No layout path mapped for strategy: ${strategy}`);\n }\n return path;\n }\n\n /**\n * Statically traverses the schema structure to identify all required plugins\n * and layouts without actually instantiating them.\n * \n * @param {ISchema} schema The root JSON schema payload to traverse\n * @returns {Set<string>} A distinct set of UI5 module paths required to render the schema\n */\n public getPathsToLoad(schema: ISchema): Set<string> {\n const pathsToLoad = new Set<string>();\n \n // 1. Gather layout strategy\n const strategy = schema.layoutStrategy || (schema.type === \"array\" ? \"table\" : \"form\");\n pathsToLoad.add(this.getLayoutPath(strategy));\n\n // 2. Recursively gather field plugins\n const scanProperties = (props: Record<string, IPropertyMetadata>) => {\n for (const key in props) {\n const prop = props[key];\n try {\n pathsToLoad.add(this.getFieldPath(prop.type || \"string\", prop.ui?.widget));\n } catch (e) {\n const msg = `[MetaUI LazyLoad] Could not find mapped plugin for field ${key}: ${(e as Error).message}`;\n Logger.error(msg);\n throw new Error(msg);\n }\n if (prop.properties) scanProperties(prop.properties);\n if (prop.items && prop.items.properties) scanProperties(prop.items.properties);\n if (prop.items && prop.items.type) {\n try {\n pathsToLoad.add(this.getFieldPath(prop.items.type, prop.items.ui?.widget));\n } catch (e) {\n const msg = `[MetaUI LazyLoad] Could not find mapped plugin for array item type ${prop.items.type}: ${(e as Error).message}`;\n Logger.error(msg);\n throw new Error(msg);\n }\n }\n }\n };\n\n if (schema.properties) {\n scanProperties(schema.properties);\n } else if (schema.items && schema.items.properties) {\n scanProperties(schema.items.properties);\n }\n\n return pathsToLoad;\n }\n\n /**\n * Defers the generation of the UI until all required UI5 modules have been\n * downloaded asynchronously. Maintains a cache of active promises to prevent\n * redundant network requests for the same module.\n * \n * @param {ISchema} schema The root JSON schema payload to parse\n * @returns {Promise<void>} Resolves when all dependencies are securely in the UI5 require cache\n */\n public async preloadDependencies(schema: ISchema): Promise<void> {\n const pathsToLoad = this.getPathsToLoad(schema);\n\n // 3. Batch execute sap.ui.require via Promises\n const promises = Array.from(pathsToLoad).map(path => {\n if (!this.activePromises[path]) {\n this.activePromises[path] = new Promise((resolve, reject) => {\n sap.ui.require([path], \n (Module: unknown) => resolve(Module), \n (err: unknown) => {\n Logger.error(`Failed to lazy load module: ${path}`);\n // CRITICAL: Delete from cache so future attempts can retry the network request\n delete this.activePromises[path];\n reject(err);\n }\n );\n });\n }\n return this.activePromises[path];\n });\n\n await Promise.all(promises);\n }\n\n /**\n * Extracts a valid constructor from a dynamically required module.\n */\n private extractConstructor(Module: unknown): new () => IPlugin | ILayoutManager | null {\n if (!Module) return null;\n if (typeof Module === \"function\") return Module as any;\n if ((Module as any).default && typeof (Module as any).default === \"function\") return (Module as any).default;\n \n // Handle namespace exports (e.g. { FormLayout: class... })\n const keys = Object.keys(Module as object);\n for (const key of keys) {\n if (typeof (Module as any)[key] === \"function\") {\n return (Module as any)[key];\n }\n }\n return null;\n }\n\n /**\n * Instantiates the requested plugin for the given field type.\n */\n public getPlugin(type: FieldType, widgetName?: string): IPlugin {\n const path = this.getFieldPath(type, widgetName);\n const Module = sap.ui.require(path);\n const PluginClass = this.extractConstructor(Module);\n \n if (!PluginClass) {\n throw new Error(`[MetaUI Plugin Instantiation] Plugin ${path} was not preloaded or has no constructor!`);\n }\n \n return new PluginClass();\n }\n\n /**\n * Instantiates the requested layout manager for the given strategy.\n */\n public getLayout(strategy: string): ILayoutManager {\n const path = this.getLayoutPath(strategy);\n const Module = sap.ui.require(path);\n const LayoutClass = this.extractConstructor(Module);\n \n if (!LayoutClass) {\n throw new Error(`[MetaUI Layout Instantiation] Layout ${path} was not preloaded or has no constructor!`);\n }\n \n return new LayoutClass();\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;AACA;AACA;EALA,MAUSA,MAAM,GAAAC,eAAA;EAGR,MAAMC,cAAc,CAAC;IAGhBC,UAAU,GAA2B,CAAC,CAAC;IACvCC,WAAW,GAA2B,CAAC,CAAC;IACxCC,WAAW,GAA2B,CAAC,CAAC;IAExCC,cAAc,GAAqC,CAAC,CAAC;IAErDC,WAAWA,CAAA,EAAG;MAClB;MACA,IAAI,CAAC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W,CAAC,CAAC;IAC5B;;IAEA;AACJ;AACA;IACWC,SAASA,CAACxC,QAAgB,EAAkB;MAC/C,MAAMJ,IAAI,GAAG,IAAI,CAACO,aAAa,CAACH,QAAQ,CAAC;MACzC,MAAM+B,MAAM,GAAGF,GAAG,CAAChB,EAAE,CAACiB,OAAO,CAAClC,IAAI,CAAC;MACnC,MAAM6C,WAAW,GAAG,IAAI,CAACP,kBAAkB,CAACH,MAAM,CAAC;MAEnD,IAAI,CAACU,WAAW,EAAE;QACd,MAAM,IAAIvC,KAAK,CAAC,wCAAwCN,IAAI,2CAA2C,CAAC;MAC5G;MAEA,OAAO,IAAI6C,WAAW,CAAC,CAAC;IAC5B;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAA3D,cAAA,GAAAA,cAAA;EAAA,OAAA2D,SAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"PluginRegistry.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/PluginRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,gDAAgD,CAAC;IAChE;;;;;OAKG;IAEH,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;IACxE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAqB,MAAM,+CAA+C,CAAC;IACtG,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;IAItF,MAAa,cAAc;QACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAiB;QAExC,OAAO,CAAC,UAAU,CAA8B;QAChD,OAAO,CAAC,WAAW,CAA8B;QACjD,OAAO,CAAC,WAAW,CAA8B;QAEjD,OAAO,CAAC,cAAc,CAAwC;QAE9D,OAAO;eAiDO,WAAW,IAAI,cAAc;QAOpC,kBAAkB,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;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AE,MAAM,GAAG,IAAI;QAKvF,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;QAI1D,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;QAI/D,OAAO,CAAC,YAAY;QAcpB,OAAO,CAAC,aAAa;QAQrB;;;;;;WAMG;QACI,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC;QAyCnD;;;;;;;WAOG;QACU,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;QAwBhE;;WAEG;QACH,OAAO,CAAC,kBAAkB;QAe1B;;WAEG;QACI,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO;QAY/D;;WAEG;QACI,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc;KAWrD;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["../utils/Logger"],function(i){"use strict";const t=i["Logger"];class e{fieldIndex={};actionIndex={};layoutIndex={};activePromises={};constructor(){this.registerPluginPath("string",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin");this.registerPluginPath("number",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin");this.registerPluginPath("integer",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin");this.registerPluginPath("date",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin");this.registerPluginPath("boolean",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin");this.registerPluginPath("array",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin");this.registerPluginPath("object",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin");this.registerPluginPath("string","time","nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin");this.registerPluginPath("string","datetime","nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin");this.registerPluginPath("boolean","switch","nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin");this.registerPluginPath("string","select","nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin");this.registerPluginPath("string","textArea","nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin");this.registerPluginPath("string","codeEditor","nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin");this.registerPluginPath("string","fileUploader","nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin");this.registerPluginPath("array","multiSelect","nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin");this.registerPluginPath("array","multiInput","nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin");this.registerPluginPath("number","slider","nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin");this.registerPluginPath("number","rating","nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin");this.registerPluginPath("string","messageStrip","nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin");this.registerPluginPath("string","camera","nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin");this.registerPluginPath("string","signature","nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin");this.registerPluginPath("object","location","nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin");this.registerPluginPath("string","scanner","nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin");this.registerPluginPath("string","voiceInput","nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin");this.registerPluginPath("string","richText","nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin");this.registerPluginPath("string","urlButton","nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin");this.registerPluginPath("string","submitButton","nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin");this.registerPluginPath("string","odataSelect","nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin");this.registerPluginPath("string","remoteDropdown","nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin");this.registerPluginPath("string","liveSearch","nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin");this.registerPluginPath("string","remoteValueHelp","nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin");this.registerLayoutPath("form","nz/co/siliconst/ui5/metaui/layouts/FormLayout");this.registerLayoutPath("table","nz/co/siliconst/ui5/metaui/layouts/TableLayout");this.registerLayoutPath("wizard","nz/co/siliconst/ui5/metaui/layouts/WizardLayout");this.registerLayoutPath("compact","nz/co/siliconst/ui5/metaui/layouts/CompactLayout")}static getInstance(){if(!e.instance){e.instance=new e}return e.instance}registerPluginPath(i,t,e){const n=t?`${i}:${t}`:i;this.fieldIndex[n]=e}registerActionPath(i,t){this.actionIndex[i]=t}registerLayoutPath(i,t){this.layoutIndex[i]=t}getFieldPath(i,t){let e;if(t){e=this.fieldIndex[`${i}:${t}`]}if(!e){e=this.fieldIndex[i]}if(!e){throw new Error(`No plugin path mapped for FieldType: ${i} (widget: ${t})`)}return e}getLayoutPath(i){const t=this.layoutIndex[i];if(!t){throw new Error(`No layout path mapped for strategy: ${i}`)}return t}getPathsToLoad(i){const e=new Set;const n=i.layoutStrategy||(i.type==="array"?"table":"form");e.add(this.getLayoutPath(n));const s=i=>{for(const n in i){const r=i[n];try{e.add(this.getFieldPath(r.type||"string",r.ui?.widget))}catch(i){const e=`[MetaUI LazyLoad] Could not find mapped plugin for field ${n}: ${i.message}`;t.error(e);throw new Error(e)}if(r.properties)s(r.properties);if(r.items&&r.items.properties)s(r.items.properties);if(r.items&&r.items.type){try{e.add(this.getFieldPath(r.items.type,r.items.ui?.widget))}catch(i){const e=`[MetaUI LazyLoad] Could not find mapped plugin for array item type ${r.items.type}: ${i.message}`;t.error(e);throw new Error(e)}}}};if(i.properties){s(i.properties)}else if(i.items&&i.items.properties){s(i.items.properties)}return e}async preloadDependencies(i){const e=this.getPathsToLoad(i);const n=Array.from(e).map(i=>{if(!this.activePromises[i]){this.activePromises[i]=new Promise((e,n)=>{sap.ui.require([i],i=>e(i),e=>{t.error(`Failed to lazy load module: ${i}`);delete this.activePromises[i];n(e)})})}return this.activePromises[i]});await Promise.all(n)}extractConstructor(i){if(!i)return null;if(typeof i==="function")return i;if(i.default&&typeof i.default==="function")return i.default;const t=Object.keys(i);for(const e of t){if(typeof i[e]==="function"){return i[e]}}return null}getPlugin(i,t){const e=this.getFieldPath(i,t);const n=sap.ui.require(e);const s=this.extractConstructor(n);if(!s){throw new Error(`[MetaUI Plugin Instantiation] Plugin ${e} was not preloaded or has no constructor!`)}return new s}getLayout(i){const t=this.getLayoutPath(i);const e=sap.ui.require(t);const n=this.extractConstructor(e);if(!n){throw new Error(`[MetaUI Layout Instantiation] Layout ${t} was not preloaded or has no constructor!`)}return new n}}var n={__esModule:true};n.PluginRegistry=e;return n});
1
+ sap.ui.define(["../utils/Logger"],function(i){"use strict";const t=i["Logger"];class e{fieldIndex={};actionIndex={};layoutIndex={};activePromises={};constructor(){this.registerPluginPath("string",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/StringPlugin");this.registerPluginPath("number",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin");this.registerPluginPath("integer",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/NumberPlugin");this.registerPluginPath("date",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/DatePlugin");this.registerPluginPath("boolean",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/BooleanPlugin");this.registerPluginPath("array",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/ArrayPlugin");this.registerPluginPath("object",undefined,"nz/co/siliconst/ui5/metaui/plugins/controls/ObjectPlugin");this.registerPluginPath("string","time","nz/co/siliconst/ui5/metaui/plugins/controls/TimePlugin");this.registerPluginPath("string","datetime","nz/co/siliconst/ui5/metaui/plugins/controls/DateTimePlugin");this.registerPluginPath("boolean","switch","nz/co/siliconst/ui5/metaui/plugins/controls/SwitchPlugin");this.registerPluginPath("number","step","nz/co/siliconst/ui5/metaui/plugins/controls/StepInputPlugin");this.registerPluginPath("string","select","nz/co/siliconst/ui5/metaui/plugins/controls/DropdownPlugin");this.registerPluginPath("string","textArea","nz/co/siliconst/ui5/metaui/plugins/controls/TextAreaPlugin");this.registerPluginPath("string","codeEditor","nz/co/siliconst/ui5/metaui/plugins/controls/CodeEditorPlugin");this.registerPluginPath("string","fileUploader","nz/co/siliconst/ui5/metaui/plugins/controls/FileUploaderPlugin");this.registerPluginPath("array","multiSelect","nz/co/siliconst/ui5/metaui/plugins/controls/MultiSelectPlugin");this.registerPluginPath("array","multiInput","nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin");this.registerPluginPath("number","slider","nz/co/siliconst/ui5/metaui/plugins/controls/SliderPlugin");this.registerPluginPath("number","rating","nz/co/siliconst/ui5/metaui/plugins/controls/RatingIndicatorPlugin");this.registerPluginPath("string","messageStrip","nz/co/siliconst/ui5/metaui/plugins/controls/MessageStripPlugin");this.registerPluginPath("string","camera","nz/co/siliconst/ui5/metaui/plugins/controls/CameraPlugin");this.registerPluginPath("string","signature","nz/co/siliconst/ui5/metaui/plugins/controls/SignaturePlugin");this.registerPluginPath("object","location","nz/co/siliconst/ui5/metaui/plugins/controls/GeolocationPlugin");this.registerPluginPath("string","scanner","nz/co/siliconst/ui5/metaui/plugins/controls/BarcodeScannerPlugin");this.registerPluginPath("string","voiceInput","nz/co/siliconst/ui5/metaui/plugins/controls/VoiceInputPlugin");this.registerPluginPath("string","richText","nz/co/siliconst/ui5/metaui/plugins/controls/RichTextPlugin");this.registerPluginPath("string","urlButton","nz/co/siliconst/ui5/metaui/plugins/actions/UrlNavigationActionPlugin");this.registerPluginPath("string","submitButton","nz/co/siliconst/ui5/metaui/plugins/actions/SubmitFormActionPlugin");this.registerPluginPath("string","odataSelect","nz/co/siliconst/ui5/metaui/plugins/datasources/ODataListBindingPlugin");this.registerPluginPath("string","remoteDropdown","nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteDropdownPlugin");this.registerPluginPath("string","liveSearch","nz/co/siliconst/ui5/metaui/plugins/datasources/LiveSearchPlugin");this.registerPluginPath("string","remoteValueHelp","nz/co/siliconst/ui5/metaui/plugins/datasources/RemoteValueHelpPlugin");this.registerLayoutPath("form","nz/co/siliconst/ui5/metaui/layouts/FormLayout");this.registerLayoutPath("table","nz/co/siliconst/ui5/metaui/layouts/TableLayout");this.registerLayoutPath("wizard","nz/co/siliconst/ui5/metaui/layouts/WizardLayout");this.registerLayoutPath("compact","nz/co/siliconst/ui5/metaui/layouts/CompactLayout")}static getInstance(){if(!e.instance){e.instance=new e}return e.instance}registerPluginPath(i,t,e){const n=t?`${i}:${t}`:i;this.fieldIndex[n]=e}registerActionPath(i,t){this.actionIndex[i]=t}registerLayoutPath(i,t){this.layoutIndex[i]=t}getFieldPath(i,t){let e;if(t){e=this.fieldIndex[`${i}:${t}`]}if(!e){e=this.fieldIndex[i]}if(!e){throw new Error(`No plugin path mapped for FieldType: ${i} (widget: ${t})`)}return e}getLayoutPath(i){const t=this.layoutIndex[i];if(!t){throw new Error(`No layout path mapped for strategy: ${i}`)}return t}getPathsToLoad(i){const e=new Set;const n=i.layoutStrategy||(i.type==="array"?"table":"form");e.add(this.getLayoutPath(n));const s=i=>{for(const n in i){const r=i[n];try{e.add(this.getFieldPath(r.type||"string",r.ui?.widget))}catch(i){const e=`[MetaUI LazyLoad] Could not find mapped plugin for field ${n}: ${i.message}`;t.error(e);throw new Error(e)}if(r.properties)s(r.properties);if(r.items&&r.items.properties)s(r.items.properties);if(r.items&&r.items.type){try{e.add(this.getFieldPath(r.items.type,r.items.ui?.widget))}catch(i){const e=`[MetaUI LazyLoad] Could not find mapped plugin for array item type ${r.items.type}: ${i.message}`;t.error(e);throw new Error(e)}}}};if(i.properties){s(i.properties)}else if(i.items&&i.items.properties){s(i.items.properties)}return e}async preloadDependencies(i){const e=this.getPathsToLoad(i);const n=Array.from(e).map(i=>{if(!this.activePromises[i]){this.activePromises[i]=new Promise((e,n)=>{sap.ui.require([i],i=>e(i),e=>{t.error(`Failed to lazy load module: ${i}`);delete this.activePromises[i];n(e)})})}return this.activePromises[i]});await Promise.all(n)}extractConstructor(i){if(!i)return null;if(typeof i==="function")return i;if(i.default&&typeof i.default==="function")return i.default;const t=Object.keys(i);for(const e of t){if(typeof i[e]==="function"){return i[e]}}return null}getPlugin(i,t){const e=this.getFieldPath(i,t);const n=sap.ui.require(e);const s=this.extractConstructor(n);if(!s){throw new Error(`[MetaUI Plugin Instantiation] Plugin ${e} was not preloaded or has no constructor!`)}return new s}getLayout(i){const t=this.getLayoutPath(i);const e=sap.ui.require(t);const n=this.extractConstructor(e);if(!n){throw new Error(`[MetaUI Layout Instantiation] Layout ${t} was not preloaded or has no constructor!`)}return new n}}var n={__esModule:true};n.PluginRegistry=e;return n});
2
2
  //# sourceMappingURL=PluginRegistry.js.map