@openui5/sap.ui.integration 1.146.0 → 1.147.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.toml +0 -51
- package/THIRDPARTY.txt +0 -44
- package/package.json +6 -6
- package/src/sap/ui/integration/.library +1 -1
- package/src/sap/ui/integration/ActionDefinition.js +1 -1
- package/src/sap/ui/integration/Designtime.js +1 -1
- package/src/sap/ui/integration/Extension.js +1 -1
- package/src/sap/ui/integration/Host.js +1 -1
- package/src/sap/ui/integration/cards/AdaptiveContent.js +1 -1
- package/src/sap/ui/integration/cards/AnalyticalContent.js +1 -1
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +1 -1
- package/src/sap/ui/integration/cards/BaseContent.js +1 -1
- package/src/sap/ui/integration/cards/BaseListContent.js +65 -2
- package/src/sap/ui/integration/cards/CalendarContent.js +13 -11
- package/src/sap/ui/integration/cards/ComponentContent.js +1 -1
- package/src/sap/ui/integration/cards/Footer.js +1 -1
- package/src/sap/ui/integration/cards/Header.js +1 -1
- package/src/sap/ui/integration/cards/ListContent.js +15 -1
- package/src/sap/ui/integration/cards/NumericHeader.js +1 -1
- package/src/sap/ui/integration/cards/ObjectContent.js +1 -1
- package/src/sap/ui/integration/cards/TableContent.js +27 -3
- package/src/sap/ui/integration/cards/TimelineContent.js +1 -1
- package/src/sap/ui/integration/cards/WebPageContent.js +1 -1
- package/src/sap/ui/integration/cards/actions/CardActions.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputChoiceSet.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputDate.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputNumber.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputText.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputToggle.js +1 -1
- package/src/sap/ui/integration/cards/filters/BaseFilter.js +1 -1
- package/src/sap/ui/integration/cards/filters/ComboBoxFilter.js +1 -1
- package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +1 -1
- package/src/sap/ui/integration/cards/filters/FilterBar.js +1 -1
- package/src/sap/ui/integration/cards/filters/FilterBarFactory.js +1 -1
- package/src/sap/ui/integration/cards/filters/SearchFilter.js +1 -1
- package/src/sap/ui/integration/cards/filters/SelectFilter.js +1 -1
- package/src/sap/ui/integration/cards/list/MicrochartsResizeHelper.js +1 -1
- package/src/sap/ui/integration/controls/ActionsStrip.js +1 -1
- package/src/sap/ui/integration/controls/ActionsToolbar.js +1 -1
- package/src/sap/ui/integration/controls/BlockingMessage.js +2 -2
- package/src/sap/ui/integration/controls/ComboBox.js +1 -1
- package/src/sap/ui/integration/controls/HeaderInfoSectionColumn.js +1 -1
- package/src/sap/ui/integration/controls/HeaderInfoSectionRow.js +1 -1
- package/src/sap/ui/integration/controls/ImageWithOverlay.js +1 -1
- package/src/sap/ui/integration/controls/ListContentItem.js +1 -1
- package/src/sap/ui/integration/controls/Microchart.js +1 -1
- package/src/sap/ui/integration/controls/MicrochartLegend.js +1 -1
- package/src/sap/ui/integration/controls/ObjectStatus.js +1 -1
- package/src/sap/ui/integration/delegate/OverflowHandler.js +1 -1
- package/src/sap/ui/integration/delegate/Paginator.js +1 -1
- package/src/sap/ui/integration/delegate/PreventKeyboardScrolling.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/layout/Form.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/PropertyEditorFactory.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditor.fragment.xml +6 -6
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditorPlain.fragment.xml +6 -6
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/booleanEditor/BooleanEditor.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/codeEditor/CodeEditor.fragment.xml +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/codeEditor/CodeEditor.js +8 -11
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/codeEditor/CodeEditorDialog.fragment.xml +3 -3
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/enumStringEditor/EnumStringEditor.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/enumStringEditor/EnumStringEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/groupEditor/GroupEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IconEditor.fragment.xml +3 -3
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IconEditorDialog.fragment.xml +4 -4
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IsInIconPool.validator.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditor.fragment.xml +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditorDialog.fragment.xml +4 -4
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor.fragment.xml +3 -3
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.fragment.xml +6 -6
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/multiSelectEditor/MultiSelectEditor.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/multiSelectEditor/MultiSelectEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/objectArrayEditor/ObjectArrayEditor.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/objectArrayEditor/ObjectArrayEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/selectEditor/SelectEditor.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/selectEditor/SelectEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/separatorEditor/SeparatorEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/binding/ObjectBinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/unset.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsBoolean.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsDate.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsInteger.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsNumber.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsSelectedKey.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsStringList.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueKey.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueList.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsValidBinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/MaxLength.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/NotABinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/ValidatorRegistry.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/config/TableCardConfig.js +84 -0
- package/src/sap/ui/integration/designtime/cardEditor/config/generateActionConfig.js +7 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n.properties +45 -0
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/complexMapEditor/ComplexMapEditor.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/complexMapEditor/ComplexMapEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/destinationsEditor/DestinationsEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/filtersEditor/FiltersEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/iconEditor/IconEditor.fragment.xml +5 -5
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/iconEditor/IconEditorSettingsDialog.fragment.xml +4 -4
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/parametersEditor/ParametersConfigurationEditor.fragment.xml +2 -2
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/parametersEditor/ParametersEditor.js +1 -1
- package/src/sap/ui/integration/designtime/editor/Card.js +1 -1
- package/src/sap/ui/integration/designtime/editor/CardEditor.js +1 -1
- package/src/sap/ui/integration/designtime/editor/CardPreview.js +1 -1
- package/src/sap/ui/integration/editor/Editor.js +37 -13
- package/src/sap/ui/integration/editor/EditorResourceBundles.js +1 -1
- package/src/sap/ui/integration/editor/Extension.js +1 -1
- package/src/sap/ui/integration/editor/Manifest.js +1 -1
- package/src/sap/ui/integration/editor/Settings.js +1 -1
- package/src/sap/ui/integration/editor/fields/BaseField.js +1 -1
- package/src/sap/ui/integration/editor/fields/BooleanField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateTimeField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DestinationField.js +1 -1
- package/src/sap/ui/integration/editor/fields/GroupField.js +1 -1
- package/src/sap/ui/integration/editor/fields/IntegerField.js +1 -1
- package/src/sap/ui/integration/editor/fields/NumberField.js +1 -1
- package/src/sap/ui/integration/editor/fields/ObjectField.js +2 -2
- package/src/sap/ui/integration/editor/fields/ObjectListField.js +1 -1
- package/src/sap/ui/integration/editor/fields/StringField.js +1 -1
- package/src/sap/ui/integration/editor/fields/StringListField.js +1 -1
- package/src/sap/ui/integration/editor/fields/fragment/Controller.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/ColorSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/IconSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/ImageSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/ShapeSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/VizBase.js +28 -7
- package/src/sap/ui/integration/extensions/OAuth3LO.js +1 -1
- package/src/sap/ui/integration/formatters/IconFormatter.js +1 -1
- package/src/sap/ui/integration/library.js +2 -2
- package/src/sap/ui/integration/model/ContextModel.js +1 -1
- package/src/sap/ui/integration/model/ObservableModel.js +1 -1
- package/src/sap/ui/integration/schemas/sap-card.json +74 -0
- package/src/sap/ui/integration/util/AnalyticsCloudHelper.js +1 -1
- package/src/sap/ui/integration/util/BaseFactory.js +1 -1
- package/src/sap/ui/integration/util/BindingHelper.js +1 -1
- package/src/sap/ui/integration/util/BindingResolver.js +1 -1
- package/src/sap/ui/integration/util/CardObserver.js +1 -1
- package/src/sap/ui/integration/util/ComboBoxHelper.js +1 -1
- package/src/sap/ui/integration/util/ContentFactory.js +1 -1
- package/src/sap/ui/integration/util/CsrfTokenHandler.js +1 -1
- package/src/sap/ui/integration/util/DataProvider.js +1 -1
- package/src/sap/ui/integration/util/DataProviderFactory.js +3 -3
- package/src/sap/ui/integration/util/Destinations.js +1 -1
- package/src/sap/ui/integration/util/DisplayVariants.js +1 -1
- package/src/sap/ui/integration/util/ErrorHandler.js +1 -1
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
- package/src/sap/ui/integration/util/Form.js +1 -1
- package/src/sap/ui/integration/util/HeaderFactory.js +1 -1
- package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
- package/src/sap/ui/integration/util/LoadingProvider.js +1 -1
- package/src/sap/ui/integration/util/Manifest.js +1 -1
- package/src/sap/ui/integration/util/ManifestResolver.js +4 -0
- package/src/sap/ui/integration/util/OAuth3LOHelper.js +1 -1
- package/src/sap/ui/integration/util/ObjectStatusFactory.js +1 -1
- package/src/sap/ui/integration/util/RadioButtonHelper.js +1 -1
- package/src/sap/ui/integration/util/RequestDataProvider.js +1 -1
- package/src/sap/ui/integration/util/ServiceDataProvider.js +1 -1
- package/src/sap/ui/integration/util/ServiceManager.js +1 -1
- package/src/sap/ui/integration/util/SkeletonCard.js +1 -1
- package/src/sap/ui/integration/util/SorterHelper.js +1 -1
- package/src/sap/ui/integration/util/Utils.js +1 -1
- package/src/sap/ui/integration/util/Validators.js +1 -1
- package/src/sap/ui/integration/widgets/Card.js +137 -24
|
@@ -40,7 +40,7 @@ sap.ui.define([
|
|
|
40
40
|
* When destroyed, all data providers created by this class are also destroyed.
|
|
41
41
|
*
|
|
42
42
|
* @author SAP SE
|
|
43
|
-
* @version 1.
|
|
43
|
+
* @version 1.147.1
|
|
44
44
|
*
|
|
45
45
|
* @private
|
|
46
46
|
* @ui5-restricted sap.ui.integration, shell-toolkit
|
|
@@ -237,14 +237,14 @@ sap.ui.define([
|
|
|
237
237
|
const oEditor = this._oEditor;
|
|
238
238
|
|
|
239
239
|
if (oCard) {
|
|
240
|
-
oSettings.baseRuntimeUrl = oCard.
|
|
240
|
+
oSettings.baseRuntimeUrl = oCard.resolveUrl();
|
|
241
241
|
oSettings.card = oCard;
|
|
242
242
|
|
|
243
243
|
if (!bConfigurationResolved) {
|
|
244
244
|
oSettings.configurationJson = JSONBindingHelper.createJsonWithBindingInfos(oDataConfiguration, oCard.getBindingNamespaces());
|
|
245
245
|
}
|
|
246
246
|
} else if (oEditor) {
|
|
247
|
-
oSettings.baseRuntimeUrl = oEditor.
|
|
247
|
+
oSettings.baseRuntimeUrl = oEditor.resolveUrl("/"); // @todo should behave the same as card.resolveUrl
|
|
248
248
|
oSettings.configurationJson = JSONBindingHelper.createJsonWithBindingInfos(oDataConfiguration, oEditor.getBindingNamespaces());
|
|
249
249
|
} else {
|
|
250
250
|
oSettings.configurationJson = JSONBindingHelper.createJsonWithBindingInfos(oDataConfiguration, {});
|
|
@@ -93,6 +93,10 @@ sap.ui.define([
|
|
|
93
93
|
// Prepare binding infos only once for all sections
|
|
94
94
|
oManifest = BindingHelper.createBindingInfos(oManifest, oCard.getBindingNamespaces());
|
|
95
95
|
|
|
96
|
+
// Include merged customSettings in resolved manifest
|
|
97
|
+
const oCustomSettings = oCard.getCombinedCustomSettings();
|
|
98
|
+
oManifest["sap.card"].customSettings = oCustomSettings;
|
|
99
|
+
|
|
96
100
|
if (oCard.getAggregation("_filterBar")) {
|
|
97
101
|
aFilters = oCard.getAggregation("_filterBar")._getFilters().map(function (oFilter) {
|
|
98
102
|
return ["/sap.card/configuration/filters/" + oFilter.getKey(), oFilter];
|
|
@@ -99,6 +99,7 @@ sap.ui.define([
|
|
|
99
99
|
DESTINATIONS: "/sap.card/configuration/destinations",
|
|
100
100
|
CSRF_TOKENS: "/sap.card/configuration/csrfTokens",
|
|
101
101
|
FILTERS: "/sap.card/configuration/filters",
|
|
102
|
+
CUSTOM_SETTINGS: "/sap.card/customSettings",
|
|
102
103
|
NO_DATA_MESSAGES: "/sap.card/configuration/messages/noData",
|
|
103
104
|
MODEL_SIZE_LIMIT: "/sap.card/configuration/modelSizeLimit",
|
|
104
105
|
CHILD_CARDS: "/sap.card/configuration/childCards"
|
|
@@ -191,7 +192,7 @@ sap.ui.define([
|
|
|
191
192
|
* @extends sap.f.CardBase
|
|
192
193
|
*
|
|
193
194
|
* @author SAP SE
|
|
194
|
-
* @version 1.
|
|
195
|
+
* @version 1.147.1
|
|
195
196
|
* @public
|
|
196
197
|
* @constructor
|
|
197
198
|
* @see {@link topic:5b46b03f024542ba802d99d67bc1a3f4 Cards}
|
|
@@ -232,6 +233,21 @@ sap.ui.define([
|
|
|
232
233
|
defaultValue: null
|
|
233
234
|
},
|
|
234
235
|
|
|
236
|
+
/**
|
|
237
|
+
* Defines custom settings passed from the Mobile SDK or a hosting application.
|
|
238
|
+
* These are global defaults that can be overridden by individual cards via their manifest.
|
|
239
|
+
* The value is an object containing custom settings as key-value pairs.
|
|
240
|
+
*
|
|
241
|
+
* <b>Note:</b> For Mobile SDK usage, set this property before calling <code>startManifestProcessing</code>.
|
|
242
|
+
*
|
|
243
|
+
* @ui5-experimental-since 1.146
|
|
244
|
+
*/
|
|
245
|
+
customSettings: {
|
|
246
|
+
type: "object",
|
|
247
|
+
defaultValue: {},
|
|
248
|
+
visibility: "hidden"
|
|
249
|
+
},
|
|
250
|
+
|
|
235
251
|
/**
|
|
236
252
|
* Defines the state of the <code>Card</code>. When set to <code>Inactive</code>, the <code>Card</code> doesn't make requests.
|
|
237
253
|
* @ui5-experimental-since 1.65
|
|
@@ -243,10 +259,14 @@ sap.ui.define([
|
|
|
243
259
|
},
|
|
244
260
|
|
|
245
261
|
/**
|
|
246
|
-
* Defines the base URL of the card manifest. It
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
262
|
+
* Defines the base URL of the card manifest. It must be provided when the manifest is an object and not a URL.
|
|
263
|
+
* The base URL is used to load relatively referenced resources.
|
|
264
|
+
*
|
|
265
|
+
* If the base URL is not defined and the manifest URL is defined, the manifest URL is used as the base URL.
|
|
266
|
+
* <ul>
|
|
267
|
+
* <li>If both the manifest URL and the base URL are defined, the base URL is used.</li>
|
|
268
|
+
* <li>If neither the manifest URL nor the base URL is defined, relative resources will not load correctly.</li>
|
|
269
|
+
* </ul>
|
|
250
270
|
*/
|
|
251
271
|
baseUrl: {
|
|
252
272
|
type: "sap.ui.core.URI",
|
|
@@ -622,6 +642,7 @@ sap.ui.define([
|
|
|
622
642
|
this._aSevereErrors = [];
|
|
623
643
|
this._sPerformanceId = "UI5 Integration Cards " + this.getId() + " ";
|
|
624
644
|
this._aActiveLoadingProviders = [];
|
|
645
|
+
this._oCustomSettings = this.getProperty("customSettings");
|
|
625
646
|
this._fnOnDataReady = function () {
|
|
626
647
|
this._bDataReady = true;
|
|
627
648
|
}.bind(this);
|
|
@@ -639,7 +660,7 @@ sap.ui.define([
|
|
|
639
660
|
* @name sap.ui.integration.widgets.CardFacade
|
|
640
661
|
* @public
|
|
641
662
|
* @author SAP SE
|
|
642
|
-
* @version 1.
|
|
663
|
+
* @version 1.147.1
|
|
643
664
|
* @borrows sap.ui.integration.widgets.Card#getId as getId
|
|
644
665
|
* @borrows sap.ui.integration.widgets.Card#getCombinedParameters as getCombinedParameters
|
|
645
666
|
* @borrows sap.ui.integration.widgets.Card#getManifestEntry as getManifestEntry
|
|
@@ -649,8 +670,7 @@ sap.ui.define([
|
|
|
649
670
|
* @borrows sap.ui.integration.widgets.Card#refreshData as refreshData
|
|
650
671
|
* @borrows sap.ui.integration.widgets.Card#showMessage as showMessage
|
|
651
672
|
* @borrows sap.ui.integration.widgets.Card#hideMessage as hideMessage
|
|
652
|
-
* @borrows sap.ui.integration.widgets.Card#
|
|
653
|
-
* @borrows sap.ui.integration.widgets.Card#getRuntimeUrl as getRuntimeUrl
|
|
673
|
+
* @borrows sap.ui.integration.widgets.Card#resolveUrl as resolveUrl
|
|
654
674
|
* @borrows sap.ui.integration.widgets.Card#getTranslatedText as getTranslatedText
|
|
655
675
|
* @borrows sap.ui.integration.widgets.Card#triggerAction as triggerAction
|
|
656
676
|
* @borrows sap.ui.integration.widgets.Card#addActionDefinition as addActionDefinition
|
|
@@ -682,7 +702,8 @@ sap.ui.define([
|
|
|
682
702
|
"refreshData",
|
|
683
703
|
"showMessage",
|
|
684
704
|
"getBaseUrl",
|
|
685
|
-
"
|
|
705
|
+
"resolveUrl",
|
|
706
|
+
"getRuntimeUrl", // @deprecated since 1.147.0
|
|
686
707
|
"getTranslatedText",
|
|
687
708
|
"getModel",
|
|
688
709
|
"triggerAction",
|
|
@@ -702,6 +723,13 @@ sap.ui.define([
|
|
|
702
723
|
"hideBlockingMessage",
|
|
703
724
|
"getBlockingMessage"
|
|
704
725
|
]);
|
|
726
|
+
|
|
727
|
+
// Temporary compatibility for deprecated getBaseUrl method
|
|
728
|
+
const fnOriginalGetBaseUrl = this._oLimitedInterface.getBaseUrl;
|
|
729
|
+
this._oLimitedInterface.getBaseUrl = function() {
|
|
730
|
+
Log.warning("Method 'getBaseUrl' must not be used through the card interface. It will be removed soon. Use 'resolveUrl' instead.");
|
|
731
|
+
return fnOriginalGetBaseUrl.apply(this, arguments);
|
|
732
|
+
};
|
|
705
733
|
};
|
|
706
734
|
|
|
707
735
|
/**
|
|
@@ -751,6 +779,10 @@ sap.ui.define([
|
|
|
751
779
|
parameters: {
|
|
752
780
|
init: () => this.setModel(new JSONModel(ParameterMap.getParamsForModel()), "parameters")
|
|
753
781
|
},
|
|
782
|
+
customSettings: {
|
|
783
|
+
init: () => this.setModel(new JSONModel({}), "customSettings"),
|
|
784
|
+
reset: () => this.getModel("customSettings").setData({})
|
|
785
|
+
},
|
|
754
786
|
filters: {
|
|
755
787
|
init: () => this.setModel(new JSONModel(), "filters"),
|
|
756
788
|
reset: () => this.getModel("filters").setData({})
|
|
@@ -876,6 +908,12 @@ sap.ui.define([
|
|
|
876
908
|
if (this._getActualDataMode() !== CardDataMode.Active) {
|
|
877
909
|
return;
|
|
878
910
|
}
|
|
911
|
+
|
|
912
|
+
if (this._oCustomSettings !== this.getProperty("customSettings")) {
|
|
913
|
+
this._bApplyCustomSettings = true;
|
|
914
|
+
this._oCustomSettings = this.getProperty("customSettings");
|
|
915
|
+
}
|
|
916
|
+
|
|
879
917
|
this.startManifestProcessing();
|
|
880
918
|
};
|
|
881
919
|
|
|
@@ -922,7 +960,7 @@ sap.ui.define([
|
|
|
922
960
|
);
|
|
923
961
|
}
|
|
924
962
|
|
|
925
|
-
if (this._bApplyManifest || this._bApplyParameters) {
|
|
963
|
+
if (this._bApplyManifest || this._bApplyParameters || this._bApplyCustomSettings) {
|
|
926
964
|
this._clearReadyState();
|
|
927
965
|
this._initReadyState();
|
|
928
966
|
}
|
|
@@ -933,7 +971,7 @@ sap.ui.define([
|
|
|
933
971
|
this.createManifest(vManifest, this.getBaseUrl());
|
|
934
972
|
}
|
|
935
973
|
|
|
936
|
-
if (!this._bApplyManifest && this._bApplyParameters) {
|
|
974
|
+
if (!this._bApplyManifest && (this._bApplyParameters || this._bApplyCustomSettings)) {
|
|
937
975
|
this._oCardManifest.processParameters(this._getContextAndRuntimeParams());
|
|
938
976
|
|
|
939
977
|
this.processDestinations(this._oCardManifest.getJson()).then((oResult) => {
|
|
@@ -945,6 +983,7 @@ sap.ui.define([
|
|
|
945
983
|
|
|
946
984
|
this._bApplyManifest = false;
|
|
947
985
|
this._bApplyParameters = false;
|
|
986
|
+
this._bApplyCustomSettings = false;
|
|
948
987
|
this._refreshActionsMenu();
|
|
949
988
|
};
|
|
950
989
|
|
|
@@ -1611,6 +1650,36 @@ sap.ui.define([
|
|
|
1611
1650
|
return oResultParams;
|
|
1612
1651
|
};
|
|
1613
1652
|
|
|
1653
|
+
/**
|
|
1654
|
+
* Gets the merged custom settings from the manifest combined with the settings from <code>customSettings</code> property.
|
|
1655
|
+
* Card manifest values take precedence for individual properties (shallow merge).
|
|
1656
|
+
*
|
|
1657
|
+
* <b>Notes</b>
|
|
1658
|
+
*
|
|
1659
|
+
* - Use this method when the manifest is ready. Check <code>manifestReady</code> event.
|
|
1660
|
+
*
|
|
1661
|
+
* - This method is intended for use by Mobile SDK.
|
|
1662
|
+
*
|
|
1663
|
+
* @private
|
|
1664
|
+
* @ui5-restricted Mobile SDK
|
|
1665
|
+
* @returns {object} Object containing the merged custom settings. Returns <code>null</code> if the manifest is not ready.
|
|
1666
|
+
* @ui5-experimental-since 1.146
|
|
1667
|
+
*/
|
|
1668
|
+
Card.prototype.getCombinedCustomSettings = function () {
|
|
1669
|
+
if (!this._isManifestReady) {
|
|
1670
|
+
Log.error("The manifest is not ready. Consider using the 'manifestReady' event.", "sap.ui.integration.widgets.Card");
|
|
1671
|
+
return null;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
const oModel = this.getModel("customSettings");
|
|
1675
|
+
if (oModel) {
|
|
1676
|
+
const oData = oModel.getData();
|
|
1677
|
+
return jQuery.extend(true, {}, oData);
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
return {};
|
|
1681
|
+
};
|
|
1682
|
+
|
|
1614
1683
|
/**
|
|
1615
1684
|
* Returns a value from the Manifest based on the specified path.
|
|
1616
1685
|
*
|
|
@@ -1850,37 +1919,42 @@ sap.ui.define([
|
|
|
1850
1919
|
};
|
|
1851
1920
|
|
|
1852
1921
|
/**
|
|
1853
|
-
* Resolves the given URL
|
|
1922
|
+
* Resolves the given URL relative to the manifest base path.
|
|
1854
1923
|
* Absolute paths are not changed.
|
|
1855
1924
|
*
|
|
1856
1925
|
* @example
|
|
1857
|
-
* oCard.
|
|
1858
|
-
* oCard.
|
|
1859
|
-
* oCard.
|
|
1860
|
-
* oCard.
|
|
1926
|
+
* oCard.resolveUrl("images/Avatar.png") === "{cardBaseUrl}/images/Avatar.png"
|
|
1927
|
+
* oCard.resolveUrl("/images/Avatar.png") === "/images/Avatar.png" (remains relative to host root)
|
|
1928
|
+
* oCard.resolveUrl("http://www.someurl.com/Avatar.png") === "http://www.someurl.com/Avatar.png"
|
|
1929
|
+
* oCard.resolveUrl("https://www.someurl.com/Avatar.png") === "https://www.someurl.com/Avatar.png"
|
|
1861
1930
|
*
|
|
1862
1931
|
* @ui5-restricted
|
|
1863
1932
|
* @param {string} sUrl The URL to resolve.
|
|
1864
1933
|
* @returns {string} The resolved URL.
|
|
1865
1934
|
*/
|
|
1866
|
-
Card.prototype.
|
|
1935
|
+
Card.prototype.resolveUrl = function (sUrl) {
|
|
1867
1936
|
if (!sUrl) {
|
|
1868
1937
|
sUrl = "";
|
|
1869
1938
|
}
|
|
1870
1939
|
|
|
1871
|
-
|
|
1872
|
-
if (sAppId === null) {
|
|
1940
|
+
if (!this._oCardManifest) {
|
|
1873
1941
|
Log.error("The manifest is not ready so the URL can not be resolved. Consider using the 'manifestReady' event.", "sap.ui.integration.widgets.Card");
|
|
1874
1942
|
return null;
|
|
1875
1943
|
}
|
|
1876
1944
|
|
|
1877
|
-
|
|
1878
|
-
|
|
1945
|
+
const sAppId = this._oCardManifest.get("/sap.app/id");
|
|
1946
|
+
|
|
1947
|
+
if (sUrl.startsWith("http://") ||
|
|
1879
1948
|
sUrl.startsWith("https://") ||
|
|
1880
1949
|
sUrl.startsWith("//")) {
|
|
1881
1950
|
return sUrl;
|
|
1882
1951
|
}
|
|
1883
1952
|
|
|
1953
|
+
if (!sAppId) {
|
|
1954
|
+
Log.error("The manifest property 'sap.app/id' is missing or empty. The URL '" + sUrl + "' cannot be resolved.", "sap.ui.integration.widgets.Card");
|
|
1955
|
+
return sUrl;
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1884
1958
|
if (sUrl.startsWith("/")) {
|
|
1885
1959
|
// urls which are absolute to the server root are not changed
|
|
1886
1960
|
return sUrl;
|
|
@@ -1894,6 +1968,26 @@ sap.ui.define([
|
|
|
1894
1968
|
return sap.ui.require.toUrl(sAppName) + "/" + sSanitizedUrl;
|
|
1895
1969
|
};
|
|
1896
1970
|
|
|
1971
|
+
/**
|
|
1972
|
+
* Resolves the given URL relative to the manifest base path.
|
|
1973
|
+
* Absolute paths are not changed.
|
|
1974
|
+
*
|
|
1975
|
+
* @example
|
|
1976
|
+
* oCard.getRuntimeUrl("images/Avatar.png") === "{cardBaseUrl}/images/Avatar.png"
|
|
1977
|
+
* oCard.getRuntimeUrl("/images/Avatar.png") === "/images/Avatar.png" (remains relative to host root)
|
|
1978
|
+
* oCard.getRuntimeUrl("http://www.someurl.com/Avatar.png") === "http://www.someurl.com/Avatar.png"
|
|
1979
|
+
* oCard.getRuntimeUrl("https://www.someurl.com/Avatar.png") === "https://www.someurl.com/Avatar.png"
|
|
1980
|
+
*
|
|
1981
|
+
* @deprecated As of version 1.146, replaced by {@link sap.ui.integration.widgets.Card#resolveUrl}
|
|
1982
|
+
* @ui5-restricted
|
|
1983
|
+
* @param {string} sUrl The URL to resolve.
|
|
1984
|
+
* @returns {string} The resolved URL.
|
|
1985
|
+
*/
|
|
1986
|
+
Card.prototype.getRuntimeUrl = function (sUrl) {
|
|
1987
|
+
Log.warning("'getRuntimeUrl' is deprecated. Use 'resolveUrl' instead.", "sap.ui.integration.widgets.Card");
|
|
1988
|
+
return this.resolveUrl(sUrl);
|
|
1989
|
+
};
|
|
1990
|
+
|
|
1897
1991
|
/**
|
|
1898
1992
|
* Returns the matching value from the query.
|
|
1899
1993
|
*
|
|
@@ -1975,6 +2069,7 @@ sap.ui.define([
|
|
|
1975
2069
|
*/
|
|
1976
2070
|
Card.prototype._applyManifestSettings = function () {
|
|
1977
2071
|
this._setParametersModelData();
|
|
2072
|
+
this._setCustomSettingsModelData();
|
|
1978
2073
|
|
|
1979
2074
|
this._checkMockPreviewMode();
|
|
1980
2075
|
|
|
@@ -2017,6 +2112,24 @@ sap.ui.define([
|
|
|
2017
2112
|
this.getModel("parameters").setData(merge(oPredefinedParameters, oCustomParameters));
|
|
2018
2113
|
};
|
|
2019
2114
|
|
|
2115
|
+
/**
|
|
2116
|
+
* Sets the data for the customSettings model.
|
|
2117
|
+
* Merges <code>customSettings</code> property with card manifest overrides.
|
|
2118
|
+
* Card manifest values take precedence for individual properties.
|
|
2119
|
+
*
|
|
2120
|
+
* The merge is shallow - card manifest can override individual properties
|
|
2121
|
+
* while preserving non-overridden properties from <code>customSettings</code> property.
|
|
2122
|
+
*
|
|
2123
|
+
* @private
|
|
2124
|
+
*/
|
|
2125
|
+
Card.prototype._setCustomSettingsModelData = function () {
|
|
2126
|
+
const oCustomSettings = this.getProperty("customSettings");
|
|
2127
|
+
const oManifestOverrides = this._oCardManifest.get(MANIFEST_PATHS.CUSTOM_SETTINGS) || {};
|
|
2128
|
+
const oMergedSettings = Object.assign({}, oCustomSettings, oManifestOverrides);
|
|
2129
|
+
|
|
2130
|
+
this.getModel("customSettings").setData(oMergedSettings);
|
|
2131
|
+
};
|
|
2132
|
+
|
|
2020
2133
|
Card.prototype._applyDataManifestSettings = function () {
|
|
2021
2134
|
var oDataSettings = this._oCardManifest.get(MANIFEST_PATHS.DATA),
|
|
2022
2135
|
oModel;
|
|
@@ -2321,7 +2434,7 @@ sap.ui.define([
|
|
|
2321
2434
|
sAncestorUrl = new URL(oAncestor.getManifest(), window.location).href;
|
|
2322
2435
|
}
|
|
2323
2436
|
|
|
2324
|
-
if (new URL(this.
|
|
2437
|
+
if (new URL(this.resolveUrl(manifest), window.location).href === sAncestorUrl) {
|
|
2325
2438
|
sMatchingChildManifestUrl = manifest;
|
|
2326
2439
|
break;
|
|
2327
2440
|
}
|
|
@@ -3505,13 +3618,13 @@ sap.ui.define([
|
|
|
3505
3618
|
}
|
|
3506
3619
|
|
|
3507
3620
|
if (typeof vManifest === "string") {
|
|
3508
|
-
oChildCard.setManifest(this.
|
|
3621
|
+
oChildCard.setManifest(this.resolveUrl(vManifest));
|
|
3509
3622
|
if (sBaseUrl) {
|
|
3510
3623
|
oChildCard.setBaseUrl(sBaseUrl);
|
|
3511
3624
|
}
|
|
3512
3625
|
} else {
|
|
3513
3626
|
oChildCard.setManifest(vManifest);
|
|
3514
|
-
oChildCard.setBaseUrl(sBaseUrl || this.
|
|
3627
|
+
oChildCard.setBaseUrl(sBaseUrl || this.resolveUrl());
|
|
3515
3628
|
}
|
|
3516
3629
|
|
|
3517
3630
|
return oChildCard;
|