@sapui5/sap.suite.ui.generic.template 1.145.1 → 1.147.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 (191) 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 +65 -16
  4. package/src/sap/suite/ui/generic/template/AnalyticalListPage/controllerFrameworkExtensions.js +15 -2
  5. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n.properties +14 -2
  6. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ar.properties +8 -0
  7. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_bg.properties +8 -0
  8. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ca.properties +8 -0
  9. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_cnr.properties +8 -0
  10. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_cs.properties +8 -0
  11. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_cy.properties +8 -0
  12. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_da.properties +8 -0
  13. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_de.properties +8 -0
  14. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_el.properties +8 -0
  15. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en.properties +8 -0
  16. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en_GB.properties +8 -0
  17. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en_US_saprigi.properties +8 -0
  18. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_es.properties +8 -0
  19. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_es_MX.properties +8 -0
  20. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_et.properties +8 -0
  21. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_fi.properties +8 -0
  22. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_fr.properties +8 -0
  23. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_fr_CA.properties +8 -0
  24. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_hi.properties +8 -0
  25. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_hr.properties +8 -0
  26. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_hu.properties +8 -0
  27. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_id.properties +8 -0
  28. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_it.properties +10 -2
  29. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_iw.properties +8 -0
  30. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ja.properties +8 -0
  31. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_kk.properties +8 -0
  32. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ko.properties +8 -0
  33. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_lt.properties +8 -0
  34. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_lv.properties +8 -0
  35. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_mk.properties +8 -0
  36. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ms.properties +8 -0
  37. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_nl.properties +8 -0
  38. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_no.properties +8 -0
  39. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_pl.properties +8 -0
  40. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_pt.properties +8 -0
  41. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_pt_PT.properties +8 -0
  42. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ro.properties +8 -0
  43. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ru.properties +8 -0
  44. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sh.properties +8 -0
  45. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sk.properties +8 -0
  46. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sl.properties +8 -0
  47. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sr.properties +8 -0
  48. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sv.properties +8 -0
  49. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_th.properties +8 -0
  50. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_tr.properties +8 -0
  51. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_uk.properties +8 -0
  52. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_vi.properties +8 -0
  53. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_zh_CN.properties +8 -0
  54. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_zh_TW.properties +8 -0
  55. package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
  56. package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
  57. package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +22 -11
  58. package/src/sap/suite/ui/generic/template/ListReport/controllerFrameworkExtensions.js +16 -2
  59. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr.properties +1 -1
  60. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr_CA.properties +1 -1
  61. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_it.properties +1 -1
  62. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sk.properties +1 -1
  63. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_uk.properties +1 -1
  64. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
  65. package/src/sap/suite/ui/generic/template/ListReport/view/fragments/DeleteConfirmation.fragment.xml +2 -2
  66. package/src/sap/suite/ui/generic/template/ListReport/view/fragments/SmartChart.fragment.xml +11 -4
  67. package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +52 -1
  68. package/src/sap/suite/ui/generic/template/ObjectPage/controllerFrameworkExtensions.js +16 -2
  69. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cnr.properties +1 -1
  70. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_mk.properties +1 -1
  71. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pt.properties +1 -1
  72. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sh.properties +1 -1
  73. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sl.properties +3 -3
  74. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sr.properties +1 -1
  75. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
  76. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/DraftConfirmationPopup.fragment.xml +2 -2
  77. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/DraftResumeDialog.fragment.xml +3 -3
  78. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/RelatedAppsSheet.fragment.xml +1 -1
  79. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartChart.fragment.xml +0 -1
  80. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SwitchDraftAndActiveObjectPopOver.fragment.xml +1 -1
  81. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/TableDeleteConfirmation.fragment.xml +2 -2
  82. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/UnsavedChangesDialog.fragment.xml +2 -2
  83. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  84. package/src/sap/suite/ui/generic/template/QuickCreate/view/QuickCreate.view.xml +7 -7
  85. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  86. package/src/sap/suite/ui/generic/template/QuickView/view/QuickView.view.xml +6 -6
  87. package/src/sap/suite/ui/generic/template/designtime/controls/SmartTable.designtime.js +90 -10
  88. package/src/sap/suite/ui/generic/template/detailTemplates/detailUtils.js +18 -1
  89. package/src/sap/suite/ui/generic/template/fragments/AINotice.fragment.xml +1 -1
  90. package/src/sap/suite/ui/generic/template/fragments/ActionConfirmation.fragment.xml +3 -3
  91. package/src/sap/suite/ui/generic/template/fragments/ContactDetails.fragment.xml +5 -5
  92. package/src/sap/suite/ui/generic/template/fragments/DataLoss.fragment.xml +2 -2
  93. package/src/sap/suite/ui/generic/template/fragments/DataLossTechnicalError.fragment.xml +3 -3
  94. package/src/sap/suite/ui/generic/template/fragments/DiscardEditPopover.fragment.xml +3 -3
  95. package/src/sap/suite/ui/generic/template/fragments/DraftAdminDataPopover.fragment.xml +1 -1
  96. package/src/sap/suite/ui/generic/template/fragments/GridTableColumns.fragment.xml +1 -1
  97. package/src/sap/suite/ui/generic/template/fragments/MessageDialog.fragment.xml +7 -7
  98. package/src/sap/suite/ui/generic/template/fragments/MessageInfluencingCRUDAction.fragment.xml +7 -7
  99. package/src/sap/suite/ui/generic/template/fragments/MessagePopover.fragment.xml +2 -2
  100. package/src/sap/suite/ui/generic/template/fragments/ShareSheet.fragment.xml +3 -3
  101. package/src/sap/suite/ui/generic/template/genericUtilities/Link.js +26 -26
  102. package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +19 -12
  103. package/src/sap/suite/ui/generic/template/genericUtilities/metadataAnalyser.js +5 -5
  104. package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +16 -1
  105. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +5 -1
  106. package/src/sap/suite/ui/generic/template/lib/BaseNoDataHandler.js +108 -0
  107. package/src/sap/suite/ui/generic/template/lib/ChartNoDataHandler.js +37 -0
  108. package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +76 -7
  109. package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +27 -21
  110. package/src/sap/suite/ui/generic/template/lib/TableNoDataHandler.js +24 -101
  111. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillHandler.js +5 -1
  112. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillDialog.fragment.xml +12 -11
  113. package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +9 -5
  114. package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +26 -2
  115. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +18 -0
  116. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +18 -0
  117. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +18 -0
  118. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +18 -0
  119. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +18 -0
  120. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +18 -0
  121. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +18 -0
  122. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +18 -0
  123. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +18 -0
  124. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +18 -0
  125. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +18 -0
  126. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +16 -0
  127. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +19 -1
  128. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +18 -0
  129. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +18 -0
  130. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +20 -2
  131. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +20 -2
  132. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +22 -4
  133. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +18 -0
  134. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +18 -0
  135. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +18 -0
  136. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +19 -1
  137. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +19 -1
  138. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +18 -0
  139. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +18 -0
  140. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +18 -0
  141. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +18 -0
  142. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +18 -0
  143. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +18 -0
  144. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +19 -1
  145. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +18 -0
  146. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +19 -1
  147. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +19 -1
  148. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +18 -0
  149. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +18 -0
  150. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +18 -0
  151. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +18 -0
  152. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +23 -5
  153. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +18 -0
  154. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +18 -0
  155. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +20 -2
  156. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +18 -0
  157. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +18 -0
  158. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +18 -0
  159. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +18 -0
  160. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +22 -4
  161. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +18 -0
  162. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +19 -1
  163. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +18 -0
  164. package/src/sap/suite/ui/generic/template/lib/insights/InsightsFECardProvider.js +7 -1
  165. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +12 -3
  166. package/src/sap/suite/ui/generic/template/library.js +1 -1
  167. package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +11 -2
  168. package/src/sap/suite/ui/generic/template/listTemplates/fragments/MessagesOnRetrieval.fragment.xml +5 -5
  169. package/src/sap/suite/ui/generic/template/listTemplates/fragments/SmartChart.fragment.xml +11 -4
  170. package/src/sap/suite/ui/generic/template/themes/base/AnalyticalListPage.less +135 -98
  171. package/src/sap/suite/ui/generic/template/themes/base/ListReport.less +12 -5
  172. package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +254 -223
  173. package/src/sap/suite/ui/generic/template/themes/base/QuickCreate.less +31 -9
  174. package/src/sap/suite/ui/generic/template/themes/base/QuickView.less +42 -21
  175. package/src/sap/suite/ui/generic/template/themes/sap_belize_base/ObjectPage.less +0 -1
  176. package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ObjectPage.less +0 -1
  177. package/src/sap/suite/ui/generic/template/themes/sap_fiori_3/ObjectPage.less +15 -11
  178. package/src/sap/suite/ui/generic/template/themes/sap_fiori_3_dark/ObjectPage.less +13 -9
  179. package/src/sap/suite/ui/generic/template/themes/sap_fiori_3_hcb/AnalyticalListPage.less +6 -2
  180. package/src/sap/suite/ui/generic/template/themes/sap_fiori_3_hcb/ObjectPage.less +2 -2
  181. package/src/sap/suite/ui/generic/template/themes/sap_fiori_3_hcw/AnalyticalListPage.less +6 -2
  182. package/src/sap/suite/ui/generic/template/themes/sap_fiori_3_hcw/ObjectPage.less +2 -2
  183. package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_ObjectPage.less +0 -1
  184. package/src/sap/suite/ui/generic/template/themes/sap_horizon/AnalyticalListPage.less +7 -2
  185. package/src/sap/suite/ui/generic/template/themes/sap_horizon/ObjectPage.less +11 -11
  186. package/src/sap/suite/ui/generic/template/themes/sap_horizon_dark/AnalyticalListPage.less +7 -2
  187. package/src/sap/suite/ui/generic/template/themes/sap_horizon_dark/ObjectPage.less +10 -10
  188. package/src/sap/suite/ui/generic/template/themes/sap_horizon_hcb/AnalyticalListPage.less +4 -4
  189. package/src/sap/suite/ui/generic/template/themes/sap_horizon_hcb/ObjectPage.less +2 -2
  190. package/src/sap/suite/ui/generic/template/themes/sap_horizon_hcw/AnalyticalListPage.less +4 -4
  191. package/src/sap/suite/ui/generic/template/themes/sap_horizon_hcw/ObjectPage.less +2 -2
@@ -0,0 +1,108 @@
1
+ sap.ui.define([
2
+ "sap/suite/ui/generic/template/genericUtilities/FeLogger"
3
+ ], function (
4
+ FeLogger
5
+ ) {
6
+ "use strict";
7
+ var oLogger = new FeLogger("lib.BaseNoDataHandler").getLogger();
8
+
9
+ /**
10
+ * Base handler for setting no data messages on smart controls
11
+ * @param {object} oController - The controller instance
12
+ * @param {object} oTemplateUtils - Template utilities
13
+ * @param {object} oNoDataConfig - Configuration object mapping scenarios to i18n keys
14
+ * @param {object} parentMethods - Methods provided by subclass
15
+ * @returns {object} Public API with setNoDataMessage method
16
+ */
17
+ function BaseNoDataHandler(oController, oTemplateUtils, oConfig) {
18
+ var sNoDataRepresentation = oController.getOwnerComponent().getAppComponent().getNoDataRepresentation();
19
+ var oNoDataConfig = oConfig.oNoDataConfig;
20
+ var parentMethods = oConfig.methods;
21
+
22
+ function fnSetNoDataMessage (oSmartCtrl, sScenario) {
23
+ if (sNoDataRepresentation === "textOnly" && !oConfig.isIllustrationOnlyMode) {
24
+ fnSetTextMessage(oSmartCtrl, sScenario);
25
+ } else if (["illustration", "illustrationWithFallback"].includes(sNoDataRepresentation) || oConfig.isIllustrationOnlyMode) {
26
+ fnSetIllustratedMessage(oSmartCtrl, sScenario);
27
+ }
28
+ }
29
+
30
+ // Sets "text" based no data message
31
+ function fnSetTextMessage (oSmartCtrl, sScenario) {
32
+ var sSmartCtrlId = oSmartCtrl.getId();
33
+ var sI18nKey = oNoDataConfig[sScenario].i18nKey;
34
+ var sNoDataText = oTemplateUtils.oCommonUtils.getContextText(sI18nKey, sSmartCtrlId);
35
+ oSmartCtrl.setNoData(sNoDataText);
36
+ }
37
+
38
+ // Sets "illustration" based no data message
39
+ function fnSetIllustratedMessage (oSmartCtrl, sScenario) {
40
+ var sSmartCtrlId = oSmartCtrl.getId();
41
+ var sI18nPrefix = oNoDataConfig[sScenario].i18nKey;
42
+ // Derive title key from base key
43
+ var sTitleI18nKey = sI18nPrefix + "_ILLUSTRATION_TITLE";
44
+ // Get title from resource bundle.
45
+ var sTitle = oTemplateUtils.oCommonUtils.getContextText(sTitleI18nKey, sSmartCtrlId);
46
+ // Find description (this logic varies between "illustration" and "illustrationWithFallback")
47
+ var sDescription = fnDeriveIllustrationDescription(sI18nPrefix, sSmartCtrlId);
48
+ // Get illustration type from config
49
+ var sIllustrationType = oNoDataConfig[sScenario].illustrationType;
50
+
51
+ var oNoDataIllustratedMessage = parentMethods.getIllustratedMessage(oSmartCtrl);
52
+ // oSmartTable.getNoData should actually return an illustrated message.
53
+ //
54
+ // Sometimes, app changes the no data message into text message using custom coding.
55
+ // Hence, adding this type check as a safety measure.
56
+ if ( !(oNoDataIllustratedMessage?.isA?.("sap.m.IllustratedMessage")) ) {
57
+ oLogger.error(`Unable to update the no data message of smart control ${oSmartCtrl.getId()} as it's not an IllustratedMessage`);
58
+ return;
59
+ }
60
+ // Table already has illustrated no data message. Just update the attributes
61
+ oNoDataIllustratedMessage.setIllustrationType(sIllustrationType);
62
+ oNoDataIllustratedMessage.setTitle(sTitle);
63
+ oNoDataIllustratedMessage.setDescription(sDescription);
64
+ }
65
+
66
+ /**
67
+ * Calculates the illustrated message's description based on the manifest flag "noDataRepresentation" value
68
+ * 1. If manifest flag is "illustration"
69
+ * - Just returns text for the new i18n key (legacy key + "_ILLUSTRATION_DESCRIPTION")
70
+ * - The text can be found on either app or FE
71
+ * 2. If flag is "illustrationWithFallback"
72
+ * a. Checks the app if customized text available for (legacy i18n key | ctrlId) (for e.g. "NOITEMS_LR_SMARTTABLE|C_SalesOrder")
73
+ * - If found, returns it.
74
+ * b. Checks the app if customized text available just for legacy i18n key (for e.g. "NOITEMS_LR_SMARTTABLE")
75
+ * - If found, returns it.
76
+ * c. Returns the text for the new i18n key (Same as "Case 1" above).
77
+ */
78
+ function fnDeriveIllustrationDescription (sI18nPrefix, sSmartCtrlId) {
79
+ var sLatestDescriptionI18nKey = sI18nPrefix + "_ILLUSTRATION_DESCRIPTION";
80
+ var sLatestDescription = oTemplateUtils.oCommonUtils.getContextText(sLatestDescriptionI18nKey, sSmartCtrlId);
81
+ if (sNoDataRepresentation === "illustration" || (oConfig.isIllustrationOnlyMode && sNoDataRepresentation === "textOnly")) {
82
+ return sLatestDescription;
83
+ }
84
+ // Below logic is for noDataRepresentation = "illustrationWithFallback"
85
+ var sLegacyDescription = null;
86
+ var sLegacyI18nKey = sI18nPrefix;
87
+ var sCtrlSpecificI18nSuffix = oTemplateUtils.oCommonUtils.getSpecificI18nKeyForSmartControl(sSmartCtrlId);
88
+ sCtrlSpecificI18nSuffix = (sCtrlSpecificI18nSuffix === "|") ? "" : sCtrlSpecificI18nSuffix; // Omit the suffix "|"
89
+ // If table specific i18n key is available, get the customized text for that.
90
+ if (sCtrlSpecificI18nSuffix) {
91
+ sLegacyDescription = oTemplateUtils.oCommonUtils.getCustomizedTextFromApp(sLegacyI18nKey + "|" + sCtrlSpecificI18nSuffix);
92
+ }
93
+ // If the description is not yet found, get the customized text just for the generic i18n key.
94
+ if (!sLegacyDescription) {
95
+ sLegacyDescription = oTemplateUtils.oCommonUtils.getCustomizedTextFromApp(sLegacyI18nKey);
96
+ }
97
+ // If legacy text is found, return it.
98
+ // Otherwise, return the latest one.
99
+ return sLegacyDescription || sLatestDescription;
100
+ }
101
+
102
+ return {
103
+ setNoDataMessage: fnSetNoDataMessage
104
+ };
105
+ }
106
+
107
+ return BaseNoDataHandler;
108
+ });
@@ -0,0 +1,37 @@
1
+ sap.ui.define([
2
+ "sap/base/util/extend",
3
+ "sap/ui/base/Object",
4
+ "sap/suite/ui/generic/template/lib/BaseNoDataHandler"
5
+ ], function (
6
+ extend,
7
+ BaseObject,
8
+ BaseNoDataHandler
9
+ ) {
10
+ "use strict";
11
+
12
+ function getMethods() {
13
+ function fnGetIllustratedMessage(oSmartCtrl) {
14
+ return oSmartCtrl.getNoDataIllustratedMessage();
15
+ }
16
+
17
+ return {
18
+ getIllustratedMessage: fnGetIllustratedMessage
19
+ };
20
+ }
21
+
22
+ return BaseObject.extend("sap.suite.ui.generic.template.lib.ChartNoDataHandler", {
23
+ constructor: function (oController, oTemplateUtils, oNoDataConfig) {
24
+ extend(this, new BaseNoDataHandler(oController, oTemplateUtils, {
25
+ oNoDataConfig: oNoDataConfig,
26
+ methods: getMethods(),
27
+ // SmartChart now only support no dato information with IllustratedMessage,
28
+ // only text messages are not possible to provide.
29
+ // Thats why is for SmartChart turned on illustration only mode.
30
+ // If it will be necessary to revert it back:
31
+ // 1) Switch isIllustrationOnlyMode:false
32
+ // 2) Add necessary messages to templates. See how it's impl. for SmartTable templates.
33
+ isIllustrationOnlyMode: true
34
+ }));
35
+ }
36
+ });
37
+ });
@@ -1389,6 +1389,31 @@ sap.ui.define(["sap/ui/base/Object",
1389
1389
  }
1390
1390
  }
1391
1391
 
1392
+ function fnAddMultiEditFieldGroupProperties(oEntityType, sAnnotationPath, aProperties) {
1393
+ if (!sAnnotationPath) { return; }
1394
+
1395
+ // Remove leading '@' if present
1396
+ var sPath = sAnnotationPath.charAt(0) === "@"
1397
+ ? sAnnotationPath.substring(1)
1398
+ : sAnnotationPath;
1399
+
1400
+ var oFieldGroup = oEntityType[sPath];
1401
+
1402
+ if (oFieldGroup && oFieldGroup.Data && Array.isArray(oFieldGroup.Data)) {
1403
+ oFieldGroup.Data
1404
+ .map(function(oField) {
1405
+ return oField.Value && oField.Value.Path;
1406
+ })
1407
+ .filter(Boolean)
1408
+ .forEach(function(sProp) {
1409
+ // Avoid duplicates
1410
+ if (aProperties.indexOf(sProp) === -1) {
1411
+ aProperties.push(sProp);
1412
+ }
1413
+ });
1414
+ }
1415
+ }
1416
+
1392
1417
  // callback for the onBeforeRebindTable event of a smart table
1393
1418
  // oEvent is the original event
1394
1419
  // oCallbacks is an optional object which contains additional callbacks to be called.
@@ -1622,6 +1647,9 @@ sap.ui.define(["sap/ui/base/Object",
1622
1647
  }
1623
1648
  }
1624
1649
  }
1650
+
1651
+ fnAddMultiEditFieldGroupProperties(oEntityType, oCallbacks.multiEditAnnotationPath, aProperties);
1652
+
1625
1653
  }
1626
1654
  // sortOrder Annotation of presentation variant - only relevant for sap.m.Table
1627
1655
  var oVariant = oSmartTable.fetchVariant();
@@ -2688,28 +2716,63 @@ sap.ui.define(["sap/ui/base/Object",
2688
2716
  return (isObjectPage && oSmartTable) ? oCommonUtils.getContextText(sI18NKey, oSmartTable.getId(), null, aParams) : oCommonUtils.getText(sI18NKey, aParams);
2689
2717
  }
2690
2718
 
2719
+
2720
+ /**
2721
+ * Function modifies dataUrl, where we remove all 1:n properties from dataUrl.
2722
+ *
2723
+ * @param {*} oExportEvent - event handler for export.
2724
+ * @param {*} aNavRestriction - list of 1:n navigation properties
2725
+ */
2726
+ function modifyDataSourceUrl(oExportEvent, aNavRestriction) {
2727
+ let aSplitDataUrl = oExportEvent.mParameters.exportSettings.dataSource.dataUrl.split("&$");
2728
+ const idxSelect = aSplitDataUrl.findIndex(data => data.startsWith("select"));
2729
+ const idxExpand = aSplitDataUrl.findIndex(data => data.startsWith("expand"));
2730
+ // reconsturct select query from URL.
2731
+ let aSelectQuery = decodeURIComponent(aSplitDataUrl[idxSelect]).split(",");
2732
+ aSelectQuery[0] = aSelectQuery[0].replace("select=", "");
2733
+ aSelectQuery = aSelectQuery.filter(data => aNavRestriction.findIndex(nav => data.includes(nav)) === -1);
2734
+ aSplitDataUrl[idxSelect] = "select=" + encodeURIComponent(aSelectQuery);
2735
+ // reconstruct expand query from URL.
2736
+ if (idxExpand > -1) {
2737
+ let aExpandQuery = decodeURIComponent(aSplitDataUrl[idxExpand]).split(",");
2738
+ aExpandQuery[0] = aExpandQuery[0].replace("expand=", "");
2739
+ aExpandQuery = aExpandQuery.filter(data => aNavRestriction.findIndex(nav => (data + "/").includes(nav)) === -1);
2740
+ if (aExpandQuery.length) {
2741
+ aSplitDataUrl[idxExpand] = "expand=" + encodeURIComponent(aExpandQuery);
2742
+ } else {
2743
+ aSplitDataUrl.splice(idxExpand, 1);
2744
+ }
2745
+ }
2746
+ oExportEvent.mParameters.exportSettings.dataSource.dataUrl = aSplitDataUrl.join("&$");
2747
+ }
2748
+
2691
2749
  /**
2692
2750
  * This method remove the unsupported columns to get exported like 1/n navigation columns.
2693
2751
  *
2694
2752
  * @param {Object} oExportEvent - event handler for export.
2695
2753
  */
2696
2754
  function removeUnsupportedColumnsToExport(oExportEvent) {
2697
- var sEntitySet = oExportEvent.oSource.getEntitySet();
2698
- var oTable = oExportEvent.oSource.getTable();
2699
- var isSplitCell = oExportEvent.mParameters.exportSettings.fileType === "PDF" || (oExportEvent.mParameters.exportSettings.fileType === "XLSX" && oExportEvent.mParameters.userExportSettings.splitCells);
2755
+ let sEntitySet = oExportEvent.oSource.getEntitySet();
2756
+ let oTable = oExportEvent.oSource.getTable();
2757
+ let isSplitCell = oExportEvent.mParameters.exportSettings.fileType === "PDF" || (oExportEvent.mParameters.exportSettings.fileType === "XLSX" && oExportEvent.mParameters.userExportSettings.splitCells);
2758
+ let aNavRestriction = [];
2700
2759
  if (!isSplitCell) {
2701
2760
  // without split cells
2702
2761
  for (let i = 0; i < oExportEvent.mParameters.exportSettings.workbook.columns.length;) {
2703
2762
  var oColumn = oExportEvent.mParameters.exportSettings.workbook.columns[i];
2704
2763
  if (typeof oColumn.property === "string") {
2705
- if (metadataAnalyser.checkFor1ToNProperty(oTable, sEntitySet, oColumn.property)) {
2764
+ const sNavProperty = metadataAnalyser.checkFor1ToNProperty(oTable, sEntitySet, oColumn.property);
2765
+ if (sNavProperty) {
2706
2766
  oExportEvent.mParameters.exportSettings.workbook.columns.splice(i, 1);
2767
+ aNavRestriction.push(sNavProperty);
2707
2768
  continue;
2708
2769
  }
2709
2770
  } else {
2710
2771
  var aProperty = oColumn.property;
2711
- if (metadataAnalyser.checkFor1ToNProperty(oTable, sEntitySet, aProperty[0]) || metadataAnalyser.checkFor1ToNProperty(oTable, sEntitySet, aProperty[1])) {
2772
+ const sNavProperty = metadataAnalyser.checkFor1ToNProperty(oTable, sEntitySet, aProperty[0]) || metadataAnalyser.checkFor1ToNProperty(oTable, sEntitySet, aProperty[1]);
2773
+ if (sNavProperty) {
2712
2774
  oExportEvent.mParameters.exportSettings.workbook.columns.splice(i, 1);
2775
+ aNavRestriction.push(sNavProperty);
2713
2776
  continue;
2714
2777
  }
2715
2778
  }
@@ -2724,13 +2787,17 @@ sap.ui.define(["sap/ui/base/Object",
2724
2787
  // in general, additional column don't have column Id.
2725
2788
  var bHasAdditionalColumns = i < oExportEvent.mParameters.exportSettings.workbook.columns.length - 2 && !oExportEvent.mParameters.exportSettings.workbook.columns[i + 1].columnId;
2726
2789
  if (bHasAdditionalColumns) {
2727
- if (metadataAnalyser.checkFor1ToNProperty(oTable, sEntitySet, oColumn.property) || metadataAnalyser.checkFor1ToNProperty(oTable, sEntitySet, oExportEvent.mParameters.exportSettings.workbook.columns[i + 1].property)) {
2790
+ const sNavProperty = metadataAnalyser.checkFor1ToNProperty(oTable, sEntitySet, oColumn.property) || metadataAnalyser.checkFor1ToNProperty(oTable, sEntitySet, oExportEvent.mParameters.exportSettings.workbook.columns[i + 1].property);
2791
+ if (sNavProperty) {
2728
2792
  oExportEvent.mParameters.exportSettings.workbook.columns.splice(i, 2);
2793
+ aNavRestriction.push(sNavProperty);
2729
2794
  continue;
2730
2795
  }
2731
2796
  } else {
2732
- if (metadataAnalyser.checkFor1ToNProperty(oTable, sEntitySet, oColumn.property)) {
2797
+ const sNavProperty = metadataAnalyser.checkFor1ToNProperty(oTable, sEntitySet, oColumn.property);
2798
+ if (sNavProperty) {
2733
2799
  oExportEvent.mParameters.exportSettings.workbook.columns.splice(i, 1);
2800
+ aNavRestriction.push(sNavProperty);
2734
2801
  continue;
2735
2802
  }
2736
2803
  }
@@ -2738,6 +2805,7 @@ sap.ui.define(["sap/ui/base/Object",
2738
2805
  i++;
2739
2806
  }
2740
2807
  }
2808
+ modifyDataSourceUrl(oExportEvent, aNavRestriction);
2741
2809
  }
2742
2810
 
2743
2811
  /**
@@ -2826,6 +2894,7 @@ sap.ui.define(["sap/ui/base/Object",
2826
2894
  var getPaginatorInfo = testableHelper.testable(getPaginatorInfo, "getPaginatorInfo");
2827
2895
  var fnRenderTeamsContactCollabOptions = testableHelper.testable(fnRenderTeamsContactCollabOptions, "fnRenderTeamsContactCollabOptions");
2828
2896
  var removeUnsupportedColumnsToExport = testableHelper.testable(removeUnsupportedColumnsToExport, "removeUnsupportedColumnsToExport");
2897
+ var fnAddMultiEditFieldGroupProperties = testableHelper.testable(fnAddMultiEditFieldGroupProperties,"fnAddMultiEditFieldGroupProperties");
2829
2898
  /* eslint-enable */
2830
2899
 
2831
2900
  return {
@@ -354,7 +354,12 @@ sap.ui.define([
354
354
  MessageBox.warning(sWarningMessage);
355
355
  return;
356
356
  }
357
-
357
+ //check if the controller has implemented "onListNavigationExtensionFromContextMenu" and call it to give the chance to restrict the open in new tab from context menu based on the application specific logic. This is to be used by application developers when they want to use the same handler for open in new tab from both item press and context menu, but with different logic to restrict the open in new tab based on the entry point.
358
+ var bOnListNavigationExtensionFromContextMenuFound = oController.hasOwnProperty("onListNavigationExtensionFromContextMenu");
359
+ var aContext = oFocusInfo.applicableContexts;
360
+ if (bOnListNavigationExtensionFromContextMenuFound && oController.onListNavigationExtensionFromContextMenu(aContext)){
361
+ return;
362
+ }
358
363
  var oSynchronizeDraftPromise = oSourceControl.getModel().hasPendingChanges() ? oTemplateUtils.oServices.oApplicationController.synchronizeDraftAsync() : Promise.resolve();
359
364
  oSynchronizeDraftPromise.then(function () {
360
365
  aNavigableContexts.forEach(function (oContext) {
@@ -375,30 +380,31 @@ sap.ui.define([
375
380
  * So that, "Open in new tab" option isn't added in context menu.
376
381
  * a. Navigation is not supported by the table
377
382
  * b. Direct edit flow (when the edit icon is pressed on row, the object is opened with draft record) is configured.
378
- * c. The controller is configured with onListNavigationExtension (i.e custom navigation logic written by app).
379
- * d. If ushell container is unavailable
383
+ * c. If ushell container is unavailable
384
+ * d. Introducing a new check bOnListNavigationExtensionFromContextMenuFound to Open in New Tab from context menu(to be added/used by application developers)
380
385
  *
381
386
  * @param {sap.suite.ui.generic.template.lib.ContextMenuHandler.FocusInfo} oFocusInfo
382
387
  * @returns {Promise<Function|undefined>} Promise which resolves the handler method
383
388
  */
384
- function getHandlePromiseForOpenInNewTab (oFocusInfo) {
385
- var getHandler = function (bEnabled, oFocusInfo, aNavigableContexts) {
386
- return bEnabled && fnOpenNavigableContextsInNewTab.bind(null, oFocusInfo, aNavigableContexts);
387
- };
388
-
389
- var bDirectEdit = oTemplateUtils.oServices.oApplication.getEditFlowOfRoot() === "direct";
390
- var bOnListNavigationExtensionFound = oController.hasOwnProperty("onListNavigationExtension");
391
- var UshellContainer = sap.ui.require("sap/ushell/Container");
392
- if (!bNavigationSupported || bDirectEdit || bOnListNavigationExtensionFound || !UshellContainer) {
393
- return;
394
- }
395
-
396
- // Enable the context menu entry only if at least one navigable context is available
397
- var aNavigableContexts = oFocusInfo.applicableContexts.filter(fnIsContextNavigable);
398
- var bEnabled = aNavigableContexts.length > 0;
399
-
400
- return Promise.resolve(getHandler(bEnabled, oFocusInfo, aNavigableContexts));
401
- }
389
+ function getHandlePromiseForOpenInNewTab (oFocusInfo) {
390
+ var getHandler = function (bEnabled, oFocusInfo, aNavigableContexts) {
391
+ return bEnabled && fnOpenNavigableContextsInNewTab.bind(null, oFocusInfo, aNavigableContexts);
392
+ };
393
+ var aNavigableContexts = oFocusInfo.applicableContexts.filter(fnIsContextNavigable);
394
+ var bDirectEdit = oTemplateUtils.oServices.oApplication.getEditFlowOfRoot() === "direct";
395
+ var UshellContainer = sap.ui.require("sap/ushell/Container");
396
+ var bIsSingleSelect = aNavigableContexts && aNavigableContexts.length === 1;
397
+ var bOnListNavigationExtensionFound = oController.hasOwnProperty("onListNavigationExtension");
398
+ var bOnListNavigationExtensionFromContextMenuFound = oController.hasOwnProperty("onListNavigationExtensionFromContextMenu");
399
+ var bRestrictOpenFromContextMenu = bOnListNavigationExtensionFound && (!bOnListNavigationExtensionFromContextMenuFound || !bIsSingleSelect);
400
+ if (!bNavigationSupported || bDirectEdit || !UshellContainer || bRestrictOpenFromContextMenu) {
401
+ return;
402
+ }
403
+
404
+ // Enable the context menu entry only if at least one navigable context is available
405
+ var bEnabled = aNavigableContexts.length > 0;
406
+ return Promise.resolve(getHandler(bEnabled, oFocusInfo, aNavigableContexts));
407
+ }
402
408
 
403
409
  /**
404
410
  * Adds "Open in wew tab/window" entry to context menu
@@ -1,107 +1,30 @@
1
1
  sap.ui.define([
2
- "sap/base/util/extend",
3
- "sap/ui/base/Object",
4
- "sap/suite/ui/generic/template/genericUtilities/FeLogger"
2
+ "sap/base/util/extend",
3
+ "sap/ui/base/Object",
4
+ "sap/suite/ui/generic/template/lib/BaseNoDataHandler"
5
5
  ], function (
6
- extend,
7
- BaseObject,
8
- FeLogger
6
+ extend,
7
+ BaseObject,
8
+ BaseNoDataHandler
9
9
  ) {
10
- "use strict";
11
- var oLogger = new FeLogger("lib.TableNoDataHandler").getLogger();
10
+ "use strict";
12
11
 
13
- function getMethods(oController, oTemplateUtils, oNoDataConfig) {
14
- var sNoDataRepresentation = oController.getOwnerComponent().getAppComponent().getNoDataRepresentation();
12
+ function getMethods() {
13
+ function fnGetIllustratedMessage(oSmartCtrl) {
14
+ return oSmartCtrl.getNoData();
15
+ }
15
16
 
16
- function fnSetNoDataMessage (oSmartTable, sScenario) {
17
- if (sNoDataRepresentation === "textOnly") {
18
- fnSetTextMessage(oSmartTable, sScenario);
19
- } else if (["illustration", "illustrationWithFallback"].includes(sNoDataRepresentation)) {
20
- fnSetIllustratedMessage(oSmartTable, sScenario);
21
- }
22
- }
17
+ return {
18
+ getIllustratedMessage: fnGetIllustratedMessage
19
+ };
20
+ }
23
21
 
24
- // Sets "text" based no data message
25
- function fnSetTextMessage (oSmartTable, sScenario) {
26
- var sSmartTableId = oSmartTable.getId();
27
- var sI18nKey = oNoDataConfig[sScenario].i18nKey;
28
- var sNoDataText = oTemplateUtils.oCommonUtils.getContextText(sI18nKey, sSmartTableId);
29
- oSmartTable.setNoData(sNoDataText);
30
- }
31
-
32
- // Sets "illustration" based no data message
33
- function fnSetIllustratedMessage (oSmartTable, sScenario) {
34
- var sSmartTableId = oSmartTable.getId();
35
- var sI18nPrefix = oNoDataConfig[sScenario].i18nKey;
36
- // Derive title key from base key
37
- var sTitleI18nKey = sI18nPrefix + "_ILLUSTRATION_TITLE";
38
- // Get title from resource bundle.
39
- var sTitle = oTemplateUtils.oCommonUtils.getContextText(sTitleI18nKey, sSmartTableId);
40
- // Find description (this logic varies between "illustration" and "illustrationWithFallback")
41
- var sDescription = fnDeriveIllustrationDescription(sI18nPrefix, sSmartTableId);
42
- // Get illustration type from config
43
- var sIllustrationType = oNoDataConfig[sScenario].illustrationType;
44
-
45
-
46
- var oNoDataIllustratedMessage = oSmartTable.getNoData();
47
- // oSmartTable.getNoData should actually return an illustrated message.
48
- //
49
- // Sometimes, app changes the no data message into text message using custom coding.
50
- // Hence, adding this type check as a safety measure.
51
- if ( !(oNoDataIllustratedMessage?.isA?.("sap.m.IllustratedMessage")) ) {
52
- oLogger.error(`Unable to update the no data message of smart table ${oSmartTable.getId()} as it's not an IllustratedMessage`);
53
- return;
54
- }
55
- // Table already has illustrated no data message. Just update the attributes
56
- oNoDataIllustratedMessage.setIllustrationType(sIllustrationType);
57
- oNoDataIllustratedMessage.setTitle(sTitle);
58
- oNoDataIllustratedMessage.setDescription(sDescription);
59
- }
60
-
61
- /**
62
- * Calculates the illustrated message's description based on the manifest flag "noDataRepresentation" value
63
- * 1. If manifest flag is "illustration"
64
- * - Just returns text for the new i18n key (legacy key + "_ILLUSTRATION_DESCRIPTION")
65
- * - The text can be found on either app or FE
66
- * 2. If flag is "illustrationWithFallback"
67
- * a. Checks the app if customized text available for (legacy i18n key | tableId) (for e.g. "NOITEMS_LR_SMARTTABLE|C_SalesOrder")
68
- * - If found, returns it.
69
- * b. Checks the app if customized text available just for legacy i18n key (for e.g. "NOITEMS_LR_SMARTTABLE")
70
- * - If found, returns it.
71
- * c. Returns the text for the new i18n key (Same as "Case 1" above).
72
- */
73
- function fnDeriveIllustrationDescription (sI18nPrefix, sSmartTableId) {
74
- var sLatestDescriptionI18nKey = sI18nPrefix + "_ILLUSTRATION_DESCRIPTION";
75
- var sLatestDescription = oTemplateUtils.oCommonUtils.getContextText(sLatestDescriptionI18nKey, sSmartTableId);
76
- if (sNoDataRepresentation === "illustration") {
77
- return sLatestDescription;
78
- }
79
- // Below logic is for noDataRepresentation = "illustrationWithFallback"
80
- var sLegacyDescription = null;
81
- var sLegacyI18nKey = sI18nPrefix;
82
- var sTableSpecificI18nSuffix = oTemplateUtils.oCommonUtils.getSpecificI18nKeyForSmartControl(sSmartTableId);
83
- sTableSpecificI18nSuffix = (sTableSpecificI18nSuffix === "|") ? "" : sTableSpecificI18nSuffix; // Omit the suffix "|"
84
- // If table specific i18n key is available, get the customized text for that.
85
- if (sTableSpecificI18nSuffix) {
86
- sLegacyDescription = oTemplateUtils.oCommonUtils.getCustomizedTextFromApp(sLegacyI18nKey + "|" + sTableSpecificI18nSuffix);
87
- }
88
- // If the description is not yet found, get the customized text just for the generic i18n key.
89
- if (!sLegacyDescription) {
90
- sLegacyDescription = oTemplateUtils.oCommonUtils.getCustomizedTextFromApp(sLegacyI18nKey);
91
- }
92
- // If legacy text is found, return it.
93
- // Otherwise, return the latest one.
94
- return sLegacyDescription || sLatestDescription;
95
- }
96
-
97
- return {
98
- setNoDataMessage: fnSetNoDataMessage
99
- };
100
- }
101
-
102
- return BaseObject.extend("sap.suite.ui.generic.template.lib.TableNoDataHandler", {
103
- constructor: function (oController, oTemplateUtils, oNoDataConfig) {
104
- extend(this, getMethods(oController, oTemplateUtils, oNoDataConfig));
105
- }
106
- });
107
- });
22
+ return BaseObject.extend("sap.suite.ui.generic.template.lib.TableNoDataHandler", {
23
+ constructor: function (oController, oTemplateUtils, oNoDataConfig) {
24
+ extend(this, new BaseNoDataHandler(oController, oTemplateUtils, {
25
+ oNoDataConfig: oNoDataConfig,
26
+ methods: getMethods()
27
+ }));
28
+ }
29
+ });
30
+ });
@@ -48,6 +48,8 @@ sap.ui.define([
48
48
  isSaveEnabled: false,
49
49
  stateType: "Initial",
50
50
  feedbackEnabled: true,
51
+ feedbackPressedUp: false,
52
+ feedbackPressedDown: false,
51
53
  isEasyFillButtonEnabled: false
52
54
  };
53
55
 
@@ -121,11 +123,11 @@ sap.ui.define([
121
123
  oEasyFillDialog.close();
122
124
  },
123
125
  onEasyFillSubmitInputToAI : async function (oEvent) {
124
- resetEasyFill();
125
126
  const easyFillDialogModel = oController.getView().getModel("easyFillDialogModel");
126
127
  easyFillDialogModel.setProperty("/isBusy",true);
127
128
  let mFieldMapping = getEntitySetMapForLLM();
128
129
  let aiCallResult = await oTemplateUtils.oServices.oFioriAIHandler.fioriaiLib.EasyFill.extractFieldValuesFromText(oController.byId("EasyFillInputTextArea").getValue(), mFieldMapping);
130
+ resetEasyFill();
129
131
  aEditableFields = [];
130
132
  easyFillDialogModel.setProperty("/isBusy",false);
131
133
  formatDateValues(aiCallResult,mFieldMapping);
@@ -290,6 +292,8 @@ sap.ui.define([
290
292
  easyFillDialogModel.setProperty("/isSaveEnabled",false);
291
293
  easyFillDialogModel.setProperty("/stateType","Initial");
292
294
  easyFillDialogModel.setProperty("/feedbackEnabled",true);
295
+ easyFillDialogModel.setProperty("/feedbackPressedUp",false);
296
+ easyFillDialogModel.setProperty("/feedbackPressedDown",false);
293
297
  if (bRemoveTextAreaValue) {
294
298
  oController.byId("EasyFillInputTextArea").setValue("");
295
299
  easyFillDialogModel.setProperty("/isEasyFillButtonEnabled",false);
@@ -5,10 +5,11 @@ xmlns:fesr="http://schemas.sap.com/sapui5/extension/sap.ui.core.FESR/1"
5
5
  xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
6
6
  >
7
7
 
8
- <Dialog id="EasyFillDialog" class = "sapSmartTemplatesObjectPageEasyFill" contentHeight="49.3125rem" title="{i18n>EASY_FILL_TITLE}" titleAlignment="Start" horizontalScrolling="false" verticalScrolling="false">
8
+ <Dialog id="EasyFillDialog" class = "sapSmartTemplatesObjectPageEasyFill" contentHeight="49.3125rem" title="{i18n>EASY_FILL_TITLE}"
9
+ titleAlignment="Start" horizontalScrolling="false" verticalScrolling="false" draggable="true" resizable="true">
9
10
  <content>
10
11
  <FlexBox id="EasyFillMainFlex" direction="Row" renderType="Bare" width="100%" height="100%">
11
- <FlexBox
12
+ <FlexBox
12
13
  direction="Column" renderType="Bare" width="40%" class = "sapSmartTemplatesObjectPageEasyFillInputArea"
13
14
  >
14
15
  <FlexBox id="EasyFillInputArea" direction="Column" renderType="Bare" width="100%" gap="36px">
@@ -18,10 +19,10 @@ xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
18
19
  </VBox>
19
20
  <TextArea
20
21
  id="EasyFillInputTextArea"
21
- growing = "true"
22
+ growing = "true"
22
23
  growingMaxLines = "30"
23
24
  maxLength = "2000"
24
- liveChange="onLiveChange"
25
+ liveChange=".onLiveChange"
25
26
  placeholder = "{i18n>EASY_FILL_TEXTAREA_PLACEHOLDER}"
26
27
  rows = "20"
27
28
  width="100%"
@@ -38,12 +39,12 @@ xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
38
39
  icon="sap-icon://ai"
39
40
  fesr:press="fe2:ef:analyzeText"
40
41
  enabled="{easyFillDialogModel>/isEasyFillButtonEnabled}"
41
- press="onEasyFillSubmitInputToAI">
42
+ press=".onEasyFillSubmitInputToAI">
42
43
  </Button>
43
44
  <Button
44
45
  id="EasyFillClearAll"
45
46
  type = "Transparent"
46
- press="onEasyFillClearAll"
47
+ press=".onEasyFillClearAll"
47
48
  fesr:press="fe2:ef:clearAll"
48
49
  text="{i18n>EASYFILL_CLEAR_ALL}">
49
50
  </Button>
@@ -58,10 +59,10 @@ xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
58
59
  description = "{path: 'easyFillDialogModel>/stateType', formatter: '.formatIllustrationDescription'}"/>
59
60
  <ScrollContainer vertical = "true" visible="{= ${easyFillDialogModel>/isUpdatableVisible} || ${easyFillDialogModel>/isNonUpdatableVisible} }">
60
61
  <HBox gap="0.5rem" justifyContent = "End" alignItems = "Center" renderType="Bare" class="sapSmartTemplatesObjectPageEasyFillReviewAreaBanner">
61
- <Link text="{i18n>AI_LINK_NOTICE_TITLE}" press="onLinkPress"/>
62
+ <Link text="{i18n>AI_LINK_NOTICE_TITLE}" press=".onLinkPress"/>
62
63
  <Label text="{i18n>AI_WARNING_TEXT}"/>
63
- <Button icon = "sap-icon://thumb-up" type = "Transparent" fesr:press="fe2:ef:thumbsup" enabled="{easyFillDialogModel>/feedbackEnabled}" press="onFeedbackPress"/>
64
- <Button icon = "sap-icon://thumb-down" type="Transparent" fesr:press="fe2:ef:thumbsdown" enabled="{easyFillDialogModel>/feedbackEnabled}" press="onFeedbackPress"/>
64
+ <ToggleButton icon = "sap-icon://thumb-up" type = "Transparent" fesr:press="fe2:ef:thumbsup" pressed="{easyFillDialogModel>/feedbackPressedUp}" enabled="{easyFillDialogModel>/feedbackEnabled}" press=".onFeedbackPress"/>
65
+ <ToggleButton icon = "sap-icon://thumb-down" type="Transparent" fesr:press="fe2:ef:thumbsdown" pressed="{easyFillDialogModel>/feedbackPressedDown}" enabled="{easyFillDialogModel>/feedbackEnabled}" press=".onFeedbackPress"/>
65
66
  </HBox>
66
67
  <VBox class="sapSmartTemplatesObjectPageEasyFillReviewAreaSmartFormWrapper" renderType = "Bare" visible="{easyFillDialogModel>/isUpdatableVisible}">
67
68
  <core:Fragment fragmentName="sap.suite.ui.generic.template.lib.ai.EasyFill.fragments.EasyFillUpdatebleSmartForm" type="XML"/>
@@ -75,10 +76,10 @@ xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
75
76
  </FlexBox>
76
77
  </content>
77
78
  <beginButton>
78
- <Button text="{i18n>EASY_FILL_CONFIRM}" fesr:press="fe2:ef:confirm" enabled="{easyFillDialogModel>/isSaveEnabled}" press="onSaveFromEasyFillDialog" type="Emphasized"/>
79
+ <Button text="{i18n>EASY_FILL_CONFIRM}" fesr:press="fe2:ef:confirm" enabled="{easyFillDialogModel>/isSaveEnabled}" press=".onSaveFromEasyFillDialog" type="Emphasized"/>
79
80
  </beginButton>
80
81
  <endButton>
81
- <Button text="{i18n>CANCEL}" press="onCancelEasyFillDialog" fesr:press="fe2:ef:cancel"/>
82
+ <Button text="{i18n>CANCEL}" press=".onCancelEasyFillDialog" fesr:press="fe2:ef:cancel"/>
82
83
  </endButton>
83
84
  </Dialog>
84
85
  </core:FragmentDefinition>
@@ -450,10 +450,10 @@ sap.ui.define([
450
450
  }
451
451
 
452
452
  function fnClearFilters(oEvent) {
453
- var oSmartFilterbar = oState.oSmartFilterbar;
454
- oSmartFilterbar.search();
455
- // Do not clear the SFB as this is applicable only for the EasyFilter
456
- //oSmartFilterbar.clear();
453
+ //Making the SmartTable in dirty state
454
+ var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
455
+ oTemplatePrivateModel.setProperty("/listReport/firstSelection", true);
456
+ oTemplatePrivateModel.setProperty("/generic/bDataAreShownInTable", false);
457
457
  }
458
458
 
459
459
  function fnAfterQueryProcessing(oEvent) {
@@ -467,7 +467,11 @@ sap.ui.define([
467
467
  oTemplateUtils.oComponentUtils.getBusyHelper().setBusy(oQueryPromise);
468
468
  }
469
469
 
470
- function fnTokensChanged(oEvent) {
470
+ function fnTokensChanged(oEvent) {
471
+ //When reset button is clicked no batch call should be triggered
472
+ if (oEvent.getParameter("reset")) {
473
+ return;
474
+ }
471
475
  var oSmartFilterbar = oState.oSmartFilterbar;
472
476
  var oFiltersFromAI = oEvent.getParameter("tokens");
473
477
  var sSmartFilterBarId = oSmartFilterbar.getId();