@openui5/sap.ui.integration 1.96.1 → 1.97.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/.reuse/dep5 +1 -1
- package/THIRDPARTY.txt +2 -1
- package/package.json +3 -3
- package/src/sap/ui/integration/.library +2 -2
- package/src/sap/ui/integration/ActionDefinition.js +2 -2
- package/src/sap/ui/integration/Designtime.js +2 -2
- package/src/sap/ui/integration/Extension.js +2 -2
- package/src/sap/ui/integration/Host.js +38 -2
- package/src/sap/ui/integration/ManifestResolver.js +102 -0
- package/src/sap/ui/integration/bindingFeatures/DateRange.js +1 -1
- package/src/sap/ui/integration/cards/AdaptiveContent.js +2 -2
- package/src/sap/ui/integration/cards/AnalyticalContent.js +8 -9
- package/src/sap/ui/integration/cards/AnalyticalContentRenderer.js +1 -1
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +5 -3
- package/src/sap/ui/integration/cards/AnalyticsCloudContentRenderer.js +1 -1
- package/src/sap/ui/integration/cards/BaseContent.js +51 -6
- package/src/sap/ui/integration/cards/BaseContentRenderer.js +2 -2
- package/src/sap/ui/integration/cards/BaseListContent.js +5 -3
- package/src/sap/ui/integration/cards/CalendarContent.js +4 -2
- package/src/sap/ui/integration/cards/CalendarContentRenderer.js +2 -1
- package/src/sap/ui/integration/cards/ComponentContent.js +3 -2
- package/src/sap/ui/integration/cards/ComponentContentRenderer.js +1 -1
- package/src/sap/ui/integration/cards/Footer.js +2 -2
- package/src/sap/ui/integration/cards/Header.js +2 -2
- package/src/sap/ui/integration/cards/ListContent.js +37 -12
- package/src/sap/ui/integration/cards/ListContentRenderer.js +34 -9
- package/src/sap/ui/integration/cards/NumericHeader.js +2 -2
- package/src/sap/ui/integration/cards/ObjectContent.js +146 -132
- package/src/sap/ui/integration/cards/TableContent.js +6 -9
- package/src/sap/ui/integration/cards/TableContentRenderer.js +1 -1
- package/src/sap/ui/integration/cards/TimelineContent.js +8 -10
- package/src/sap/ui/integration/cards/TimelineContentRenderer.js +1 -1
- package/src/sap/ui/integration/cards/WebPageContent.js +6 -2
- package/src/sap/ui/integration/cards/WebPageContentRenderer.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputChoiceSet.js +2 -2
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputDate.js +2 -2
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputNumber.js +2 -2
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputText.js +2 -2
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputTime.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputToggle.js +2 -2
- package/src/sap/ui/integration/cards/adaptivecards/elements/hostConfig.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/overwrites/ActionRender.js +1 -1
- package/src/sap/ui/integration/cards/filters/BaseFilter.js +2 -2
- package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +16 -14
- package/src/sap/ui/integration/cards/filters/FilterBarFactory.js +2 -2
- package/src/sap/ui/integration/cards/filters/SelectFilter.js +34 -4
- package/src/sap/ui/integration/controls/ActionsStrip.js +2 -2
- package/src/sap/ui/integration/controls/ActionsToolbar.js +2 -2
- package/src/sap/ui/integration/controls/ActionsToolbarRenderer.js +1 -1
- package/src/sap/ui/integration/controls/ListContentItem.js +2 -2
- package/src/sap/ui/integration/controls/ListContentItemRenderer.js +1 -1
- package/src/sap/ui/integration/controls/Microchart.js +2 -2
- package/src/sap/ui/integration/controls/MicrochartLegend.js +2 -2
- package/src/sap/ui/integration/controls/MicrochartLegendRenderer.js +1 -1
- package/src/sap/ui/integration/customElements/CustomElementBase.js +1 -1
- package/src/sap/ui/integration/customElements/CustomElementCard.js +1 -1
- package/src/sap/ui/integration/customElements/CustomElementCardEditor.js +1 -1
- package/src/sap/ui/integration/customElements/CustomElementEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ar.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_bg.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ca.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_cs.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_cy.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_da.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_de.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_el.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_GB.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_sappsd.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_saprigi.properties +13 -19
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_saptrc.properties +16 -12
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_es.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_es_MX.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_et.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_fi.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_fr.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_fr_CA.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_hi.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_hr.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_hu.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_id.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_it.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_iw.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ja.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_kk.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ko.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_lt.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_lv.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ms.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_nl.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_no.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_pl.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_pt.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_pt_PT.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ro.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ru.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sh.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sk.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sl.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sv.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_th.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_tr.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_uk.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_vi.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_zh_CN.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_zh_TW.properties +15 -11
- package/src/sap/ui/integration/designtime/baseEditor/layout/Form.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/PropertyEditorFactory.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/booleanEditor/BooleanEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/enumStringEditor/EnumStringEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/groupEditor/GroupEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IconEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IsInIconPool.validator.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/selectEditor/SelectEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/separatorEditor/SeparatorEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/util/BaseDefaultValidatorModules.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/StylesheetManager.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/binding/ObjectBinding.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/util/binding/resolveBinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/cleanupDesigntimeMetadata.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/createPromise.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/escapeParameter.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/findClosestInstance.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/hasTag.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/isTemplate.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/isValidBindingString.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/unset.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsBoolean.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsDate.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsInteger.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsNumber.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsPatternMatch.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsSelectedKey.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsStringList.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueKey.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueList.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsValidBinding.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/validator/MaxLength.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/validator/NotABinding.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/validator/ValidatorRegistry.js +2 -2
- package/src/sap/ui/integration/designtime/cardEditor/BASEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/CardEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/PropertyEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/PropertyEditors.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/config/AppConfig.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/config/HeaderConfig.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/config/ListCardConfig.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/config/ObjectCardConfig.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/config/TableCardConfig.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/config/generateActionConfig.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/config/generateDataConfig.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/config/index.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_en_US_saprigi.properties +0 -4
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/complexMapEditor/ComplexMapEditor.js +2 -2
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/destinationsEditor/DestinationsEditor.js +2 -2
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/iconEditor/IconEditor.js +2 -2
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/parametersEditor/ParametersEditor.js +2 -2
- package/src/sap/ui/integration/designtime/cardEditor/util/CommonPatterns.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/validator/IsPatternMatchList.js +1 -1
- package/src/sap/ui/integration/designtime/editor/CardEditor.js +2 -2
- package/src/sap/ui/integration/designtime/editor/CardPreview.js +27 -5
- package/src/sap/ui/integration/designtime/editor/css/CardPreview.css +18 -1
- package/src/sap/ui/integration/editor/Editor.js +63 -47
- package/src/sap/ui/integration/editor/EditorResourceBundles.js +2 -2
- package/src/sap/ui/integration/editor/Extension.js +2 -2
- package/src/sap/ui/integration/editor/Manifest.js +2 -2
- package/src/sap/ui/integration/editor/Merger.js +1 -1
- package/src/sap/ui/integration/editor/Settings.js +2 -2
- package/src/sap/ui/integration/editor/css/Editor.css +0 -3
- package/src/sap/ui/integration/editor/fields/BaseField.js +9 -3
- package/src/sap/ui/integration/editor/fields/BooleanField.js +4 -2
- package/src/sap/ui/integration/editor/fields/DateField.js +2 -2
- package/src/sap/ui/integration/editor/fields/DateTimeField.js +2 -2
- package/src/sap/ui/integration/editor/fields/DestinationField.js +2 -21
- package/src/sap/ui/integration/editor/fields/IntegerField.js +5 -2
- package/src/sap/ui/integration/editor/fields/ListField.js +252 -67
- package/src/sap/ui/integration/editor/fields/NumberField.js +2 -2
- package/src/sap/ui/integration/editor/fields/StringField.js +3 -16
- package/src/sap/ui/integration/editor/fields/viz/ColorSelect.js +2 -2
- package/src/sap/ui/integration/editor/fields/viz/IconSelect.js +2 -2
- package/src/sap/ui/integration/editor/fields/viz/ShapeSelect.js +2 -2
- package/src/sap/ui/integration/formatters/DateTimeFormatter.js +1 -1
- package/src/sap/ui/integration/formatters/IconFormatter.js +1 -1
- package/src/sap/ui/integration/formatters/NumberFormatter.js +1 -1
- package/src/sap/ui/integration/formatters/TextFormatter.js +1 -1
- package/src/sap/ui/integration/library-bootstrap.js +1 -1
- package/src/sap/ui/integration/library.js +3 -3
- package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +55 -81
- package/src/sap/ui/integration/model/ContextModel.js +2 -2
- package/src/sap/ui/integration/model/ObservableModel.js +2 -2
- package/src/sap/ui/integration/sap-ui-integration-config.js +1 -1
- package/src/sap/ui/integration/sap-ui-integration-define-nojQuery.js +1 -1
- package/src/sap/ui/integration/schemas/sap-card.json +29 -4
- package/src/sap/ui/integration/services/Data.js +1 -1
- package/src/sap/ui/integration/services/Navigation.js +1 -1
- package/src/sap/ui/integration/services/Service.js +1 -1
- package/src/sap/ui/integration/themes/base/CalendarContent.less +31 -4
- package/src/sap/ui/integration/themes/base/ListContentItem.less +66 -28
- package/src/sap/ui/integration/themes/base/library.source.less +1 -1
- package/src/sap/ui/integration/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/integration/util/BaseFactory.js +2 -2
- package/src/sap/ui/integration/util/BindingHelper.js +3 -3
- package/src/sap/ui/integration/util/BindingResolver.js +2 -2
- package/src/sap/ui/integration/util/CacheAndRequestDataProvider.js +1 -1
- package/src/sap/ui/integration/util/CardActions.js +2 -2
- package/src/sap/ui/integration/util/CardMerger.js +1 -1
- package/src/sap/ui/integration/util/CardObserver.js +2 -2
- package/src/sap/ui/integration/util/ContentFactory.js +4 -8
- package/src/sap/ui/integration/util/CsrfTokenHandler.js +312 -0
- package/src/sap/ui/integration/util/DataProvider.js +11 -2
- package/src/sap/ui/integration/util/DataProviderFactory.js +49 -12
- package/src/sap/ui/integration/util/Destinations.js +2 -2
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +2 -2
- package/src/sap/ui/integration/util/HeaderFactory.js +2 -2
- package/src/sap/ui/integration/util/JSONBindingHelper.js +3 -3
- package/src/sap/ui/integration/util/LoadingProvider.js +2 -2
- package/src/sap/ui/integration/util/Manifest.js +3 -3
- package/src/sap/ui/integration/util/ParameterMap.js +1 -1
- package/src/sap/ui/integration/util/RequestDataProvider.js +87 -49
- package/src/sap/ui/integration/util/ServiceDataProvider.js +2 -2
- package/src/sap/ui/integration/util/ServiceManager.js +2 -2
- package/src/sap/ui/integration/util/Utils.js +42 -2
- package/src/sap/ui/integration/util/loadCardEditor.js +1 -1
- package/src/sap/ui/integration/widgets/Card.js +18 -4
- package/src/sap/ui/integration/widgets/CardRenderer.js +1 -1
- package/src/sap-ui-integration-card-editor.js +1 -1
- package/src/sap-ui-integration-editor.js +1 -1
- package/src/sap-ui-integration.js +1 -1
- package/ui5.yaml +286 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
* @extends sap.ui.base.Object
|
|
23
23
|
*
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.97.1
|
|
26
26
|
*
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
@@ -38,7 +38,7 @@ sap.ui.define([
|
|
|
38
38
|
* Helper class for working with bindings.
|
|
39
39
|
*
|
|
40
40
|
* @author SAP SE
|
|
41
|
-
* @version 1.
|
|
41
|
+
* @version 1.97.1
|
|
42
42
|
*
|
|
43
43
|
* @private
|
|
44
44
|
* @alias sap.ui.integration.util.BindingHelper
|
|
@@ -167,7 +167,7 @@ sap.ui.define([
|
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
169
|
* Escapes the cards placeholders with double braces, so that the binding parser does not consider it as a binding.
|
|
170
|
-
* The string "{{destinations.myDestination}}" will become "
|
|
170
|
+
* The string "{{destinations.myDestination}}" will become "\{\{destinations.myDestination\}\}".
|
|
171
171
|
*
|
|
172
172
|
* @param {any} vValue The value to escape.
|
|
173
173
|
* @returns {string} The escaped value.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* Resolves a binding syntax based on a provided model and path.
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.97.1
|
|
36
36
|
*
|
|
37
37
|
* @private
|
|
38
38
|
* @alias sap.ui.integration.util.BindingResolver
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
@@ -43,7 +43,7 @@ sap.ui.define([
|
|
|
43
43
|
* @extends sap.ui.base.ManagedObject
|
|
44
44
|
*
|
|
45
45
|
* @author SAP SE
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.97.1
|
|
47
47
|
*
|
|
48
48
|
* @constructor
|
|
49
49
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
* @extends sap.ui.base.Object
|
|
23
23
|
*
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.97.1
|
|
26
26
|
*
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
@@ -40,7 +40,7 @@ sap.ui.define([
|
|
|
40
40
|
* @extends sap.ui.integration.util.BaseFactory
|
|
41
41
|
*
|
|
42
42
|
* @author SAP SE
|
|
43
|
-
* @version 1.
|
|
43
|
+
* @version 1.97.1
|
|
44
44
|
*
|
|
45
45
|
* @constructor
|
|
46
46
|
* @private
|
|
@@ -87,14 +87,10 @@ sap.ui.define([
|
|
|
87
87
|
oContent.setDataProviderFactory(mConfig.dataProviderFactory);
|
|
88
88
|
oContent.setIconFormatter(mConfig.iconFormatter);
|
|
89
89
|
oContent.setActions(oActions);
|
|
90
|
+
oContent.setConfiguration(mConfig.contentManifest, sType);
|
|
90
91
|
|
|
91
|
-
if (sType.toLowerCase() !== "adaptivecard") {
|
|
92
|
-
oContent.setConfiguration(this.createBindingInfos(mConfig.contentManifest), sType);
|
|
93
|
-
} else {
|
|
94
|
-
oContent.setConfiguration(mConfig.contentManifest);
|
|
95
|
-
}
|
|
96
92
|
resolve(oContent);
|
|
97
|
-
}
|
|
93
|
+
})
|
|
98
94
|
.catch(function (sError) {
|
|
99
95
|
reject(sError);
|
|
100
96
|
});
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/base/Object",
|
|
9
|
+
"sap/base/util/isPlainObject",
|
|
10
|
+
"sap/ui/model/json/JSONModel"
|
|
11
|
+
], function (
|
|
12
|
+
BaseObject,
|
|
13
|
+
isPlainObject,
|
|
14
|
+
JSONModel
|
|
15
|
+
) {
|
|
16
|
+
"use strict";
|
|
17
|
+
|
|
18
|
+
var rPattern = /\{\{csrfTokens.([^\}]+)/;
|
|
19
|
+
var TOKEN_DEFAULT_HEADER = "X-CSRF-Token";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Constructor for a new <code>CsrfTokenHandler</code>.
|
|
23
|
+
*
|
|
24
|
+
* @class
|
|
25
|
+
* Fetches and provides CSRF tokens for data requests.
|
|
26
|
+
* Tokens are shared between cards per user session.
|
|
27
|
+
*
|
|
28
|
+
* @extends sap.ui.base.Object
|
|
29
|
+
*
|
|
30
|
+
* @author SAP SE
|
|
31
|
+
* @version 1.97.1
|
|
32
|
+
*
|
|
33
|
+
* @constructor
|
|
34
|
+
* @param {sap.ui.integration.Host} oHost The Host which will be used for resolve CSRF tokens.
|
|
35
|
+
* @param {object} oConfiguration The CSRF configuration from the manifest.
|
|
36
|
+
* @private
|
|
37
|
+
* @ui5-restricted
|
|
38
|
+
* @alias sap.ui.integration.util.CsrfTokenHandler
|
|
39
|
+
*/
|
|
40
|
+
var CsrfTokenHandler = BaseObject.extend("sap.ui.integration.util.CsrfTokenHandler", {
|
|
41
|
+
metadata: {
|
|
42
|
+
library: "sap.ui.integration"
|
|
43
|
+
},
|
|
44
|
+
constructor: function (mSettings) {
|
|
45
|
+
BaseObject.call(this);
|
|
46
|
+
|
|
47
|
+
mSettings = mSettings || {};
|
|
48
|
+
|
|
49
|
+
this._oHost = mSettings.host;
|
|
50
|
+
this._oConfiguration = mSettings.configuration;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Map of all Promises which resolve to CSRF tokens. Keyed by the unique URL of each CSRF request. Shared by all cards.
|
|
56
|
+
*
|
|
57
|
+
* @static
|
|
58
|
+
* @private
|
|
59
|
+
*/
|
|
60
|
+
CsrfTokenHandler._mTokens = new Map();
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Resolves CSRF placeholders to actual values within a data configuration object.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
* @param {object} oDataConfig Data configuration object
|
|
67
|
+
* @returns {Promise} A promise which resolves with the data configuration object containing resolved CSRF token values
|
|
68
|
+
*/
|
|
69
|
+
CsrfTokenHandler.prototype.resolveToken = function (oDataConfig) {
|
|
70
|
+
var sCsrfTokenName = this._findCsrfPlaceholder(oDataConfig),
|
|
71
|
+
oCsrfConfig;
|
|
72
|
+
|
|
73
|
+
if (!sCsrfTokenName) {
|
|
74
|
+
return Promise.resolve(oDataConfig);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
oCsrfConfig = this._getCsrfConfig(sCsrfTokenName);
|
|
78
|
+
|
|
79
|
+
if (this._oHost) {
|
|
80
|
+
return this._oHost.getCsrfToken(oCsrfConfig)
|
|
81
|
+
.then(function (sTokenValue) {
|
|
82
|
+
if (!sTokenValue) {
|
|
83
|
+
return this._resolveTokenByUrl(oDataConfig);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
this._replaceCsrfPlaceholder(oDataConfig, sTokenValue);
|
|
87
|
+
return oDataConfig;
|
|
88
|
+
}.bind(this))
|
|
89
|
+
.catch(function (sError) {
|
|
90
|
+
return Promise.reject(sError);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return this._resolveTokenByUrl(oDataConfig);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
CsrfTokenHandler.prototype._resolveTokenByUrl = function (oDataConfig) {
|
|
98
|
+
var sCsrfTokenName = this._findCsrfPlaceholder(oDataConfig),
|
|
99
|
+
sCsrfUrl = this._getCsrfConfig(sCsrfTokenName).data.request.url;
|
|
100
|
+
|
|
101
|
+
if (CsrfTokenHandler._mTokens.has(sCsrfUrl)) {
|
|
102
|
+
return CsrfTokenHandler._mTokens.get(sCsrfUrl).then(function (sTokenValue) {
|
|
103
|
+
this._replaceCsrfPlaceholder(oDataConfig, sTokenValue);
|
|
104
|
+
return oDataConfig;
|
|
105
|
+
}.bind(this));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (sCsrfTokenName) {
|
|
109
|
+
return this._requestToken(oDataConfig);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return Promise.resolve(oDataConfig);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Saves a reference to the DataProviderFactory to create own data requests.
|
|
117
|
+
* Those CSRF placeholders may contain destinations placeholders which need to be resolved prior to making the request.
|
|
118
|
+
*
|
|
119
|
+
* @public
|
|
120
|
+
* @param {sap.ui.integration.util.DataProviderFactory} oDataProviderFactory the factory
|
|
121
|
+
*/
|
|
122
|
+
CsrfTokenHandler.prototype.setDataProviderFactory = function (oDataProviderFactory) {
|
|
123
|
+
this._oDataProviderFactory = oDataProviderFactory;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Sets the host which is used to resolve tokens.
|
|
128
|
+
* @param {sap.ui.integration.Host} oHost The host.
|
|
129
|
+
*/
|
|
130
|
+
CsrfTokenHandler.prototype.setHost = function (oHost) {
|
|
131
|
+
this._oHost = oHost;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Checks if a response contains an expired CSRF Token.
|
|
136
|
+
* @param {object} jqXHR The request.
|
|
137
|
+
*/
|
|
138
|
+
CsrfTokenHandler.prototype.isExpiredToken = function (jqXHR) {
|
|
139
|
+
if (!jqXHR) {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
var sXCSRFHeader = jqXHR.getResponseHeader(TOKEN_DEFAULT_HEADER);
|
|
144
|
+
return sXCSRFHeader && sXCSRFHeader.toLowerCase() === "required" && jqXHR.status === 403;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Executes a CSRF token request based on the data configuration object which contains a CSRF placeholder in its headers property.
|
|
149
|
+
*
|
|
150
|
+
* @private
|
|
151
|
+
* @param {object} oDataConfig Data configuration object
|
|
152
|
+
* @returns {Promise} Promise which resolves with the CSRF token
|
|
153
|
+
*/
|
|
154
|
+
CsrfTokenHandler.prototype._requestToken = function (oDataConfig) {
|
|
155
|
+
var sCsrfTokenName = this._findCsrfPlaceholder(oDataConfig),
|
|
156
|
+
oCsrfConfig = this._getCsrfConfig(sCsrfTokenName);
|
|
157
|
+
|
|
158
|
+
if (!sCsrfTokenName || !oCsrfConfig) {
|
|
159
|
+
return Promise.reject("CSRF definition is incorrect");
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
var pTokenValuePromise = new Promise(function (resolve, reject) {
|
|
163
|
+
var oCsrfTokenDataProvider = this._oDataProviderFactory.create(oCsrfConfig.data);
|
|
164
|
+
oCsrfTokenDataProvider.getData().then(function (oData) {
|
|
165
|
+
var sTokenValue,
|
|
166
|
+
oModel;
|
|
167
|
+
|
|
168
|
+
if (oCsrfConfig.data.path) {
|
|
169
|
+
oModel = new JSONModel(oData);
|
|
170
|
+
sTokenValue = oModel.getProperty(oCsrfConfig.data.path);
|
|
171
|
+
oModel.destroy();
|
|
172
|
+
} else {
|
|
173
|
+
sTokenValue = oCsrfTokenDataProvider.getLastJQXHR().getResponseHeader(TOKEN_DEFAULT_HEADER);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
resolve(sTokenValue);
|
|
177
|
+
}).catch(function () {
|
|
178
|
+
reject("CSRF token cannot be resolved");
|
|
179
|
+
});
|
|
180
|
+
}.bind(this));
|
|
181
|
+
|
|
182
|
+
this._registerToken(oCsrfConfig, pTokenValuePromise);
|
|
183
|
+
|
|
184
|
+
return pTokenValuePromise.then(function (sTokenValue) {
|
|
185
|
+
this._replaceCsrfPlaceholder(oDataConfig, sTokenValue);
|
|
186
|
+
return oDataConfig;
|
|
187
|
+
}.bind(this));
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Deletes a token based on a data configuration object which contains a CSRF placeholder in its headers property.
|
|
192
|
+
*
|
|
193
|
+
* @public
|
|
194
|
+
* @param {object} oDataConfig Data configuration object
|
|
195
|
+
*/
|
|
196
|
+
CsrfTokenHandler.prototype.resetTokenByRequest = function (oDataConfig) {
|
|
197
|
+
var sCsrfTokenName = this._findCsrfPlaceholder(oDataConfig);
|
|
198
|
+
if (!sCsrfTokenName) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
this._deleteRegisteredToken(this._getCsrfConfig(sCsrfTokenName));
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Returns the CSRF configuration object based on its name from the card configuration.
|
|
207
|
+
*
|
|
208
|
+
* @private
|
|
209
|
+
* @param {string} sCsrfTokenName The name of the CSRF object.
|
|
210
|
+
* @returns {object} The CSRF configuration object.
|
|
211
|
+
*/
|
|
212
|
+
CsrfTokenHandler.prototype._getCsrfConfig = function (sCsrfTokenName) {
|
|
213
|
+
return this._oConfiguration[sCsrfTokenName];
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Searches a data configuration object's properties for the presence of a CSRF placeholder.
|
|
218
|
+
* Currently only works with placeholders used in the 'headers' property of the oDataConfig.
|
|
219
|
+
*
|
|
220
|
+
* @private
|
|
221
|
+
* @param {object} oDataConfig Data configuration object
|
|
222
|
+
* @returns {string} The name of the CSRF placeholder.
|
|
223
|
+
*/
|
|
224
|
+
CsrfTokenHandler.prototype._findCsrfPlaceholder = function (oDataConfig) {
|
|
225
|
+
var sHeaderName = this._findCsrfInHeaders(oDataConfig);
|
|
226
|
+
|
|
227
|
+
if (sHeaderName) {
|
|
228
|
+
return this._getCsrfName(oDataConfig.headers[sHeaderName]);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return null;
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Replaces the CSRF placeholder within a data configuration object with the resolved token.
|
|
236
|
+
* Currently only works when the token is used in the 'headers' property.
|
|
237
|
+
*
|
|
238
|
+
* @private
|
|
239
|
+
* @param {object} oDataConfig Data configuration object
|
|
240
|
+
* @param {string} sTokenValue The resolved token value
|
|
241
|
+
*/
|
|
242
|
+
CsrfTokenHandler.prototype._replaceCsrfPlaceholder = function (oDataConfig, sTokenValue) {
|
|
243
|
+
oDataConfig.headers[TOKEN_DEFAULT_HEADER] = sTokenValue;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Checks if the data config headers contain a csrf definition.
|
|
248
|
+
*
|
|
249
|
+
* @private
|
|
250
|
+
* @param {object} oDataConfig Data configuration object
|
|
251
|
+
* @returns {string} sHeaderName the header which uses the csrf definition or an empty string if there is no such header.
|
|
252
|
+
*/
|
|
253
|
+
CsrfTokenHandler.prototype._findCsrfInHeaders = function (oDataConfig) {
|
|
254
|
+
if (!oDataConfig || !oDataConfig.headers || !isPlainObject(oDataConfig.headers)) {
|
|
255
|
+
return "";
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
for (var sKey in oDataConfig.headers) {
|
|
259
|
+
if (typeof oDataConfig.headers[sKey] === "string" && this._hasCsrf(oDataConfig.headers[sKey])) {
|
|
260
|
+
return sKey;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return "";
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Returns true if the given string contains a csrf placeholder.
|
|
269
|
+
*
|
|
270
|
+
* @private
|
|
271
|
+
* @param {string} sString The string to check.
|
|
272
|
+
* @returns {boolean} True if the string contains a csrf placeholder.
|
|
273
|
+
*/
|
|
274
|
+
CsrfTokenHandler.prototype._hasCsrf = function (sString) {
|
|
275
|
+
return !!sString.match(rPattern);
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Returns the name from the CSRF placeholder.
|
|
280
|
+
* For input of <code>{{csrfTokens.token1}}</code>, it will return <code>"token1"</code>
|
|
281
|
+
*
|
|
282
|
+
* @private
|
|
283
|
+
* @param {string} sString the CSRF placeholder
|
|
284
|
+
* @returns {string} The name of the placeholder or empty string
|
|
285
|
+
*/
|
|
286
|
+
CsrfTokenHandler.prototype._getCsrfName = function (sString) {
|
|
287
|
+
var aMatches = sString.match(rPattern);
|
|
288
|
+
if (!aMatches) {
|
|
289
|
+
return "";
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
return aMatches[1];
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
CsrfTokenHandler.prototype._registerToken = function (mCSRFTokenConfig, pTokenValuePromise) {
|
|
296
|
+
CsrfTokenHandler._mTokens.set(mCSRFTokenConfig.data.request.url, pTokenValuePromise);
|
|
297
|
+
|
|
298
|
+
if (this._oHost) {
|
|
299
|
+
this._oHost.csrfTokenFetched(mCSRFTokenConfig, pTokenValuePromise);
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
CsrfTokenHandler.prototype._deleteRegisteredToken = function (mCSRFTokenConfig) {
|
|
304
|
+
CsrfTokenHandler._mTokens.delete(mCSRFTokenConfig.data.request.url);
|
|
305
|
+
|
|
306
|
+
if (this._oHost) {
|
|
307
|
+
this._oHost.csrfTokenExpired(mCSRFTokenConfig);
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
return CsrfTokenHandler;
|
|
312
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define(["sap/ui/base/ManagedObject"],
|
|
@@ -24,7 +24,7 @@ sap.ui.define(["sap/ui/base/ManagedObject"],
|
|
|
24
24
|
* @extends sap.ui.base.ManagedObject
|
|
25
25
|
*
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.97.1
|
|
28
28
|
*
|
|
29
29
|
* @constructor
|
|
30
30
|
* @private
|
|
@@ -100,6 +100,15 @@ sap.ui.define(["sap/ui/base/ManagedObject"],
|
|
|
100
100
|
this._oDestinations = oDestinations;
|
|
101
101
|
};
|
|
102
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Sets the CSRF token handler
|
|
105
|
+
*
|
|
106
|
+
* @param {sap.ui.integration.util.CsrfTokenHandler} oCsrfTokenHandler The CSRF token handler.
|
|
107
|
+
*/
|
|
108
|
+
DataProvider.prototype.setCsrfTokenHandler = function (oCsrfTokenHandler) {
|
|
109
|
+
this._oCsrfTokenHandler = oCsrfTokenHandler;
|
|
110
|
+
};
|
|
111
|
+
|
|
103
112
|
/**
|
|
104
113
|
* Sets a list of <code>sap.ui.integration.util.DataProvider</code> which will be considered dependencies of the current one.
|
|
105
114
|
* @param {sap.ui.integration.util.DataProvider[]} aDependencies The list of dependencies.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
@@ -11,10 +11,18 @@ sap.ui.define([
|
|
|
11
11
|
"sap/ui/integration/util/DataProvider",
|
|
12
12
|
"sap/ui/integration/util/ExtensionDataProvider",
|
|
13
13
|
"sap/ui/integration/util/JSONBindingHelper",
|
|
14
|
-
"sap/ui/integration/util/BindingHelper"
|
|
15
|
-
|
|
16
|
-
function (BaseObject,
|
|
17
|
-
|
|
14
|
+
"sap/ui/integration/util/BindingHelper",
|
|
15
|
+
"sap/ui/integration/util/CsrfTokenHandler"
|
|
16
|
+
], function (BaseObject,
|
|
17
|
+
ServiceDataProvider,
|
|
18
|
+
RequestDataProvider,
|
|
19
|
+
CacheAndRequestDataProvider,
|
|
20
|
+
DataProvider,
|
|
21
|
+
ExtensionDataProvider,
|
|
22
|
+
JSONBindingHelper,
|
|
23
|
+
BindingHelper,
|
|
24
|
+
CsrfTokenHandler) {
|
|
25
|
+
"use strict";
|
|
18
26
|
|
|
19
27
|
/**
|
|
20
28
|
* @class
|
|
@@ -22,7 +30,7 @@ function (BaseObject, ServiceDataProvider, RequestDataProvider, CacheAndRequestD
|
|
|
22
30
|
* When destroyed, all data providers created by this class are also destroyed.
|
|
23
31
|
*
|
|
24
32
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
33
|
+
* @version 1.97.1
|
|
26
34
|
*
|
|
27
35
|
* @private
|
|
28
36
|
* @ui5-restricted sap.ui.integration, shell-toolkit
|
|
@@ -30,13 +38,24 @@ function (BaseObject, ServiceDataProvider, RequestDataProvider, CacheAndRequestD
|
|
|
30
38
|
* @alias sap.ui.integration.util.DataProviderFactory
|
|
31
39
|
*/
|
|
32
40
|
var DataProviderFactory = BaseObject.extend("sap.ui.integration.util.DataProviderFactory", {
|
|
33
|
-
constructor: function (
|
|
41
|
+
constructor: function (mSettings) {
|
|
34
42
|
BaseObject.call(this);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
43
|
+
|
|
44
|
+
mSettings = mSettings || {};
|
|
45
|
+
|
|
46
|
+
this._oDestinations = mSettings.destinations;
|
|
47
|
+
this._oExtension = mSettings.extension;
|
|
48
|
+
this._oCsrfTokenHandler = mSettings.csrfTokenHandler;
|
|
49
|
+
this._oCard = mSettings.card;
|
|
50
|
+
this._oEditor = mSettings.editor;
|
|
51
|
+
this._oHost = mSettings.host;
|
|
52
|
+
|
|
53
|
+
if (mSettings.csrfTokensConfig) {
|
|
54
|
+
this._oCsrfTokenHandler = new CsrfTokenHandler({
|
|
55
|
+
host: mSettings.host,
|
|
56
|
+
configuration: mSettings.csrfTokensConfig
|
|
57
|
+
});
|
|
58
|
+
}
|
|
40
59
|
|
|
41
60
|
this._aDataProviders = [];
|
|
42
61
|
this._aFiltersProviders = [];
|
|
@@ -61,6 +80,11 @@ function (BaseObject, ServiceDataProvider, RequestDataProvider, CacheAndRequestD
|
|
|
61
80
|
this._aFiltersProviders = null;
|
|
62
81
|
}
|
|
63
82
|
|
|
83
|
+
if (this._oCsrfTokenHandler) {
|
|
84
|
+
this._oCsrfTokenHandler.destroy();
|
|
85
|
+
this._oCsrfTokenHandler = null;
|
|
86
|
+
}
|
|
87
|
+
|
|
64
88
|
this._oCard = null;
|
|
65
89
|
this._oExtension = null;
|
|
66
90
|
this._bIsDestroyed = true;
|
|
@@ -139,6 +163,11 @@ function (BaseObject, ServiceDataProvider, RequestDataProvider, CacheAndRequestD
|
|
|
139
163
|
|
|
140
164
|
oDataProvider.setDestinations(this._oDestinations);
|
|
141
165
|
|
|
166
|
+
if (this._oCsrfTokenHandler) {
|
|
167
|
+
oDataProvider.setCsrfTokenHandler(this._oCsrfTokenHandler);
|
|
168
|
+
this._oCsrfTokenHandler.setDataProviderFactory(this);
|
|
169
|
+
}
|
|
170
|
+
|
|
142
171
|
if (oDataProvider.isA("sap.ui.integration.util.IServiceDataProvider")) {
|
|
143
172
|
oDataProvider.createServiceInstances(oServiceManager);
|
|
144
173
|
}
|
|
@@ -174,5 +203,13 @@ function (BaseObject, ServiceDataProvider, RequestDataProvider, CacheAndRequestD
|
|
|
174
203
|
}
|
|
175
204
|
};
|
|
176
205
|
|
|
206
|
+
DataProviderFactory.prototype.setHost = function (oHost) {
|
|
207
|
+
this._oHost = oHost;
|
|
208
|
+
|
|
209
|
+
if (this._oCsrfTokenHandler) {
|
|
210
|
+
this._oCsrfTokenHandler.setHost(oHost);
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
|
|
177
214
|
return DataProviderFactory;
|
|
178
215
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @extends sap.ui.base.Object
|
|
28
28
|
*
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.97.1
|
|
31
31
|
*
|
|
32
32
|
* @constructor
|
|
33
33
|
* @param {sap.ui.integration.Host} oHost The Host which will be used for resolving destinations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define(["sap/ui/integration/util/DataProvider"], function (DataProvider) {
|
|
@@ -17,7 +17,7 @@ sap.ui.define(["sap/ui/integration/util/DataProvider"], function (DataProvider)
|
|
|
17
17
|
* @extends sap.ui.integration.util.DataProvider
|
|
18
18
|
*
|
|
19
19
|
* @author SAP SE
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.97.1
|
|
21
21
|
*
|
|
22
22
|
* @constructor
|
|
23
23
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
@@ -68,7 +68,7 @@ sap.ui.define([
|
|
|
68
68
|
* @extends sap.ui.integration.util.BaseFactory
|
|
69
69
|
*
|
|
70
70
|
* @author SAP SE
|
|
71
|
-
* @version 1.
|
|
71
|
+
* @version 1.97.1
|
|
72
72
|
*
|
|
73
73
|
* @constructor
|
|
74
74
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* Helper class for working with bindings for json objects.
|
|
28
28
|
*
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.97.1
|
|
31
31
|
*
|
|
32
32
|
* @private
|
|
33
33
|
* @ui5-restricted sap.ui.integration, shell-toolkit
|
|
@@ -70,7 +70,7 @@ sap.ui.define([
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
return vValue;
|
|
73
|
-
|
|
73
|
+
}.bind(this));
|
|
74
74
|
|
|
75
75
|
sResult = this._escape(sResult);
|
|
76
76
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @extends sap.ui.core.Element
|
|
24
24
|
*
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.97.1
|
|
27
27
|
*
|
|
28
28
|
* @constructor
|
|
29
29
|
* @private
|