@sapui5/sap.suite.ui.generic.template 1.152.1 → 1.154.0

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 (265) hide show
  1. package/package.json +1 -1
  2. package/src/sap/suite/ui/generic/template/.library +1 -1
  3. package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/ControllerImplementation.js +31 -2
  4. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n.properties +7 -2
  5. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ar.properties +3 -0
  6. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_bg.properties +3 -0
  7. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ca.properties +3 -0
  8. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_cnr.properties +3 -0
  9. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_cs.properties +3 -0
  10. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_cy.properties +3 -0
  11. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_da.properties +3 -0
  12. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_de.properties +3 -0
  13. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_el.properties +3 -0
  14. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en.properties +3 -0
  15. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en_GB.properties +3 -0
  16. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en_US_sappsd.properties +3 -0
  17. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en_US_saprigi.properties +3 -0
  18. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_es.properties +3 -0
  19. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_es_MX.properties +3 -0
  20. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_et.properties +3 -0
  21. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_fi.properties +3 -0
  22. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_fr.properties +3 -0
  23. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_fr_CA.properties +3 -0
  24. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_hi.properties +3 -0
  25. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_hr.properties +3 -0
  26. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_hu.properties +3 -0
  27. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_id.properties +3 -0
  28. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_it.properties +3 -0
  29. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_iw.properties +3 -0
  30. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ja.properties +3 -0
  31. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_kk.properties +3 -0
  32. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ko.properties +3 -0
  33. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_lt.properties +3 -0
  34. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_lv.properties +3 -0
  35. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_mk.properties +3 -0
  36. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ms.properties +3 -0
  37. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_nl.properties +3 -0
  38. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_no.properties +3 -0
  39. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_pl.properties +3 -0
  40. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_pt.properties +3 -0
  41. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_pt_PT.properties +3 -0
  42. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ro.properties +3 -0
  43. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ru.properties +3 -0
  44. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sh.properties +3 -0
  45. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sk.properties +3 -0
  46. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sl.properties +3 -0
  47. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sr.properties +3 -0
  48. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sv.properties +3 -0
  49. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_th.properties +3 -0
  50. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_tr.properties +3 -0
  51. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_uk.properties +3 -0
  52. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_vi.properties +3 -0
  53. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_zh_CN.properties +3 -0
  54. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_zh_TW.properties +3 -0
  55. package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +8 -3
  56. package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/FilterContainer.fragment.xml +2 -1
  57. package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/HeaderCommands.fragment.xml +1 -1
  58. package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/SmartFilterBar.fragment.xml +1 -1
  59. package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
  60. package/src/sap/suite/ui/generic/template/ListReport/Component.js +25 -1
  61. package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +121 -25
  62. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n.properties +6 -3
  63. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ar.properties +2 -0
  64. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_bg.properties +2 -0
  65. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ca.properties +2 -0
  66. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cnr.properties +2 -0
  67. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cs.properties +2 -0
  68. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cy.properties +2 -0
  69. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_da.properties +2 -0
  70. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_de.properties +2 -0
  71. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_el.properties +2 -0
  72. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en.properties +3 -1
  73. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_GB.properties +2 -0
  74. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_US_sappsd.properties +2 -0
  75. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_US_saprigi.properties +2 -0
  76. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_es.properties +3 -1
  77. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_es_MX.properties +2 -0
  78. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_et.properties +2 -0
  79. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fi.properties +2 -0
  80. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr.properties +2 -0
  81. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr_CA.properties +2 -0
  82. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hi.properties +2 -0
  83. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hr.properties +2 -0
  84. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hu.properties +2 -0
  85. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_id.properties +2 -0
  86. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_it.properties +2 -0
  87. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_iw.properties +2 -0
  88. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ja.properties +4 -2
  89. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_kk.properties +2 -0
  90. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ko.properties +2 -0
  91. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_lt.properties +2 -0
  92. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_lv.properties +2 -0
  93. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_mk.properties +2 -0
  94. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ms.properties +2 -0
  95. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_nl.properties +2 -0
  96. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_no.properties +2 -0
  97. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pl.properties +2 -0
  98. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pt.properties +2 -0
  99. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pt_PT.properties +2 -0
  100. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ro.properties +2 -0
  101. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ru.properties +2 -0
  102. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sh.properties +2 -0
  103. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sk.properties +2 -0
  104. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sl.properties +2 -0
  105. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sr.properties +2 -0
  106. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sv.properties +2 -0
  107. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_th.properties +2 -0
  108. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_tr.properties +2 -0
  109. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_uk.properties +3 -1
  110. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_vi.properties +2 -0
  111. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_zh_CN.properties +4 -2
  112. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_zh_TW.properties +5 -3
  113. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +7 -2
  114. package/src/sap/suite/ui/generic/template/ListReport/view/fragments/HeaderCommands.fragment.xml +21 -15
  115. package/src/sap/suite/ui/generic/template/ListReport/view/fragments/SmartFilterBar.fragment.xml +1 -1
  116. package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +96 -14
  117. package/src/sap/suite/ui/generic/template/ObjectPage/controller/SectionTitleHandler.js +1 -1
  118. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n.properties +6 -0
  119. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ar.properties +4 -0
  120. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_bg.properties +4 -0
  121. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ca.properties +4 -0
  122. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cnr.properties +4 -0
  123. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cs.properties +4 -0
  124. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cy.properties +4 -0
  125. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_da.properties +4 -0
  126. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_de.properties +4 -0
  127. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_el.properties +4 -0
  128. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en.properties +4 -0
  129. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_GB.properties +4 -0
  130. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_US_sappsd.properties +4 -0
  131. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_US_saprigi.properties +4 -0
  132. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_es.properties +5 -1
  133. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_es_MX.properties +4 -0
  134. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_et.properties +4 -0
  135. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fi.properties +4 -0
  136. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fr.properties +4 -0
  137. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fr_CA.properties +4 -0
  138. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hi.properties +4 -0
  139. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hr.properties +4 -0
  140. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hu.properties +4 -0
  141. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_id.properties +4 -0
  142. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_it.properties +4 -0
  143. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_iw.properties +4 -0
  144. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ja.properties +4 -0
  145. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_kk.properties +30 -26
  146. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ko.properties +4 -0
  147. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_lt.properties +4 -0
  148. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_lv.properties +4 -0
  149. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_mk.properties +4 -0
  150. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ms.properties +4 -0
  151. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_nl.properties +4 -0
  152. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_no.properties +4 -0
  153. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pl.properties +4 -0
  154. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pt.properties +4 -0
  155. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pt_PT.properties +4 -0
  156. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ro.properties +4 -0
  157. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ru.properties +4 -0
  158. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sh.properties +4 -0
  159. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sk.properties +4 -0
  160. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sl.properties +4 -0
  161. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sr.properties +4 -0
  162. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sv.properties +4 -0
  163. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_th.properties +4 -0
  164. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_tr.properties +4 -0
  165. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_uk.properties +8 -4
  166. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_vi.properties +4 -0
  167. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_zh_CN.properties +4 -0
  168. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_zh_TW.properties +8 -4
  169. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +13 -5
  170. package/src/sap/suite/ui/generic/template/ObjectPage/templateSpecificPreparationHelper.js +2 -2
  171. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Actions.fragment.xml +1 -1
  172. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/PageLevelCommands.fragment.xml +2 -0
  173. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartTableUiTableCommons.fragment.xml +1 -1
  174. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  175. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  176. package/src/sap/suite/ui/generic/template/designtime/controls/DynamicPage.designtime.js +39 -3
  177. package/src/sap/suite/ui/generic/template/designtime/controls/ObjectPageLayout.designtime.js +39 -5
  178. package/src/sap/suite/ui/generic/template/designtime/controls/SmartTable.designtime.js +17 -0
  179. package/src/sap/suite/ui/generic/template/detailTemplates/detailUtils.js +3 -2
  180. package/src/sap/suite/ui/generic/template/detailTemplates/i18n/i18n_es.properties +1 -1
  181. package/src/sap/suite/ui/generic/template/fragments/EasyFilter.fragment.xml +1 -0
  182. package/src/sap/suite/ui/generic/template/fragments/SmartTableUiTableCommons.fragment.xml +1 -0
  183. package/src/sap/suite/ui/generic/template/fragments/TableColumnListItem.fragment.xml +3 -0
  184. package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +3 -0
  185. package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +8 -3
  186. package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon.js +7 -0
  187. package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartVariantManagementWrapper.js +35 -43
  188. package/src/sap/suite/ui/generic/template/genericUtilities/designtime/messagebundle.properties +0 -0
  189. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +28 -7
  190. package/src/sap/suite/ui/generic/template/lib/Application.js +13 -0
  191. package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +88 -4
  192. package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +36 -5
  193. package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +45 -2
  194. package/src/sap/suite/ui/generic/template/lib/MessageUtils.js +1 -0
  195. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillAIOrchestrator.js +142 -8
  196. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillApplyHandler.js +21 -6
  197. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillDialogController.js +234 -13
  198. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFileHandler.js +218 -0
  199. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFormRenderer.js +83 -18
  200. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillHandler.js +165 -6
  201. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillTableRenderer.js +106 -6
  202. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillDialog.fragment.xml +193 -30
  203. package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +610 -27
  204. package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +71 -2
  205. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +47 -1
  206. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +47 -1
  207. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +47 -1
  208. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +47 -1
  209. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +47 -1
  210. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +47 -1
  211. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +48 -2
  212. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +47 -1
  213. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +47 -1
  214. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +47 -1
  215. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +47 -1
  216. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_sappsd.properties +47 -1
  217. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +47 -1
  218. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saptrc.properties +7 -1
  219. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +49 -3
  220. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +47 -1
  221. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +47 -1
  222. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +47 -1
  223. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +50 -4
  224. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +47 -1
  225. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +47 -1
  226. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +47 -1
  227. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +47 -1
  228. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +47 -1
  229. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +47 -1
  230. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +47 -1
  231. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +47 -1
  232. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +47 -1
  233. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +47 -1
  234. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +47 -1
  235. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +47 -1
  236. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +47 -1
  237. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +47 -1
  238. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +47 -1
  239. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +47 -1
  240. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +47 -1
  241. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +47 -1
  242. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +47 -1
  243. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +47 -1
  244. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +47 -1
  245. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +47 -1
  246. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +47 -1
  247. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +47 -1
  248. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +47 -1
  249. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +47 -1
  250. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +49 -3
  251. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +47 -1
  252. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +47 -1
  253. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +47 -1
  254. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +47 -1
  255. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +48 -2
  256. package/src/sap/suite/ui/generic/template/lib/insights/InsightsCardHelper.js +24 -4
  257. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +27 -7
  258. package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +4 -0
  259. package/src/sap/suite/ui/generic/template/library.js +1 -1
  260. package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +3 -0
  261. package/src/sap/suite/ui/generic/template/listTemplates/fragments/TableCommands.fragment.xml +23 -19
  262. package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +271 -0
  263. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/ObjectPage.less +9 -0
  264. package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ObjectPage.less +9 -0
  265. package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_ObjectPage.less +9 -0
@@ -1,14 +1,27 @@
1
1
  sap.ui.define([
2
2
  "sap/ui/model/json/JSONModel",
3
3
  "sap/m/MessageToast",
4
+ "sap/m/MessageBox",
5
+ "sap/m/Text",
4
6
  "sap/suite/ui/generic/template/genericUtilities/FeLogger",
5
- "sap/ui/core/ResizeHandler"
6
- ], function(JSONModel, MessageToast, FeLogger, ResizeHandler) {
7
+ "sap/ui/core/ResizeHandler",
8
+ "sap/m/Table",
9
+ "sap/m/Column",
10
+ "sap/m/ColumnListItem"
11
+ ], function(JSONModel, MessageToast, MessageBox, Text, FeLogger, ResizeHandler, MTable, Column, ColumnListItem) {
7
12
  "use strict";
8
13
 
9
14
  var sClassName = "lib.ai.EasyFill.EasyFillDialogController";
10
15
  var oLogger = new FeLogger(sClassName).getLogger();
11
16
 
17
+ // Maximum number of characters accepted as AI input — applies to both the textarea
18
+ // (fragment maxLength) and imported file text. Keep in sync with EasyFillDialog.fragment.xml
19
+ // (TextArea maxLength) and EasyFillApplyHandler.
20
+ var MAX_INPUT_LENGTH = 50000;
21
+ // Maximum number of CSV data rows rendered in the preview table — guards against building
22
+ // thousands of controls synchronously. The full text is still sent to the AI.
23
+ var MAX_PREVIEW_ROWS = 200;
24
+
12
25
  /**
13
26
  * EasyFillDialogController
14
27
  *
@@ -22,6 +35,29 @@ sap.ui.define([
22
35
  * All data operations are delegated to EasyFillAIOrchestrator, EasyFillFormRenderer,
23
36
  * EasyFillTableRenderer, and EasyFillApplyHandler.
24
37
  */
38
+ // ─── Private Helpers ─────────────────────────────────────────────────────
39
+
40
+ function _addTextPreview(oPreviewContent, sText) {
41
+ var oText = new Text({ text: sText });
42
+ oText.addStyleClass("sapSmartTemplatesObjectPageEasyFillFilePreviewText");
43
+ oPreviewContent.addItem(oText);
44
+ }
45
+
46
+ function _createCSVPreviewTable(oParsed) {
47
+ var oTable = new MTable({ width: "100%", backgroundDesign: "Solid" });
48
+ oTable.addStyleClass("sapSmartTemplatesObjectPageEasyFillFilePreviewTable");
49
+ oParsed.headers.forEach(function(sHeader) {
50
+ oTable.addColumn(new Column({ width: "10rem", header: new Text({ text: sHeader }) }));
51
+ });
52
+ // Cap the number of rendered rows so a large CSV cannot freeze the dialog by creating
53
+ // one control per cell for thousands of rows.
54
+ oParsed.rows.slice(0, MAX_PREVIEW_ROWS).forEach(function(aRow) {
55
+ var aCells = aRow.map(function(sCell) { return new Text({ text: sCell }); });
56
+ oTable.addItem(new ColumnListItem({ cells: aCells }));
57
+ });
58
+ return oTable;
59
+ }
60
+
25
61
  return {
26
62
 
27
63
  /**
@@ -66,9 +102,22 @@ sap.ui.define([
66
102
  isFullScreen: true,
67
103
  hasTableUpdates: false,
68
104
  attemptedMultipleNewRows: false,
69
- isSplitterPageMode: false
105
+ isSplitterPageMode: false,
106
+ // File import state
107
+ uploadedFileName: "",
108
+ uploadedFileSize: "",
109
+ uploadedFileType: "none",
110
+ filePreviewVisible: false,
111
+ uploadProgress: 0,
112
+ selectedFilePreviewMode: "Text",
113
+ isDragging: false,
114
+ hasEnteredText: false,
115
+ remainingCharactersText: ""
70
116
  };
71
117
 
118
+ var oRbInit = oController.getView().getModel("i18n").getResourceBundle();
119
+ oData.remainingCharactersText = oRbInit.getText("EASYFILL_REMAINING_CHARACTERS", [MAX_INPUT_LENGTH]);
120
+
72
121
  oController.getView().setModel(new JSONModel(oData), "easyFillDialogModel");
73
122
  oLogger.debug("initDialogModel: easyFillDialogModel created and registered on view");
74
123
  },
@@ -118,6 +167,10 @@ sap.ui.define([
118
167
 
119
168
  if (!oDialog) { return; } // guard: load rejected, nothing to open
120
169
 
170
+ if (oHandlers._onAfterOpen) {
171
+ oDialog.attachEventOnce("afterOpen", oHandlers._onAfterOpen);
172
+ }
173
+
121
174
  oDialog.open();
122
175
 
123
176
  if (!oDialog._easyFillResizeHandlerId) {
@@ -212,25 +265,193 @@ sap.ui.define([
212
265
 
213
266
  /**
214
267
  * Handles the live change event on the input text area.
215
- * Enforces the 2000 character limit by truncating excess input.
216
268
  * Enables/disables the "Easy Fill" submit button based on whether there is any input.
217
269
  *
218
270
  * @param {sap.ui.base.Event} oEvent
219
271
  * @param {object} oController - MVC controller
220
272
  */
221
273
  onLiveChange: function(oEvent, oController) {
222
- var oTextArea = oEvent.getSource();
223
- var sValue = oTextArea.getValue();
224
- var iMaxLength = 2000;
225
-
226
- // Enforce character limit by truncating excess input
227
- if (sValue && sValue.length > iMaxLength) {
228
- sValue = sValue.substring(0, iMaxLength);
229
- oTextArea.setValue(sValue);
274
+ var sValue = oEvent.getSource().getValue();
275
+
276
+ var oDialogModel = oController.getView().getModel("easyFillDialogModel");
277
+ // Button is enabled when there is text in the textarea OR a file has been imported
278
+ var bHasFileImported = !!oDialogModel.getProperty("/uploadedFileName") &&
279
+ oDialogModel.getProperty("/filePreviewVisible");
280
+ oDialogModel.setProperty("/isEasyFillButtonEnabled", !!sValue || bHasFileImported);
281
+ oDialogModel.setProperty("/hasEnteredText", !!sValue);
282
+
283
+ var oRb = oController.getView().getModel("i18n").getResourceBundle();
284
+ oDialogModel.setProperty("/remainingCharactersText", oRb.getText("EASYFILL_REMAINING_CHARACTERS", [MAX_INPUT_LENGTH - sValue.length]));
285
+ },
286
+
287
+ // ─── File Import Handlers ──────────────────────────────────────────────────
288
+
289
+ /**
290
+ * Handles the FileUploader change event when a file is selected.
291
+ * Delegates to the shared acceptFile path.
292
+ *
293
+ * @param {sap.ui.base.Event} oEvent - FileUploader change event
294
+ * @param {object} oController - MVC controller
295
+ * @param {object} oRb - i18n resource bundle
296
+ * @param {object} oFileHandler - EasyFillFileHandler module
297
+ * @param {function} fnOnTextImported - callback(sText) called after successful file read
298
+ */
299
+ onFileUploaderChange: function(oEvent, oController, oRb, oFileHandler, fnOnTextImported) {
300
+ var oFileUploader = oEvent.getSource();
301
+ var aFiles = oEvent.getParameter("files");
302
+ var oFile = aFiles && aFiles[0];
303
+ if (oFile) {
304
+ this.acceptFile(oController, oRb, oFileHandler, oFile, fnOnTextImported);
305
+ }
306
+ oFileUploader.clear();
307
+ },
308
+
309
+ /**
310
+ * Shows a file-upload error in a MessageBox popup dialog (mirrors V4
311
+ * EasyFillDialog.showFileUploadError). Used for every file-import failure —
312
+ * unsupported type, multiple files, empty/unreadable file, and over-limit text.
313
+ *
314
+ * @param {object} oRb - i18n resource bundle
315
+ * @param {string} sMessage - localized error message to display
316
+ */
317
+ showFileUploadError: function(oRb, sMessage) {
318
+ MessageBox.error(sMessage, {
319
+ title: oRb.getText("EASY_FILL_FILE_UPLOAD_ERROR_TITLE")
320
+ });
321
+ },
322
+
323
+ /**
324
+ * Shows the "unsupported file type" error popup. Wired to the FileUploader
325
+ * typeMissmatch event, which fires when the chosen file's extension is not txt/csv
326
+ * (the FileUploader rejects it before change fires, so the user otherwise gets no feedback).
327
+ *
328
+ * @param {object} oRb - i18n resource bundle
329
+ */
330
+ showFileTypeError: function(oRb) {
331
+ this.showFileUploadError(oRb, oRb.getText("EASY_FILL_UPLOAD_UNSUPPORTED_FILE_ERROR"));
332
+ },
333
+
334
+ /**
335
+ * Shared file-accept path used by both the FileUploader change handler and the
336
+ * drag-and-drop handler. Sets the file metadata on the model, reads the file via
337
+ * EasyFillFileHandler, enforces the input-length cap, and surfaces all failures as a
338
+ * MessageBox error popup (localized) rather than a transient toast.
339
+ *
340
+ * @param {object} oController - MVC controller
341
+ * @param {object} oRb - i18n resource bundle
342
+ * @param {object} oFileHandler - EasyFillFileHandler module
343
+ * @param {File} oFile - the selected/dropped file
344
+ * @param {function} fnOnTextImported - callback(sText) invoked once the (within-limit) text is read
345
+ */
346
+ acceptFile: function(oController, oRb, oFileHandler, oFile, fnOnTextImported) {
347
+ var oDialogModel = oController.getView().getModel("easyFillDialogModel");
348
+ var oSelf = this;
349
+
350
+ function clearFileMeta() {
351
+ oDialogModel.setProperty("/uploadedFileName", "");
352
+ oDialogModel.setProperty("/uploadedFileSize", "");
353
+ oDialogModel.setProperty("/uploadedFileType", "none");
354
+ oDialogModel.setProperty("/uploadProgress", 0);
355
+ oDialogModel.setProperty("/filePreviewVisible", false);
356
+ oDialogModel.setProperty("/isEasyFillButtonEnabled", false);
230
357
  }
231
358
 
359
+ oDialogModel.setProperty("/uploadedFileName", oFile.name);
360
+ oDialogModel.setProperty("/uploadedFileSize", oFileHandler.formatFileSize(oFile.size));
361
+ oDialogModel.setProperty("/uploadedFileType", oFileHandler.getFileType(oFile.name));
362
+ oDialogModel.setProperty("/uploadProgress", 0);
363
+
364
+ oFileHandler.importFile(oFile, {
365
+ onTextImported: function(sText) {
366
+ // Enforce the same character cap as the textarea on imported file text.
367
+ if (sText.length > MAX_INPUT_LENGTH) {
368
+ oLogger.warning("acceptFile: imported text exceeds MAX_INPUT_LENGTH (" + sText.length + ")");
369
+ clearFileMeta();
370
+ oSelf.showFileUploadError(oRb, oRb.getText("EASY_FILL_UPLOAD_FILE_TOO_LARGE_ERROR", [MAX_INPUT_LENGTH]));
371
+ return;
372
+ }
373
+ var sFileType = oDialogModel.getProperty("/uploadedFileType");
374
+ oDialogModel.setProperty("/selectedFilePreviewMode", sFileType === "csv" ? "Table" : "Text");
375
+ fnOnTextImported(sText);
376
+ oDialogModel.setProperty("/filePreviewVisible", true);
377
+ oDialogModel.setProperty("/isEasyFillButtonEnabled", true);
378
+ MessageToast.show(oRb.getText("EASY_FILL_FILE_IMPORTED_SUCCESS", [oFile.name]));
379
+ },
380
+ onValidationError: function() {
381
+ clearFileMeta();
382
+ oSelf.showFileUploadError(oRb, oRb.getText("EASY_FILL_UPLOAD_UNSUPPORTED_FILE_ERROR"));
383
+ },
384
+ onReadError: function(sReason) {
385
+ clearFileMeta();
386
+ var sErrorKey = sReason === "empty"
387
+ ? "EASY_FILL_UPLOAD_EMPTY_FILE_ERROR"
388
+ : "EASY_FILL_UPLOAD_READ_ERROR";
389
+ oSelf.showFileUploadError(oRb, oRb.getText(sErrorKey));
390
+ },
391
+ onProgress: function(iPercent) {
392
+ oDialogModel.setProperty("/uploadProgress", iPercent);
393
+ }
394
+ });
395
+ },
396
+
397
+ /**
398
+ * Renders file preview content into the EasyFillFilePreviewContent VBox.
399
+ * CSV files in table-preview mode are rendered as a sap.m.Table; all other content
400
+ * is rendered as a sap.m.Text.
401
+ *
402
+ * @param {object} oController - MVC controller
403
+ * @param {object} oFileHandler - EasyFillFileHandler module (used for parseCSV in table-preview mode)
404
+ * @param {string|null} sImportedFileText - currently imported file text (or null)
405
+ */
406
+ renderFilePreview: function(oController, oFileHandler, sImportedFileText) {
407
+ var oPreviewContent = oController.byId("EasyFillFilePreviewContent");
408
+ if (!oPreviewContent) { return; }
409
+ oPreviewContent.destroyItems();
410
+
411
+ var sText = sImportedFileText || "";
412
+ if (!sText) { return; }
413
+
414
+ var oDialogModel = oController.getView().getModel("easyFillDialogModel");
415
+ var sMode = oDialogModel ? oDialogModel.getProperty("/selectedFilePreviewMode") : "Text";
416
+ var sFileType = oDialogModel ? oDialogModel.getProperty("/uploadedFileType") : "none";
417
+
418
+ if (sMode === "Table" && sFileType === "csv") {
419
+ var oParsed = oFileHandler.parseCSV(sText);
420
+ if (oParsed && oParsed.headers.length > 0) {
421
+ oPreviewContent.addItem(_createCSVPreviewTable(oParsed));
422
+ if (oParsed.rows.length > MAX_PREVIEW_ROWS) {
423
+ var oRb = oController.getView().getModel("i18n").getResourceBundle();
424
+ var oNote = new Text({ text: oRb.getText("EASY_FILL_FILE_PREVIEW_TRUNCATED", [MAX_PREVIEW_ROWS]) });
425
+ oNote.addStyleClass("sapSmartTemplatesObjectPageEasyFillFilePreviewText");
426
+ oPreviewContent.addItem(oNote);
427
+ }
428
+ } else {
429
+ _addTextPreview(oPreviewContent, sText);
430
+ }
431
+ } else {
432
+ _addTextPreview(oPreviewContent, sText);
433
+ }
434
+ },
435
+
436
+ /**
437
+ * Resets all file-related state in the dialog model and clears the preview area.
438
+ * Called by EasyFillHandler._resetEasyFill when the dialog is cleared or cancelled.
439
+ *
440
+ * @param {object} oController - MVC controller
441
+ */
442
+ resetFileState: function(oController) {
232
443
  var oDialogModel = oController.getView().getModel("easyFillDialogModel");
233
- oDialogModel.setProperty("/isEasyFillButtonEnabled", !!sValue);
444
+ if (!oDialogModel) { return; }
445
+ oDialogModel.setProperty("/uploadedFileName", "");
446
+ oDialogModel.setProperty("/uploadedFileSize", "");
447
+ oDialogModel.setProperty("/uploadedFileType", "none");
448
+ oDialogModel.setProperty("/filePreviewVisible", false);
449
+ oDialogModel.setProperty("/uploadProgress", 0);
450
+ oDialogModel.setProperty("/selectedFilePreviewMode", "Text");
451
+ oDialogModel.setProperty("/isDragging", false);
452
+
453
+ var oPreviewContent = oController.byId("EasyFillFilePreviewContent");
454
+ if (oPreviewContent) { oPreviewContent.destroyItems(); }
234
455
  },
235
456
 
236
457
  /**
@@ -0,0 +1,218 @@
1
+ sap.ui.define([
2
+ "sap/base/Log",
3
+ "sap/m/MessageBox"
4
+ ], function(Log, MessageBox) {
5
+ "use strict";
6
+
7
+ var sClassName = "lib.ai.EasyFill.EasyFillFileHandler";
8
+
9
+ // Browser-reported MIME types vary wildly across OS/browser combinations for the very same
10
+ // file (e.g. a .csv is "application/vnd.ms-excel" on Windows+Excel, "application/csv" elsewhere,
11
+ // or "" when nothing is registered). The file extension is the authoritative gate (findHandler),
12
+ // so these are the types we additionally treat as "text-like" when a type IS reported.
13
+ var VENDOR_TEXT_MIME_TYPES = {
14
+ "application/csv": true,
15
+ "application/vnd.ms-excel": true
16
+ };
17
+ var BINARY_MIME_TYPE = "application/octet-stream";
18
+
19
+ var FILE_HANDLERS = [
20
+ {
21
+ extensions: [".txt", ".csv"],
22
+ handle: _handleTextFileImport
23
+ }
24
+ ];
25
+
26
+ // ─── File Validation ──────────────────────────────────────────────────────
27
+
28
+ /**
29
+ * Decides whether a file whose extension already matched a handler should be accepted
30
+ * based on its (unreliable) browser-reported MIME type.
31
+ *
32
+ * The extension is the authoritative gate, so an absent/binary/vendor type is accepted —
33
+ * only a type that is explicitly a different, non-text category (e.g. "image/png") is rejected.
34
+ *
35
+ * @param {File} oFile
36
+ * @returns {boolean}
37
+ */
38
+ function _isMimeTypeAcceptable(oFile) {
39
+ var sMimeType = oFile.type;
40
+ // No type reported, or generic binary — common for .txt/.csv; trust the extension.
41
+ if (!sMimeType || sMimeType === BINARY_MIME_TYPE) {
42
+ Log.warning(sClassName + ": file " + oFile.name + " has no/binary MIME type; accepting on extension");
43
+ return true;
44
+ }
45
+ if (sMimeType.indexOf("text/") === 0 || VENDOR_TEXT_MIME_TYPES[sMimeType]) {
46
+ return true;
47
+ }
48
+ Log.warning(sClassName + ": file " + oFile.name + " has non-text MIME type: " + sMimeType);
49
+ return false;
50
+ }
51
+
52
+ // ─── File Type Handlers ───────────────────────────────────────────────────
53
+
54
+ /**
55
+ * Reads a TXT or CSV file as text and reports progress/result via callbacks.
56
+ * No user-facing messages are shown here — the caller owns localized feedback.
57
+ * @param {File} oFile
58
+ * @param {{ onTextImported: function, onValidationError: function, onReadError: function(string=), onProgress: function }} oCallbacks
59
+ * onReadError receives "empty" when the file is empty, "read" on a read failure.
60
+ */
61
+ function _handleTextFileImport(oFile, oCallbacks) {
62
+ if (!_isMimeTypeAcceptable(oFile)) {
63
+ Log.error(sClassName + ": file validation failed for " + oFile.name);
64
+ if (oCallbacks.onValidationError) { oCallbacks.onValidationError("invalidType"); }
65
+ return;
66
+ }
67
+
68
+ var oReader = new FileReader();
69
+ oReader.onprogress = function(oEvent) {
70
+ if (oEvent.lengthComputable && oCallbacks.onProgress) {
71
+ oCallbacks.onProgress(Math.round((oEvent.loaded / oEvent.total) * 100));
72
+ }
73
+ };
74
+ oReader.onload = function(oEvent) {
75
+ if (oCallbacks.onProgress) { oCallbacks.onProgress(100); }
76
+ var sText = oEvent.target && oEvent.target.result;
77
+ if (!sText) {
78
+ Log.error(sClassName + ": text file is empty");
79
+ if (oCallbacks.onReadError) { oCallbacks.onReadError("empty"); }
80
+ return;
81
+ }
82
+ Log.info(sClassName + ": text file parsed successfully");
83
+ oCallbacks.onTextImported(sText);
84
+ };
85
+ oReader.onerror = function() {
86
+ Log.error(sClassName + ": failed to read text file");
87
+ if (oCallbacks.onReadError) { oCallbacks.onReadError("read"); }
88
+ };
89
+ oReader.readAsText(oFile);
90
+ }
91
+
92
+ // ─── Public API ───────────────────────────────────────────────────────────
93
+
94
+ return {
95
+
96
+ /**
97
+ * Finds the handler entry for the given file name based on its extension.
98
+ * @param {string} sFileName
99
+ * @returns {{ extensions: string[], handle: function } | undefined}
100
+ */
101
+ findHandler: function(sFileName) {
102
+ var sLower = sFileName.toLowerCase();
103
+ return FILE_HANDLERS.find(function(oHandler) {
104
+ return oHandler.extensions.some(function(sExt) { return sLower.endsWith(sExt); });
105
+ });
106
+ },
107
+
108
+ /**
109
+ * Detects the file type ("csv" or "txt") from the file name.
110
+ * @param {string} sFileName
111
+ * @returns {"csv" | "txt" | "none"}
112
+ */
113
+ getFileType: function(sFileName) {
114
+ if (!sFileName) { return "none"; }
115
+ var sLower = sFileName.toLowerCase();
116
+ if (sLower.endsWith(".csv")) { return "csv"; }
117
+ if (sLower.endsWith(".txt")) { return "txt"; }
118
+ return "none";
119
+ },
120
+
121
+ /**
122
+ * Shows a confirmation dialog before removing a file.
123
+ * Calls fnOnConfirm only when the user clicks OK.
124
+ * @param {string} sConfirmText - i18n message to display
125
+ * @param {function} fnOnConfirm - callback invoked on confirmation
126
+ */
127
+ confirmFileRemoval: function(sConfirmText, fnOnConfirm) {
128
+ MessageBox.confirm(sConfirmText, {
129
+ onClose: function(sAction) {
130
+ if (sAction === MessageBox.Action.OK) {
131
+ fnOnConfirm();
132
+ }
133
+ }
134
+ });
135
+ },
136
+
137
+ /**
138
+ * Parses a CSV/TSV text string into { headers: string[], rows: string[][] }.
139
+ * Auto-detects comma vs. semicolon vs. tab as separator and honours double-quoted
140
+ * fields (separators inside quotes are literal; "" is an escaped quote).
141
+ * @param {string} sText
142
+ * @returns {{ headers: string[], rows: string[][] }}
143
+ */
144
+ parseCSV: function(sText) {
145
+ if (!sText) { return { headers: [], rows: [] }; }
146
+ var aLines = sText.split(/\r?\n/).filter(function(sLine) { return sLine.trim() !== ""; });
147
+ if (!aLines.length) { return { headers: [], rows: [] }; }
148
+
149
+ // Auto-detect separator: tab > semicolon > comma
150
+ var sSep = ",";
151
+ var sFirst = aLines[0];
152
+ if (sFirst.indexOf("\t") !== -1) {
153
+ sSep = "\t";
154
+ } else if (sFirst.indexOf(";") !== -1) {
155
+ sSep = ";";
156
+ }
157
+
158
+ // Quote-aware single-line splitter: a separator inside double quotes is part of the
159
+ // field, and a doubled quote ("") inside a quoted field is a literal quote.
160
+ function splitLine(sLine) {
161
+ var aFields = [];
162
+ var sField = "";
163
+ var bInQuotes = false;
164
+ for (var i = 0; i < sLine.length; i++) {
165
+ var c = sLine.charAt(i);
166
+ if (c === '"') {
167
+ if (bInQuotes && sLine.charAt(i + 1) === '"') {
168
+ sField += '"';
169
+ i++; // skip the escaped quote
170
+ } else {
171
+ bInQuotes = !bInQuotes;
172
+ }
173
+ } else if (c === sSep && !bInQuotes) {
174
+ aFields.push(sField.trim());
175
+ sField = "";
176
+ } else {
177
+ sField += c;
178
+ }
179
+ }
180
+ aFields.push(sField.trim());
181
+ return aFields;
182
+ }
183
+
184
+ var aHeaders = splitLine(aLines[0]);
185
+ var aRows = aLines.slice(1).map(splitLine);
186
+ return { headers: aHeaders, rows: aRows };
187
+ },
188
+
189
+ /**
190
+ * Formats a byte size into a human-readable string (e.g. "1.2 KB").
191
+ * @param {number} iBytes
192
+ * @returns {string}
193
+ */
194
+ formatFileSize: function(iBytes) {
195
+ if (!iBytes || iBytes < 0) { return "0 B"; }
196
+ if (iBytes < 1024) { return iBytes + " B"; }
197
+ if (iBytes < 1024 * 1024) { return (iBytes / 1024).toFixed(1) + " KB"; }
198
+ return (iBytes / (1024 * 1024)).toFixed(1) + " MB";
199
+ },
200
+
201
+ /**
202
+ * Entry point: validates the file and runs the appropriate handler.
203
+ * Reports failures via oCallbacks.onValidationError (no user-facing message is shown here —
204
+ * the caller owns localized feedback).
205
+ * @param {File} oFile
206
+ * @param {{ onTextImported: function, onValidationError: function, onReadError: function, onProgress: function }} oCallbacks
207
+ */
208
+ importFile: function(oFile, oCallbacks) {
209
+ var oHandler = this.findHandler(oFile.name);
210
+ if (!oHandler) {
211
+ Log.error(sClassName + ": unsupported file type: " + oFile.name);
212
+ if (oCallbacks.onValidationError) { oCallbacks.onValidationError("unsupported"); }
213
+ return;
214
+ }
215
+ oHandler.handle(oFile, oCallbacks);
216
+ }
217
+ };
218
+ });
@@ -2,9 +2,11 @@ sap.ui.define([
2
2
  "sap/ui/comp/smartform/GroupElement",
3
3
  "sap/ui/comp/smartfield/SmartField",
4
4
  "sap/m/Text",
5
+ "sap/m/Link",
6
+ "sap/m/Button",
5
7
  "sap/ui/layout/form/ColumnElementData",
6
8
  "sap/suite/ui/generic/template/genericUtilities/FeLogger"
7
- ], function(GroupElement, SmartField, Text, ColumnElementData, FeLogger) {
9
+ ], function(GroupElement, SmartField, Text, Link, Button, ColumnElementData, FeLogger) {
8
10
  "use strict";
9
11
 
10
12
  var sClassName = "lib.ai.EasyFill.EasyFillFormRenderer";
@@ -100,7 +102,10 @@ sap.ui.define([
100
102
  if (!Array.isArray(aFields) || aFields.length === 0) { return; }
101
103
 
102
104
  var oObjectPageLayout = oController.byId("EasyFillObjectPageLayout");
103
- var sPreviouslyLabel = oController.getView().getModel("i18n").getResourceBundle().getText("EASY_FILL_PREVIOUSLY_LABEL");
105
+ var oRb = oController.getView().getModel("i18n").getResourceBundle();
106
+ var sOriginalValueLabel = oRb.getText("EASY_FILL_ORIGINAL_VALUE_LABEL");
107
+ var sProposedValueLabel = oRb.getText("EASY_FILL_PROPOSED_VALUE_LABEL");
108
+ var sRevertTooltip = oRb.getText("EASY_FILL_REVERT_FIELD_TOOLTIP");
104
109
  var that = this;
105
110
 
106
111
  function tryInject() {
@@ -147,23 +152,21 @@ sap.ui.define([
147
152
  });
148
153
  }
149
154
 
155
+ // Hoist vAIValue so it can be reused when seeding the transient context below
156
+ var vAIValue = oLLMData[sKey];
157
+
150
158
  if (oTransientContextForEasyFill) {
151
159
  oSmartField.setBindingContext(oTransientContextForEasyFill);
152
160
  if (oTransientContextForEasyFill.getProperty(sKey) === undefined) {
153
- oTransientContextForEasyFill.setProperty(sKey, oLLMData[sKey]);
161
+ oTransientContextForEasyFill.setProperty(sKey, vAIValue);
154
162
  }
155
163
  } else {
156
164
  oSmartField.setBindingContext(oObjectPageContext);
157
165
  }
158
166
 
159
- // Read the current (pre-AI) value as a plain string and render it as
160
- // compact secondary text directly below the SmartField.
161
- // Mirroring V4: no second SmartField — just a plain sap.m.Text showing
162
- // "Previously: <value>", avoiding all SmartField layout overhead.
167
+ // Read the current (pre-AI) value as a plain string for display.
163
168
  var vCurrentValue = (oObjectPageContext && typeof oObjectPageContext.getProperty === "function")
164
169
  ? oObjectPageContext.getProperty(sKey) : null;
165
- // Use typeof check to guard against objects/arrays; Date.toLocaleDateString()
166
- // gives a readable form for date values rather than "[object Object]".
167
170
  var sCurrentValue;
168
171
  if (vCurrentValue === null || vCurrentValue === undefined || vCurrentValue === "") {
169
172
  sCurrentValue = "-";
@@ -175,17 +178,79 @@ sap.ui.define([
175
178
  sCurrentValue = String(vCurrentValue);
176
179
  }
177
180
 
178
- var oPreviousValueText = new Text({
179
- text: sPreviouslyLabel + " " + sCurrentValue,
180
- wrapping: false
181
- }).addStyleClass("sapEasyFillPreviouslyLabel");
182
-
183
- // Two elements stacked vertically in one GroupElement:
184
- // row 1 — primary SmartField (AI value, editable or read-only)
185
- // row 2 — "Previously: <value>" text directly below, no gap
186
181
  var oGroupElement = new GroupElement({ useHorizontalLayout: false });
187
182
  oGroupElement.addElement(oSmartField);
188
- oGroupElement.addElement(oPreviousValueText);
183
+
184
+ // "Original Value:" text shown for all fields (editable and non-editable)
185
+ var oOriginalValueText = new Text({
186
+ text: sOriginalValueLabel + " " + sCurrentValue,
187
+ wrapping: false,
188
+ tooltip: sOriginalValueLabel + " " + sCurrentValue
189
+ }).addStyleClass("sapEasyFillPreviouslyLabel");
190
+ oGroupElement.addElement(oOriginalValueText);
191
+
192
+ // Toggle controls (revert button + proposed value link) only for editable fields
193
+ if (bIsEditable) {
194
+ var bReverted = false;
195
+
196
+ var oRevertButton = new Button({
197
+ icon: "sap-icon://undo",
198
+ type: "Transparent",
199
+ tooltip: sRevertTooltip
200
+ }).addStyleClass("sapEasyFillRevertButton");
201
+
202
+ // State 2 row: "Proposed Value: <aiValue>" clickable link — hidden until user reverts
203
+ var sAIDisplayValue;
204
+ if (vAIValue === null || vAIValue === undefined || vAIValue === "") {
205
+ sAIDisplayValue = "-";
206
+ } else if (vAIValue instanceof Date) {
207
+ sAIDisplayValue = vAIValue.toLocaleDateString();
208
+ } else if (typeof vAIValue === "object") {
209
+ sAIDisplayValue = "-";
210
+ } else {
211
+ sAIDisplayValue = String(vAIValue);
212
+ }
213
+
214
+ var oProposedValueLink = new Link({
215
+ text: sProposedValueLabel + " " + sAIDisplayValue,
216
+ wrapping: false,
217
+ visible: false,
218
+ icon: "sap-icon://ai",
219
+ width: "100%",
220
+ tooltip: sProposedValueLabel + " " + sAIDisplayValue,
221
+ layoutData: new ColumnElementData({ cellsSmall: 12, cellsLarge: 12 })
222
+ }).addStyleClass("sapEasyFillProposedValueLink");
223
+
224
+ // Revert button: State 1 → State 2
225
+ oRevertButton.attachPress(function() {
226
+ if (bReverted) { return; }
227
+ bReverted = true;
228
+ if (oTransientContextForEasyFill) {
229
+ oTransientContextForEasyFill.setProperty(sKey, vCurrentValue);
230
+ }
231
+ oOriginalValueText.setVisible(false);
232
+ oRevertButton.setVisible(false);
233
+ oProposedValueLink.setVisible(true);
234
+ if (typeof fnOnFieldChange === "function") { fnOnFieldChange(); }
235
+ });
236
+
237
+ // Proposed Value link: State 2 → State 1
238
+ oProposedValueLink.attachPress(function() {
239
+ if (!bReverted) { return; }
240
+ bReverted = false;
241
+ if (oTransientContextForEasyFill) {
242
+ oTransientContextForEasyFill.setProperty(sKey, vAIValue);
243
+ }
244
+ oProposedValueLink.setVisible(false);
245
+ oOriginalValueText.setVisible(true);
246
+ oRevertButton.setVisible(true);
247
+ if (typeof fnOnFieldChange === "function") { fnOnFieldChange(); }
248
+ });
249
+
250
+ oGroupElement.addElement(oRevertButton);
251
+ oGroupElement.addElement(oProposedValueLink);
252
+ }
253
+
189
254
  oGroup.addGroupElement(oGroupElement);
190
255
  });
191
256