@sapui5/sap.suite.ui.generic.template 1.149.0 → 1.150.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.
- package/package.json +1 -1
- package/src/sap/suite/ui/generic/template/.library +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/VisualFilterDialogController.js +4 -4
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +6 -3
- 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 +12 -13
- package/src/sap/suite/ui/generic/template/ObjectPage/Component.js +7 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +39 -5
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/PasteHandler.js +100 -18
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ValueHelpDataFetcher.js +178 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n.properties +6 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ar.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_bg.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ca.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cnr.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cs.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cy.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_da.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_de.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_el.properties +5 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_GB.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_US_sappsd.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_US_saprigi.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_es.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_es_MX.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_et.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fi.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fr.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fr_CA.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hi.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hr.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hu.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_id.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_it.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_iw.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ja.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_kk.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ko.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_lt.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_lv.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_mk.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ms.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_nl.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_no.properties +6 -2
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pl.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pt.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pt_PT.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ro.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ru.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sh.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sk.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sl.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sr.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sv.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_th.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_tr.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_uk.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_vi.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_zh_CN.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_zh_TW.properties +4 -0
- 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 +9 -11
- 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/designtimeUtils.js +2 -2
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +48 -8
- package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +0 -1
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +24 -14
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +22 -3
- package/src/sap/suite/ui/generic/template/lib/MessageUtils.js +4 -3
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillAIOrchestrator.js +43 -9
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillApplyHandler.js +67 -218
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillDialogController.js +55 -8
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFieldCollector.js +214 -35
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFormRenderer.js +93 -18
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillHandler.js +421 -46
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillTableRenderer.js +512 -63
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillDialog.fragment.xml +33 -22
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +90 -73
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +27 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +20 -4
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +19 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +36 -20
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +29 -13
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +18 -2
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/library.js +1 -1
- package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +22 -1
|
@@ -303,9 +303,9 @@ sap.ui.define([
|
|
|
303
303
|
"sap/m/MessageStrip"
|
|
304
304
|
], function (Dialog, Button, MessageStrip) {
|
|
305
305
|
const warningText = new MessageStrip({
|
|
306
|
-
type: MessageType.
|
|
306
|
+
type: MessageType.Warning,
|
|
307
307
|
showIcon: true,
|
|
308
|
-
text: "{i18n>
|
|
308
|
+
text: "{i18n>RTA_CONFIGURATION_WARNING_MESSAGE}"
|
|
309
309
|
});
|
|
310
310
|
warningText.addStyleClass("sapUiSmallMarginBottom");
|
|
311
311
|
const dialog = new Dialog({
|
|
@@ -27,6 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
var aBasicFilters = [];
|
|
28
28
|
var oSmartFilterBar = oControl;
|
|
29
29
|
var oEasyFilterCallbacks = null;
|
|
30
|
+
var oPendingEasyFilterState = null;
|
|
30
31
|
|
|
31
32
|
var oVariantManagementInitializedPromise;
|
|
32
33
|
|
|
@@ -71,21 +72,47 @@ sap.ui.define([
|
|
|
71
72
|
// after this has happened, we can get the custom data from SFB.
|
|
72
73
|
oSmartFilterBar.attachAfterVariantLoad(function(){
|
|
73
74
|
var oCustomData = oSmartFilterBar.getCustomFilterData();
|
|
75
|
+
var oGenericData;
|
|
76
|
+
if (oCustomData && oCustomData[dataPropertyNameGeneric]) {
|
|
77
|
+
oGenericData = oCustomData[dataPropertyNameGeneric];
|
|
78
|
+
} else {
|
|
79
|
+
// getCustomFilterData() returns null on cold start (no prior sap-iapp-state) because
|
|
80
|
+
// setCustomFilterData() is only called from beforeVariantFetch (variant save path),
|
|
81
|
+
// never during the initial LREP variant load. The _CUSTOM section is present in the
|
|
82
|
+
// variant content — fall back to reading it via getVariantContent().
|
|
83
|
+
try {
|
|
84
|
+
var oSVM = oSmartFilterBar.getSmartVariant();
|
|
85
|
+
// getCurrentVariantId() converts STANDARDVARIANTKEY to "" which _getVariantById can't look up.
|
|
86
|
+
// getCurrentVariantKey() returns the raw internal key and works for all variants.
|
|
87
|
+
var sVariantKey = oSVM && (oSVM.getCurrentVariantKey ? oSVM.getCurrentVariantKey() : oSVM.getStandardVariantKey());
|
|
88
|
+
var oVariantContent = oSVM && oSVM.getVariantContent(oSmartFilterBar, sVariantKey);
|
|
89
|
+
var oFilterBarVariant = oVariantContent && oVariantContent.filterBarVariant && JSON.parse(oVariantContent.filterBarVariant);
|
|
90
|
+
var oCustomSection = oFilterBarVariant && oFilterBarVariant._CUSTOM;
|
|
91
|
+
oGenericData = (oCustomSection && oCustomSection[dataPropertyNameGeneric]) || Object.create(null);
|
|
92
|
+
} catch (e) {
|
|
93
|
+
oGenericData = Object.create(null);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
74
96
|
// variant stored with 1.103 or later: all customFilter data stored in property customFilters
|
|
75
97
|
// legacy variant stored with 1.102 or earlier: customFilters (from storing point of view) separated according to their origin
|
|
76
|
-
var oCustomFiltersState =
|
|
77
|
-
editState:
|
|
78
|
-
appExtension: oCustomData[dataPropertyNameCustom],
|
|
79
|
-
adaptationExtensions: oCustomData[dataPropertyNameExtension]
|
|
98
|
+
var oCustomFiltersState = oGenericData.customFilters || {
|
|
99
|
+
editState: oGenericData.editStateFilter,
|
|
100
|
+
appExtension: oCustomData && oCustomData[dataPropertyNameCustom],
|
|
101
|
+
adaptationExtensions: oCustomData && oCustomData[dataPropertyNameExtension]
|
|
80
102
|
};
|
|
81
103
|
aBasicFilters = oSmartFilterBar.getAllFilterItems(true);
|
|
82
104
|
mParams.oCustomFiltersWrapper.setState(oCustomFiltersState);
|
|
83
|
-
oSVMWrapperCallbacks.setManagedControlStates(
|
|
105
|
+
oSVMWrapperCallbacks.setManagedControlStates(oGenericData);
|
|
84
106
|
if (oEasyFilterCallbacks) {
|
|
85
107
|
oEasyFilterCallbacks.setState({
|
|
86
|
-
filterMode:
|
|
87
|
-
easyFilter:
|
|
108
|
+
filterMode: oGenericData.filterMode,
|
|
109
|
+
easyFilter: oGenericData.easyFilter
|
|
88
110
|
});
|
|
111
|
+
} else {
|
|
112
|
+
oPendingEasyFilterState = {
|
|
113
|
+
filterMode: oGenericData.filterMode,
|
|
114
|
+
easyFilter: oGenericData.easyFilter
|
|
115
|
+
};
|
|
89
116
|
}
|
|
90
117
|
});
|
|
91
118
|
|
|
@@ -142,7 +169,8 @@ sap.ui.define([
|
|
|
142
169
|
.map(oFilterItem => oFilterItem.getName()),
|
|
143
170
|
...aRemovedFromStandard
|
|
144
171
|
])],
|
|
145
|
-
customFilters: mParams.oCustomFiltersWrapper.getState()
|
|
172
|
+
customFilters: mParams.oCustomFiltersWrapper.getState(),
|
|
173
|
+
easyFilterState: oEasyFilterCallbacks ? oEasyFilterCallbacks.getState() : null
|
|
146
174
|
};
|
|
147
175
|
}
|
|
148
176
|
|
|
@@ -175,6 +203,14 @@ sap.ui.define([
|
|
|
175
203
|
|
|
176
204
|
mParams.oCustomFiltersWrapper.setState(oState && oState.customFilters);
|
|
177
205
|
|
|
206
|
+
if (oState && oState.easyFilterState) {
|
|
207
|
+
if (oEasyFilterCallbacks) {
|
|
208
|
+
oEasyFilterCallbacks.setState(oState.easyFilterState);
|
|
209
|
+
} else {
|
|
210
|
+
oPendingEasyFilterState = oState.easyFilterState;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
178
214
|
// set visibility
|
|
179
215
|
// TODO:
|
|
180
216
|
// - How to deal with old states (not containing all information about visibility) -> legacy state handler?
|
|
@@ -250,6 +286,10 @@ sap.ui.define([
|
|
|
250
286
|
setSVMWrapperCallbacks: setSVMWrapperCallbacks,
|
|
251
287
|
setEasyFilterCallbacks: function(oCallbacks) {
|
|
252
288
|
oEasyFilterCallbacks = oCallbacks;
|
|
289
|
+
if (oPendingEasyFilterState) {
|
|
290
|
+
oEasyFilterCallbacks.setState(oPendingEasyFilterState);
|
|
291
|
+
oPendingEasyFilterState = null;
|
|
292
|
+
}
|
|
253
293
|
},
|
|
254
294
|
bVMConnection: oSmartFilterBar.getSmartVariant(),
|
|
255
295
|
suppressSelection: oSmartFilterBar.setSuppressSelection.bind(oSmartFilterBar), // if multiple reasons for suppressing overlap, a counter (to avoid to early resume) could be implemented here
|
|
@@ -734,7 +734,6 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
734
734
|
}
|
|
735
735
|
},
|
|
736
736
|
|
|
737
|
-
|
|
738
737
|
getShareOptionVisibility: function(bFlexibleColumnLayout) {
|
|
739
738
|
if (bFlexibleColumnLayout) {
|
|
740
739
|
return "{= !(" + fnGetCommonShareVisibilityPath() + " || ${_templPrivGlobal>/generic/FCL/highestViewLevel})}";
|
|
@@ -959,7 +959,7 @@ sap.ui.define([
|
|
|
959
959
|
* @public
|
|
960
960
|
* @extends sap.ui.core.UIComponent
|
|
961
961
|
* @author SAP SE
|
|
962
|
-
* @version 1.
|
|
962
|
+
* @version 1.150.0
|
|
963
963
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
964
964
|
*/
|
|
965
965
|
var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -541,7 +541,13 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
541
541
|
var aMessagesBeforeSave = CRUDHelper.fnGetMessagesFromContextFilter(oContextFilter, oMessageManager, true);
|
|
542
542
|
var mMessagesBeforeSave = Object.create(null);
|
|
543
543
|
aMessagesBeforeSave.forEach(function(oMessage){
|
|
544
|
-
|
|
544
|
+
// Exclude transition messages (persistent === false) left over from a prior 412 response.
|
|
545
|
+
// Including them causes false-positive deduplication on retry: the new 412 produces
|
|
546
|
+
// the same message IDs, they are filtered out of aNewMessages, and fnHandleWarning
|
|
547
|
+
// is never called.
|
|
548
|
+
if (oMessage.persistent !== false) {
|
|
549
|
+
mMessagesBeforeSave[oMessage.getId()] = oMessage;
|
|
550
|
+
}
|
|
545
551
|
});
|
|
546
552
|
|
|
547
553
|
// Handles the 412 Warning case.
|
|
@@ -564,10 +570,23 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
564
570
|
var aMessagesAfterSave = CRUDHelper.fnGetMessagesFromContextFilter(oContextFilter, oMessageManager, true);
|
|
565
571
|
var aAllMessages = aMessagesAfterSave.map(function(oMessage){
|
|
566
572
|
if (!mMessagesBeforeSave[oMessage.getId()]) { // if this is a new message
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
573
|
+
// Create a new Message instance instead of mutating the original object.
|
|
574
|
+
// The original object may be held by ODataMessageParser._lastMessages; mutating it
|
|
575
|
+
// in-place causes _propagateMessages to treat the message as non-persistent on the
|
|
576
|
+
// next successful OData response and silently remove it before the popover opens.
|
|
577
|
+
var oNewMessage = new Message({
|
|
578
|
+
message: oMessage.getMessage(),
|
|
579
|
+
type: oMessage.getType(),
|
|
580
|
+
target: oMessage.getTargets ? oMessage.getTargets() : [oMessage.getTarget()],
|
|
581
|
+
processor: oMessage.getMessageProcessor(),
|
|
582
|
+
persistent: false,
|
|
583
|
+
technical: false,
|
|
584
|
+
code: oMessage.getCode(),
|
|
585
|
+
description: oMessage.getDescription(),
|
|
586
|
+
technicalDetails: oMessage.getTechnicalDetails()
|
|
587
|
+
});
|
|
588
|
+
bWarningOccured = bWarningOccured || oNewMessage.technicalDetails.statusCode === "412" && oNewMessage.technicalDetails.headers["preference-applied"] === "handling=strict";
|
|
589
|
+
aNewMessages.push(oNewMessage);
|
|
571
590
|
}
|
|
572
591
|
return oMessage;
|
|
573
592
|
});
|
|
@@ -577,15 +596,6 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
577
596
|
// If there is at least one new message we assume that the backend has checked the object (and found business errors). Thus, the old messages can be removed and only the new messages
|
|
578
597
|
// have to stay. However, we delete all messages and then add the new ones. This ensures, that the message model gets a change event even if no message has been there before.
|
|
579
598
|
// This will trigger the follow-up activities.
|
|
580
|
-
// Reset pending changes before adding messages to prevent infinite loop when entering edit mode again.
|
|
581
|
-
// Invalid values cause infinite loop because the pending changes (with invalid values) are resubmitted when the user clicks Edit, triggering the same error.
|
|
582
|
-
// Must run before addMessages: resetChanges calls _discardEntityChanges which removes messages whose target path starts
|
|
583
|
-
// with the binding context path — on a sub-object page this would delete the error messages we are about to add.
|
|
584
|
-
var oContext = oController.getView().getBindingContext();
|
|
585
|
-
var sContextPath = oContext && oContext.getPath();
|
|
586
|
-
if (sContextPath && oModel && oModel.hasPendingChanges()) {
|
|
587
|
-
oModel.resetChanges([sContextPath], undefined, true);
|
|
588
|
-
}
|
|
589
599
|
if (aNewMessages.length) {
|
|
590
600
|
oMessageManager.removeMessages(aAllMessages);
|
|
591
601
|
oMessageManager.addMessages(aNewMessages);
|
|
@@ -1417,8 +1417,15 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1417
1417
|
var oColumn = oSmartTableHandler.getColumnByKey(sColumnKey);
|
|
1418
1418
|
//if the column is visible in the table, then only we bind the visible property of the cell
|
|
1419
1419
|
if (oColumn && oColumn.getVisible()){
|
|
1420
|
+
// For UITable, getCells() only contains cells for visible columns (sap.ui.table.Table._getRowClone
|
|
1421
|
+
// skips invisible columns). indexOfColumn returns the position in the full columns aggregation
|
|
1422
|
+
// (including invisible), so we resolve the visible-column index instead to avoid an off-by-N
|
|
1423
|
+
// mismatch when columns have been deactivated. For ResponsiveTable, indexOfColumn is correct.
|
|
1424
|
+
var iCellIndex = controlHelper.isUiTable(oTable)
|
|
1425
|
+
? oTable.getColumns().filter(function(c) { return c.getVisible(); }).indexOf(oColumn)
|
|
1426
|
+
: oTable.indexOfColumn(oColumn);
|
|
1420
1427
|
aItems.forEach(function(oItem) {
|
|
1421
|
-
var oCell = oItem.getCells()[
|
|
1428
|
+
var oCell = iCellIndex >= 0 ? oItem.getCells()[iCellIndex] : undefined;
|
|
1422
1429
|
if (oCell) {
|
|
1423
1430
|
// Only apply the binding if it is not already set with the correct path.
|
|
1424
1431
|
// This avoids unnecessary teardown/recreation during scroll (rowsUpdated),
|
|
@@ -2777,7 +2784,17 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2777
2784
|
* @param {*} aNavRestriction - list of 1:n navigation properties
|
|
2778
2785
|
*/
|
|
2779
2786
|
function modifyDataSourceUrl(oExportEvent, aNavRestriction) {
|
|
2780
|
-
let
|
|
2787
|
+
let sDataUrl = oExportEvent.mParameters.exportSettings.dataSource.dataUrl;
|
|
2788
|
+
// Extract non-$-prefixed query parameters (e.g. &search=NVT, &sap-client=100) before
|
|
2789
|
+
// splitting by "&$". Without this, such parameters remain appended to the preceding
|
|
2790
|
+
// $-parameter segment and their & / = characters get encoded by encodeURIComponent,
|
|
2791
|
+
// corrupting the OData URL sent to the backend.
|
|
2792
|
+
const aNonDollarParams = [];
|
|
2793
|
+
sDataUrl = sDataUrl.replace(/&(?!\$)([^&]+)/g, function(match) {
|
|
2794
|
+
aNonDollarParams.push(match);
|
|
2795
|
+
return "";
|
|
2796
|
+
});
|
|
2797
|
+
let aSplitDataUrl = sDataUrl.split("&$");
|
|
2781
2798
|
const idxSelect = aSplitDataUrl.findIndex(data => data.startsWith("select"));
|
|
2782
2799
|
const idxExpand = aSplitDataUrl.findIndex(data => data.startsWith("expand"));
|
|
2783
2800
|
// reconsturct select query from URL.
|
|
@@ -2796,7 +2813,8 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2796
2813
|
aSplitDataUrl.splice(idxExpand, 1);
|
|
2797
2814
|
}
|
|
2798
2815
|
}
|
|
2799
|
-
|
|
2816
|
+
// Re-append the preserved non-$-prefixed parameters after the $-parameter reconstruction.
|
|
2817
|
+
oExportEvent.mParameters.exportSettings.dataSource.dataUrl = aSplitDataUrl.join("&$") + aNonDollarParams.join("");
|
|
2800
2818
|
}
|
|
2801
2819
|
|
|
2802
2820
|
/**
|
|
@@ -2947,6 +2965,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2947
2965
|
var getPaginatorInfo = testableHelper.testable(getPaginatorInfo, "getPaginatorInfo");
|
|
2948
2966
|
var fnRenderTeamsContactCollabOptions = testableHelper.testable(fnRenderTeamsContactCollabOptions, "fnRenderTeamsContactCollabOptions");
|
|
2949
2967
|
var removeUnsupportedColumnsToExport = testableHelper.testable(removeUnsupportedColumnsToExport, "removeUnsupportedColumnsToExport");
|
|
2968
|
+
var modifyDataSourceUrl = testableHelper.testable(modifyDataSourceUrl, "modifyDataSourceUrl");
|
|
2950
2969
|
var fnAddMultiEditFieldGroupProperties = testableHelper.testable(fnAddMultiEditFieldGroupProperties,"fnAddMultiEditFieldGroupProperties");
|
|
2951
2970
|
var fnHideTableCells = testableHelper.testable(fnHideTableCells, "fnHideTableCells");
|
|
2952
2971
|
var fnApplyCellHiddenBindings = testableHelper.testable(fnApplyCellHiddenBindings, "fnApplyCellHiddenBindings");
|
|
@@ -403,7 +403,8 @@ sap.ui.define([
|
|
|
403
403
|
var fnFilter = oTemplateContract.oApplicationProxy.isTransientMessageNoCustomMessage;
|
|
404
404
|
var sState; // Only one message which is a success (or info/None) message -> show as message toast
|
|
405
405
|
// Remove transient messages that already exist in the error cache
|
|
406
|
-
|
|
406
|
+
// isDuplicateMessage is a plain closure function — no this binding needed
|
|
407
|
+
fnRemoveTransientMessages(isDuplicateMessage);
|
|
407
408
|
var aTransientMessages = fnGetTransientMessages(false, fnFilter);
|
|
408
409
|
if (aTransientMessages.length === 0) { // no transient messages -> immediate return
|
|
409
410
|
return Promise.resolve();
|
|
@@ -658,8 +659,8 @@ sap.ui.define([
|
|
|
658
659
|
}
|
|
659
660
|
let oError;
|
|
660
661
|
oError = JSON.parse(rawMessage);
|
|
661
|
-
//
|
|
662
|
-
return aWarningCache.some((oCachedError) =>
|
|
662
|
+
// areMessagesSame is a plain closure — call it directly, no this needed
|
|
663
|
+
return aWarningCache.some((oCachedError) => areMessagesSame(oCachedError, oError));
|
|
663
664
|
}
|
|
664
665
|
|
|
665
666
|
/**
|
|
@@ -131,18 +131,28 @@ sap.ui.define([
|
|
|
131
131
|
* - collectionFields: row-level updates for SmartTable collections
|
|
132
132
|
*
|
|
133
133
|
* Collection fields are identified by the isCollection flag in the field mapping.
|
|
134
|
-
*
|
|
134
|
+
* For tables that allow creation (mCollectionState.mCollectionAllowsCreation), rows
|
|
135
|
+
* without _rowIndex or _contextPath are treated as new rows to be created.
|
|
136
|
+
* Only one new row per table is supported; extra new rows are flagged via multipleNewRows.
|
|
137
|
+
* Tables where the AI proposed new rows but creation is not allowed are tracked in
|
|
138
|
+
* collectionsWithRejectedNewRows so the renderer can show a per-table warning strip.
|
|
135
139
|
*
|
|
136
140
|
* @param {object} oAiData - the AI response data map { fieldName: value | rowArray }
|
|
137
141
|
* @param {object} mFieldMapping - the complete field mapping
|
|
138
142
|
* @param {object} oFieldCollector - EasyFillFieldCollector (used for SmartTable validation)
|
|
139
143
|
* @param {object} oObjectPage - the ObjectPage control (used for SmartTable validation)
|
|
140
|
-
* @
|
|
144
|
+
* @param {object} mCollectionState - collection tracking state (used for allowsCreation check)
|
|
145
|
+
* @returns {{ simpleFields: object, collectionFields: object, attemptedMultipleNewRows: boolean, collectionsWithRejectedNewRows: object }}
|
|
141
146
|
*/
|
|
142
|
-
splitAIResultByCollection: function(oAiData, mFieldMapping, oFieldCollector, oObjectPage) {
|
|
147
|
+
splitAIResultByCollection: function(oAiData, mFieldMapping, oFieldCollector, oObjectPage, mCollectionState) {
|
|
143
148
|
var oSplitResult = {
|
|
144
149
|
simpleFields: {},
|
|
145
|
-
collectionFields: {}
|
|
150
|
+
collectionFields: {},
|
|
151
|
+
attemptedMultipleNewRows: false,
|
|
152
|
+
// Map of { navProperty: "all" | "mixed" } for tables where AI proposed new rows
|
|
153
|
+
// but creation is not allowed. "all" = only new rows proposed; "mixed" = some
|
|
154
|
+
// existing updates + some rejected new rows.
|
|
155
|
+
collectionsWithRejectedNewRows: {}
|
|
146
156
|
};
|
|
147
157
|
|
|
148
158
|
Object.keys(oAiData || {}).forEach(function(sFieldName) {
|
|
@@ -158,17 +168,41 @@ sap.ui.define([
|
|
|
158
168
|
}
|
|
159
169
|
|
|
160
170
|
if (oFieldMeta && oFieldMeta.isCollection === true && aCollectionRows) {
|
|
161
|
-
|
|
162
|
-
|
|
171
|
+
var bAllowsCreation = !!(mCollectionState && mCollectionState.mCollectionAllowsCreation &&
|
|
172
|
+
mCollectionState.mCollectionAllowsCreation[sFieldName]);
|
|
173
|
+
|
|
174
|
+
// Separate existing-row updates (have _rowIndex or _contextPath) from new rows
|
|
175
|
+
var aExistingRowUpdates = aCollectionRows.filter(function(oRow) {
|
|
163
176
|
return oRow && typeof oRow === "object" &&
|
|
164
177
|
(typeof oRow._contextPath === "string" || typeof oRow._rowIndex === "number");
|
|
165
178
|
});
|
|
179
|
+
var aRawNewRows = aCollectionRows.filter(function(oRow) {
|
|
180
|
+
return oRow && typeof oRow === "object" &&
|
|
181
|
+
typeof oRow._contextPath !== "string" &&
|
|
182
|
+
typeof oRow._rowIndex !== "number";
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
// Track tables where AI proposed new rows that cannot be created
|
|
186
|
+
if (!bAllowsCreation && aRawNewRows.length > 0) {
|
|
187
|
+
var sRejectionType = aExistingRowUpdates.length === 0 ? "all" : "mixed";
|
|
188
|
+
oSplitResult.collectionsWithRejectedNewRows[sFieldName] = sRejectionType;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
var aNewRows = bAllowsCreation ? aRawNewRows : [];
|
|
192
|
+
|
|
193
|
+
// Cap new rows to one per table; flag if the AI proposed more
|
|
194
|
+
if (aNewRows.length > 1) {
|
|
195
|
+
oSplitResult.attemptedMultipleNewRows = true;
|
|
196
|
+
aNewRows = [aNewRows[0]];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
var aRowUpdates = aExistingRowUpdates.concat(aNewRows);
|
|
166
200
|
|
|
167
201
|
var oValidation = oFieldCollector.isValidSmartTable(oFieldMeta.entitySet, oObjectPage);
|
|
168
|
-
if (aRowUpdates.length > 0 &&
|
|
169
|
-
oValidation.isValid) {
|
|
202
|
+
if (aRowUpdates.length > 0 && oValidation.isValid) {
|
|
170
203
|
oSplitResult.collectionFields[sFieldName] = aRowUpdates;
|
|
171
|
-
oLogger.debug("splitAIResultByCollection: accepted collection field '" + sFieldName + "' with " +
|
|
204
|
+
oLogger.debug("splitAIResultByCollection: accepted collection field '" + sFieldName + "' with " +
|
|
205
|
+
aExistingRowUpdates.length + " updates and " + aNewRows.length + " new row(s)");
|
|
172
206
|
}
|
|
173
207
|
} else {
|
|
174
208
|
// Scalar field → goes to simpleFields
|