@sapui5/sap.suite.ui.generic.template 1.126.0 → 1.127.1
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.
- package/package.json +1 -1
- package/src/sap/suite/ui/generic/template/.library +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/SmartKpiTag.js +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/FilterItemMicroChart.js +2 -2
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/SmartVisualFilterBar.js +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/VisualFilterProvider.js +17 -15
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/ControllerImplementation.js +0 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/DropDownController.js +8 -13
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/DynamicDateRangeController.js +4 -5
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/VisualFilterDialogController.js +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controllerFrameworkExtensions.js +12 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_de.properties +2 -2
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/util/AnnotationHelper.js +11 -11
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/util/FilterUtil.js +6 -6
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/Component.js +9 -1
- package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +65 -40
- package/src/sap/suite/ui/generic/template/ListReport/controllerFrameworkExtensions.js +12 -1
- package/src/sap/suite/ui/generic/template/ListReport/extensionAPI/ExtensionAPI.js +3 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n.properties +16 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ar.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_bg.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ca.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cnr.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cs.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cy.properties +13 -1
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_da.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_de.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_el.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_GB.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_US_saprigi.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_es.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_es_MX.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_et.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fi.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr_CA.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hi.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hr.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hu.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_id.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_it.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_iw.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ja.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_kk.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ko.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_lt.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_lv.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_mk.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ms.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_nl.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_no.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pl.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pt.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pt_PT.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ro.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ru.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sh.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sk.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sl.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sr.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sv.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_th.properties +13 -1
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_tr.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_uk.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_vi.properties +13 -1
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_zh_CN.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_zh_TW.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/DefaultVariant.fragment.xml +18 -3
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/FullscreenPage.fragment.xml +6 -1
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/SmartTable.fragment.xml +1 -3
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +26 -19
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/MessageStripHelper.js +3 -4
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/PasteHandler.js +12 -15
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/inlineCreationRows/InlineCreationRowsHelper.js +5 -6
- package/src/sap/suite/ui/generic/template/ObjectPage/controllerFrameworkExtensions.js +12 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_de.properties +4 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Actions.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/CRUDActionButtons.fragment.xml +2 -2
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/HeaderContainer.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartTable.fragment.xml +2 -5
- package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/designtime/utils/DesigntimeHandler.js +4 -2
- package/src/sap/suite/ui/generic/template/designtime/utils/designtimeHelper.js +27 -10
- package/src/sap/suite/ui/generic/template/fragments/ContactDetails.fragment.xml +0 -2
- package/src/sap/suite/ui/generic/template/fragments/ContactDetailsQuickViewGroupReplica.fragment.xml +0 -1
- package/src/sap/suite/ui/generic/template/fragments/EasyFilter.fragment.xml +24 -0
- package/src/sap/suite/ui/generic/template/fragments/GridTableCells.fragment.xml +2 -2
- package/src/sap/suite/ui/generic/template/fragments/HeaderDataPointContent.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/fragments/HeaderFormDataField.fragment.xml +2 -2
- package/src/sap/suite/ui/generic/template/fragments/MessageDialog.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/fragments/MessageInfluencingCRUDAction.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/fragments/QuickViewSmartForm.fragment.xml +0 -1
- package/src/sap/suite/ui/generic/template/fragments/SmartFormDataField.fragment.xml +3 -3
- package/src/sap/suite/ui/generic/template/fragments/TableCell.fragment.xml +2 -2
- package/src/sap/suite/ui/generic/template/fragments/TreeTableColumns.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/genericUtilities/AjaxHelper.js +57 -47
- package/src/sap/suite/ui/generic/template/genericUtilities/ControlStateWrapperFactory.js +1 -1
- package/src/sap/suite/ui/generic/template/genericUtilities/FeLogger.js +0 -1
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +12 -11
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon.js +26 -20
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartVariantManagementWrapper.js +3 -3
- package/src/sap/suite/ui/generic/template/genericUtilities/filterHelper.js +6 -6
- package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +59 -51
- package/src/sap/suite/ui/generic/template/js/RuntimeFormatters.js +3 -3
- package/src/sap/suite/ui/generic/template/js/formatters/formatDisplayValueForProgressIndicator.js +3 -3
- package/src/sap/suite/ui/generic/template/lib/AdaptiveCardHelper.js +39 -33
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +79 -53
- package/src/sap/suite/ui/generic/template/lib/Application.js +1 -4
- package/src/sap/suite/ui/generic/template/lib/CRUDHelper.js +21 -21
- package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +34 -19
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +63 -11
- package/src/sap/suite/ui/generic/template/lib/ContactCardDetailHelper.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +11 -12
- package/src/sap/suite/ui/generic/template/lib/CreateWithDialogHandler.js +2 -2
- package/src/sap/suite/ui/generic/template/lib/PageLeaveHandler.js +6 -6
- package/src/sap/suite/ui/generic/template/lib/SideEffectUtil.js +5 -7
- package/src/sap/suite/ui/generic/template/lib/TemplateAssembler.js +1 -0
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +323 -0
- package/src/sap/suite/ui/generic/template/lib/ai/FioriAIHandler.js +77 -0
- package/src/sap/suite/ui/generic/template/lib/ai/JouleContextProvider.js +56 -0
- package/src/sap/suite/ui/generic/template/lib/filterHelper.js +38 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +16 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +13 -5
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +10 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +13 -5
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +9 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/info/SmartTableInfo.js +26 -2
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsCardHelper.js +10 -29
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsHandler.js +3 -3
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +2 -1
- package/src/sap/suite/ui/generic/template/library.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/filterSettingsPreparationHelper.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/semanticDateRangeTypeHelper.js +1 -1
- package/src/sap/suite/ui/generic/template/themes/base/base.less +4 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/ALPConstants.less +47 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base.less +7 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_AnalyticalListPage.less +475 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_ListReport.less +33 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_ObjectPage.less +391 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_QuickCreate.less +96 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_QuickView.less +108 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/library.source.less +24 -7
- package/ui5.yaml +1 -1
|
@@ -52,12 +52,14 @@ sap.ui.define([
|
|
|
52
52
|
"sap/suite/ui/commons/collaboration/CollaborationHelper",
|
|
53
53
|
"sap/insights/CardHelper",
|
|
54
54
|
"sap/suite/ui/generic/template/lib/insights/InsightsFECardProvider",
|
|
55
|
+
"sap/suite/ui/generic/template/lib/ai/JouleContextProvider",
|
|
55
56
|
"sap/ui/core/service/ServiceFactoryRegistry",
|
|
56
57
|
"sap/ui/VersionInfo",
|
|
57
58
|
"sap/m/IllustratedMessageType",
|
|
59
|
+
"sap/suite/ui/generic/template/lib/ai/FioriAIHandler",
|
|
58
60
|
"sap/suite/ui/generic/template/js/RuntimeFormatters" // just to make sure that this class is loaded
|
|
59
61
|
], function(
|
|
60
|
-
extend,
|
|
62
|
+
extend,
|
|
61
63
|
isPlainObject,
|
|
62
64
|
NavContainer,
|
|
63
65
|
FlexibleColumnLayout,
|
|
@@ -85,12 +87,13 @@ sap.ui.define([
|
|
|
85
87
|
startupParameterHelper,
|
|
86
88
|
PageLeaveHandler,
|
|
87
89
|
ShareUtils,
|
|
88
|
-
CollaborationHelper,
|
|
90
|
+
CollaborationHelper,
|
|
89
91
|
CardHelper,
|
|
90
92
|
InsightsFECardProvider,
|
|
93
|
+
JouleContextProvider,
|
|
91
94
|
ServiceFactoryRegistry,
|
|
92
95
|
VersionInfo,
|
|
93
|
-
IllustratedMessageType) {
|
|
96
|
+
IllustratedMessageType, FioriAIHandler) {
|
|
94
97
|
"use strict";
|
|
95
98
|
var sClassName = "lib.AppComponent";
|
|
96
99
|
|
|
@@ -102,7 +105,7 @@ sap.ui.define([
|
|
|
102
105
|
var mDesigntimeHandlers = Object.create(null); // maps the ids of AppComponents to the corresponding instance of DesigntimeHandler
|
|
103
106
|
|
|
104
107
|
var fnRegisterAppComponent = TemplateAssembler.getRegisterAppComponent(); // Retrieve the possibility to register at TemplateAssembler
|
|
105
|
-
var bShellConfigPlaceholderEnabled = true;
|
|
108
|
+
var bShellConfigPlaceholderEnabled = true;
|
|
106
109
|
if (window["sap-ushell-config"] && window["sap-ushell-config"].apps && window["sap-ushell-config"].apps.placeholder) {
|
|
107
110
|
bShellConfigPlaceholderEnabled = window["sap-ushell-config"].apps.placeholder.enabled;
|
|
108
111
|
}
|
|
@@ -177,12 +180,11 @@ sap.ui.define([
|
|
|
177
180
|
// The implementation of this infrastructure is done in class BusyHelper.
|
|
178
181
|
bEnablePlaceholder: bShellConfigPlaceholderEnabled, //holds the value of placeholder enablement shell and URL (URL enablement will be added in constructor code of NavigationController).
|
|
179
182
|
bStateHandlingSuspended: false, // holds the RTA or Key user mode
|
|
180
|
-
nDelayedDraftTimerInSeconds: 20
|
|
181
|
-
sSummarizationLibraryUrl: "" // property hold the Url for the Summarization service library
|
|
183
|
+
nDelayedDraftTimerInSeconds: 20 // holds the timer interval value for draft data save and by default, the value is 20 seconds
|
|
182
184
|
};
|
|
183
185
|
oTemplateContract.oDataLossHandler = new DataLossHandler(oTemplateContract); // an object which expose methods that can be used to bring data loss popup at app level
|
|
184
186
|
oTemplateContract.oPageLeaveHandler = new PageLeaveHandler(oTemplateContract);
|
|
185
|
-
|
|
187
|
+
|
|
186
188
|
// the following additional properties are added to TemplateContract later:
|
|
187
189
|
// - appSettings a model representing the settings of the app (by function init()). These settings are derived from the settings section in the manifest, but also take in account the defaults.
|
|
188
190
|
// - oBusyHelper (instance of BusyHelper) by function createContent
|
|
@@ -287,8 +289,11 @@ sap.ui.define([
|
|
|
287
289
|
shellServiceUnavailable: false,
|
|
288
290
|
// experimental: not yet used
|
|
289
291
|
forceFullscreenCreate: false,
|
|
290
|
-
// Check
|
|
291
|
-
|
|
292
|
+
// Check FioriAI servce is enabled
|
|
293
|
+
"fioriAI": {
|
|
294
|
+
isSummarizationEnabled : false,
|
|
295
|
+
isEasyFilterEnabled : false
|
|
296
|
+
}
|
|
292
297
|
});
|
|
293
298
|
oAppComponent.setModel(oTemplateContract.oTemplatePrivateGlobalModel, "_templPrivGlobal");
|
|
294
299
|
oTemplateContract.oShellServicePromise.catch(function(){
|
|
@@ -299,16 +304,8 @@ sap.ui.define([
|
|
|
299
304
|
var oParsingServicePromise;
|
|
300
305
|
if (UShellContainer) {
|
|
301
306
|
oParsingServicePromise = UShellContainer.getServiceAsync("URLParsing");
|
|
302
|
-
UShellContainer.getServiceAsync("Navigation").then(function(oNavigationService) {
|
|
303
|
-
oNavigationService.resolveIntent("#IntelligentPrompt-summarize").then(function(sUrl) {
|
|
304
|
-
oTemplateContract.oTemplatePrivateGlobalModel.setProperty("/generic/isSummarizationEnabled", !!sUrl);
|
|
305
|
-
oTemplateContract.sSummarizationLibraryUrl = sUrl;
|
|
306
|
-
}).catch(function() {
|
|
307
|
-
oLogger.warning("No intelligent summarization capability enabled on the tenant");
|
|
308
|
-
});
|
|
309
|
-
});
|
|
310
307
|
}
|
|
311
|
-
|
|
308
|
+
|
|
312
309
|
Promise.allSettled([oCurrentUrlPromise, oParsingServicePromise]).then(function(aResult) {
|
|
313
310
|
var sURL = aResult[0].value,
|
|
314
311
|
oParsingService = aResult[1].value;
|
|
@@ -320,13 +317,18 @@ sap.ui.define([
|
|
|
320
317
|
});
|
|
321
318
|
} else {
|
|
322
319
|
oTemplateContract.oTemplatePrivateGlobalModel.setProperty("/generic/crossAppNavSupport", false);
|
|
323
|
-
}
|
|
320
|
+
}
|
|
324
321
|
});
|
|
325
322
|
CollaborationHelper.isTeamsModeActive().then(function(bIsActive) {
|
|
326
323
|
oTemplateContract.oTemplatePrivateGlobalModel.setProperty("/generic/isTeamsModeActive", bIsActive);
|
|
327
324
|
}).finally(function(bIsActive) {
|
|
328
|
-
// If MSTeams mode is active and in ghostApp init scenario do not load
|
|
325
|
+
// If MSTeams mode is active and in ghostApp init scenario do not load
|
|
329
326
|
if (!bIsActive && !oTemplateContract.ghostapp) {
|
|
327
|
+
// Load the FioriAI library
|
|
328
|
+
oTemplateContract.oFioriAIHandler = new FioriAIHandler(oTemplateContract);
|
|
329
|
+
oTemplateContract.oFioriAIHandler.loadAILibrary();
|
|
330
|
+
|
|
331
|
+
// Load the Insights library
|
|
330
332
|
CardHelper.getServiceAsync("UIService").then(function(oInstance) {
|
|
331
333
|
oTemplateContract.oTemplatePrivateGlobalModel.setProperty("/generic/insights", {
|
|
332
334
|
"oInsightsInstance": oInstance,
|
|
@@ -334,6 +336,9 @@ sap.ui.define([
|
|
|
334
336
|
});
|
|
335
337
|
oTemplateContract.oInsightsFECardProvider = new InsightsFECardProvider(oTemplateContract);
|
|
336
338
|
oTemplateContract.oInsightsFECardProvider.fnRegisterApplicationAsCardProvider();
|
|
339
|
+
//joule context provider registration
|
|
340
|
+
oTemplateContract.JouleContextProvider = new JouleContextProvider(oTemplateContract);
|
|
341
|
+
oTemplateContract.JouleContextProvider.fnRegisterProvider();
|
|
337
342
|
}).catch(Function.prototype);
|
|
338
343
|
}
|
|
339
344
|
});
|
|
@@ -396,9 +401,9 @@ sap.ui.define([
|
|
|
396
401
|
// Begin: Implementation of standard lifecycle methods
|
|
397
402
|
|
|
398
403
|
function init(){
|
|
399
|
-
// redirect app with shorten URL to actual URL. Method returns promise and
|
|
404
|
+
// redirect app with shorten URL to actual URL. Method returns promise and
|
|
400
405
|
// and resolved when redirection to full URL is complete.
|
|
401
|
-
// If already full URL then it resolved immediately without any redirection.
|
|
406
|
+
// If already full URL then it resolved immediately without any redirection.
|
|
402
407
|
var oExpandHashPromise = CollaborationHelper.processAndExpandHash();
|
|
403
408
|
var sAppComponentId = oAppComponent.getId();
|
|
404
409
|
oLogger.info("Init called for AppComponent " + sAppComponentId);
|
|
@@ -407,7 +412,7 @@ sap.ui.define([
|
|
|
407
412
|
if (RuntimeAuthoring.willRTAStartAfterReload()){
|
|
408
413
|
oLogger.info("AppComponent " + sAppComponentId + " has been restarted for RTA");
|
|
409
414
|
oDesigntimeHandler.start(true);
|
|
410
|
-
}
|
|
415
|
+
}
|
|
411
416
|
var oAppRegistryEntry = {
|
|
412
417
|
appComponent: oAppComponent,
|
|
413
418
|
oTemplateContract: oTemplateContract,
|
|
@@ -418,7 +423,16 @@ sap.ui.define([
|
|
|
418
423
|
oTemplateContract.oShellServicePromise = oAppComponent.getService("ShellUIService").catch(function(){
|
|
419
424
|
// fallback to old generic logic if service is not defined in manifest
|
|
420
425
|
var oShellServiceFactory = ServiceFactoryRegistry.get("sap.ushell.ui5service.ShellUIService");
|
|
421
|
-
|
|
426
|
+
var oServiceContext = {
|
|
427
|
+
scopeObject: oAppComponent,
|
|
428
|
+
scopeType: "component"
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
if (oShellServiceFactory) {
|
|
432
|
+
return Promise.resolve(oShellServiceFactory.createInstance(oServiceContext));
|
|
433
|
+
} else {
|
|
434
|
+
return Promise.reject();
|
|
435
|
+
}
|
|
422
436
|
});
|
|
423
437
|
oTemplateContract.oShellServicePromise.catch(function(){
|
|
424
438
|
oLogger.warning("No ShellService available");
|
|
@@ -428,7 +442,7 @@ sap.ui.define([
|
|
|
428
442
|
mSettings = extend({}, mSettings); // but should not be passed as an "official" setting
|
|
429
443
|
delete mSettings.ghostapp;
|
|
430
444
|
} else {
|
|
431
|
-
mSettings = mSettings || Object.create(null);
|
|
445
|
+
mSettings = mSettings || Object.create(null);
|
|
432
446
|
}
|
|
433
447
|
if (mSettings.draftSettings && mSettings.draftSettings.dataSaveFrequency === "immediate") {
|
|
434
448
|
oTemplateContract.nDelayedDraftTimerInSeconds = 0;
|
|
@@ -560,7 +574,7 @@ sap.ui.define([
|
|
|
560
574
|
});
|
|
561
575
|
return oTemplateContract.oNavigationHost;
|
|
562
576
|
}
|
|
563
|
-
|
|
577
|
+
|
|
564
578
|
function fnLeave(){
|
|
565
579
|
for (var sComponentId in oTemplateContract.componentRegistry){
|
|
566
580
|
var oRegistryEntry = oTemplateContract.componentRegistry[sComponentId];
|
|
@@ -592,6 +606,10 @@ sap.ui.define([
|
|
|
592
606
|
if (oTemplateContract.oInsightsFECardProvider) {
|
|
593
607
|
oTemplateContract.oInsightsFECardProvider.unRegisterApplicationAsCardProvider();
|
|
594
608
|
}
|
|
609
|
+
if (oTemplateContract.JouleContextProvider) {
|
|
610
|
+
oTemplateContract.JouleContextProvider.fnUnregisterProvider();
|
|
611
|
+
oTemplateContract.JouleContextProvider.destroy();
|
|
612
|
+
}
|
|
595
613
|
CommonMethods.setAppComponent(null);
|
|
596
614
|
(UIComponent.prototype.exit || Function.prototype).apply(oAppComponent, arguments);
|
|
597
615
|
fnDeregister();
|
|
@@ -617,7 +635,7 @@ sap.ui.define([
|
|
|
617
635
|
}
|
|
618
636
|
oTemplateContract.ghostapp = true;
|
|
619
637
|
oTemplateContract.aStateChangers.forEach(function(oStateChanger){
|
|
620
|
-
oStateChanger.leaveApp();
|
|
638
|
+
oStateChanger.leaveApp();
|
|
621
639
|
});
|
|
622
640
|
(oTemplateContract.oNavigationControllerProxy ? oTemplateContract.oNavigationControllerProxy.suspend : Function.prototype)();
|
|
623
641
|
fnLeaveAppResolve();
|
|
@@ -773,7 +791,7 @@ sap.ui.define([
|
|
|
773
791
|
function fnGetShellDataLossPopup(oShellContext) {
|
|
774
792
|
return !oTemplateContract.ghostapp && oTemplateContract.oDataLossHandler.getShellDataLossPopup(oShellContext);
|
|
775
793
|
}
|
|
776
|
-
|
|
794
|
+
|
|
777
795
|
var oNextStartupParameters; // next target for function navigateBasedOnStartupParameter
|
|
778
796
|
|
|
779
797
|
// This flag will be set if the app should refresh its data when navigateBasedOnStartupParameter is called the next time
|
|
@@ -793,47 +811,47 @@ sap.ui.define([
|
|
|
793
811
|
|
|
794
812
|
var oMethods = {
|
|
795
813
|
/**
|
|
796
|
-
*
|
|
814
|
+
*
|
|
797
815
|
* @private
|
|
798
816
|
*/
|
|
799
817
|
init: init,
|
|
800
818
|
/**
|
|
801
|
-
*
|
|
819
|
+
*
|
|
802
820
|
* @private
|
|
803
821
|
*/
|
|
804
822
|
createContent: createContent,
|
|
805
823
|
/**
|
|
806
|
-
*
|
|
824
|
+
*
|
|
807
825
|
* @private
|
|
808
826
|
*/
|
|
809
827
|
exit: exit,
|
|
810
828
|
/**
|
|
811
|
-
*
|
|
829
|
+
*
|
|
812
830
|
* @private
|
|
813
831
|
*/
|
|
814
832
|
suspend: suspend,
|
|
815
833
|
/**
|
|
816
|
-
*
|
|
834
|
+
*
|
|
817
835
|
* @private
|
|
818
836
|
*/
|
|
819
837
|
restore: restore,
|
|
820
838
|
/**
|
|
821
|
-
*
|
|
839
|
+
*
|
|
822
840
|
* @private
|
|
823
841
|
*/
|
|
824
842
|
getConfig: getConfig,
|
|
825
843
|
/**
|
|
826
|
-
*
|
|
844
|
+
*
|
|
827
845
|
* @private
|
|
828
846
|
*/
|
|
829
847
|
getInternalManifest: getInternalManifest,
|
|
830
848
|
|
|
831
849
|
/**
|
|
832
850
|
* Method returns the associated Transaction Controller
|
|
833
|
-
* @returns {sap.ui.generic.app.transaction.BaseController} Returns instance of
|
|
834
|
-
* {@link sap.ui.generic.app.transaction.DraftController DraftController} incase of
|
|
835
|
-
* Draft enabled application. In case application is non-draft, instance of
|
|
836
|
-
* {@link sap.ui.generic.app.transaction.TransactionController TransactionController} will be returned
|
|
851
|
+
* @returns {sap.ui.generic.app.transaction.BaseController} Returns instance of
|
|
852
|
+
* {@link sap.ui.generic.app.transaction.DraftController DraftController} incase of
|
|
853
|
+
* Draft enabled application. In case application is non-draft, instance of
|
|
854
|
+
* {@link sap.ui.generic.app.transaction.TransactionController TransactionController} will be returned
|
|
837
855
|
* @public
|
|
838
856
|
*/
|
|
839
857
|
getTransactionController: function() {
|
|
@@ -861,9 +879,9 @@ sap.ui.define([
|
|
|
861
879
|
|
|
862
880
|
/**
|
|
863
881
|
* Navigate to the target component based on the startup parameters passed as input. Currently this API
|
|
864
|
-
* is exposed only for consumption of My Inbox integration and should not be consumed by other consumers
|
|
882
|
+
* is exposed only for consumption of My Inbox integration and should not be consumed by other consumers
|
|
865
883
|
* without consent from the Fiori element V2 team
|
|
866
|
-
*
|
|
884
|
+
*
|
|
867
885
|
* @param {object} oStartupParameters Startup parameters for the application
|
|
868
886
|
* @internal
|
|
869
887
|
*/
|
|
@@ -882,12 +900,12 @@ sap.ui.define([
|
|
|
882
900
|
var oExecutionPromise = oTemplateContract.oNavigationControllerProxy.clearHistory().then(startupParameterHelper.parametersToNavigation.bind(null, oTemplateContract, oNextStartupParameters));
|
|
883
901
|
oTemplateContract.oBusyHelper.setBusy(oExecutionPromise);
|
|
884
902
|
oNextStartupParameters = null;
|
|
885
|
-
});
|
|
903
|
+
});
|
|
886
904
|
},
|
|
887
|
-
|
|
905
|
+
|
|
888
906
|
/**
|
|
889
907
|
* Refresh the data cached by this app. Currently this API
|
|
890
|
-
* is exposed only for consumption of My Inbox integration and should not be consumed by other consumers
|
|
908
|
+
* is exposed only for consumption of My Inbox integration and should not be consumed by other consumers
|
|
891
909
|
* without consent from the Fiori element V2 team.
|
|
892
910
|
* @param [object] oStartupParameters if provided it defines the object for which data should be refreshed. Otherwise, all data should be refreshed.
|
|
893
911
|
* @param {boolean} bIsCurrentlyVisible information whether myInbox is currently displaying this component
|
|
@@ -916,12 +934,16 @@ sap.ui.define([
|
|
|
916
934
|
/**
|
|
917
935
|
* Main class used for Smart Template(Fiori elements V2) Application Component
|
|
918
936
|
* @class Smart Templates Application Component
|
|
937
|
+
* @abstract
|
|
919
938
|
*
|
|
939
|
+
* @param {string}
|
|
940
|
+
* [sId] Generated automatically if no non-empty ID is given;
|
|
941
|
+
* @param {object}
|
|
942
|
+
* [mSettings] Initial settings for the new AppComponent instance
|
|
920
943
|
* @public
|
|
921
944
|
* @extends sap.ui.core.UIComponent
|
|
922
|
-
* @abstract
|
|
923
945
|
* @author SAP SE
|
|
924
|
-
* @version 1.
|
|
946
|
+
* @version 1.127.1
|
|
925
947
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
926
948
|
*/
|
|
927
949
|
var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -971,6 +993,10 @@ sap.ui.define([
|
|
|
971
993
|
type: "object",
|
|
972
994
|
defaultValue: null
|
|
973
995
|
},
|
|
996
|
+
tableSettings: {
|
|
997
|
+
type: "object",
|
|
998
|
+
defaultValue: null
|
|
999
|
+
},
|
|
974
1000
|
// "tableColumnVerticalAlignment" to set the vAlign property of columnListItem for responsive tables across LR,WL and OP
|
|
975
1001
|
tableColumnVerticalAlignment: {
|
|
976
1002
|
type: "string",
|
|
@@ -1002,9 +1028,9 @@ sap.ui.define([
|
|
|
1002
1028
|
draftDiscardConfirmationSettings: {
|
|
1003
1029
|
type:"object",
|
|
1004
1030
|
defaultValue: {enabled: "always"}
|
|
1005
|
-
},
|
|
1031
|
+
},
|
|
1006
1032
|
collaborationSettings : {
|
|
1007
|
-
type: "object",
|
|
1033
|
+
type: "object",
|
|
1008
1034
|
defaultValue: {
|
|
1009
1035
|
isShareAsCardEnabled: true
|
|
1010
1036
|
}
|
|
@@ -1043,7 +1069,7 @@ sap.ui.define([
|
|
|
1043
1069
|
oDesigntimeHandler.stop();
|
|
1044
1070
|
}
|
|
1045
1071
|
}
|
|
1046
|
-
}
|
|
1072
|
+
}
|
|
1047
1073
|
},
|
|
1048
1074
|
|
|
1049
1075
|
/**
|
|
@@ -1055,7 +1081,7 @@ sap.ui.define([
|
|
|
1055
1081
|
suppressDataLossPopup: function() {
|
|
1056
1082
|
return false;
|
|
1057
1083
|
},
|
|
1058
|
-
|
|
1084
|
+
|
|
1059
1085
|
constructor: function() {
|
|
1060
1086
|
var oAppId = testableHelper.startApp(); // suppress access to private methods in productive coding
|
|
1061
1087
|
extend(this, getMethods(this, oAppId));
|
|
@@ -1065,9 +1091,9 @@ sap.ui.define([
|
|
|
1065
1091
|
|
|
1066
1092
|
/**
|
|
1067
1093
|
* Implement "_fnGetRouterClassName" hook to derive the router class name.
|
|
1068
|
-
* We do not want to have router class derived from "/sap.ui5/routing" section of manifest settings,
|
|
1069
|
-
* instead derive it from FCL setting of Fiori Elements section ("sap.ui.generic.app")
|
|
1070
|
-
* @param {*} oManifest
|
|
1094
|
+
* We do not want to have router class derived from "/sap.ui5/routing" section of manifest settings,
|
|
1095
|
+
* instead derive it from FCL setting of Fiori Elements section ("sap.ui.generic.app")
|
|
1096
|
+
* @param {*} oManifest
|
|
1071
1097
|
* @returns {string} Router class name
|
|
1072
1098
|
*/
|
|
1073
1099
|
oAppComponent._fnGetRouterClassName = function (oManifest) {
|
|
@@ -923,10 +923,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
923
923
|
setNextFocus: oFocusHelper.setNextFocus,
|
|
924
924
|
getIntentPromise: getIntentPromise,
|
|
925
925
|
getComponentUtilsIfLoaded: getComponentUtilsIfLoaded,
|
|
926
|
-
preloadComponent: fnPreloadComponent
|
|
927
|
-
getSummarizationLibraryUrl : function() {
|
|
928
|
-
return oTemplateContract.sSummarizationLibraryUrl;
|
|
929
|
-
}
|
|
926
|
+
preloadComponent: fnPreloadComponent
|
|
930
927
|
};
|
|
931
928
|
}
|
|
932
929
|
|
|
@@ -4,7 +4,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
4
4
|
|
|
5
5
|
var oRejectedPromise = Promise.reject();
|
|
6
6
|
oRejectedPromise.catch(Function.prototype);
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
function createNonDraft(oParentContext, sBindingPath, oModel, vPredefinedValues, bMakeRequestsCanonical) {
|
|
9
9
|
var oCreateContext = oModel.createEntry(sBindingPath, {
|
|
10
10
|
properties: vPredefinedValues,
|
|
@@ -184,7 +184,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
184
184
|
MessageUtils.handleTransientMessages(oTemplateContract);
|
|
185
185
|
});
|
|
186
186
|
};
|
|
187
|
-
|
|
187
|
+
|
|
188
188
|
var fnPropertyChanged = function(oEvent){
|
|
189
189
|
oTemplateContract.oTemplatePrivateGlobalModel.setProperty("/generic/draftIndicatorState", sap.m.DraftIndicatorState.Clear);
|
|
190
190
|
|
|
@@ -242,7 +242,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
242
242
|
var oEditEntityPromise = oTransactionController.editEntity(oContext, false, sRootExpand);
|
|
243
243
|
resolve(oEditEntityPromise);
|
|
244
244
|
// The active context is invalidated as the DraftAdministrativeData of the context(the active context) has changed after draft creation.
|
|
245
|
-
// This is done to keep the DraftAdministrativeData of the record updated.
|
|
245
|
+
// This is done to keep the DraftAdministrativeData of the record updated.
|
|
246
246
|
oEditEntityPromise.then(function(){
|
|
247
247
|
oModel.invalidateEntry(oContext);
|
|
248
248
|
});
|
|
@@ -291,7 +291,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
291
291
|
oModel.createBindingContext(sBindingPath, null, null, function(oBindingContext){
|
|
292
292
|
if (oDraftContext.isDraftEnabled(sEntitySet)) {
|
|
293
293
|
// todo: enable preserveChanges
|
|
294
|
-
if (true || !oDraftContext.hasPreserveChanges(oBindingContext)) {
|
|
294
|
+
//if (true || !oDraftContext.hasPreserveChanges(oBindingContext)) { //Commenting out this if condition to avoid eslint error
|
|
295
295
|
fnReadDraftAdministrativeData(oModel, sBindingPath, oTemplateContract.oBusyHelper).then(function(oResponse) {
|
|
296
296
|
if (!oResponse.DraftAdministrativeData || oResponse.DraftAdministrativeData.DraftIsCreatedByMe) {
|
|
297
297
|
// no or own draft
|
|
@@ -319,7 +319,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
319
319
|
draftAdminReadResponse: oResponse
|
|
320
320
|
});
|
|
321
321
|
});
|
|
322
|
-
}
|
|
322
|
+
//}
|
|
323
323
|
} else {
|
|
324
324
|
resolve({
|
|
325
325
|
context: oBindingContext
|
|
@@ -331,8 +331,8 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
331
331
|
oTemplateContract.oBusyHelper.setBusy(oRet, true);
|
|
332
332
|
return oRet;
|
|
333
333
|
}
|
|
334
|
-
|
|
335
|
-
/*
|
|
334
|
+
|
|
335
|
+
/*
|
|
336
336
|
Allows direct edit on the entires on the list, unlike the method 'edit'above, this method first edit the entry with preserveChanges as true
|
|
337
337
|
If the response indicates an unsaved change or locked record, a corresponding dialog is shown to proceed or cancel with the edit.
|
|
338
338
|
*/
|
|
@@ -346,7 +346,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
346
346
|
oViewDependencyHelper.setRootPageToDirty();
|
|
347
347
|
resolve({
|
|
348
348
|
context: oResponse.context
|
|
349
|
-
});
|
|
349
|
+
});
|
|
350
350
|
}, function(oResponse) {
|
|
351
351
|
if (oResponse && oResponse.response && oResponse.response.statusCode === "409") {
|
|
352
352
|
//remove transient message associated with rc 409 in order to prevent message pop-up
|
|
@@ -364,7 +364,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
364
364
|
oViewDependencyHelper.setRootPageToDirty();
|
|
365
365
|
resolve({
|
|
366
366
|
context: oResponse.context
|
|
367
|
-
});
|
|
367
|
+
});
|
|
368
368
|
});
|
|
369
369
|
oApplication.getBusyHelper().setBusy(oUnsavedChangesEditPromise, true);
|
|
370
370
|
};
|
|
@@ -393,7 +393,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
393
393
|
});
|
|
394
394
|
return oPromise;
|
|
395
395
|
}
|
|
396
|
-
|
|
396
|
+
|
|
397
397
|
function deleteEntity(oDraftController, fnExecuteDelete, oApplicationProxy, oContext, bIsActiveEntity, sActionType){
|
|
398
398
|
var bHasActiveEntity = oDraftController.hasActiveEntity(oContext);
|
|
399
399
|
var oSiblingPromise = bHasActiveEntity && !bIsActiveEntity ? oApplicationProxy.getDraftSiblingPromise(oContext) : Promise.resolve();
|
|
@@ -404,10 +404,10 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
404
404
|
return { context: oActive };
|
|
405
405
|
};
|
|
406
406
|
var oCancellationPromise = oDeletePromise.then(fnTransformActiveContext);
|
|
407
|
-
oApplicationProxy.cancellationStarted(oContext, oCancellationPromise, sActionType, oActive);
|
|
407
|
+
oApplicationProxy.cancellationStarted(oContext, oCancellationPromise, sActionType, oActive);
|
|
408
408
|
}
|
|
409
409
|
return oDeletePromise;
|
|
410
|
-
});
|
|
410
|
+
});
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
function discardDraft(oDraftController, oTransactionController, oApplicationProxy, oContext){
|
|
@@ -416,7 +416,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
416
416
|
};
|
|
417
417
|
return deleteEntity(oDraftController, fnExecuteDelete, oApplicationProxy, oContext, false, "discardAction");
|
|
418
418
|
}
|
|
419
|
-
|
|
419
|
+
|
|
420
420
|
function fnGetMessagesFromContextFilter(oContextFilter, oMessageManager, bExcludeETagMessages) {
|
|
421
421
|
var oMessageModel = oMessageManager.getMessageModel();
|
|
422
422
|
var oMessageBinding = oMessageModel.bindList("/", null, null, [oContextFilter]); // Note: It is necessary to create this binding each time, since UI5 does not update it (because there is no change handler)
|
|
@@ -425,7 +425,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
425
425
|
});
|
|
426
426
|
if (bExcludeETagMessages){
|
|
427
427
|
aRet = aRet.filter(function(oMessage){
|
|
428
|
-
return !MessageUtils.isMessageETagMessage(oMessage);
|
|
428
|
+
return !MessageUtils.isMessageETagMessage(oMessage);
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
431
|
return aRet;
|
|
@@ -479,7 +479,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
479
479
|
// In case 2 and 3 it is expected that at least one of those messages is an error message.
|
|
480
480
|
// Note that in case 2 and possibly also in case 1 we need to suppress the generic error message (like "An exception has occurred") which is coming as a transient message to
|
|
481
481
|
// indicate that the activation request has failed.
|
|
482
|
-
// Note that case 3 has 2 subcases
|
|
482
|
+
// Note that case 3 has 2 subcases
|
|
483
483
|
// 3a) Some severe technical error has happened which even prevented the Preparation call to be executed successfully
|
|
484
484
|
// 3b) The Preparation call was successful and did not find any reason which prevents activation. However, the call of activation failed.
|
|
485
485
|
// Note that this failure may still be because of business reasons (excluding reasons named in case 1) or technical reasons.
|
|
@@ -526,12 +526,12 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
526
526
|
var bHasStateError = aCurrentStateMessages.some(function(oMessage) {
|
|
527
527
|
return oMessage.type === "Error";
|
|
528
528
|
});
|
|
529
|
-
var
|
|
529
|
+
var bHasStateWarning = aCurrentStateMessages.some(function(oMessage) {
|
|
530
|
+
return oMessage.type === "Warning";
|
|
531
|
+
});
|
|
532
|
+
var bIsWarning = bIs412 && !bHasStateError && (!!aTransientWarnings.length || bHasStateWarning);
|
|
530
533
|
if (bIsWarning) {
|
|
531
534
|
// Only show transient warnings in the confirmation popup if no state warning is available (note that backend sometimes sends warnings redundantly as transient and state message)
|
|
532
|
-
var bHasStateWarning = aCurrentStateMessages.some(function(oMessage) {
|
|
533
|
-
return oMessage.type === "Warning";
|
|
534
|
-
});
|
|
535
535
|
var aMessagesForUserDecision = bHasStateWarning ? aCurrentStateMessages : aTransientWarnings;
|
|
536
536
|
var oCustomMessageProvider = aCurrentStateMessages.length === 0 && { // if confirmation popup is to show transient messages these messages should be excluded from the
|
|
537
537
|
isCustomMessage: function (oMessage) { // normal handling of transient messages (until the confirmation popup is closed)
|
|
@@ -541,7 +541,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
541
541
|
if (oCustomMessageProvider){
|
|
542
542
|
oServices.oApplication.registerCustomMessageProvider(oCustomMessageProvider);
|
|
543
543
|
}
|
|
544
|
-
oServices.oApplication.removeTransientMessages();
|
|
544
|
+
oServices.oApplication.removeTransientMessages();
|
|
545
545
|
var fnOnConfirmationPopupClose = function(bConfirmed){
|
|
546
546
|
if (oCustomMessageProvider){ // if transient messages have been shown in the confirmation popup they can be removed from the message model when the confirmation popup is closed
|
|
547
547
|
oServices.oApplication.deregisterCustomMessageProvider(oCustomMessageProvider);
|
|
@@ -581,7 +581,7 @@ sap.ui.define(["sap/ui/model/Context", "sap/suite/ui/generic/template/lib/Messag
|
|
|
581
581
|
oBusyHelper.setBusy(oGetSiblingPromise);
|
|
582
582
|
oGetSiblingPromise.then(fnActivate.bind(null, false));
|
|
583
583
|
});
|
|
584
|
-
|
|
584
|
+
|
|
585
585
|
oBusyHelper.setBusy(oActivationStartedPromise);
|
|
586
586
|
});
|
|
587
587
|
return oRet;
|
|
@@ -606,19 +606,23 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
606
606
|
}
|
|
607
607
|
|
|
608
608
|
function getActionUtil(mParameters){
|
|
609
|
-
|
|
609
|
+
var oActionUtil = new ActionUtil(mParameters);
|
|
610
|
+
// NOTE: The following property is set using the setter method to ensure even if the values
|
|
611
|
+
// are i18N paths, it is taken over and not been resolved at the time of setting
|
|
612
|
+
oActionUtil.setActionLabel(mParameters.actionLabel);
|
|
613
|
+
return oActionUtil;
|
|
610
614
|
}
|
|
611
615
|
|
|
612
616
|
/*
|
|
613
617
|
* Calls generic app layer to get default values. If oPredefinedValues are passed then it overrides the values returned from the default values function.
|
|
614
618
|
* Default value function is invoked when the application is non-draft (or) inline creation rows feature enabled
|
|
615
619
|
* @param {object} oEventSource to extract context and entityset
|
|
616
|
-
* @param {object}
|
|
620
|
+
* @param {object} mPredefinedValues existing predefined values
|
|
617
621
|
* @param {boolean} bIsInlineCreationRowsEnabled is inline creation rows feature enabled
|
|
618
622
|
* @returns {Promise} A <code>Promise</code> for default value function predefined values are returned if no default values function exists. If both are not available then an empty object is returned.
|
|
619
623
|
* @public
|
|
620
624
|
*/
|
|
621
|
-
function getDefaultValues(oEventSource,
|
|
625
|
+
function getDefaultValues(oEventSource, mPredefinedValues, bIsInlineCreationRowsEnabled) {
|
|
622
626
|
if (!oComponentUtils.isDraftEnabled() || bIsInlineCreationRowsEnabled) {
|
|
623
627
|
var oContext, sNavigationProperty;
|
|
624
628
|
var oPresentationControlHandler = oServices.oPresentationControlHandlerFactory.getPresentationControlHandler(oCommonUtils.getOwnerPresentationControl(oEventSource));
|
|
@@ -633,9 +637,9 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
633
637
|
} else {
|
|
634
638
|
oContext = new Context(oPresentationControlHandler.getModel(), "/" + sEntitySet);
|
|
635
639
|
}
|
|
636
|
-
return oServices.oTransactionController.getDefaultValues([oContext],
|
|
640
|
+
return oServices.oTransactionController.getDefaultValues([oContext], mPredefinedValues, sNavigationProperty);
|
|
637
641
|
} else {
|
|
638
|
-
return
|
|
642
|
+
return mPredefinedValues;
|
|
639
643
|
}
|
|
640
644
|
}
|
|
641
645
|
|
|
@@ -648,9 +652,8 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
648
652
|
var aFailed = [];
|
|
649
653
|
var aWarning = [];
|
|
650
654
|
var bSuccess = false;
|
|
651
|
-
var
|
|
655
|
+
var mContextIndependentParameterData = Object.create(null);
|
|
652
656
|
var aWarningIndex = [];
|
|
653
|
-
var sFunctionImportPath = mParameters.functionImportPath;
|
|
654
657
|
var aCurrentContexts = mParameters.contexts || [];
|
|
655
658
|
var oSourceControlHandler = mParameters.sourceControlHandler;
|
|
656
659
|
// Code to support context Independent actions with parameter
|
|
@@ -664,7 +667,6 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
664
667
|
}
|
|
665
668
|
var sFunctionImportLabel = mParameters.label;
|
|
666
669
|
var sOperationGrouping = mParameters.operationGrouping;
|
|
667
|
-
var oSkipProperties = mParameters.skipProperties;
|
|
668
670
|
var fnCleanUpContext = function(){
|
|
669
671
|
// remove pending request from the last change of the model
|
|
670
672
|
// actually, this should rather be done by ActionUtil itself
|
|
@@ -715,15 +717,19 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
715
717
|
}
|
|
716
718
|
var oActionProcessor = getActionUtil({
|
|
717
719
|
controller: oController,
|
|
718
|
-
contexts: aContexts,
|
|
719
720
|
applicationController: oServices.oApplicationController,
|
|
721
|
+
contexts: aContexts,
|
|
722
|
+
functionImport: mParameters.functionImport,
|
|
723
|
+
functionImportPath: mParameters.functionImportPath,
|
|
724
|
+
entityType: mParameters.entityType,
|
|
725
|
+
actionLabel: sFunctionImportLabel,
|
|
726
|
+
actionButtonText: mParameters.actionButtonText,
|
|
727
|
+
isDraftEnabled: oComponentUtils.isDraftEnabled(),
|
|
728
|
+
contextIndependentParameterData: mContextIndependentParameterData,
|
|
729
|
+
expand: mParameters.sRootExpand,
|
|
720
730
|
operationGrouping: sOperationGrouping
|
|
721
731
|
});
|
|
722
|
-
|
|
723
|
-
mAdditionalParmsData = Object.create(null);
|
|
724
|
-
}
|
|
725
|
-
mAdditionalParmsData.expand = mParameters.sRootExpand;
|
|
726
|
-
oActionProcessor.call(sFunctionImportPath, sFunctionImportLabel, oComponentUtils.isDraftEnabled(), oSkipProperties, bIsStrict, mAdditionalParmsData).then(function(oResult){
|
|
732
|
+
oActionProcessor.call(bIsStrict).then(function(oResult){
|
|
727
733
|
var oSessionParams = {};
|
|
728
734
|
oSessionParams.actionLabel = sFunctionImportLabel;
|
|
729
735
|
oBusyHelper.setBusy(oResult.executionPromise, null, oSessionParams);
|
|
@@ -744,7 +750,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
744
750
|
// userEnteredAdditionalParams represents the parameter that user has entered in parameter dialog,
|
|
745
751
|
// We get back these param in order to fill the parameter dialog, when user accepts the warning and proceeds.
|
|
746
752
|
// We do this to avoid reentering the same data again in paramater dialog.
|
|
747
|
-
|
|
753
|
+
mContextIndependentParameterData = aResponse[0].userEnteredAdditionalParams;
|
|
748
754
|
var oParsedResult = fnParseResponse(aPaths, aFormattedResponse, bWithWarningDialog);
|
|
749
755
|
aFailed = aFailed.concat(mapToArray(oParsedResult.mFailed));
|
|
750
756
|
aSuccess = aSuccess.concat(mapToArray(oParsedResult.mSuccess));
|
|
@@ -848,12 +854,13 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
848
854
|
var oMetaModel = oModel.getMetaModel();
|
|
849
855
|
var oComponent = oController.getOwnerComponent();
|
|
850
856
|
var sEntitySet = oComponent.getEntitySet();
|
|
851
|
-
var
|
|
857
|
+
var oFunctionImport = getFunctionImport(oMetaModel, mParameters.functionImportPath);
|
|
852
858
|
var oEntitySet = oMetaModel.getODataEntitySet(sEntitySet);
|
|
853
|
-
|
|
854
|
-
var sFunctionImportReturnType = oFuctionImport && oFuctionImport.returnType;
|
|
859
|
+
var sFunctionImportReturnType = oFunctionImport && oFunctionImport.returnType;
|
|
855
860
|
var sEntityType = oEntitySet && oEntitySet.entityType;
|
|
856
|
-
|
|
861
|
+
var oEntityType = oMetaModel.getODataEntityType(sEntityType);
|
|
862
|
+
mParameters.functionImport = oFunctionImport;
|
|
863
|
+
mParameters.entityType = oEntityType;
|
|
857
864
|
if (sFunctionImportReturnType === sEntityType) {
|
|
858
865
|
var oAppComponent = oComponent.getAppComponent();
|
|
859
866
|
var oOPComponentUtils = oServices.oApplication.getComponentUtilsIfLoaded(sEntitySet); // oOPComponentUtils would differ from oComponentUtils if this instance belongs to the root page
|
|
@@ -875,6 +882,14 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
875
882
|
return oRet;
|
|
876
883
|
}
|
|
877
884
|
|
|
885
|
+
function getFunctionImport(oMetaModel, sFunctionImportPath) {
|
|
886
|
+
if (oMetaModel && sFunctionImportPath) {
|
|
887
|
+
var sFunctionImportName = sFunctionImportPath.split("/").pop();
|
|
888
|
+
return oMetaModel.getODataFunctionImport(sFunctionImportName);
|
|
889
|
+
}
|
|
890
|
+
return undefined;
|
|
891
|
+
}
|
|
892
|
+
|
|
878
893
|
/*
|
|
879
894
|
* Adds an entry to a table. Only called in draft scenarios.
|
|
880
895
|
*
|