@sapui5/sap.suite.ui.generic.template 1.151.1 → 1.153.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/control/visualfilterbar/SmartVisualFilterBar.js +4 -3
- 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/Component.js +4 -2
- package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +0 -6
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sv.properties +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/FullscreenPage.fragment.xml +3 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/Component.js +5 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +31 -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 +1 -1
- 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/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +13 -7
- package/src/sap/suite/ui/generic/template/genericUtilities/designtime/messagebundle.properties +0 -0
- package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +21 -17
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +19 -3
- package/src/sap/suite/ui/generic/template/lib/ShareUtils.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillAIOrchestrator.js +16 -6
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillApplyHandler.js +35 -47
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillDialogController.js +80 -64
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFieldCollector.js +442 -259
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFormRenderer.js +186 -161
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillHandler.js +137 -161
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillTableRenderer.js +157 -191
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillDialog.fragment.xml +67 -85
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +56 -4
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +11 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_sappsd.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saptrc.properties +13 -7
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +11 -5
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +10 -4
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +8 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsCardHelper.js +40 -8
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +3 -2
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +4 -0
- package/src/sap/suite/ui/generic/template/library.js +1 -1
- package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +7 -1
|
@@ -2,9 +2,8 @@ sap.ui.define([
|
|
|
2
2
|
"sap/ui/model/json/JSONModel",
|
|
3
3
|
"sap/m/MessageToast",
|
|
4
4
|
"sap/suite/ui/generic/template/genericUtilities/FeLogger",
|
|
5
|
-
"sap/suite/ui/generic/template/genericUtilities/FeError",
|
|
6
5
|
"sap/ui/core/ResizeHandler"
|
|
7
|
-
], function(JSONModel, MessageToast, FeLogger,
|
|
6
|
+
], function(JSONModel, MessageToast, FeLogger, ResizeHandler) {
|
|
8
7
|
"use strict";
|
|
9
8
|
|
|
10
9
|
var sClassName = "lib.ai.EasyFill.EasyFillDialogController";
|
|
@@ -76,57 +75,74 @@ sap.ui.define([
|
|
|
76
75
|
|
|
77
76
|
/**
|
|
78
77
|
* Loads the EasyFillDialog fragment (if not already loaded) and opens it.
|
|
79
|
-
*
|
|
78
|
+
* Uses getDialogFragmentAsync with keepAlive=true so the fragment is cached
|
|
79
|
+
* across opens — the OPL and SmartForm controls persist between invocations.
|
|
80
|
+
* A concurrent-open guard prevents the duplicate-ID error when the button is
|
|
81
|
+
* pressed before the first load completes.
|
|
80
82
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* @param {object} oController - MVC controller
|
|
85
|
-
* @param {object} oTemplateUtils - FE template utilities (used for getDialogFragmentAsync)
|
|
86
|
-
* @param {object} oHandlers - map of event handler and formatter functions to bind to the fragment
|
|
87
|
-
* @returns {Promise<void>}
|
|
83
|
+
* @param {object} oController - MVC controller
|
|
84
|
+
* @param {object} oTemplateUtils - FE template utilities
|
|
85
|
+
* @param {object} oHandlers - event handler / formatter map
|
|
88
86
|
*/
|
|
89
|
-
openDialog: function(oController, oTemplateUtils, oHandlers) {
|
|
87
|
+
openDialog: async function(oController, oTemplateUtils, oHandlers) {
|
|
90
88
|
var sFragmentName = "sap.suite.ui.generic.template.lib.ai.EasyFill.fragments.EasyFillDialog";
|
|
89
|
+
var oView = oController.getView();
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
oDialog.open();
|
|
101
|
-
|
|
102
|
-
// Register a ResizeHandler on the ResponsiveSplitter
|
|
103
|
-
// The dialog is kept alive across opens so we must not register more than once.
|
|
104
|
-
if (!oDialog._easyFillResizeHandlerId) {
|
|
105
|
-
oDialog.attachEventOnce("afterOpen", function() {
|
|
106
|
-
// Locate the splitter by its stable fragment ID
|
|
107
|
-
var oSplitter = oController.byId("EasyFillMainFlex") &&
|
|
108
|
-
oController.byId("EasyFillMainFlex").findAggregatedObjects(true, function(o) {
|
|
109
|
-
return o.isA("sap.ui.layout.ResponsiveSplitter");
|
|
110
|
-
})[0];
|
|
111
|
-
|
|
112
|
-
if (oSplitter) {
|
|
113
|
-
var oDialogModel = oController.getView().getModel("easyFillDialogModel");
|
|
114
|
-
// sapUiRSVisiblePaginator is added/removed by the splitter itself on resize
|
|
115
|
-
oDialog._easyFillResizeHandlerId = ResizeHandler.register(oSplitter, function() {
|
|
116
|
-
var bInPageMode = oSplitter.$().hasClass("sapUiRSVisiblePaginator");
|
|
117
|
-
oDialogModel.setProperty("/isSplitterPageMode", bInPageMode);
|
|
118
|
-
if (bInPageMode && !oDialogModel.getProperty("/isFullScreen")) {
|
|
119
|
-
// Reset fullscreen state so pane sizes are correct when dialog is widened again
|
|
120
|
-
oDialogModel.setProperty("/isFullScreen", true);
|
|
121
|
-
oController.byId("inputAreaSplitPane").getLayoutData().setSize("40%");
|
|
122
|
-
oController.byId("reviewAreaSplitPane").getLayoutData().setSize("60%");
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
});
|
|
91
|
+
// Guard: if a load is already in flight (concurrent button press) wait for it
|
|
92
|
+
if (oView._mEasyFillFragmentPromise) {
|
|
93
|
+
var oDialogPending;
|
|
94
|
+
try {
|
|
95
|
+
oDialogPending = await oView._mEasyFillFragmentPromise;
|
|
96
|
+
} catch (e) {
|
|
97
|
+
oLogger.error("openDialog: concurrent fragment load failed: " + e);
|
|
98
|
+
return;
|
|
127
99
|
}
|
|
100
|
+
if (oDialogPending) { oDialogPending.open(); }
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Store the in-flight promise before the first await so re-entrant calls
|
|
105
|
+
// hit the guard above instead of starting a second Fragment.load().
|
|
106
|
+
oView._mEasyFillFragmentPromise = oTemplateUtils.oCommonUtils.getDialogFragmentAsync(
|
|
107
|
+
sFragmentName, oHandlers, "easyFillPopup", undefined,
|
|
108
|
+
true, // keepAlive — do not destroy on close
|
|
109
|
+
true // use view as parent
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
var oDialog;
|
|
113
|
+
try {
|
|
114
|
+
oDialog = await oView._mEasyFillFragmentPromise;
|
|
115
|
+
} finally {
|
|
116
|
+
oView._mEasyFillFragmentPromise = null; // always clear in-flight marker
|
|
117
|
+
}
|
|
128
118
|
|
|
129
|
-
|
|
119
|
+
if (!oDialog) { return; } // guard: load rejected, nothing to open
|
|
120
|
+
|
|
121
|
+
oDialog.open();
|
|
122
|
+
|
|
123
|
+
if (!oDialog._easyFillResizeHandlerId) {
|
|
124
|
+
this._registerResizeHandler(oController, oDialog);
|
|
125
|
+
}
|
|
126
|
+
oLogger.debug("openDialog: EasyFillDialog opened");
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
_registerResizeHandler: function(oController, oDialog) {
|
|
130
|
+
oDialog.attachEventOnce("afterOpen", function() {
|
|
131
|
+
var oSplitter = oController.byId("EasyFillMainFlex") &&
|
|
132
|
+
oController.byId("EasyFillMainFlex").findAggregatedObjects(true, function(o) {
|
|
133
|
+
return o.isA("sap.ui.layout.ResponsiveSplitter");
|
|
134
|
+
})[0];
|
|
135
|
+
if (!oSplitter) { return; }
|
|
136
|
+
var oDialogModel = oController.getView().getModel("easyFillDialogModel");
|
|
137
|
+
oDialog._easyFillResizeHandlerId = ResizeHandler.register(oSplitter, function() {
|
|
138
|
+
var bInPageMode = oSplitter.$().hasClass("sapUiRSVisiblePaginator");
|
|
139
|
+
oDialogModel.setProperty("/isSplitterPageMode", bInPageMode);
|
|
140
|
+
if (bInPageMode && !oDialogModel.getProperty("/isFullScreen")) {
|
|
141
|
+
oDialogModel.setProperty("/isFullScreen", true);
|
|
142
|
+
oController.byId("inputAreaSplitPane").getLayoutData().setSize("40%");
|
|
143
|
+
oController.byId("reviewAreaSplitPane").getLayoutData().setSize("60%");
|
|
144
|
+
}
|
|
145
|
+
});
|
|
130
146
|
});
|
|
131
147
|
},
|
|
132
148
|
|
|
@@ -158,27 +174,27 @@ sap.ui.define([
|
|
|
158
174
|
* @param {object} oFieldCollector - EasyFillFieldCollector
|
|
159
175
|
* @param {object} oEasyFillLayoutMode - EasyFillLayoutMode enum
|
|
160
176
|
*/
|
|
161
|
-
onSelectionChange: function(oEvent, oController,
|
|
177
|
+
onSelectionChange: function(oEvent, oController, oFieldCollector, oEasyFillLayoutMode, oOPStructureMap) {
|
|
162
178
|
var sSelectedKey = oEvent.getSource().getSelectedKey();
|
|
163
179
|
var oDialogModel = oController.getView().getModel("easyFillDialogModel");
|
|
164
|
-
var oEntityType = oTemplateUtils.oCommonUtils.getMetaModelEntityType(
|
|
165
|
-
oController.getOwnerComponent().getEntitySet()
|
|
166
|
-
);
|
|
167
180
|
oDialogModel.setProperty("/easyFillMode", sSelectedKey);
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
// only when it is absent (e.g. before the first AI submit).
|
|
171
|
-
// Important: an empty map is a valid state (all fields are non-updatable)
|
|
172
|
-
// and must not trigger fallback, otherwise non-updatable fields appear as filled.
|
|
173
|
-
var oStoredUpdatable = oDialogModel.getProperty("/updatableFields");
|
|
174
|
-
var oUpdatableFields = (oStoredUpdatable !== undefined && oStoredUpdatable !== null)
|
|
175
|
-
? oStoredUpdatable
|
|
176
|
-
: oLLMResult;
|
|
181
|
+
|
|
182
|
+
var oStoredUpdatable = oDialogModel.getProperty("/updatableFields") || {};
|
|
177
183
|
var oNonUpdatableFields = oDialogModel.getProperty("/nonUpdatableFields") || {};
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
184
|
+
|
|
185
|
+
var aSections;
|
|
186
|
+
if (sSelectedKey === oEasyFillLayoutMode.CondensedMode) {
|
|
187
|
+
aSections = oFieldCollector.getSectionInfoForCondensedMode(oStoredUpdatable, oNonUpdatableFields);
|
|
188
|
+
} else if (oOPStructureMap) {
|
|
189
|
+
aSections = oFieldCollector.applyLLMResultToStructureMap(
|
|
190
|
+
oOPStructureMap.fieldMap, oOPStructureMap.sections,
|
|
191
|
+
oStoredUpdatable, oNonUpdatableFields
|
|
192
|
+
);
|
|
193
|
+
} else {
|
|
194
|
+
aSections = oFieldCollector.getSectionInfoForCondensedMode(oStoredUpdatable, oNonUpdatableFields);
|
|
195
|
+
oLogger.warning("onSelectionChange: oOPStructureMap not available");
|
|
196
|
+
}
|
|
197
|
+
oDialogModel.setProperty("/sections", aSections);
|
|
182
198
|
},
|
|
183
199
|
|
|
184
200
|
/**
|