@sapui5/sap.suite.ui.generic.template 1.129.0 → 1.130.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 +4 -3
- package/src/sap/suite/ui/generic/template/.library +5 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/Component.js +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/VisualFilterDialogController.js +1 -1
- 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 +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +22 -11
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_bg.properties +3 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hu.properties +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_th.properties +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +5 -2
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/DefaultVariant.fragment.xml +7 -8
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/MultipleViewsSingleTableMode.fragment.xml +4 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/Component.js +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/templateSpecificPreparationHelper.js +90 -42
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/MultipleViewsSingleTableMode.fragment.xml +3 -0
- 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/controls/SmartTable.designtime.js +379 -0
- package/src/sap/suite/ui/generic/template/designtime/{AnalyticalListPage.designtime.js → floorplans/AnalyticalListPage.designtime.js} +3 -3
- package/src/sap/suite/ui/generic/template/designtime/{ListReport.designtime.js → floorplans/ListReport.designtime.js} +3 -3
- package/src/sap/suite/ui/generic/template/designtime/{ObjectPage.designtime.js → floorplans/ObjectPage.designtime.js} +4 -5
- package/src/sap/suite/ui/generic/template/designtime/utils/designtimeHelper.js +119 -96
- package/src/sap/suite/ui/generic/template/designtime/utils/designtimeUtils.js +395 -0
- package/src/sap/suite/ui/generic/template/fragments/EasyFilter.fragment.xml +12 -17
- package/src/sap/suite/ui/generic/template/fragments/MessagePage.controller.js +16 -0
- package/src/sap/suite/ui/generic/template/fragments/MessagePopover.fragment.xml +16 -2
- package/src/sap/suite/ui/generic/template/fragments/SmartFormDataField.fragment.xml +2 -0
- package/src/sap/suite/ui/generic/template/genericUtilities/Link.js +9 -2
- package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +8 -4
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +10 -3
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +0 -42
- package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +6 -1
- package/src/sap/suite/ui/generic/template/lib/MessageButtonHelper.js +11 -7
- package/src/sap/suite/ui/generic/template/lib/RetryAfterHandler.js +249 -0
- package/src/sap/suite/ui/generic/template/lib/ShareUtils.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/SideEffectUtil.js +64 -3
- package/src/sap/suite/ui/generic/template/lib/StableIdDefinition.js +7 -0
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +210 -74
- package/src/sap/suite/ui/generic/template/lib/ai/ErrorExplanationHelper.js +47 -0
- package/src/sap/suite/ui/generic/template/lib/ai/FioriAIHandler.js +10 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +31 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +1 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +5 -3
- package/src/sap/suite/ui/generic/template/library.js +3 -1
- package/src/sap/suite/ui/generic/template/listTemplates/fragments/MultipleViewsSingleTableMode.fragment.xml +6 -2
- package/src/sap/suite/ui/generic/template/manifestMerger/ChangePageConfiguration.js +28 -23
- package/src/sap/suite/ui/generic/template/manifestMerger/MergerUtil.js +6 -6
- package/src/sap/suite/ui/generic/template/themes/base/base.less +0 -4
- package/ui5.yaml +1 -0
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
|
|
4
|
+
(c) Copyright 2009-2015 SAP SE. All rights reserved
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
"sap/base/util/ObjectPath",
|
|
10
|
+
"sap/suite/ui/generic/template/genericUtilities/testableHelper"
|
|
11
|
+
], function (ObjectPath, testableHelper) {
|
|
12
|
+
"use strict";
|
|
13
|
+
/**
|
|
14
|
+
* Creates the adaptation dialog content based on the provided settings, property values, and unchanged data.
|
|
15
|
+
* It dynamically generates UI controls based on the type of each setting and binds them to the provided data.
|
|
16
|
+
*
|
|
17
|
+
* @param {Settings[]} aDialogContent - An array of Settings objects that define the structure and data for the dialog content.
|
|
18
|
+
* @param {Object} propertyValues - An object containing the current values of the properties to be edited.
|
|
19
|
+
* @param {Object} unchangedData - An object containing the original values of the properties before any changes.
|
|
20
|
+
* @returns {Promise<sap.m.List>} A promise that resolves to a sap.m.List containing the generated dialog content.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
const SettingScope = {
|
|
25
|
+
Page: "Page",
|
|
26
|
+
Control: "Control",
|
|
27
|
+
Application: "Application"
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const ChangeType = {
|
|
31
|
+
ChangePageConfiguration: "appdescr_ui_generic_app_changePageConfiguration",
|
|
32
|
+
AddNewObjectPage: "appdescr_ui_generic_app_addNewObjectPage"
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
function fnCreateAdaptionDialogContent(aDialogContent, propertyValues, unchangedData) {
|
|
36
|
+
return new Promise(function (resolve, reject) {
|
|
37
|
+
sap.ui.require([
|
|
38
|
+
"sap/ui/model/json/JSONModel",
|
|
39
|
+
"sap/m/InputListItem",
|
|
40
|
+
"sap/m/List",
|
|
41
|
+
"sap/m/MultiInput",
|
|
42
|
+
"sap/m/Input",
|
|
43
|
+
"sap/m/CheckBox",
|
|
44
|
+
"sap/ui/core/Item",
|
|
45
|
+
"sap/m/Select",
|
|
46
|
+
"sap/m/Token"
|
|
47
|
+
], function (JSONModel, InputListItem, List, MultiInput, Input, CheckBox, Item, Select, Token) {
|
|
48
|
+
const settingsModel = new JSONModel();
|
|
49
|
+
settingsModel.setData(aDialogContent);
|
|
50
|
+
|
|
51
|
+
const list = new List();
|
|
52
|
+
list.setModel(settingsModel);
|
|
53
|
+
|
|
54
|
+
const listItem = new InputListItem({ label: "{label}" });
|
|
55
|
+
|
|
56
|
+
listItem.bindAggregation("content", {
|
|
57
|
+
path: "control",
|
|
58
|
+
factory: function (sId, oContext) {
|
|
59
|
+
const type = oContext.getProperty("type");
|
|
60
|
+
const id = oContext.getProperty("id");
|
|
61
|
+
|
|
62
|
+
switch (type) {
|
|
63
|
+
case "string":
|
|
64
|
+
if (oContext.getProperty("enum")) {
|
|
65
|
+
const item = new Item({ text: "{name}", key: "{id}" });
|
|
66
|
+
const select = new Select({
|
|
67
|
+
selectedItem: "{value}",
|
|
68
|
+
change: function (event) {
|
|
69
|
+
propertyValues[this.data("id")] = event.getParameter("selectedItem").getKey();
|
|
70
|
+
},
|
|
71
|
+
enabled: {
|
|
72
|
+
path: "disabled",
|
|
73
|
+
formatter: function (disabled) {
|
|
74
|
+
return !disabled;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}).data("id", id);
|
|
78
|
+
|
|
79
|
+
select.bindItems({ path: "enum", template: item });
|
|
80
|
+
select.setSelectedKey(unchangedData[id]);
|
|
81
|
+
return select;
|
|
82
|
+
} else {
|
|
83
|
+
return new Input({
|
|
84
|
+
value: "{value}",
|
|
85
|
+
change: function (event) {
|
|
86
|
+
propertyValues[this.data("id")] = event.getParameter("value");
|
|
87
|
+
}
|
|
88
|
+
}).data("id", id);
|
|
89
|
+
}
|
|
90
|
+
case "string[]":
|
|
91
|
+
const oMultiInput = new MultiInput({
|
|
92
|
+
width: "70%",
|
|
93
|
+
showValueHelp: false,
|
|
94
|
+
showClearIcon: true,
|
|
95
|
+
tokens: (propertyValues[id] || []).map(function (navigationProperty) {
|
|
96
|
+
return new Token({ text: navigationProperty, key: navigationProperty });
|
|
97
|
+
}),
|
|
98
|
+
tokenUpdate: function (event) {
|
|
99
|
+
const array = propertyValues[this.data("id")];
|
|
100
|
+
if (event.getParameter("addedTokens").length > 0) {
|
|
101
|
+
array.push(event.getParameter("addedTokens")[0].getKey());
|
|
102
|
+
} else if (event.getParameter("removedTokens").length > 0) {
|
|
103
|
+
const index = array.indexOf(event.getParameter("removedTokens")[0].getKey());
|
|
104
|
+
if (index !== -1) { array.splice(index, 1); }
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}).data("id", id);
|
|
108
|
+
oMultiInput.addValidator(function (args) {
|
|
109
|
+
return new Token({ key: args.text, text: args.text });
|
|
110
|
+
});
|
|
111
|
+
return oMultiInput;
|
|
112
|
+
case "number":
|
|
113
|
+
return new Input({
|
|
114
|
+
value: "{value}",
|
|
115
|
+
type: "Number",
|
|
116
|
+
change: function (event) {
|
|
117
|
+
propertyValues[this.data("id")] = parseFloat(event.getParameter("value"));
|
|
118
|
+
}
|
|
119
|
+
}).data("id", id);
|
|
120
|
+
case "boolean":
|
|
121
|
+
return new CheckBox({
|
|
122
|
+
selected: "{value}",
|
|
123
|
+
select: function (event) {
|
|
124
|
+
propertyValues[this.data("id")] = event.getParameter("selected");
|
|
125
|
+
}
|
|
126
|
+
}).data("id", id);
|
|
127
|
+
case "booleanOrString":
|
|
128
|
+
const booleanOrStringItem = new Item({ text: "{name}", key: "{id}" });
|
|
129
|
+
const booleanOrStringSelect = new Select({
|
|
130
|
+
selectedItem: "{value}",
|
|
131
|
+
change: function (event) {
|
|
132
|
+
let value = event.getParameter("selectedItem").getKey();
|
|
133
|
+
if (value.toLowerCase() === "false" || value.toLowerCase() === "true") {
|
|
134
|
+
value = JSON.parse(value);
|
|
135
|
+
}
|
|
136
|
+
propertyValues[this.data("id")] = value;
|
|
137
|
+
}
|
|
138
|
+
}).data("id", id);
|
|
139
|
+
|
|
140
|
+
booleanOrStringSelect.bindItems({ path: "enum", template: booleanOrStringItem });
|
|
141
|
+
booleanOrStringSelect.setSelectedKey(unchangedData[id]);
|
|
142
|
+
return booleanOrStringSelect;
|
|
143
|
+
case "json":
|
|
144
|
+
return new Input({
|
|
145
|
+
value: "{value}",
|
|
146
|
+
change: function (event) {
|
|
147
|
+
try {
|
|
148
|
+
propertyValues[this.data("id")] = JSON.parse(event.getParameter("value"));
|
|
149
|
+
} catch (e) {
|
|
150
|
+
// Handle JSON parse error
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}).data("id", id);
|
|
154
|
+
default:
|
|
155
|
+
// unsupported type
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
list.bindItems({ path: "/", template: listItem });
|
|
162
|
+
resolve(list);
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function getComponent(oElement) {
|
|
168
|
+
let oComponent = oElement;
|
|
169
|
+
while (oComponent && !oComponent.getRootControl) {
|
|
170
|
+
oComponent = oComponent.getParent();
|
|
171
|
+
}
|
|
172
|
+
return oComponent;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* @typedef {Object} PathParameters
|
|
176
|
+
* @property {string} sScope - The scope of the manifest setting.
|
|
177
|
+
* @property {ChangeType} sChangeType - Desciptor change type.
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Generates settings for the designtime based on the provided runtime settings and manifest settings data.
|
|
182
|
+
* It maps each manifest setting to a structured format that includes labels, tooltips, and controls,
|
|
183
|
+
* which are then used to create the adaptation dialog content.
|
|
184
|
+
*
|
|
185
|
+
* @param {Object} mRuntimeSettings - An object containing the current runtime settings.
|
|
186
|
+
* @param {Array<Object>} aManifestSettingsData - An array of objects representing the manifest settings data.
|
|
187
|
+
* @returns {Array<Object>} An array of Settings objects, which can then be used to create the adaptation dialog content.
|
|
188
|
+
*
|
|
189
|
+
* @typedef {Object} Settings
|
|
190
|
+
* @property {string} label - The name of the setting.
|
|
191
|
+
* @property {string} tooltip - The description of the setting.
|
|
192
|
+
* @property {Array<Control>} control - An array of Control objects.
|
|
193
|
+
*
|
|
194
|
+
* @typedef {Object} Control
|
|
195
|
+
* @property {string} type - The type of the control (e.g., "string", "number").
|
|
196
|
+
* @property {Array<string>} [enum] - The enumeration values for the control, if applicable.
|
|
197
|
+
* @property {*} value - The current value of the control from mRuntimeSettings.
|
|
198
|
+
* @property {string} id - The unique identifier of the control.
|
|
199
|
+
* @property {boolean} [disabled] - An optional flag indicating if the control is disabled.
|
|
200
|
+
*/
|
|
201
|
+
function getSettings(mRuntimeSettings, aManifestSettingsData) {
|
|
202
|
+
return aManifestSettingsData.map(function (oManifestSetting) {
|
|
203
|
+
/**
|
|
204
|
+
* @type {Settings}
|
|
205
|
+
*/
|
|
206
|
+
const oSettingData = {
|
|
207
|
+
label: oManifestSetting.name,
|
|
208
|
+
tooltip: oManifestSetting.description,
|
|
209
|
+
control: []
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* @type {Control}
|
|
214
|
+
*/
|
|
215
|
+
const oControlData = {
|
|
216
|
+
type: oManifestSetting.type,
|
|
217
|
+
"enum": oManifestSetting.enums,
|
|
218
|
+
value: mRuntimeSettings[oManifestSetting.id],
|
|
219
|
+
id: oManifestSetting.id
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
oSettingData.control.push(oControlData);
|
|
223
|
+
return oSettingData;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Convert change into a structure required by the flexibility tools.
|
|
229
|
+
*
|
|
230
|
+
* @param {Object} oComponent - The control for which the change should be created
|
|
231
|
+
* @param {string} propertyPath - The property path
|
|
232
|
+
* @param {string|string[]|boolean|number|object|undefined} propertyChanges - The property changes
|
|
233
|
+
* @param {string} sChangeType - Descriptor change type
|
|
234
|
+
* @param {boolean} bIsGlobalChange - The flag to indicate if the change is for global scope
|
|
235
|
+
* @returns {Object} The change structure used by flexibility tools
|
|
236
|
+
*/
|
|
237
|
+
let getChangeStructure = function (oComponent, propertyPath, propertyChanges, sChangeType = ChangeType.ChangePageConfiguration, bIsGlobalChange = false) {
|
|
238
|
+
const oAppComponent = oComponent.getAppComponent();
|
|
239
|
+
return {
|
|
240
|
+
appComponent: oAppComponent,
|
|
241
|
+
selector: oAppComponent,
|
|
242
|
+
changeSpecificData: {
|
|
243
|
+
appDescriptorChangeType: sChangeType,
|
|
244
|
+
content: {
|
|
245
|
+
parameters: {
|
|
246
|
+
parentPage: {
|
|
247
|
+
component: bIsGlobalChange ? "sap.suite.ui.generic.template" : oComponent.getMetadata().getComponentName(),
|
|
248
|
+
entitySet: !bIsGlobalChange ? oComponent.getEntitySet() : undefined
|
|
249
|
+
},
|
|
250
|
+
entityPropertyChange: {
|
|
251
|
+
propertyPath: propertyPath,
|
|
252
|
+
operation: "UPSERT",
|
|
253
|
+
propertyValue: propertyChanges
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
async function fnOpenAdaptionDialog(items, propertyValues, unchangedData, title, size) {
|
|
262
|
+
const list = await fnCreateAdaptionDialogContent(items, propertyValues, unchangedData);
|
|
263
|
+
return new Promise(function (resolve, reject) {
|
|
264
|
+
sap.ui.require([
|
|
265
|
+
"sap/m/Dialog",
|
|
266
|
+
"sap/m/Button",
|
|
267
|
+
"sap/m/MessageStrip"
|
|
268
|
+
], function (Dialog, Button, MessageStrip) {
|
|
269
|
+
const informationText = new MessageStrip({
|
|
270
|
+
type: "Information",
|
|
271
|
+
text: "Changes made in this dialog may not directly result in visible changes in the application, because some settings don’t work in combination with others."
|
|
272
|
+
});
|
|
273
|
+
const dialog = new Dialog({
|
|
274
|
+
title: title,
|
|
275
|
+
contentWidth: size ? size.width : "550px",
|
|
276
|
+
contentHeight: size ? size.height : "300px",
|
|
277
|
+
content: [informationText, list],
|
|
278
|
+
buttons: [
|
|
279
|
+
new Button({
|
|
280
|
+
text: "Close",
|
|
281
|
+
press: function () {
|
|
282
|
+
dialog.close();
|
|
283
|
+
reject();
|
|
284
|
+
}
|
|
285
|
+
}),
|
|
286
|
+
new Button({
|
|
287
|
+
text: "Apply",
|
|
288
|
+
press: function () {
|
|
289
|
+
dialog.close();
|
|
290
|
+
resolve(propertyValues);
|
|
291
|
+
}
|
|
292
|
+
})
|
|
293
|
+
]
|
|
294
|
+
});
|
|
295
|
+
dialog.open();
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Retrieves the changed property values.
|
|
302
|
+
* @param {Array} designtimeSettings - The array of designtime settings.
|
|
303
|
+
* @param {Object} unchangedData - The unchanged data.
|
|
304
|
+
* @param {Object} propertyValues - The property values.
|
|
305
|
+
* @param {PathParameters} mPathParameters - The path parameters.
|
|
306
|
+
* @returns {Object} - The changed property values.
|
|
307
|
+
*/
|
|
308
|
+
let getChangedPropertyValues = function (designtimeSettings, unchangedData, propertyValues, mPathParameters) {
|
|
309
|
+
const propertyChanges = {};
|
|
310
|
+
designtimeSettings.forEach(function (setting) {
|
|
311
|
+
if (
|
|
312
|
+
(typeof unchangedData[setting.id] !== "object" && unchangedData[setting.id] !== propertyValues[setting.id]) ||
|
|
313
|
+
(typeof unchangedData[setting.id] === "object" && JSON.stringify(unchangedData[setting.id]) !== JSON.stringify(propertyValues[setting.id]))
|
|
314
|
+
) {
|
|
315
|
+
const propertyChangeKey = setting.getPath ? setting.getPath(mPathParameters) : setting.id;
|
|
316
|
+
propertyChanges[propertyChangeKey] = {
|
|
317
|
+
value: propertyValues[setting.id],
|
|
318
|
+
bIsGlobalChange: !!setting.bSupportsGlobalScope && mPathParameters.sScope === SettingScope.Application
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
return propertyChanges;
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
let getChanges = function (mChanges, oComponent, sChangeType) {
|
|
326
|
+
const aChanges = [];
|
|
327
|
+
const oSingleChange = {};
|
|
328
|
+
for (const [propertyPath, oPropertyChange] of Object.entries(mChanges)) {
|
|
329
|
+
oSingleChange[propertyPath] = oPropertyChange.value;
|
|
330
|
+
aChanges.push(getChangeStructure(oComponent, propertyPath, oPropertyChange.value, sChangeType, oPropertyChange.bIsGlobalChange));
|
|
331
|
+
}
|
|
332
|
+
return aChanges;
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Extracts the changes.
|
|
337
|
+
* @param {Object} mPropertyValues - The property values.
|
|
338
|
+
* @param {Object} mUnchangedData - The unchanged data.
|
|
339
|
+
* @param {Array} aDesigntimeSettings - The array of designtime settings.
|
|
340
|
+
* @param {Object} oComponent - The component.
|
|
341
|
+
* @param {PathParameters} mPathParameters - The path parameters.
|
|
342
|
+
* @returns {Array} - The changes.
|
|
343
|
+
*/
|
|
344
|
+
|
|
345
|
+
function fnExtractChanges(mPropertyValues, mUnchangedData, aDesigntimeSettings, oComponent, mPathParameters) {
|
|
346
|
+
const mChanges = getChangedPropertyValues(aDesigntimeSettings, mUnchangedData, mPropertyValues, mPathParameters);
|
|
347
|
+
return getChanges(mChanges, oComponent, mPathParameters.sChangeType);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
function getLocalId(oElement) {
|
|
351
|
+
const oComponent = getComponent(oElement);
|
|
352
|
+
return oComponent.getRootControl().getLocalId(oElement.getId());
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Retrieves the supported global manifest settings for the given app component.
|
|
357
|
+
*
|
|
358
|
+
* @param {object} oAppComponent - The app component.
|
|
359
|
+
* @returns {object} - The supported global manifest settings.
|
|
360
|
+
*/
|
|
361
|
+
function getSupportedGlobalManifestSettings(oAppComponent) {
|
|
362
|
+
const oManifest = oAppComponent.getManifest();
|
|
363
|
+
const oSettings = oManifest["sap.ui.generic.app"]["settings"];
|
|
364
|
+
|
|
365
|
+
const aSupportedGlobalManifestSettingKeys = ["tableSettings.createMode", "statePreservationMode", "flexibleColumnLayout", "inBoundParameters"];
|
|
366
|
+
|
|
367
|
+
const oSupportedGlobalManifestSettings = {};
|
|
368
|
+
|
|
369
|
+
aSupportedGlobalManifestSettingKeys.forEach(function (sKey) {
|
|
370
|
+
const sValue = ObjectPath.get(sKey, oSettings);
|
|
371
|
+
if (sValue) {
|
|
372
|
+
ObjectPath.set(sKey, sValue, oSupportedGlobalManifestSettings);
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
return oSupportedGlobalManifestSettings;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
// Add the functions to the testableHelper for testing which are not exported
|
|
380
|
+
getChangedPropertyValues = testableHelper.testableStatic(getChangedPropertyValues, "getChangedPropertyValues");
|
|
381
|
+
getChanges = testableHelper.testableStatic(getChanges, "getChanges");
|
|
382
|
+
getChangeStructure = testableHelper.testableStatic(getChangeStructure, "getChangeStructure");
|
|
383
|
+
|
|
384
|
+
return {
|
|
385
|
+
openAdaptionDialog: fnOpenAdaptionDialog,
|
|
386
|
+
getSettings,
|
|
387
|
+
extractChanges: fnExtractChanges,
|
|
388
|
+
getComponent,
|
|
389
|
+
createAdaptionDialogContent: fnCreateAdaptionDialogContent,
|
|
390
|
+
getLocalId,
|
|
391
|
+
SettingScope,
|
|
392
|
+
ChangeType,
|
|
393
|
+
getSupportedGlobalManifestSettings
|
|
394
|
+
};
|
|
395
|
+
});
|
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core">
|
|
1
|
+
<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:feControls="sap.fe.controls.easyFilter">
|
|
2
|
+
<!-- to check how to use a common model property instead of listReport/filterMode which is specific to LR-->
|
|
2
3
|
<VBox visible="{= ${_templPriv>/listReport/filterMode} === 'easyFilter'}">
|
|
3
|
-
|
|
4
|
+
<MessageStrip
|
|
4
5
|
text="{i18n>ST_EASY_FILTER_PROMPT_INFO}"
|
|
5
6
|
showIcon="true"
|
|
6
7
|
showCloseButton="true"
|
|
7
8
|
class="sapUiSmallMarginBottom"/>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<Button text="{i18n>ST_EASY_FILTER_GO_BUTTON_TEXT}"
|
|
18
|
-
type="Emphasized"
|
|
19
|
-
icon="sap-icon://ai"
|
|
20
|
-
press="._templateEventHandlers.onEasyFilterGoButtonPress">
|
|
21
|
-
</Button>
|
|
22
|
-
</FlexBox>
|
|
9
|
+
<feControls:EasyFilterBarContainer id="template::easyFilterContainer"
|
|
10
|
+
showValueHelp="._templateEventHandlers.onEasyFilterShowValueHelp"
|
|
11
|
+
queryChanged="._templateEventHandlers.onEasyFilterQueryChanged"
|
|
12
|
+
tokensChanged="._templateEventHandlers.onEasyFilterTokensChanged"
|
|
13
|
+
beforeQueryProcessing="._templateEventHandlers.onEasyFilterBeforeQueryProcessing"
|
|
14
|
+
afterQueryProcessing="._templateEventHandlers.onEasyFilterAfterQueryProcessing"
|
|
15
|
+
clearFilters="._templateEventHandlers.onEasyFilterClearFilters"
|
|
16
|
+
executeSearch="._templateEventHandlers.onEasyFilterExecuteSearch"
|
|
17
|
+
/>
|
|
23
18
|
</VBox>
|
|
24
19
|
</core:FragmentDefinition>
|
|
@@ -5,6 +5,22 @@ sap.ui.define([
|
|
|
5
5
|
|
|
6
6
|
// Controller of the EmptyPage view
|
|
7
7
|
return Controller.extend("sap.suite.ui.generic.template.fragments.MessagePage", {
|
|
8
|
+
onInit: function() {
|
|
9
|
+
this.oView = this.getView();
|
|
10
|
+
},
|
|
11
|
+
onBeforeRendering: function () {
|
|
12
|
+
// Note: The additional content array may contain any control like Button, Text etc.
|
|
13
|
+
// That can't be handled dynamically in the template file (MessagePage.view.xml) as we don't know the control type.
|
|
14
|
+
// Hence, kept the logic of adding additional controls in the controller file.
|
|
15
|
+
var oIllustratedMessage = this.oView.byId("messagePage");
|
|
16
|
+
var aAdditionalContent = this.oView.getModel("_templPrivGlobal").getProperty("/generic/messagePage/additionalContent");
|
|
17
|
+
// If additional content found on the model, add them to the illustrated message (message page)
|
|
18
|
+
if (aAdditionalContent && Array.isArray(aAdditionalContent)) {
|
|
19
|
+
aAdditionalContent.forEach(function (oControl) {
|
|
20
|
+
oIllustratedMessage.addAdditionalContent(oControl);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
},
|
|
8
24
|
navButtonPress: function() {
|
|
9
25
|
window.history.back();
|
|
10
26
|
}
|
|
@@ -2,10 +2,24 @@
|
|
|
2
2
|
xmlns="sap.m"
|
|
3
3
|
xmlns:core="sap.ui.core">
|
|
4
4
|
<MessagePopover groupItems="true" items="{msg>/}" activeTitlePress="titlePressed" beforeOpen="beforeOpen" afterClose="afterClose" >
|
|
5
|
-
<MessageItem
|
|
5
|
+
<MessageItem description="{msg>description}" type="{msg>type}" title="{msg>message}"
|
|
6
6
|
subtitle="{parts:[{path: 'msg>id'}, {path: 'msg>controlIds'}, {path: 'msg>additionalText'}, {path: 'helper>/isPopoverOpen'}, {path: 'helper>/heartBeat'}], formatter: '.getSubtitle'}"
|
|
7
7
|
longtextUrl="{msg>descriptionUrl}"
|
|
8
|
+
markupDescription="true"
|
|
8
9
|
activeTitle="{parts:[{path: 'msg>id'}, {path: 'msg>controlIds'}, {path: 'helper>/isPopoverOpen'}], formatter: '.isPositionable'}"
|
|
9
|
-
groupName="{= ${helper>/messageToGroupName}[${msg>id}] }"
|
|
10
|
+
groupName="{= ${helper>/messageToGroupName}[${msg>id}] }">
|
|
11
|
+
<Link
|
|
12
|
+
text="{i18n>ST_AI_EE_BUTTON_LABEL}"
|
|
13
|
+
icon="sap-icon://ai"
|
|
14
|
+
visible="{helper>/isAIErrorExplanationEnabled}"
|
|
15
|
+
press="generateErrorExplanation">
|
|
16
|
+
<customData>
|
|
17
|
+
<core:CustomData key="message" value="{msg>message}" />
|
|
18
|
+
<core:CustomData key="description" value="{msg>description}" />
|
|
19
|
+
<core:CustomData key="descriptionUrl" value="{msg>descriptionUrl}" />
|
|
20
|
+
<core:CustomData key="code" value="{msg>code}" />
|
|
21
|
+
</customData>
|
|
22
|
+
</Link>
|
|
23
|
+
</MessageItem>
|
|
10
24
|
</MessagePopover>
|
|
11
25
|
</core:FragmentDefinition>
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
visible="{path: 'dataField>', formatter: 'AH.getVisibiltyBasedOnImportanceAndHidden'}"
|
|
36
36
|
binding="{path: 'dataField>Target'}, formatter: 'AH.getNavigationPathWithExpand'}">
|
|
37
37
|
<fe:customData>
|
|
38
|
+
<core:CustomData key="SideEffects" value="{parts: [{path: 'entitySet>'}, {path: 'dataField>'}], formatter: 'AH.getPropsForLinkFields'}"/>
|
|
38
39
|
<core:CustomData key="Location" value="Section" />
|
|
39
40
|
<core:CustomData key="contactDetails" value="{= ${path: 'contact>', formatter: 'AH.getCustomDataForContactPopup'}}"/>
|
|
40
41
|
</fe:customData>
|
|
@@ -120,6 +121,7 @@
|
|
|
120
121
|
press="._templateEventHandlers.onDataFieldWithIntentBasedNavigation"
|
|
121
122
|
wrapping="true">
|
|
122
123
|
<fe:customData>
|
|
124
|
+
<core:CustomData key="SideEffects" value="{parts: [{path: 'entitySet>'}, {path: 'dataField>'}], formatter: 'AH.getPropsForLinkFields'}"/>
|
|
123
125
|
<core:CustomData key="SemanticObject" value="{path: 'dataField>SemanticObject', formatter: 'AHModel.format'}" />
|
|
124
126
|
<core:CustomData key="Action" value="{path: 'dataField>Action', formatter: 'AHModel.format'}" />
|
|
125
127
|
</fe:customData>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/* FE specific implementation of a Link that preserves whitespaces */
|
|
2
|
-
sap.ui.define([
|
|
3
|
-
|
|
2
|
+
sap.ui.define([
|
|
3
|
+
"sap/m/Link",
|
|
4
|
+
"sap/m/LinkRenderer",
|
|
5
|
+
"sap/base/strings/whitespaceReplacer",
|
|
6
|
+
"sap/suite/ui/generic/template/lib/SideEffectUtil"
|
|
7
|
+
], function (Link, LinkRenderer, whitespaceReplacer, SideEffectUtil){
|
|
4
8
|
"use strict";
|
|
5
9
|
|
|
6
10
|
var FELink = Link.extend("sap.suite.ui.generic.template.genericUtilities.Link", {
|
|
@@ -12,6 +16,9 @@ sap.ui.define(["sap/m/Link", "sap/m/LinkRenderer", "sap/base/strings/whitespaceR
|
|
|
12
16
|
},
|
|
13
17
|
renderer: function(oRM, oControl){
|
|
14
18
|
LinkRenderer.render(oRM, oControl);
|
|
19
|
+
},
|
|
20
|
+
onAfterRendering : function() {
|
|
21
|
+
SideEffectUtil.assignFieldGroupIdsToLinkField(this);
|
|
15
22
|
}
|
|
16
23
|
});
|
|
17
24
|
|
|
@@ -11,9 +11,10 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
11
11
|
"sap/ui/core/library",
|
|
12
12
|
"sap/suite/ui/generic/template/genericUtilities/metadataAnalyser",
|
|
13
13
|
"sap/ui/base/ManagedObject",
|
|
14
|
+
"sap/suite/ui/generic/template/lib/SideEffectUtil",
|
|
14
15
|
"sap/suite/ui/generic/template/js/RuntimeFormatters" // just to make sure that it is loaded
|
|
15
16
|
], function (AnnotationHelperModel, AnnotationHelperModelBasics, SmartField, FeLogger, formatMessage, deepExtend, StableIdHelper, utils, Device,
|
|
16
|
-
SapMLibrary, SapCoreLibrary, metadataAnalyser, ManagedObject) {
|
|
17
|
+
SapMLibrary, SapCoreLibrary, metadataAnalyser, ManagedObject, SideEffectUtil) {
|
|
17
18
|
"use strict";
|
|
18
19
|
|
|
19
20
|
// shortcut for sap.ui.core.ValueState
|
|
@@ -383,7 +384,9 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
383
384
|
getCustomDataForContactPopup: function (oContactDetails) {
|
|
384
385
|
return ((JSON.stringify(oContactDetails)).replace(/\}/g, "\\}").replace(/\{/g, "\\{")); //check bindingParser.escape
|
|
385
386
|
},
|
|
386
|
-
|
|
387
|
+
getPropsForLinkFields: function(oEntitySet, oTarget) {
|
|
388
|
+
return SideEffectUtil.getPropsForLinkFields(oEntitySet, oTarget);
|
|
389
|
+
},
|
|
387
390
|
checkIsEmailAddress: function (oInterface, sEntityType, oDataField) {
|
|
388
391
|
var oMetaModel = oInterface.getInterface(1).getModel();
|
|
389
392
|
var sPath = oInterface.getInterface(1).getPath() + '/Value';
|
|
@@ -3322,7 +3325,8 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
3322
3325
|
// To build criticality for the action buttons based on the criticality annotation
|
|
3323
3326
|
// Both path and enum values are considered
|
|
3324
3327
|
buildExpressionForButtonCriticality: function(oDataPoint) {
|
|
3325
|
-
var
|
|
3328
|
+
var bIsDetermining = oDataPoint.Determining;
|
|
3329
|
+
var sFormatCriticalityExpression = bIsDetermining ? SapMLibrary.ButtonType.Default : SapMLibrary.ButtonType.Ghost ;
|
|
3326
3330
|
var sExpressionTemplate;
|
|
3327
3331
|
var oCriticalityProperty = oDataPoint.Criticality;
|
|
3328
3332
|
if (oCriticalityProperty) {
|
|
@@ -3340,7 +3344,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
3340
3344
|
}
|
|
3341
3345
|
} else {
|
|
3342
3346
|
// Any other cases are not valid, the default value of 'Default' will be returned
|
|
3343
|
-
oLogger.warning("Case not supported, returning the default
|
|
3347
|
+
oLogger.warning("Case not supported, returning the default" + sFormatCriticalityExpression);
|
|
3344
3348
|
}
|
|
3345
3349
|
|
|
3346
3350
|
return sFormatCriticalityExpression;
|
|
@@ -57,6 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
"sap/ui/VersionInfo",
|
|
58
58
|
"sap/m/IllustratedMessageType",
|
|
59
59
|
"sap/suite/ui/generic/template/lib/ai/FioriAIHandler",
|
|
60
|
+
"sap/suite/ui/generic/template/lib/RetryAfterHandler",
|
|
60
61
|
"sap/suite/ui/generic/template/js/RuntimeFormatters" // just to make sure that this class is loaded
|
|
61
62
|
], function(
|
|
62
63
|
extend,
|
|
@@ -93,7 +94,9 @@ sap.ui.define([
|
|
|
93
94
|
JouleContextProvider,
|
|
94
95
|
ServiceFactoryRegistry,
|
|
95
96
|
VersionInfo,
|
|
96
|
-
IllustratedMessageType,
|
|
97
|
+
IllustratedMessageType,
|
|
98
|
+
FioriAIHandler,
|
|
99
|
+
RetryAfterHandler) {
|
|
97
100
|
"use strict";
|
|
98
101
|
var sClassName = "lib.AppComponent";
|
|
99
102
|
|
|
@@ -292,7 +295,8 @@ sap.ui.define([
|
|
|
292
295
|
// Check FioriAI servce is enabled
|
|
293
296
|
"fioriAI": {
|
|
294
297
|
isSummarizationEnabled : false,
|
|
295
|
-
isEasyFilterEnabled : false
|
|
298
|
+
isEasyFilterEnabled : false,
|
|
299
|
+
isErrorExplanationEnabled : false
|
|
296
300
|
}
|
|
297
301
|
});
|
|
298
302
|
oAppComponent.setModel(oTemplateContract.oTemplatePrivateGlobalModel, "_templPrivGlobal");
|
|
@@ -499,6 +503,9 @@ sap.ui.define([
|
|
|
499
503
|
}
|
|
500
504
|
});
|
|
501
505
|
setLeaveAppPromise();
|
|
506
|
+
var oRetryAfterHandler = new RetryAfterHandler(oTemplateContract, oAppComponent);
|
|
507
|
+
oRetryAfterHandler.registerRetryAfterHandler();
|
|
508
|
+
|
|
502
509
|
oLogger.info("Init done for AppComponent " + sAppComponentId);
|
|
503
510
|
}
|
|
504
511
|
|
|
@@ -931,7 +938,7 @@ sap.ui.define([
|
|
|
931
938
|
* @public
|
|
932
939
|
* @extends sap.ui.core.UIComponent
|
|
933
940
|
* @author SAP SE
|
|
934
|
-
* @version 1.
|
|
941
|
+
* @version 1.130.1
|
|
935
942
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
936
943
|
*/
|
|
937
944
|
var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -2692,47 +2692,6 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2692
2692
|
oController.onBeforeExportTableExtension(oExportParams);
|
|
2693
2693
|
}
|
|
2694
2694
|
|
|
2695
|
-
/**
|
|
2696
|
-
* This method is called when the user interacts with EasyFilter field (Enter on the input field or Go button press).
|
|
2697
|
-
* The AI easy filter is triggered and the result filters are applied to the SmartFilterBar.
|
|
2698
|
-
* @param {object} oEasyFilterInputField - The EasyFilter input field which has the value entered by the user
|
|
2699
|
-
* @param {object} oState - oState of the component
|
|
2700
|
-
*/
|
|
2701
|
-
function fnHandleEasyFilterChange(oEasyFilterInputField, oState) {
|
|
2702
|
-
|
|
2703
|
-
var oSmartFilterbar = oState.oSmartFilterbar;
|
|
2704
|
-
FESRHelper.setSemanticStepname(oEasyFilterInputField, "press", "fe2:ai:search");
|
|
2705
|
-
var oAIFilterQueryHandlerPromise = oState.oEasyFilterBarHandler.triggerEasyFilterQuery(oEasyFilterInputField, oSmartFilterbar);
|
|
2706
|
-
|
|
2707
|
-
oAIFilterQueryHandlerPromise.then(function(oFiltersFromAI) {
|
|
2708
|
-
|
|
2709
|
-
var sSmartFilterBarId = oSmartFilterbar.getId();
|
|
2710
|
-
var oSmartFilterBarWrapper = oCommonUtils.getControlStateWrapperById(sSmartFilterBarId, "SmartFilterBar");
|
|
2711
|
-
var oSmartFilterBarVariant = oSmartFilterBarWrapper.getState();
|
|
2712
|
-
var oVariantDataFromAI = oState.oEasyFilterBarHandler.getSFBVariantData(oFiltersFromAI);
|
|
2713
|
-
|
|
2714
|
-
// restore the custom filters to the initial state for now
|
|
2715
|
-
// To check if other objects in oSmartFilterBarVariant needs to be modified
|
|
2716
|
-
var aAppExtension = Object.keys(oSmartFilterBarVariant.customFilters.appExtension);
|
|
2717
|
-
if ( aAppExtension.length > 0 ) {
|
|
2718
|
-
aAppExtension.forEach(function(sKey) {
|
|
2719
|
-
oSmartFilterBarVariant.customFilters.appExtension[sKey] = "";
|
|
2720
|
-
});
|
|
2721
|
-
}
|
|
2722
|
-
oSmartFilterBarVariant.selectOptions = oVariantDataFromAI.aSelectOptions;
|
|
2723
|
-
if (oComponentUtils.isDraftEnabled()) {
|
|
2724
|
-
oSmartFilterBarVariant.customFilters.editState = oVariantDataFromAI.oEditStateFilter;
|
|
2725
|
-
}
|
|
2726
|
-
|
|
2727
|
-
oSmartFilterBarWrapper.setState(oSmartFilterBarVariant);
|
|
2728
|
-
oSmartFilterbar.getSmartVariant() && oSmartFilterbar.getSmartVariant().currentVariantSetModified(true);
|
|
2729
|
-
oSmartFilterbar.search();
|
|
2730
|
-
}, function(oError) {
|
|
2731
|
-
oLogger.error("Error occurred while applying the AI filters", oError);
|
|
2732
|
-
});
|
|
2733
|
-
oComponentUtils.getBusyHelper().setBusy(oAIFilterQueryHandlerPromise);
|
|
2734
|
-
}
|
|
2735
|
-
|
|
2736
2695
|
/**
|
|
2737
2696
|
* Performs intent based navigation and opens the given line item context in a new tab.
|
|
2738
2697
|
*
|
|
@@ -2814,7 +2773,6 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2814
2773
|
onSmartFieldModeToggled: onSmartFieldModeToggled,
|
|
2815
2774
|
onRenderTeamsContactCollabOptions: fnRenderTeamsContactCollabOptions,
|
|
2816
2775
|
hideTableCells: fnHideTableCells,
|
|
2817
|
-
onEasyFilterChange: fnHandleEasyFilterChange,
|
|
2818
2776
|
navigateIntentOnNewTab: fnNavigateIntentOnNewTab
|
|
2819
2777
|
};
|
|
2820
2778
|
}
|