@sapui5/sap.fe.core 1.93.3 → 1.96.2
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 +2 -2
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/AppComponent.js +9 -40
- package/src/sap/fe/core/BusyLocker.js +12 -0
- package/src/sap/fe/core/CommonUtils.js +430 -27
- package/src/sap/fe/core/ExtensionAPI.js +1 -1
- package/src/sap/fe/core/PageController.js +13 -2
- package/src/sap/fe/core/TemplateComponent.js +6 -0
- package/src/sap/fe/core/TransactionHelper.js +248 -170
- package/src/sap/fe/core/actions/draft.js +13 -1
- package/src/sap/fe/core/actions/operations.js +165 -45
- package/src/sap/fe/core/controllerextensions/EditFlow.js +56 -37
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +13 -6
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +127 -24
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +183 -164
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +834 -170
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +890 -189
- package/src/sap/fe/core/controllerextensions/PageReady.js +48 -33
- package/src/sap/fe/core/controllerextensions/PageReady.ts +49 -14
- package/src/sap/fe/core/controllerextensions/Paginator.js +150 -0
- package/src/sap/fe/core/controllerextensions/Placeholder.js +133 -270
- package/src/sap/fe/core/controllerextensions/Share.js +31 -13
- package/src/sap/fe/core/controllerextensions/SideEffects.js +5 -6
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +13 -12
- package/src/sap/fe/core/controllerextensions/ViewState.js +173 -6
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +39 -34
- package/src/sap/fe/core/controls/ActionParameterDialogValueHelp.fragment.xml +35 -0
- package/src/sap/fe/core/controls/ActionPartial.fragment.xml +1 -1
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +3 -0
- package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +45 -0
- package/src/sap/fe/core/controls/filterbar/FilterContainer.js +15 -4
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +250 -94
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +129 -135
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +325 -0
- package/src/sap/fe/core/converters/ConverterContext.js +19 -5
- package/src/sap/fe/core/converters/ConverterContext.ts +13 -3
- package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +9 -2
- package/src/sap/fe/core/converters/ManifestWrapper.js +9 -9
- package/src/sap/fe/core/converters/MetaModelConverter.js +858 -871
- package/src/sap/fe/core/converters/MetaModelConverter.ts +763 -826
- package/src/sap/fe/core/converters/TemplateConverter.js +4 -4
- package/src/sap/fe/core/converters/annotations/DataField.js +57 -7
- package/src/sap/fe/core/converters/annotations/DataField.ts +52 -2
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +80 -46
- package/src/sap/fe/core/converters/controls/Common/Action.js +56 -54
- package/src/sap/fe/core/converters/controls/Common/Action.ts +48 -36
- package/src/sap/fe/core/converters/controls/Common/Chart.js +101 -9
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +100 -5
- package/src/sap/fe/core/converters/controls/Common/Criticality.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +15 -16
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +16 -30
- package/src/sap/fe/core/converters/controls/Common/Form.js +21 -12
- package/src/sap/fe/core/converters/controls/Common/Form.ts +28 -8
- package/src/sap/fe/core/converters/controls/Common/KPI.js +287 -109
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +314 -139
- package/src/sap/fe/core/converters/controls/Common/Table.js +414 -171
- package/src/sap/fe/core/converters/controls/Common/Table.ts +412 -130
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +487 -0
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +541 -0
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +364 -0
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +338 -0
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.js +74 -0
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.ts +50 -0
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +11 -11
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +47 -35
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +45 -29
- package/src/sap/fe/core/converters/helpers/Aggregation.js +31 -32
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +26 -27
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +27 -2
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +22 -2
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +1 -1
- package/src/sap/fe/core/converters/helpers/ID.js +1 -3
- package/src/sap/fe/core/converters/helpers/ID.ts +2 -3
- package/src/sap/fe/core/converters/helpers/IssueManager.js +5 -4
- package/src/sap/fe/core/converters/helpers/IssueManager.ts +4 -3
- package/src/sap/fe/core/converters/helpers/Key.js +3 -3
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.js +11 -6
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.ts +9 -5
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +18 -5
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +14 -14
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +91 -20
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +77 -5
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +76 -714
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +75 -807
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +106 -17
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +121 -16
- package/src/sap/fe/core/formatters/CriticalityFormatter.js +1 -1
- package/src/sap/fe/core/formatters/FPMFormatter.js +1 -1
- package/src/sap/fe/core/formatters/FPMFormatter.ts +8 -3
- package/src/sap/fe/core/formatters/KPIFormatter.js +1 -1
- package/src/sap/fe/core/formatters/TableFormatter.js +1 -1
- package/src/sap/fe/core/formatters/TableFormatterTypes.js +1 -1
- package/src/sap/fe/core/formatters/ValueFormatter.js +1 -1
- package/src/sap/fe/core/fpm/Component.js +1 -1
- package/src/sap/fe/core/helpers/AnnotationEnum.js +3 -3
- package/src/sap/fe/core/helpers/BindingExpression.js +6 -6
- package/src/sap/fe/core/helpers/ClassSupport.js +4 -4
- package/src/sap/fe/core/helpers/ExcelFormatHelper.js +0 -2
- package/src/sap/fe/core/helpers/ModelHelper.js +27 -0
- package/src/sap/fe/core/helpers/PasteHelper.js +6 -0
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js +2 -2
- package/src/sap/fe/core/helpers/StableIdHelper.js +1 -1
- package/src/sap/fe/core/helpers/StableIdHelper.ts +1 -1
- package/src/sap/fe/core/jsx-runtime/jsx.js +2 -2
- package/src/sap/fe/core/jsx-runtime/jsxs.js +1 -1
- package/src/sap/fe/core/library.js +1 -1
- package/src/sap/fe/core/messagebundle.properties +30 -1
- package/src/sap/fe/core/messagebundle_ar.properties +43 -1
- package/src/sap/fe/core/messagebundle_bg.properties +42 -0
- package/src/sap/fe/core/messagebundle_ca.properties +44 -2
- package/src/sap/fe/core/messagebundle_cs.properties +42 -0
- package/src/sap/fe/core/messagebundle_cy.properties +42 -0
- package/src/sap/fe/core/messagebundle_da.properties +43 -1
- package/src/sap/fe/core/messagebundle_de.properties +45 -3
- package/src/sap/fe/core/messagebundle_el.properties +43 -1
- package/src/sap/fe/core/messagebundle_en.properties +42 -0
- package/src/sap/fe/core/messagebundle_en_GB.properties +43 -1
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +43 -1
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +48 -0
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +42 -0
- package/src/sap/fe/core/messagebundle_es.properties +50 -8
- package/src/sap/fe/core/messagebundle_es_MX.properties +45 -3
- package/src/sap/fe/core/messagebundle_et.properties +42 -0
- package/src/sap/fe/core/messagebundle_fi.properties +42 -0
- package/src/sap/fe/core/messagebundle_fr.properties +51 -9
- package/src/sap/fe/core/messagebundle_fr_CA.properties +42 -0
- package/src/sap/fe/core/messagebundle_hi.properties +43 -1
- package/src/sap/fe/core/messagebundle_hr.properties +43 -1
- package/src/sap/fe/core/messagebundle_hu.properties +42 -0
- package/src/sap/fe/core/messagebundle_id.properties +43 -1
- package/src/sap/fe/core/messagebundle_it.properties +43 -1
- package/src/sap/fe/core/messagebundle_iw.properties +44 -2
- package/src/sap/fe/core/messagebundle_ja.properties +43 -1
- package/src/sap/fe/core/messagebundle_kk.properties +43 -1
- package/src/sap/fe/core/messagebundle_ko.properties +43 -1
- package/src/sap/fe/core/messagebundle_lt.properties +43 -1
- package/src/sap/fe/core/messagebundle_lv.properties +43 -1
- package/src/sap/fe/core/messagebundle_ms.properties +43 -1
- package/src/sap/fe/core/messagebundle_nl.properties +47 -5
- package/src/sap/fe/core/messagebundle_no.properties +44 -2
- package/src/sap/fe/core/messagebundle_pl.properties +43 -1
- package/src/sap/fe/core/messagebundle_pt.properties +43 -1
- package/src/sap/fe/core/messagebundle_pt_PT.properties +43 -1
- package/src/sap/fe/core/messagebundle_ro.properties +43 -1
- package/src/sap/fe/core/messagebundle_ru.properties +43 -1
- package/src/sap/fe/core/messagebundle_sh.properties +43 -1
- package/src/sap/fe/core/messagebundle_sk.properties +42 -0
- package/src/sap/fe/core/messagebundle_sl.properties +43 -1
- package/src/sap/fe/core/messagebundle_sv.properties +43 -1
- package/src/sap/fe/core/messagebundle_th.properties +42 -0
- package/src/sap/fe/core/messagebundle_tr.properties +42 -0
- package/src/sap/fe/core/messagebundle_uk.properties +42 -0
- package/src/sap/fe/core/messagebundle_vi.properties +43 -1
- package/src/sap/fe/core/messagebundle_zh_CN.properties +43 -1
- package/src/sap/fe/core/messagebundle_zh_TW.properties +43 -1
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +5 -5
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +5 -5
- package/src/sap/fe/core/services/RoutingServiceFactory.js +155 -76
- package/src/sap/fe/core/services/ShellServicesFactory.js +9 -9
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +11 -12
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +11 -1
- package/src/sap/fe/core/support/AnnotationIssue.support.js +2 -4
- package/src/sap/fe/core/support/CollectionFacetMissingID.support.js +2 -4
- package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.js +2 -4
- package/src/sap/fe/core/support/CommonHelper.js +2 -4
- package/src/sap/fe/core/support/Diagnostics.js +1 -1
- package/src/sap/fe/core/templating/CriticalityFormatters.js +4 -4
- package/src/sap/fe/core/templating/DataFieldFormatters.js +1 -1
- package/src/sap/fe/core/templating/DataModelPathHelper.js +54 -6
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +54 -4
- package/src/sap/fe/core/templating/EntitySetHelper.js +13 -3
- package/src/sap/fe/core/templating/EntitySetHelper.ts +4 -0
- package/src/sap/fe/core/templating/FieldControlHelper.js +1 -1
- package/src/sap/fe/core/templating/FilterHelper.js +23 -5
- package/src/sap/fe/core/templating/FilterHelper.ts +15 -1
- package/src/sap/fe/core/templating/FilterTemplating.js +1 -1
- package/src/sap/fe/core/templating/PropertyFormatters.js +1 -1
- package/src/sap/fe/core/templating/PropertyHelper.js +8 -8
- package/src/sap/fe/core/templating/UIFormatters.js +72 -4
- package/src/sap/fe/core/templating/UIFormatters.ts +98 -3
- package/src/sap/fe/core/type/Email.js +1 -1
|
@@ -17,13 +17,13 @@ sap.ui.define(["sap/ui/core/service/ServiceFactory", "sap/ui/core/service/Servic
|
|
|
17
17
|
|
|
18
18
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
19
19
|
|
|
20
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (
|
|
20
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
21
21
|
|
|
22
22
|
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
23
23
|
|
|
24
24
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25
25
|
|
|
26
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try {
|
|
26
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
27
27
|
|
|
28
28
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
29
29
|
|
|
@@ -40,8 +40,8 @@ sap.ui.define(["sap/ui/core/service/ServiceFactory", "sap/ui/core/service/Servic
|
|
|
40
40
|
|
|
41
41
|
_createClass(EnvironmentCapabilitiesService, [{
|
|
42
42
|
key: "init",
|
|
43
|
-
// !: means that we know it will be assigned before usage
|
|
44
|
-
|
|
43
|
+
value: // !: means that we know it will be assigned before usage
|
|
44
|
+
function init() {
|
|
45
45
|
var _this = this;
|
|
46
46
|
|
|
47
47
|
this.initPromise = new Promise(function (resolve, reject) {
|
|
@@ -125,4 +125,4 @@ sap.ui.define(["sap/ui/core/service/ServiceFactory", "sap/ui/core/service/Servic
|
|
|
125
125
|
|
|
126
126
|
return EnvironmentServiceFactory;
|
|
127
127
|
}, false);
|
|
128
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
128
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkVudmlyb25tZW50U2VydmljZUZhY3RvcnkudHMiXSwibmFtZXMiOlsiRW52aXJvbm1lbnRDYXBhYmlsaXRpZXNTZXJ2aWNlIiwiaW5pdFByb21pc2UiLCJQcm9taXNlIiwicmVzb2x2ZSIsInJlamVjdCIsInJlc29sdmVGbiIsInJlamVjdEZuIiwib0NvbnRleHQiLCJnZXRDb250ZXh0IiwiZW52aXJvbm1lbnRDYXBhYmlsaXRpZXMiLCJPYmplY3QiLCJhc3NpZ24iLCJEZWZhdWx0RW52aXJvbm1lbnRDYXBhYmlsaXRpZXMiLCJWZXJzaW9uSW5mbyIsImxvYWQiLCJ1bmRlZmluZWQiLCJ0aGVuIiwidmVyc2lvbkluZm8iLCJDaGFydCIsImxpYnJhcmllcyIsImZpbmQiLCJsaWIiLCJuYW1lIiwiTWljcm9DaGFydCIsIlVTaGVsbCIsInNhcCIsInVzaGVsbCIsIkNvbnRhaW5lciIsIkludGVudEJhc2VkTmF2aWdhdGlvbiIsInNldHRpbmdzIiwiY2F0Y2giLCJsaWJyYXJ5TmFtZSIsInVpIiwiZ2V0Q29yZSIsImxvYWRMaWJyYXJ5IiwicmVwbGFjZSIsImFzeW5jIiwiZSIsIm9DYXBhYmlsaXRpZXMiLCJTZXJ2aWNlIiwiRW52aXJvbm1lbnRTZXJ2aWNlRmFjdG9yeSIsIm9TZXJ2aWNlQ29udGV4dCIsImVudmlyb25tZW50Q2FwYWJpbGl0aWVzU2VydmljZSIsIlNlcnZpY2VGYWN0b3J5Il0sIm1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pYyBzZXRDYXBhYmlsaXRpZXMob0NhcGFiaWxpdGllczogRW52aXJvbm1lbnRDYXBhYmlsaXRpZXMpIHtcblx0XHR0aGlzLmVudmlyb25tZW50Q2FwYWJpbGl0aWVzID0gb0NhcGFiaWxpdGllcztcblx0fVxuXG5cdHB1YmxpYyBnZXRDYXBhYmlsaXRpZXMoKSB7XG5cdFx0cmV0dXJuIHRoaXMuZW52aXJvbm1lbnRDYXBhYmlsaXRpZXM7XG5cdH1cblxuXHRnZXRJbnRlcmZhY2UoKTogYW55IHtcblx0XHRyZXR1cm4gdGhpcztcblx0fVxufVxuXG5jbGFzcyBFbnZpcm9ubWVudFNlcnZpY2VGYWN0b3J5IGV4dGVuZHMgU2VydmljZUZhY3Rvcnk8RW52aXJvbm1lbnRDYXBhYmlsaXRpZXM+IHtcblx0Y3JlYXRlSW5zdGFuY2Uob1NlcnZpY2VDb250ZXh0OiBTZXJ2aWNlQ29udGV4dDxFbnZpcm9ubWVudENhcGFiaWxpdGllcz4pIHtcblx0XHRjb25zdCBlbnZpcm9ubWVudENhcGFiaWxpdGllc1NlcnZpY2UgPSBuZXcgRW52aXJvbm1lbnRDYXBhYmlsaXRpZXNTZXJ2aWNlKG9TZXJ2aWNlQ29udGV4dCk7XG5cdFx0cmV0dXJuIGVudmlyb25tZW50Q2FwYWJpbGl0aWVzU2VydmljZS5pbml0UHJvbWlzZTtcblx0fVxufVxuXG5leHBvcnQgZGVmYXVsdCBFbnZpcm9ubWVudFNlcnZpY2VGYWN0b3J5O1xuIl19
|
|
@@ -71,10 +71,11 @@ sap.ui.define(
|
|
|
71
71
|
|
|
72
72
|
this.initPromise = Promise.resolve(that);
|
|
73
73
|
},
|
|
74
|
-
|
|
75
|
-
exit: function() {
|
|
74
|
+
beforeExit: function() {
|
|
76
75
|
this.oRouter.detachRouteMatched(this._fnOnRouteMatched);
|
|
77
76
|
this.eventProvider.fireEvent("routeMatched", {});
|
|
77
|
+
},
|
|
78
|
+
exit: function() {
|
|
78
79
|
this.eventProvider.destroy();
|
|
79
80
|
},
|
|
80
81
|
|
|
@@ -113,7 +114,7 @@ sap.ui.define(
|
|
|
113
114
|
|
|
114
115
|
// Check route pattern: all patterns need to end with ':?query:', that we use for parameters
|
|
115
116
|
if (sRoutePattern.length < 8 || sRoutePattern.indexOf(":?query:") !== sRoutePattern.length - 8) {
|
|
116
|
-
Log.
|
|
117
|
+
Log.warning("Pattern for route " + sRouteName + " doesn't end with ':?query:' : " + sRoutePattern);
|
|
117
118
|
}
|
|
118
119
|
var iRouteLevel = that._getViewLevelFromPattern(sRoutePattern, 0);
|
|
119
120
|
that._mRoutes[sRouteName] = {
|
|
@@ -335,56 +336,74 @@ sap.ui.define(
|
|
|
335
336
|
},
|
|
336
337
|
|
|
337
338
|
navigateTo: function(oContext, sRouteName, mParameterMapping, bPreserveHistory) {
|
|
338
|
-
var
|
|
339
|
+
var sTargetURLPromise;
|
|
339
340
|
if (!mParameterMapping) {
|
|
340
341
|
// if there is no parameter mapping define this mean we rely entirely on the binding context path
|
|
341
|
-
|
|
342
|
+
sTargetURLPromise = Promise.resolve(SemanticKeyHelper.getSemanticPath(oContext));
|
|
342
343
|
} else {
|
|
343
|
-
|
|
344
|
-
|
|
344
|
+
sTargetURLPromise = this.prepareParameters(mParameterMapping, sRouteName, oContext).then(
|
|
345
|
+
function(mParameters) {
|
|
346
|
+
return this.oRouter.getURL(sRouteName, mParameters);
|
|
347
|
+
}.bind(this)
|
|
348
|
+
);
|
|
345
349
|
}
|
|
346
|
-
|
|
350
|
+
return sTargetURLPromise.then(
|
|
351
|
+
function(sTargetURL) {
|
|
352
|
+
this.oRouterProxy.navToHash(sTargetURL, bPreserveHistory);
|
|
353
|
+
}.bind(this)
|
|
354
|
+
);
|
|
347
355
|
},
|
|
348
356
|
|
|
349
357
|
/**
|
|
350
|
-
*
|
|
351
|
-
* and return a map where the binding syntax is resolved to the current model.
|
|
352
|
-
* Additionally, relative path are supported.
|
|
358
|
+
* Method to return a map of routing target parameters where the binding syntax is resolved to the current model.
|
|
353
359
|
*
|
|
354
|
-
* @param mParameters
|
|
355
|
-
* @param sTargetRoute
|
|
356
|
-
* @param oContext
|
|
357
|
-
* @returns {
|
|
360
|
+
* @param {object} mParameters Parameters map in the format [k: string] : ComplexBindingSyntax
|
|
361
|
+
* @param {string} sTargetRoute Name of the target route
|
|
362
|
+
* @param {object} oContext The instance of the binding context
|
|
363
|
+
* @returns {Promise} A promise which resolves to the routing target parameters
|
|
358
364
|
*/
|
|
359
365
|
prepareParameters: function(mParameters, sTargetRoute, oContext) {
|
|
360
|
-
var
|
|
366
|
+
var oParametersPromise;
|
|
361
367
|
try {
|
|
362
368
|
var sContextPath = oContext.getPath();
|
|
363
369
|
var aContextPathParts = sContextPath.split("/");
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
var
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
370
|
+
var aAllResolvedParameterPromises = Object.keys(mParameters).map(
|
|
371
|
+
function(sParameterKey) {
|
|
372
|
+
var sParameterMappingExpression = mParameters[sParameterKey];
|
|
373
|
+
// We assume the defined parameters will be compatible with a binding expression
|
|
374
|
+
var oParsedExpression = BindingParser.complexParser(sParameterMappingExpression);
|
|
375
|
+
var aParts = oParsedExpression.parts || [oParsedExpression];
|
|
376
|
+
var aResolvedParameterPromises = aParts.map(function(oPathPart) {
|
|
377
|
+
var aRelativeParts = oPathPart.path.split("../");
|
|
378
|
+
// We go up the current context path as many times as necessary
|
|
379
|
+
var aLocalParts = aContextPathParts.slice(0, aContextPathParts.length - aRelativeParts.length + 1);
|
|
380
|
+
aLocalParts.push(aRelativeParts[aRelativeParts.length - 1]);
|
|
381
|
+
return oContext.requestProperty(aLocalParts.join("/"));
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
return Promise.all(aResolvedParameterPromises).then(
|
|
385
|
+
function(aResolvedParameters) {
|
|
386
|
+
var value = oParsedExpression.formatter
|
|
387
|
+
? oParsedExpression.formatter.apply(this, aResolvedParameters)
|
|
388
|
+
: aResolvedParameters.join("");
|
|
389
|
+
return { key: sParameterKey, value: value };
|
|
390
|
+
}.bind(this)
|
|
391
|
+
);
|
|
392
|
+
}.bind(this)
|
|
393
|
+
);
|
|
394
|
+
|
|
395
|
+
oParametersPromise = Promise.all(aAllResolvedParameterPromises).then(function(aAllResolvedParameters) {
|
|
396
|
+
var oParameters = {};
|
|
397
|
+
aAllResolvedParameters.forEach(function(oResolvedParameter) {
|
|
398
|
+
oParameters[oResolvedParameter.key] = oResolvedParameter.value;
|
|
375
399
|
});
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
oReducer[sParameterKey] = aResolvedParameters.join("");
|
|
380
|
-
}
|
|
381
|
-
return oReducer;
|
|
382
|
-
}, {});
|
|
383
|
-
} catch (error) {
|
|
400
|
+
return oParameters;
|
|
401
|
+
});
|
|
402
|
+
} catch (oError) {
|
|
384
403
|
Log.error("Could not parse the parameters for the navigation to route " + sTargetRoute);
|
|
385
|
-
|
|
404
|
+
oParametersPromise = Promise.resolve(undefined);
|
|
386
405
|
}
|
|
387
|
-
return
|
|
406
|
+
return oParametersPromise;
|
|
388
407
|
},
|
|
389
408
|
|
|
390
409
|
_fireRouteMatchEvents: function(mParameters) {
|
|
@@ -416,8 +435,7 @@ sap.ui.define(
|
|
|
416
435
|
* @final
|
|
417
436
|
*/
|
|
418
437
|
navigateToContext: function(oContext, mParameters, oViewData, oCurrentTargetInfo) {
|
|
419
|
-
var sTargetRoute,
|
|
420
|
-
oRouteParameters = null;
|
|
438
|
+
var sTargetRoute, oRouteParametersPromise;
|
|
421
439
|
|
|
422
440
|
// Manage parameter mapping
|
|
423
441
|
if (mParameters.targetPath && oViewData && oViewData.navigation) {
|
|
@@ -425,7 +443,7 @@ sap.ui.define(
|
|
|
425
443
|
sTargetRoute = oRouteDetail.route;
|
|
426
444
|
|
|
427
445
|
if (oRouteDetail.parameters) {
|
|
428
|
-
|
|
446
|
+
oRouteParametersPromise = this.prepareParameters(oRouteDetail.parameters, sTargetRoute, oContext);
|
|
429
447
|
}
|
|
430
448
|
}
|
|
431
449
|
|
|
@@ -454,7 +472,8 @@ sap.ui.define(
|
|
|
454
472
|
bTargetEditable: mParameters.editable,
|
|
455
473
|
bPersistOPScroll: mParameters.bPersistOPScroll,
|
|
456
474
|
useContext: mParameters.updateFCLLevel === -1 || mParameters.bRecreateContext ? undefined : oContext,
|
|
457
|
-
bDraftNavigation: mParameters.bDraftNavigation
|
|
475
|
+
bDraftNavigation: mParameters.bDraftNavigation,
|
|
476
|
+
bShowPlaceholder: mParameters.showPlaceholder !== undefined ? mParameters.showPlaceholder : true
|
|
458
477
|
};
|
|
459
478
|
|
|
460
479
|
if (mParameters.checkNoHashChange) {
|
|
@@ -505,12 +524,15 @@ sap.ui.define(
|
|
|
505
524
|
// Add the navigation parameters in the queue
|
|
506
525
|
this.navigationInfoQueue.push(oNavigationInfo);
|
|
507
526
|
|
|
508
|
-
if (sTargetRoute &&
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
527
|
+
if (sTargetRoute && oRouteParametersPromise) {
|
|
528
|
+
return oRouteParametersPromise.then(
|
|
529
|
+
function(oRouteParameters) {
|
|
530
|
+
this.oRouter.navTo(sTargetRoute, oRouteParameters);
|
|
531
|
+
return Promise.resolve();
|
|
532
|
+
}.bind(this)
|
|
533
|
+
);
|
|
513
534
|
}
|
|
535
|
+
return this.oRouterProxy.navToHash(sTargetPath, false, mParameters.noPreservationCache);
|
|
514
536
|
},
|
|
515
537
|
|
|
516
538
|
/**
|
|
@@ -553,6 +575,25 @@ sap.ui.define(
|
|
|
553
575
|
}
|
|
554
576
|
},
|
|
555
577
|
|
|
578
|
+
_checkContextForSemanticPath: function(oContext) {
|
|
579
|
+
var sPath = oContext.getPath();
|
|
580
|
+
|
|
581
|
+
// First, check if this is a level-1 object (path = /aaa(bbb))
|
|
582
|
+
if (!/^\/[^\(]+\([^\)]+\)$/.test(sPath)) {
|
|
583
|
+
return false;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
// Then check if the entity has semantic keys
|
|
587
|
+
var oMetaModel = oContext.getModel().getMetaModel(),
|
|
588
|
+
sEntitySetName = oMetaModel.getMetaContext(oContext.getPath()).getObject("@sapui.name");
|
|
589
|
+
if (!SemanticKeyHelper.getSemanticKeys(oMetaModel, sEntitySetName)) {
|
|
590
|
+
return false;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
// Then check the entity is draft-enabled
|
|
594
|
+
return ModelHelper.isDraftSupported(oMetaModel, sPath);
|
|
595
|
+
},
|
|
596
|
+
|
|
556
597
|
_getPathFromContext: function(oContext, mParameters) {
|
|
557
598
|
var sPath;
|
|
558
599
|
|
|
@@ -570,14 +611,19 @@ sap.ui.define(
|
|
|
570
611
|
if (this.oLastSemanticMapping && this.oLastSemanticMapping.technicalPath === sPath) {
|
|
571
612
|
sPath = this.oLastSemanticMapping.semanticPath;
|
|
572
613
|
}
|
|
573
|
-
} else if (
|
|
614
|
+
} else if (this._checkContextForSemanticPath(oContext)) {
|
|
574
615
|
// We check if we have to use a semantic path
|
|
575
|
-
var sSemanticPath = SemanticKeyHelper.getSemanticPath(oContext);
|
|
576
|
-
|
|
577
|
-
if (sSemanticPath
|
|
616
|
+
var sSemanticPath = SemanticKeyHelper.getSemanticPath(oContext, true);
|
|
617
|
+
|
|
618
|
+
if (!sSemanticPath) {
|
|
619
|
+
// We were not able to build the semantic path --> Use the technical path and
|
|
620
|
+
// clear the previous mapping, otherwise the old mapping is used in EditFlow#updateDocument
|
|
621
|
+
// and it leads to unwanted page reloads
|
|
622
|
+
this.setLastSemanticMapping(undefined);
|
|
623
|
+
} else if (sSemanticPath !== sPath) {
|
|
578
624
|
// Store the mapping technical <-> semantic path to avoid recalculating it later
|
|
579
625
|
// and use the semantic path instead of the technical one
|
|
580
|
-
this.
|
|
626
|
+
this.setLastSemanticMapping({ technicalPath: sPath, semanticPath: sSemanticPath });
|
|
581
627
|
sPath = sSemanticPath;
|
|
582
628
|
}
|
|
583
629
|
}
|
|
@@ -731,9 +777,13 @@ sap.ui.define(
|
|
|
731
777
|
// Manage startup parameters (in case of no iapp-state)
|
|
732
778
|
if (!bIsIappState && bHasStartUpParameters) {
|
|
733
779
|
var sHash = that.oRouter.getHashChanger().getHash();
|
|
734
|
-
if (
|
|
780
|
+
if (
|
|
781
|
+
oStartupParameters.preferredMode &&
|
|
782
|
+
oStartupParameters.preferredMode[0].indexOf("create") !== -1 &&
|
|
783
|
+
!sHash
|
|
784
|
+
) {
|
|
735
785
|
// Logic for create mode
|
|
736
|
-
return that._managePreferredModeCreateStartup();
|
|
786
|
+
return that._managePreferredModeCreateStartup(oStartupParameters);
|
|
737
787
|
} else {
|
|
738
788
|
return that._manageDeeplinkStartup(oStartupParameters);
|
|
739
789
|
}
|
|
@@ -746,9 +796,17 @@ sap.ui.define(
|
|
|
746
796
|
return initPromise;
|
|
747
797
|
},
|
|
748
798
|
|
|
749
|
-
getDefaultCreateHash: function() {
|
|
750
|
-
var sContextPath = this.getContextPath()
|
|
751
|
-
|
|
799
|
+
getDefaultCreateHash: function(oStartupParameters) {
|
|
800
|
+
var sContextPath = this.getContextPath(),
|
|
801
|
+
sDefaultCreateHash =
|
|
802
|
+
oStartupParameters && oStartupParameters.preferredMode ? oStartupParameters.preferredMode[0] : "create",
|
|
803
|
+
sHash;
|
|
804
|
+
|
|
805
|
+
sDefaultCreateHash =
|
|
806
|
+
sDefaultCreateHash.indexOf(":") !== -1 && sDefaultCreateHash.length > sDefaultCreateHash.indexOf(":") + 1
|
|
807
|
+
? sDefaultCreateHash.substr(0, sDefaultCreateHash.indexOf(":"))
|
|
808
|
+
: "create";
|
|
809
|
+
sHash = sContextPath.substring(1) + "(...)?i-action=" + sDefaultCreateHash;
|
|
752
810
|
if (this.oRouter.getRouteInfoByHash(sHash)) {
|
|
753
811
|
return sHash;
|
|
754
812
|
} else {
|
|
@@ -756,7 +814,7 @@ sap.ui.define(
|
|
|
756
814
|
}
|
|
757
815
|
},
|
|
758
816
|
|
|
759
|
-
_managePreferredModeCreateStartup: function() {
|
|
817
|
+
_managePreferredModeCreateStartup: function(oStartupParameters) {
|
|
760
818
|
var that = this;
|
|
761
819
|
return this.oMetaModel
|
|
762
820
|
.requestObject(this.getContextPath() + "@")
|
|
@@ -790,7 +848,7 @@ sap.ui.define(
|
|
|
790
848
|
}
|
|
791
849
|
}
|
|
792
850
|
if (bCreatable) {
|
|
793
|
-
var sPath = that.getDefaultCreateHash();
|
|
851
|
+
var sPath = that.getDefaultCreateHash(oStartupParameters);
|
|
794
852
|
that.oRouter.getHashChanger().replaceHash(sPath);
|
|
795
853
|
that.bExitOnNavigateBackToRoot = true;
|
|
796
854
|
}
|
|
@@ -800,6 +858,31 @@ sap.ui.define(
|
|
|
800
858
|
});
|
|
801
859
|
},
|
|
802
860
|
|
|
861
|
+
_requestObjectsFromParameters: function(oStartUpParameters, aExternallyNavigablePages) {
|
|
862
|
+
var that = this;
|
|
863
|
+
|
|
864
|
+
// Load the respective objects for all object pages found in aExternallyNavigablePages
|
|
865
|
+
var aContextPromises = aExternallyNavigablePages.map(function(oPage) {
|
|
866
|
+
var oCompleteFilter, oListBind;
|
|
867
|
+
if (oPage.isSemanticKeyNavigation) {
|
|
868
|
+
oCompleteFilter = that._createFilter(oPage.draft, oPage.semanticKeys, oStartUpParameters);
|
|
869
|
+
} else {
|
|
870
|
+
oCompleteFilter = that._createFilter(oPage.draft, oPage.technicalKeys, oStartUpParameters);
|
|
871
|
+
}
|
|
872
|
+
// only request a minimum of fields to boost backend performance since this is only used to check if an object exists
|
|
873
|
+
oListBind = that.oModel.bindList(oPage.contextPath, undefined, undefined, oCompleteFilter, {
|
|
874
|
+
"$select": oPage.isSemanticKeyNavigation
|
|
875
|
+
? oPage.semanticKeys.map(function(key) {
|
|
876
|
+
return key.$PropertyPath;
|
|
877
|
+
})
|
|
878
|
+
: oPage.technicalKeys
|
|
879
|
+
});
|
|
880
|
+
return oListBind.requestContexts(0, 2);
|
|
881
|
+
});
|
|
882
|
+
|
|
883
|
+
return Promise.all(aContextPromises);
|
|
884
|
+
},
|
|
885
|
+
|
|
803
886
|
_manageDeeplinkStartup: function(oStartUpParameters) {
|
|
804
887
|
var that = this,
|
|
805
888
|
aExternallyNavigablePages;
|
|
@@ -813,19 +896,7 @@ sap.ui.define(
|
|
|
813
896
|
|
|
814
897
|
aExternallyNavigablePages = that._findTargetPagesFromStartupParams(oLevelOfObjectPages, oStartUpParameters);
|
|
815
898
|
|
|
816
|
-
|
|
817
|
-
var aContextPromises = aExternallyNavigablePages.map(function(oPage) {
|
|
818
|
-
var oCompleteFilter, oListBind;
|
|
819
|
-
if (oPage.isSemanticKeyNavigation) {
|
|
820
|
-
oCompleteFilter = that._createFilter(oPage.draft, oPage.semanticKeys, oStartUpParameters);
|
|
821
|
-
} else {
|
|
822
|
-
oCompleteFilter = that._createFilter(oPage.draft, oPage.technicalKeys, oStartUpParameters);
|
|
823
|
-
}
|
|
824
|
-
oListBind = that.oModel.bindList(oPage.contextPath, undefined, undefined, oCompleteFilter);
|
|
825
|
-
return oListBind.requestContexts(0, 2);
|
|
826
|
-
});
|
|
827
|
-
|
|
828
|
-
return Promise.all(aContextPromises);
|
|
899
|
+
return that._requestObjectsFromParameters(oStartUpParameters, aExternallyNavigablePages);
|
|
829
900
|
})
|
|
830
901
|
.then(function(aValues) {
|
|
831
902
|
if (aValues.length) {
|
|
@@ -958,13 +1029,14 @@ sap.ui.define(
|
|
|
958
1029
|
/**
|
|
959
1030
|
* Creates the filter for the entity set.
|
|
960
1031
|
*
|
|
961
|
-
* @param {object} oDraftDetail The details of
|
|
1032
|
+
* @param {object} oDraftDetail The details of draft node
|
|
962
1033
|
* @param {Array} aKeys Array of semantic keys or technical keys of the page
|
|
963
|
-
* @param {object} oStartUpParameters URL
|
|
1034
|
+
* @param {object} oStartUpParameters URL parameters
|
|
964
1035
|
* @returns {object} Filters for the entity set
|
|
965
1036
|
*/
|
|
966
1037
|
_createFilter: function(oDraftDetail, aKeys, oStartUpParameters) {
|
|
967
|
-
var aFilters = []
|
|
1038
|
+
var aFilters = [],
|
|
1039
|
+
bFilteringCaseSensitive = ModelHelper.isFilteringCaseSensitive(this.oMetaModel);
|
|
968
1040
|
|
|
969
1041
|
for (var j = 0; j < aKeys.length; j++) {
|
|
970
1042
|
var sProperty = aKeys[j].$PropertyPath;
|
|
@@ -977,7 +1049,14 @@ sap.ui.define(
|
|
|
977
1049
|
}
|
|
978
1050
|
var sValue = oStartUpParameters[sProperty][0];
|
|
979
1051
|
if (sValue) {
|
|
980
|
-
aFilters.push(
|
|
1052
|
+
aFilters.push(
|
|
1053
|
+
new Filter({
|
|
1054
|
+
path: sProperty,
|
|
1055
|
+
operator: FilterOperator.EQ,
|
|
1056
|
+
value1: sValue,
|
|
1057
|
+
caseSensitive: bFilteringCaseSensitive
|
|
1058
|
+
})
|
|
1059
|
+
);
|
|
981
1060
|
} else {
|
|
982
1061
|
return undefined;
|
|
983
1062
|
}
|
|
@@ -1030,7 +1109,7 @@ sap.ui.define(
|
|
|
1030
1109
|
if (sSemanticPath !== sTechnicalPath) {
|
|
1031
1110
|
// Store the mapping technical <-> semantic path to avoid recalculating it later
|
|
1032
1111
|
// and use the semantic path instead of the technical one
|
|
1033
|
-
this.
|
|
1112
|
+
this.setLastSemanticMapping({ technicalPath: sTechnicalPath, semanticPath: sSemanticPath });
|
|
1034
1113
|
}
|
|
1035
1114
|
|
|
1036
1115
|
sHash = sSemanticPath.substring(1); // To remove the leading '/'
|