@sapui5/sap.suite.ui.generic.template 1.153.0 → 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 (259) 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 +122 -20
  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/Component.js +0 -5
  117. package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +87 -36
  118. package/src/sap/suite/ui/generic/template/ObjectPage/controller/SectionTitleHandler.js +1 -1
  119. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n.properties +6 -0
  120. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ar.properties +4 -0
  121. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_bg.properties +4 -0
  122. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ca.properties +4 -0
  123. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cnr.properties +4 -0
  124. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cs.properties +4 -0
  125. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cy.properties +4 -0
  126. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_da.properties +4 -0
  127. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_de.properties +4 -0
  128. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_el.properties +4 -0
  129. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en.properties +4 -0
  130. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_GB.properties +4 -0
  131. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_US_sappsd.properties +4 -0
  132. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_US_saprigi.properties +4 -0
  133. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_es.properties +5 -1
  134. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_es_MX.properties +4 -0
  135. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_et.properties +4 -0
  136. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fi.properties +4 -0
  137. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fr.properties +4 -0
  138. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fr_CA.properties +4 -0
  139. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hi.properties +4 -0
  140. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hr.properties +4 -0
  141. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hu.properties +4 -0
  142. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_id.properties +4 -0
  143. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_it.properties +4 -0
  144. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_iw.properties +4 -0
  145. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ja.properties +4 -0
  146. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_kk.properties +30 -26
  147. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ko.properties +4 -0
  148. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_lt.properties +4 -0
  149. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_lv.properties +4 -0
  150. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_mk.properties +4 -0
  151. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ms.properties +4 -0
  152. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_nl.properties +4 -0
  153. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_no.properties +4 -0
  154. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pl.properties +4 -0
  155. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pt.properties +4 -0
  156. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pt_PT.properties +4 -0
  157. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ro.properties +4 -0
  158. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ru.properties +4 -0
  159. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sh.properties +4 -0
  160. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sk.properties +4 -0
  161. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sl.properties +4 -0
  162. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sr.properties +4 -0
  163. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sv.properties +4 -0
  164. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_th.properties +4 -0
  165. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_tr.properties +4 -0
  166. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_uk.properties +8 -4
  167. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_vi.properties +4 -0
  168. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_zh_CN.properties +4 -0
  169. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_zh_TW.properties +8 -4
  170. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +13 -5
  171. package/src/sap/suite/ui/generic/template/ObjectPage/templateSpecificPreparationHelper.js +2 -2
  172. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Actions.fragment.xml +1 -1
  173. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/PageLevelCommands.fragment.xml +2 -0
  174. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartTableUiTableCommons.fragment.xml +1 -1
  175. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  176. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  177. package/src/sap/suite/ui/generic/template/designtime/controls/DynamicPage.designtime.js +39 -3
  178. package/src/sap/suite/ui/generic/template/designtime/controls/ObjectPageLayout.designtime.js +39 -5
  179. package/src/sap/suite/ui/generic/template/designtime/controls/SmartTable.designtime.js +17 -0
  180. package/src/sap/suite/ui/generic/template/detailTemplates/detailUtils.js +3 -2
  181. package/src/sap/suite/ui/generic/template/detailTemplates/i18n/i18n_es.properties +1 -1
  182. package/src/sap/suite/ui/generic/template/fragments/EasyFilter.fragment.xml +1 -0
  183. package/src/sap/suite/ui/generic/template/fragments/SmartTableUiTableCommons.fragment.xml +1 -0
  184. package/src/sap/suite/ui/generic/template/fragments/TableColumnListItem.fragment.xml +3 -0
  185. package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +3 -0
  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/lib/AppComponent.js +20 -15
  189. package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +69 -0
  190. package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +32 -1
  191. package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +45 -2
  192. package/src/sap/suite/ui/generic/template/lib/MessageUtils.js +1 -0
  193. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillAIOrchestrator.js +127 -8
  194. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillApplyHandler.js +9 -1
  195. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillDialogController.js +234 -13
  196. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFileHandler.js +218 -0
  197. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFormRenderer.js +6 -2
  198. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillHandler.js +162 -5
  199. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillDialog.fragment.xml +193 -30
  200. package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +581 -26
  201. package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +60 -0
  202. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +42 -2
  203. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +43 -3
  204. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +42 -2
  205. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +42 -2
  206. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +40 -0
  207. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +44 -4
  208. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +44 -4
  209. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +42 -2
  210. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +42 -2
  211. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +40 -0
  212. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +40 -0
  213. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_sappsd.properties +40 -0
  214. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +40 -0
  215. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +44 -4
  216. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +40 -0
  217. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +43 -3
  218. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +42 -2
  219. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +40 -0
  220. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +44 -4
  221. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +43 -3
  222. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +42 -2
  223. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +43 -3
  224. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +42 -2
  225. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +42 -2
  226. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +42 -2
  227. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +43 -3
  228. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +42 -2
  229. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +42 -2
  230. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +42 -2
  231. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +42 -2
  232. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +44 -4
  233. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +43 -3
  234. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +42 -2
  235. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +42 -2
  236. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +42 -2
  237. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +42 -2
  238. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +44 -4
  239. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +40 -0
  240. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +40 -0
  241. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +42 -2
  242. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +42 -2
  243. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +42 -2
  244. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +42 -2
  245. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +42 -2
  246. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +44 -4
  247. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +43 -3
  248. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +40 -0
  249. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +43 -3
  250. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +42 -2
  251. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +44 -4
  252. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +27 -7
  253. package/src/sap/suite/ui/generic/template/library.js +1 -1
  254. package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +3 -0
  255. package/src/sap/suite/ui/generic/template/listTemplates/fragments/TableCommands.fragment.xml +23 -19
  256. package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +265 -0
  257. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/ObjectPage.less +9 -0
  258. package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ObjectPage.less +9 -0
  259. package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_ObjectPage.less +9 -0
@@ -169,6 +169,7 @@ sap.ui.define([
169
169
  sMessageDescription = oResourceBundle.getText("ST_GENERIC_ERROR_SYSTEM_UNAVAILABLE_DESC");
170
170
  break;
171
171
  case 0:
172
+ case undefined:
172
173
  // case when server being offline
173
174
  /*adapted to have a reasonable processing for the Apply-Button -
174
175
  * workaround to not leave the page in case of apply */
@@ -92,8 +92,11 @@ sap.ui.define([
92
92
  },
93
93
 
94
94
  /**
95
- * Sends the user's free-text input to the AI service and returns the structured result.
96
- * The AI service is accessed via oTemplateUtils.oServices.oFioriAIHandler.
95
+ * Sends the user's free-text input to the AI service using a two-prompt flow.
96
+ *
97
+ * First prompt sends field metadata without table row data. If the AI returns
98
+ * 'scnd_cll' (second-call flag), a second prompt is made with the current table
99
+ * row data (ISLM_Collection_Data) so the AI can reference existing rows.
97
100
  *
98
101
  * @param {string} sInputText - the user's free-text input from the EasyFill textarea
99
102
  * @param {object} mFieldMapping - the complete field mapping built by buildFieldMapping()
@@ -101,19 +104,135 @@ sap.ui.define([
101
104
  * @returns {Promise<object>} AI service result: { success: boolean, data: object }
102
105
  */
103
106
  submitToAI: async function(sInputText, mFieldMapping, oTemplateUtils) {
104
- oLogger.debug("submitToAI: sending input to AI service");
107
+ oLogger.debug("submitToAI: starting two-prompt AI extraction flow");
105
108
  try {
106
- var aiCallResult = await oTemplateUtils.oServices.oFioriAIHandler.fioriaiLib.EasyFill.extractFieldValuesFromText(
107
- sInputText,
108
- mFieldMapping
109
- );
110
- return aiCallResult;
109
+ var oEasyFill = oTemplateUtils.oServices.oFioriAIHandler.fioriaiLib.EasyFill;
110
+
111
+ // First prompt: send field metadata without table row data
112
+ var mFieldMappingWithoutTableRows = this.buildFieldMappingWithoutTableRows(mFieldMapping);
113
+ var oFirstResult = await oEasyFill.extractFieldValuesFromText(sInputText, mFieldMappingWithoutTableRows);
114
+ if (!oFirstResult.success) {
115
+ return oFirstResult;
116
+ }
117
+
118
+ // If the AI signals that table row context is needed, run a second prompt
119
+ if ("scnd_cll" in oFirstResult.data) {
120
+ oLogger.debug("submitToAI: second prompt required for table row edits");
121
+ var oTableData = this.buildTableDataForSecondPrompt(oFirstResult.data, mFieldMapping);
122
+ var mFilteredMetadata = this.filterFieldMetadataByFirstPromptResponse(oFirstResult.data, mFieldMapping);
123
+ var oSecondResult = await oEasyFill.extractFieldValuesWithTableData(sInputText, mFilteredMetadata, oTableData);
124
+ if (!oSecondResult.success) {
125
+ return oSecondResult;
126
+ }
127
+ return { success: true, data: this.stripSecondPromptFlag(oSecondResult.data) };
128
+ }
129
+
130
+ // No second prompt needed: first prompt returned all field values
131
+ return { success: true, data: this.stripSecondPromptFlag(oFirstResult.data) };
111
132
  } catch (e) {
112
133
  oLogger.error("submitToAI: AI call failed: " + (e && e.message));
113
134
  return { success: false, data: {} };
114
135
  }
115
136
  },
116
137
 
138
+ /**
139
+ * Returns a copy of mFieldMapping where collection entries contain only
140
+ * { description, dataType, itemProperties, isCollection: true }, with
141
+ * currentItems removed. Used for the first AI prompt to avoid sending large
142
+ * table row payloads before it is known whether the AI needs them.
143
+ * itemProperties is preserved so the LLM knows the schema of each collection.
144
+ *
145
+ * @param {object} mFieldMapping - the complete field mapping
146
+ * @returns {object} field mapping with currentItems stripped from collection entries
147
+ */
148
+ buildFieldMappingWithoutTableRows: function(mFieldMapping) {
149
+ var mResult = {};
150
+ Object.keys(mFieldMapping).forEach(function(sFieldName) {
151
+ var oEntry = mFieldMapping[sFieldName];
152
+ if (oEntry && oEntry.isCollection === true) {
153
+ mResult[sFieldName] = {
154
+ description: oEntry.description,
155
+ dataType: oEntry.dataType,
156
+ itemProperties: oEntry.itemProperties,
157
+ isCollection: true
158
+ };
159
+ } else {
160
+ mResult[sFieldName] = oEntry;
161
+ }
162
+ });
163
+ return mResult;
164
+ },
165
+
166
+ /**
167
+ * Builds the table data structure passed to the second AI prompt (ISLM_Collection_Data).
168
+ * Only includes tables that were mentioned in the first prompt response and have
169
+ * existing row data.
170
+ *
171
+ * @param {object} oFirstPromptData - the first prompt response data (may contain scnd_cll)
172
+ * @param {object} mFieldMapping - the complete field mapping (contains currentItems per table)
173
+ * @returns {object} table data: { [navProp]: { currentItems: array } }
174
+ */
175
+ buildTableDataForSecondPrompt: function(oFirstPromptData, mFieldMapping) {
176
+ var oTableData = {};
177
+ Object.keys(oFirstPromptData).forEach(function(sFieldName) {
178
+ if (sFieldName === "scnd_cll") { return; }
179
+ var oFieldMeta = mFieldMapping[sFieldName];
180
+ if (!oFieldMeta || oFieldMeta.isCollection !== true) { return; }
181
+ var aCurrentItems = oFieldMeta.currentItems;
182
+ if (Array.isArray(aCurrentItems) && aCurrentItems.length > 0) {
183
+ oTableData[sFieldName] = { currentItems: aCurrentItems };
184
+ }
185
+ });
186
+ return oTableData;
187
+ },
188
+
189
+ /**
190
+ * Filters the field mapping to only include fields mentioned in the first prompt
191
+ * response. For collection fields, currentItems is excluded because table data is
192
+ * passed separately via ISLM_Collection_Data in the second prompt.
193
+ *
194
+ * @param {object} oFirstPromptData - the first prompt response data
195
+ * @param {object} mFieldMapping - the complete field mapping
196
+ * @returns {object} filtered field metadata for the second prompt
197
+ */
198
+ filterFieldMetadataByFirstPromptResponse: function(oFirstPromptData, mFieldMapping) {
199
+ var mResult = {};
200
+ Object.keys(oFirstPromptData).forEach(function(sFieldName) {
201
+ if (sFieldName === "scnd_cll") { return; }
202
+ var oFieldMeta = mFieldMapping[sFieldName];
203
+ if (oFieldMeta === undefined) { return; }
204
+ if (oFieldMeta.isCollection === true) {
205
+ // Include collection metadata without currentItems
206
+ var oWithoutCurrentItems = {};
207
+ Object.keys(oFieldMeta).forEach(function(sKey) {
208
+ if (sKey !== "currentItems") {
209
+ oWithoutCurrentItems[sKey] = oFieldMeta[sKey];
210
+ }
211
+ });
212
+ mResult[sFieldName] = oWithoutCurrentItems;
213
+ } else {
214
+ mResult[sFieldName] = oFieldMeta;
215
+ }
216
+ });
217
+ return mResult;
218
+ },
219
+
220
+ /**
221
+ * Returns a copy of oData with the internal 'scnd_cll' flag key removed.
222
+ *
223
+ * @param {object} oData - field values that may contain the scnd_cll flag
224
+ * @returns {object} field values without the internal flag
225
+ */
226
+ stripSecondPromptFlag: function(oData) {
227
+ var oResult = {};
228
+ Object.keys(oData).forEach(function(sKey) {
229
+ if (sKey !== "scnd_cll") {
230
+ oResult[sKey] = oData[sKey];
231
+ }
232
+ });
233
+ return oResult;
234
+ },
235
+
117
236
  /**
118
237
  * Converts date-like string values in the AI response to JavaScript Date objects,
119
238
  * based on the OData data type declared in the field mapping.
@@ -8,6 +8,11 @@ sap.ui.define([
8
8
  var sClassName = "lib.ai.EasyFill.EasyFillApplyHandler";
9
9
  var oLogger = new FeLogger(sClassName).getLogger();
10
10
 
11
+ // Maximum number of characters accepted as AI input.
12
+ // Keep in sync with EasyFillDialogController.MAX_INPUT_LENGTH and the TextArea maxLength in
13
+ // EasyFillDialog.fragment.xml.
14
+ var MAX_INPUT_LENGTH = 50000;
15
+
11
16
  /**
12
17
  * EasyFillApplyHandler
13
18
  *
@@ -210,7 +215,7 @@ sap.ui.define([
210
215
  * Clears the dialog model properties, destroys table preview items,
211
216
  * and optionally clears the text area value.
212
217
  *
213
- * @param {boolean} bRemoveTextAreaValue - if true, also clears the user input text area
218
+ * @param {boolean} bRemoveTextAreaValue - if true, also clears the user input text area and resets all file import state (sImportedFileText, file model properties)
214
219
  * @param {object} oDialogModel - the easyFillDialogModel JSONModel
215
220
  * @param {object} oController - MVC controller (used to byId controls)
216
221
  * @param {object} mCollectionUpdates - mutable collection updates map (cleared in place)
@@ -260,6 +265,9 @@ sap.ui.define([
260
265
  var oTextArea = oController.byId("EasyFillInputTextArea");
261
266
  if (oTextArea) { oTextArea.setValue(""); }
262
267
  oDialogModel.setProperty("/isEasyFillButtonEnabled", false);
268
+ oDialogModel.setProperty("/hasEnteredText", false);
269
+ var oRb = oController.getView().getModel("i18n").getResourceBundle();
270
+ oDialogModel.setProperty("/remainingCharactersText", oRb.getText("EASYFILL_REMAINING_CHARACTERS", [MAX_INPUT_LENGTH]));
263
271
  }
264
272
 
265
273
  oLogger.debug("resetEasyFill: dialog state reset" + (bRemoveTextAreaValue ? " (including text area)" : ""));
@@ -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
  /**