@sapui5/sap.suite.ui.generic.template 1.147.1 → 1.148.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/ControllerImplementation.js +5 -3
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_bg.properties +3 -3
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_da.properties +3 -3
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_id.properties +2 -2
- 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 +32 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_id.properties +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_uk.properties +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/Component.js +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +57 -25
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n.properties +6 -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/manifest.json +6 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/templateSpecificPreparationHelper.js +35 -19
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Footer.fragment.xml +103 -42
- 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/fragments/EasyFilter.fragment.xml +3 -0
- package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +30 -29
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +15 -0
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/CRUDHelper.js +93 -55
- package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +7 -0
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +19 -13
- package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +4 -1
- package/src/sap/suite/ui/generic/template/lib/ComponentUtils.js +17 -7
- package/src/sap/suite/ui/generic/template/lib/StableIdDefinition.js +35 -34
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillHandler.js +853 -130
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/ObjectPageSectionHandler.js +282 -0
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillDialog.fragment.xml +138 -72
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +409 -22
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +21 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +6 -6
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +3 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +6 -6
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +6 -6
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/library.js +25 -2
- package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +14 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
sap.ui.define([
|
|
2
|
+
],function(){
|
|
3
|
+
"use strict";
|
|
4
|
+
/**
|
|
5
|
+
* This class extracts the what sections are present according to the property from the manifest and EntityType and show it in objectpage
|
|
6
|
+
* Currently it only supports the default annotations from the ObjectPage, In future we should make sure to add Custom Sections and Reusable Components to integrate in it
|
|
7
|
+
* @namespace suite.ui.generic.template.lib.ai.EasyFill.ObjectPageSectionHandler.js
|
|
8
|
+
* @private
|
|
9
|
+
*/
|
|
10
|
+
return {
|
|
11
|
+
getSectionsForObjectPageView: function (oEntityType,oLLMResult,oRb) {
|
|
12
|
+
let aSections = [];
|
|
13
|
+
//Extract the Header Information,Section and SubObject table information
|
|
14
|
+
aSections = aSections.concat(this.getSectionsForHeader(oEntityType,oRb))
|
|
15
|
+
.concat(this.getSectionsForObjectPageFacets(oEntityType));
|
|
16
|
+
const aTree = this.transformToTree(aSections,oEntityType);
|
|
17
|
+
// return aTree;
|
|
18
|
+
return this.filterTreeByLLMResult(aTree,oLLMResult);
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
getSectionsForCondensedView: function (oLLMResult) {
|
|
22
|
+
return this.transformToTreeExpanded(oLLMResult);
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
getSectionsForObjectPageFacets: function (oEntityType) {
|
|
26
|
+
const aSectionFacets = oEntityType["com.sap.vocabularies.UI.v1.Facets"];
|
|
27
|
+
if (aSectionFacets && aSectionFacets.length > 0) {
|
|
28
|
+
return this.extractFacetInfoRecursively(oEntityType,aSectionFacets,[]);
|
|
29
|
+
}
|
|
30
|
+
return [];
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
//We have to write a recursive code, as there might be nested CollectionFacets
|
|
34
|
+
extractFacetInfoRecursively: function(oEntityType,aFacets,aTitle) {
|
|
35
|
+
let aRes = [];
|
|
36
|
+
aFacets.forEach((oFacet) => {
|
|
37
|
+
if (oFacet.RecordType === "com.sap.vocabularies.UI.v1.CollectionFacet") {
|
|
38
|
+
const aInnerFacets = oFacet.Facets;
|
|
39
|
+
if (aInnerFacets && aInnerFacets.length > 0) {
|
|
40
|
+
aRes = aRes.concat(this.extractFacetInfoRecursively(oEntityType,aInnerFacets,aTitle.concat(oFacet.Label.String ? oFacet.Label.String : [])));
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
aRes = aRes.concat(this.extractSectionInfoFromReferenceFacet(oEntityType,[oFacet],aTitle));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return aRes;
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
//For HeaderFacets we only have one section and the rest of the fields will be part of it, currently we are not supporting multiple subsections in the header
|
|
50
|
+
getSectionsForHeader: function (oEntityType,oRb) {
|
|
51
|
+
let aRes = [];
|
|
52
|
+
//Fetch the HeaderInfo and HeaderFacets, if not present return empty array, as we will not be able to find any section without it
|
|
53
|
+
const oHeaderInfo = oEntityType["com.sap.vocabularies.UI.v1.HeaderInfo"];
|
|
54
|
+
const aHeaderFacets = oEntityType["com.sap.vocabularies.UI.v1.HeaderFacets"];
|
|
55
|
+
|
|
56
|
+
if (oHeaderInfo && Object.keys(oHeaderInfo).length > 0) {
|
|
57
|
+
const aKeys = Object.keys(oHeaderInfo).filter(sKey => oHeaderInfo[sKey].RecordType === "com.sap.vocabularies.UI.v1.DataField");
|
|
58
|
+
aKeys?.forEach((sKey) => {
|
|
59
|
+
aRes.push({title:[oRb.getText("EASY_FILL_SECTION_HEADER"),oRb.getText("EASY_FILL_SECTION_HEADER")],property: oHeaderInfo[sKey].Value.Path});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (aHeaderFacets && aHeaderFacets.length > 0) {
|
|
64
|
+
const aSection = this.extractSectionInfoFromReferenceFacet(oEntityType,aHeaderFacets);
|
|
65
|
+
aSection.forEach((oSection) => {
|
|
66
|
+
oSection.title = [oRb.getText("EASY_FILL_SECTION_HEADER"),oRb.getText("EASY_FILL_SECTION_HEADER")];
|
|
67
|
+
});
|
|
68
|
+
aRes.push(...aSection);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return aRes;
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
//Use it once you get the reference facets, if the sText is already known then we will give that as priority
|
|
75
|
+
extractSectionInfoFromReferenceFacet: function(oEntityType,aFacets,aText = []) {
|
|
76
|
+
// eslint-disable-next-line no-warning-comments
|
|
77
|
+
//TODO: Handle the LineItem Code here only and SemanticObjects for intentbased Navigation
|
|
78
|
+
const aRes = [];
|
|
79
|
+
aFacets.forEach((oFacet) => {
|
|
80
|
+
//We are skipping the IntentBased Navigation for now, as we will be handling it in a different way, as we need to check the SemanticObject and Action for it,
|
|
81
|
+
//so we will be doing it in a different method
|
|
82
|
+
if (oFacet.RecordType === "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation") {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const aTempText = [...aText];
|
|
87
|
+
const sAnnotationPath = oFacet.Target.AnnotationPath.substring(1);
|
|
88
|
+
const oAnnotation = oEntityType[sAnnotationPath];
|
|
89
|
+
let sTitle = null;
|
|
90
|
+
|
|
91
|
+
if (oFacet?.Label) {
|
|
92
|
+
sTitle = oFacet.Label.String;
|
|
93
|
+
} else if (oAnnotation?.Label) {
|
|
94
|
+
sTitle = oAnnotation.Label.String;
|
|
95
|
+
} else if (oFacet?.Title) {
|
|
96
|
+
sTitle = oFacet.Title.String;
|
|
97
|
+
} else if (oAnnotation?.Title) {
|
|
98
|
+
sTitle = oAnnotation.Title.String;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
// if (oFacet.Label) {
|
|
103
|
+
// sTitle = oFacet.Label.String;
|
|
104
|
+
// } else if (oFacet.Title) {
|
|
105
|
+
// sTitle = oFacet.Title.String;
|
|
106
|
+
// }
|
|
107
|
+
|
|
108
|
+
if (sTitle) {
|
|
109
|
+
aTempText.push(sTitle);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (oAnnotation) {
|
|
113
|
+
if (oAnnotation.Data) {
|
|
114
|
+
oAnnotation.Data.forEach((oData) => {
|
|
115
|
+
if (!this.isSupportedRecordType(oData.RecordType)) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
aRes.push({title:aTempText,property:oData.Value.Path});
|
|
119
|
+
});
|
|
120
|
+
} else if (Array.isArray(oAnnotation)) {
|
|
121
|
+
const aArray = oAnnotation;
|
|
122
|
+
aArray.forEach((oAnno) => {
|
|
123
|
+
if (!this.isSupportedRecordType(oAnno.RecordType)) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
aRes.push({title:aTempText,property:oAnno.Value.Path});
|
|
127
|
+
});
|
|
128
|
+
} else if (oAnnotation.Value && oAnnotation.Value.Path) {
|
|
129
|
+
aRes.push({title:aTempText,property:oAnnotation.Value.Path});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
return aRes;
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
//We have to support most of the below annotations in our future waves
|
|
137
|
+
isSupportedRecordType: function(sRecordType) {
|
|
138
|
+
if (sRecordType === "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" || sRecordType === "com.sap.vocabularies.UI.v1.DataFieldForAnnotation"
|
|
139
|
+
|| sRecordType === "com.sap.vocabularies.UI.v1.DataFieldForAction"
|
|
140
|
+
) {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
return true;
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
transformToTreeExpanded: function(oLLMRes) {
|
|
147
|
+
return [
|
|
148
|
+
{
|
|
149
|
+
title: "",
|
|
150
|
+
fields: [],
|
|
151
|
+
children: [{
|
|
152
|
+
title: "",
|
|
153
|
+
fields: Object.keys(oLLMRes),
|
|
154
|
+
id: this.generateId("", Object.keys(oLLMRes))
|
|
155
|
+
}]
|
|
156
|
+
}
|
|
157
|
+
];
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
transformToTree: function (data, oEntityType) {
|
|
162
|
+
const rootMap = {};
|
|
163
|
+
const seen = new Set();
|
|
164
|
+
const that = this;
|
|
165
|
+
|
|
166
|
+
data.forEach(({ title, property }) => {
|
|
167
|
+
if (seen.has(property)) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
seen.add(property);
|
|
171
|
+
|
|
172
|
+
let currentMap = rootMap;
|
|
173
|
+
let sTitlePath = "";
|
|
174
|
+
|
|
175
|
+
title.forEach((level, index) => {
|
|
176
|
+
const isLast = index === title.length - 1;
|
|
177
|
+
|
|
178
|
+
// Build cumulative title path: "Header_Header", "GeneralInformation_SalesOrdertotalamount"
|
|
179
|
+
sTitlePath = sTitlePath ? `${sTitlePath}_${level}` : level;
|
|
180
|
+
|
|
181
|
+
if (!currentMap[level]) {
|
|
182
|
+
currentMap[level] = {
|
|
183
|
+
title: level,
|
|
184
|
+
titlePath: sTitlePath, // ✅ Store full path for ID generation later
|
|
185
|
+
fields: [],
|
|
186
|
+
_childrenMap: {}
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (isLast) {
|
|
191
|
+
currentMap[level].fields.push(property);
|
|
192
|
+
} else {
|
|
193
|
+
currentMap = currentMap[level]._childrenMap;
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
// ID is generated here - after all fields are collected
|
|
199
|
+
function convertToArray(oMap) {
|
|
200
|
+
return Object.values(oMap).map((oNode) => ({
|
|
201
|
+
title: oNode.title,
|
|
202
|
+
id: that.generateId(oNode.titlePath, oNode.fields), // ✅ title path + fields combined
|
|
203
|
+
fields: oNode.fields,
|
|
204
|
+
children: oNode._childrenMap ? convertToArray(oNode._childrenMap) : []
|
|
205
|
+
}));
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return convertToArray(rootMap);
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
generateId: function(sTitlePath, aFields) {
|
|
212
|
+
const sSanitizedTitle = sTitlePath
|
|
213
|
+
.replace(/\s+/g, "_")
|
|
214
|
+
.replace(/[^a-zA-Z0-9_]/g, "")
|
|
215
|
+
.toLowerCase();
|
|
216
|
+
|
|
217
|
+
// Join fields to make it unique per section content
|
|
218
|
+
const sFieldsPart = aFields
|
|
219
|
+
.join("_")
|
|
220
|
+
.replace(/[^a-zA-Z0-9_]/g, "")
|
|
221
|
+
.toLowerCase();
|
|
222
|
+
|
|
223
|
+
return "EasyFillSmartForm_" + sSanitizedTitle + (sFieldsPart ? "_" + sFieldsPart : "");
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
filterTreeByLLMResult: function(aTree, oLLMResult) {
|
|
227
|
+
const aRequestedKeys = Object.keys(oLLMResult);
|
|
228
|
+
const aMatchedKeys = new Set();
|
|
229
|
+
|
|
230
|
+
function generateId(sTitlePath, aFields) {
|
|
231
|
+
const sSanitizedTitle = sTitlePath
|
|
232
|
+
.replace(/\s+/g, "_")
|
|
233
|
+
.replace(/[^a-zA-Z0-9_]/g, "")
|
|
234
|
+
.toLowerCase();
|
|
235
|
+
const sFieldsPart = aFields
|
|
236
|
+
.join("_")
|
|
237
|
+
.replace(/[^a-zA-Z0-9_]/g, "")
|
|
238
|
+
.toLowerCase();
|
|
239
|
+
return "EasyFillSmartForm_" + sSanitizedTitle + (sFieldsPart ? "_" + sFieldsPart : "");
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
function filterNode(oNode, sParentPath) {
|
|
243
|
+
const sTitlePath = sParentPath ? `${sParentPath}_${oNode.title}` : oNode.title;
|
|
244
|
+
|
|
245
|
+
const aFilteredFields = oNode.fields.filter((sField) => {
|
|
246
|
+
if (aRequestedKeys.includes(sField)) {
|
|
247
|
+
aMatchedKeys.add(sField);
|
|
248
|
+
return true;
|
|
249
|
+
}
|
|
250
|
+
return false;
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
const aFilteredChildren = oNode.children
|
|
254
|
+
.map((oChild) => filterNode(oChild, sTitlePath))
|
|
255
|
+
.filter((oChild) => oChild.fields.length > 0 || oChild.children.length > 0);
|
|
256
|
+
|
|
257
|
+
return {
|
|
258
|
+
title: oNode.title,
|
|
259
|
+
id: generateId(sTitlePath, aFilteredFields), // ✅ Regenerate ID with filtered fields
|
|
260
|
+
fields: aFilteredFields,
|
|
261
|
+
children: aFilteredChildren
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const aFilteredTree = aTree
|
|
266
|
+
.map((oNode) => filterNode(oNode, ""))
|
|
267
|
+
.filter((oNode) => oNode.fields.length > 0 || oNode.children.length > 0);
|
|
268
|
+
|
|
269
|
+
const aUnmatchedKeys = aRequestedKeys.filter((sKey) => !aMatchedKeys.has(sKey));
|
|
270
|
+
if (aUnmatchedKeys.length > 0) {
|
|
271
|
+
aFilteredTree.push({
|
|
272
|
+
title: "unableToFill",
|
|
273
|
+
id: generateId("unableToFill", aUnmatchedKeys),
|
|
274
|
+
fields: aUnmatchedKeys,
|
|
275
|
+
children: []
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return aFilteredTree;
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
});
|
package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillDialog.fragment.xml
CHANGED
|
@@ -1,85 +1,151 @@
|
|
|
1
1
|
<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core"
|
|
2
|
-
xmlns:
|
|
3
|
-
xmlns:
|
|
4
|
-
xmlns:
|
|
2
|
+
xmlns:smartForm="sap.ui.comp.smartform"
|
|
3
|
+
xmlns:smartField="sap.ui.comp.smartfield"
|
|
4
|
+
xmlns:uxap="sap.uxap"
|
|
5
|
+
xmlns:layout="sap.ui.layout"
|
|
5
6
|
xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
|
|
6
|
-
|
|
7
|
+
template:require="{AH: 'sap/suite/ui/generic/template/js/AnnotationHelper',
|
|
8
|
+
AHModel: 'sap/ui/model/odata/AnnotationHelper'}"
|
|
9
|
+
xmlns:fesr="http://schemas.sap.com/sapui5/extension/sap.ui.core.FESR/1">
|
|
7
10
|
|
|
8
|
-
<Dialog id="EasyFillDialog" class
|
|
9
|
-
titleAlignment="Start" horizontalScrolling="false" verticalScrolling="false" draggable="true" resizable="true">
|
|
11
|
+
<Dialog id="EasyFillDialog" contentWidth="72.25rem" class="sapSmartTemplatesObjectPageEasyFill" contentHeight="49.3125rem" title="{i18n>EASY_FILL_TITLE}" titleAlignment="Start" horizontalScrolling="false" verticalScrolling="false" draggable="true" resizable="true">
|
|
10
12
|
<content>
|
|
11
13
|
<FlexBox id="EasyFillMainFlex" direction="Row" renderType="Bare" width="100%" height="100%">
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
14
|
+
<layout:ResponsiveSplitter defaultPane="default">
|
|
15
|
+
<layout:PaneContainer>
|
|
16
|
+
<layout:SplitPane requiredParentWidth="400" id="inputAreaSplitPane">
|
|
17
|
+
<layout:layoutData>
|
|
18
|
+
<layout:SplitterLayoutData size="40%"/>
|
|
19
|
+
</layout:layoutData>
|
|
20
|
+
<FlexBox direction="Column" renderType="Bare" class="sapSmartTemplatesObjectPageEasyFillInputArea">
|
|
21
|
+
<FlexBox id="EasyFillInputArea" direction="Column" renderType="Bare" width="100%" gap="36px">
|
|
22
|
+
<VBox gap="22px" class="sapSmartTemplatesObjectPageEasyFillInputAreaLabel">
|
|
23
|
+
<Label text="{i18n>EASY_FILL_FIRST_LABEL_TEXT}" wrapping="true"/>
|
|
24
|
+
<Label text="{i18n>EASY_FILL_SECOND_LABEL_TEXT}" wrapping="true"/>
|
|
25
|
+
</VBox>
|
|
26
|
+
<TextArea
|
|
27
|
+
id="EasyFillInputTextArea"
|
|
28
|
+
growing="true"
|
|
29
|
+
growingMaxLines="30"
|
|
30
|
+
maxLength="2000"
|
|
31
|
+
liveChange=".onLiveChange"
|
|
32
|
+
placeholder="{i18n>EASY_FILL_TEXTAREA_PLACEHOLDER}"
|
|
33
|
+
rows="20"
|
|
34
|
+
width="100%"
|
|
35
|
+
height="17.5rem"
|
|
36
|
+
showExceededText="true"
|
|
37
|
+
ariaLabelledBy="EasyFillInputArea"/>
|
|
38
|
+
</FlexBox>
|
|
39
|
+
<FlexBox direction="Row" justifyContent="End" gap="1rem">
|
|
40
|
+
<Button
|
|
41
|
+
id="EasyFillSubmitButton"
|
|
42
|
+
text="Easy Fill"
|
|
43
|
+
type="Default"
|
|
44
|
+
icon="sap-icon://ai"
|
|
45
|
+
fesr:press="fe2:ef:analyzeText"
|
|
46
|
+
enabled="{easyFillDialogModel>/isEasyFillButtonEnabled}"
|
|
47
|
+
press=".onEasyFillSubmitInputToAI"/>
|
|
48
|
+
<Button
|
|
49
|
+
id="EasyFillClearAll"
|
|
50
|
+
type="Transparent"
|
|
51
|
+
press=".onEasyFillClearAll"
|
|
52
|
+
fesr:press="fe2:ef:clearAll"
|
|
53
|
+
text="{i18n>EASYFILL_CLEAR_ALL}"/>
|
|
54
|
+
</FlexBox>
|
|
55
|
+
</FlexBox>
|
|
56
|
+
</layout:SplitPane>
|
|
57
|
+
<layout:PaneContainer>
|
|
58
|
+
<layout:SplitPane requiredParentWidth="600" id="reviewAreaSplitPane">
|
|
59
|
+
<layout:layoutData>
|
|
60
|
+
<layout:SplitterLayoutData size="60%"/>
|
|
61
|
+
</layout:layoutData>
|
|
62
|
+
<FlexBox id="EasyFillReviewArea" busy="{easyFillDialogModel>/isBusy}" class="sapSmartTemplatesObjectPageEasyFillReviewArea" renderType="Bare" direction="Column">
|
|
63
|
+
<IllustratedMessage
|
|
64
|
+
illustrationSize="Large"
|
|
65
|
+
illustrationType="{path: 'easyFillDialogModel>/stateType', formatter: '.formatIllustrationType'}"
|
|
66
|
+
visible="{easyFillDialogModel>/isIllustrationVisible}"
|
|
67
|
+
title="{path: 'easyFillDialogModel>/stateType', formatter: '.formatIllustrationTitle'}"
|
|
68
|
+
description="{path: 'easyFillDialogModel>/stateType', formatter: '.formatIllustrationDescription'}"/>
|
|
69
|
+
<!-- <ScrollContainer height="100%" horizontal = "true"> -->
|
|
70
|
+
<uxap:ObjectPageLayout visible="{easyFillDialogModel>/isFormVisible}" id="EasyFillObjectPageLayout" sections="{path: 'easyFillDialogModel>/sections', templateShareable: false}">
|
|
71
|
+
<uxap:headerTitle>
|
|
72
|
+
<uxap:ObjectPageHeader objectTitle="{i18n>EASY_FILL_FILLED_FIELDS}">
|
|
73
|
+
<uxap:actions>
|
|
74
|
+
<SegmentedButton selectedKey="{easyFillDialogModel>/easyFillMode}" selectionChange=".onSelectionChange" class="sapUiSmallMarginBottom">
|
|
75
|
+
<items>
|
|
76
|
+
<SegmentedButtonItem icon="sap-icon://increase-line-height" key="CondensedMode"/>
|
|
77
|
+
<SegmentedButtonItem icon="sap-icon://decrease-line-height" key="ObjectPageMode"/>
|
|
78
|
+
</items>
|
|
79
|
+
</SegmentedButton>
|
|
70
80
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
<Button
|
|
82
|
+
icon="{= ${easyFillDialogModel>/isFullScreen} ? 'sap-icon://full-screen' : 'sap-icon://exit-full-screen'}"
|
|
83
|
+
type="Transparent"
|
|
84
|
+
press=".onToggleFullScreen"/>
|
|
85
|
+
</uxap:actions>
|
|
86
|
+
</uxap:ObjectPageHeader>
|
|
87
|
+
</uxap:headerTitle>
|
|
88
|
+
<uxap:headerContent>
|
|
89
|
+
<HBox gap="0.5rem" justifyContent="End" alignItems="Center" renderType="Bare" class="sapSmartTemplatesObjectPageEasyFillReviewAreaBanner">
|
|
90
|
+
<Link text="{i18n>AI_LINK_NOTICE_TITLE}" press=".onLinkPress"/>
|
|
91
|
+
<Label text="{i18n>AI_WARNING_TEXT}"/>
|
|
92
|
+
</HBox>
|
|
93
|
+
</uxap:headerContent>
|
|
94
|
+
<uxap:ObjectPageSection title="{path: 'easyFillDialogModel>title', formatter: '.formatSectionTitle'}">
|
|
95
|
+
<uxap:ObjectPageSubSection>
|
|
96
|
+
<smartForm:SmartForm editable="true" id="EasyFillSmartForm" groups="{path: 'easyFillDialogModel>children', templateShareable: false}">
|
|
97
|
+
<smartForm:layout>
|
|
98
|
+
<smartForm:ColumnLayout
|
|
99
|
+
columnsXL="3"
|
|
100
|
+
columnsL="3"
|
|
101
|
+
columnsM="2"
|
|
102
|
+
labelCellsLarge="12"/>
|
|
103
|
+
</smartForm:layout>
|
|
104
|
+
<smartForm:Group
|
|
105
|
+
title="{path: 'easyFillDialogModel>title', formatter: '.formatSectionTitle'}"
|
|
106
|
+
visible="{
|
|
107
|
+
parts: [
|
|
108
|
+
{path: 'easyFillDialogModel>id'},
|
|
109
|
+
{path: 'easyFillDialogModel>fields'},
|
|
110
|
+
{path: 'easyFillDialogModel>/easyFillMode'}
|
|
111
|
+
],
|
|
112
|
+
formatter: '.populateSmartFields'
|
|
113
|
+
}">
|
|
114
|
+
<smartForm:customData>
|
|
115
|
+
<core:CustomData key="id" value="{easyFillDialogModel>id}"/>
|
|
116
|
+
</smartForm:customData>
|
|
117
|
+
</smartForm:Group>
|
|
118
|
+
</smartForm:SmartForm>
|
|
119
|
+
</uxap:ObjectPageSubSection>
|
|
120
|
+
</uxap:ObjectPageSection>
|
|
121
|
+
</uxap:ObjectPageLayout>
|
|
122
|
+
<VBox id="EasyFillTablePreviewContainer" fitContainer="true" renderType="Bare" visible="{easyFillDialogModel>/hasTableUpdates}"/>
|
|
123
|
+
<MessageStrip
|
|
124
|
+
visible="{easyFillDialogModel>/hasTableUpdates}"
|
|
125
|
+
text="{i18n>EASY_FILL_TABLE_UPDATES_INFO}"
|
|
126
|
+
showIcon="true"
|
|
127
|
+
type="Information"/>
|
|
128
|
+
|
|
129
|
+
<MessageStrip
|
|
130
|
+
visible="{easyFillDialogModel>/hasTableValidationErrors}"
|
|
131
|
+
text="{easyFillDialogModel>/tableValidationMessage}"
|
|
132
|
+
showIcon="true"
|
|
133
|
+
type="Error"/>
|
|
134
|
+
</FlexBox>
|
|
135
|
+
</layout:SplitPane>
|
|
136
|
+
|
|
137
|
+
</layout:PaneContainer>
|
|
138
|
+
|
|
139
|
+
</layout:PaneContainer>
|
|
140
|
+
|
|
141
|
+
</layout:ResponsiveSplitter>
|
|
76
142
|
</FlexBox>
|
|
77
143
|
</content>
|
|
78
144
|
<beginButton>
|
|
79
|
-
<Button text="{i18n>EASY_FILL_CONFIRM}"
|
|
145
|
+
<Button text="{i18n>EASY_FILL_CONFIRM}" fesr:press="fe2:ef:confirm" enabled="{easyFillDialogModel>/isSaveEnabled}" press=".onSaveFromEasyFillDialog" type="Emphasized"/>
|
|
80
146
|
</beginButton>
|
|
81
147
|
<endButton>
|
|
82
|
-
<Button text="{i18n>CANCEL}"
|
|
148
|
+
<Button text="{i18n>CANCEL}" press=".onCancelEasyFillDialog" fesr:press="fe2:ef:cancel"/>
|
|
83
149
|
</endButton>
|
|
84
|
-
|
|
150
|
+
</Dialog>
|
|
85
151
|
</core:FragmentDefinition>
|