@openui5/sap.ui.integration 1.120.10 → 1.121.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 +23 -21
- package/THIRDPARTY.txt +6 -43
- 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 +14 -12
- package/src/sap/ui/integration/cards/AdaptiveContent.js +16 -16
- package/src/sap/ui/integration/cards/AnalyticalContent.js +37 -11
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +1 -1
- package/src/sap/ui/integration/cards/BaseContent.js +13 -4
- package/src/sap/ui/integration/cards/BaseContentRenderer.js +1 -1
- package/src/sap/ui/integration/cards/BaseListContent.js +1 -1
- package/src/sap/ui/integration/cards/CalendarContent.js +9 -9
- package/src/sap/ui/integration/cards/CalendarContentRenderer.js +10 -7
- package/src/sap/ui/integration/cards/ComponentContent.js +1 -1
- package/src/sap/ui/integration/cards/Footer.js +11 -5
- package/src/sap/ui/integration/cards/Header.js +4 -4
- package/src/sap/ui/integration/cards/ListContent.js +8 -2
- package/src/sap/ui/integration/cards/ListContentRenderer.js +5 -3
- package/src/sap/ui/integration/cards/NumericHeader.js +4 -4
- package/src/sap/ui/integration/cards/ObjectContent.js +42 -5
- package/src/sap/ui/integration/cards/TableContent.js +1 -1
- package/src/sap/ui/integration/cards/TimelineContent.js +4 -4
- package/src/sap/ui/integration/cards/WebPageContent.js +1 -1
- package/src/sap/ui/integration/cards/actions/BaseAction.js +4 -4
- package/src/sap/ui/integration/cards/actions/CardActions.js +1 -1
- package/src/sap/ui/integration/cards/actions/ShowCardAction.js +3 -3
- 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/adaptivecards/overwrites/inputsGeneralOverwrites.js +3 -3
- package/src/sap/ui/integration/cards/data/CsrfToken.js +61 -0
- package/src/sap/ui/integration/cards/filters/BaseFilter.js +33 -32
- package/src/sap/ui/integration/cards/filters/ComboBoxFilter.js +254 -0
- 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 +9 -3
- package/src/sap/ui/integration/cards/filters/SearchFilter.js +16 -3
- 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 +189 -84
- package/src/sap/ui/integration/controls/ActionsToolbar.js +12 -9
- package/src/sap/ui/integration/controls/BlockingMessage.js +93 -44
- package/src/sap/ui/integration/controls/ImageWithOverlay.js +199 -0
- package/src/sap/ui/integration/controls/ImageWithOverlayRenderer.js +36 -0
- package/src/sap/ui/integration/controls/LinkWithIcon.js +2 -2
- package/src/sap/ui/integration/controls/ListContentItem.js +10 -7
- package/src/sap/ui/integration/controls/ListContentItemRenderer.js +5 -4
- package/src/sap/ui/integration/controls/Microchart.js +4 -4
- package/src/sap/ui/integration/controls/MicrochartLegend.js +4 -4
- package/src/sap/ui/integration/controls/MicrochartLegendRenderer.js +3 -3
- package/src/sap/ui/integration/controls/ObjectStatus.js +3 -1
- package/src/sap/ui/integration/controls/Paginator.js +19 -11
- package/src/sap/ui/integration/controls/PaginatorRenderer.js +4 -4
- package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +6 -4
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +8 -6
- 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.js +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.js +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.js +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.js +1 -1
- 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.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.js +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.js +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.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.js +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/index.js +5 -16
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_mk.properties +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.js +5 -3
- 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 +14 -6
- package/src/sap/ui/integration/designtime/editor/CardPreview.js +27 -11
- package/src/sap/ui/integration/designtime/editor/css/CardPreview.css +30 -17
- package/src/sap/ui/integration/editor/Editor.js +23 -25
- 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 +21 -18
- package/src/sap/ui/integration/editor/css/Editor.css +9 -7
- package/src/sap/ui/integration/editor/fields/BaseField.js +27 -7
- package/src/sap/ui/integration/editor/fields/BooleanField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateField.js +5 -5
- package/src/sap/ui/integration/editor/fields/DateTimeField.js +5 -5
- package/src/sap/ui/integration/editor/fields/DestinationField.js +1 -1
- package/src/sap/ui/integration/editor/fields/GroupField.js +11 -13
- package/src/sap/ui/integration/editor/fields/IntegerField.js +5 -5
- package/src/sap/ui/integration/editor/fields/NumberField.js +5 -5
- package/src/sap/ui/integration/editor/fields/ObjectField.js +171 -13
- package/src/sap/ui/integration/editor/fields/ObjectListField.js +2 -1
- package/src/sap/ui/integration/editor/fields/StringField.js +4 -4
- package/src/sap/ui/integration/editor/fields/StringListField.js +1 -1
- package/src/sap/ui/integration/editor/fields/fragment/Controller.js +5 -5
- package/src/sap/ui/integration/editor/fields/viz/ColorSelect.js +2 -3
- package/src/sap/ui/integration/editor/fields/viz/IconSelect.js +12 -8
- 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 +1 -1
- package/src/sap/ui/integration/formatters/IconFormatter.js +5 -5
- package/src/sap/ui/integration/library-bootstrap.js +21 -20
- package/src/sap/ui/integration/library.js +23 -8
- package/src/sap/ui/integration/messagebundle.properties +3 -3
- package/src/sap/ui/integration/messagebundle_ar.properties +2 -0
- package/src/sap/ui/integration/messagebundle_bg.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ca.properties +2 -0
- package/src/sap/ui/integration/messagebundle_cnr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_cs.properties +2 -0
- package/src/sap/ui/integration/messagebundle_cy.properties +2 -0
- package/src/sap/ui/integration/messagebundle_da.properties +2 -0
- package/src/sap/ui/integration/messagebundle_de.properties +2 -0
- package/src/sap/ui/integration/messagebundle_el.properties +2 -0
- package/src/sap/ui/integration/messagebundle_en.properties +157 -0
- package/src/sap/ui/integration/messagebundle_en_GB.properties +2 -0
- package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +154 -152
- package/src/sap/ui/integration/messagebundle_es.properties +2 -0
- package/src/sap/ui/integration/messagebundle_es_MX.properties +2 -0
- package/src/sap/ui/integration/messagebundle_et.properties +2 -0
- package/src/sap/ui/integration/messagebundle_fi.properties +2 -0
- package/src/sap/ui/integration/messagebundle_fr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_fr_CA.properties +2 -0
- package/src/sap/ui/integration/messagebundle_hi.properties +2 -0
- package/src/sap/ui/integration/messagebundle_hr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_hu.properties +2 -0
- package/src/sap/ui/integration/messagebundle_id.properties +2 -0
- package/src/sap/ui/integration/messagebundle_it.properties +2 -0
- package/src/sap/ui/integration/messagebundle_iw.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ja.properties +2 -0
- package/src/sap/ui/integration/messagebundle_kk.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ko.properties +2 -0
- package/src/sap/ui/integration/messagebundle_lt.properties +2 -0
- package/src/sap/ui/integration/messagebundle_lv.properties +2 -0
- package/src/sap/ui/integration/messagebundle_mk.properties +4 -2
- package/src/sap/ui/integration/messagebundle_ms.properties +2 -0
- package/src/sap/ui/integration/messagebundle_nl.properties +2 -0
- package/src/sap/ui/integration/messagebundle_no.properties +2 -0
- package/src/sap/ui/integration/messagebundle_pl.properties +2 -0
- package/src/sap/ui/integration/messagebundle_pt.properties +2 -0
- package/src/sap/ui/integration/messagebundle_pt_PT.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ro.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ru.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sh.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sk.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sl.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sv.properties +2 -0
- package/src/sap/ui/integration/messagebundle_th.properties +2 -0
- package/src/sap/ui/integration/messagebundle_tr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_uk.properties +2 -0
- package/src/sap/ui/integration/messagebundle_vi.properties +2 -0
- package/src/sap/ui/integration/messagebundle_zh_CN.properties +2 -0
- package/src/sap/ui/integration/messagebundle_zh_TW.properties +2 -0
- 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/model/PagingModelListBinding.js +1 -1
- package/src/sap/ui/integration/schemas/sap-card.json +198 -22
- package/src/sap/ui/integration/themes/base/ActionsStrip.less +6 -0
- package/src/sap/ui/integration/themes/base/AnalyticsCloudContent.less +2 -2
- package/src/sap/ui/integration/themes/base/Card.less +5 -0
- package/src/sap/ui/integration/themes/base/ImageWithOverlay.less +47 -0
- package/src/sap/ui/integration/themes/base/ListContentItem.less +12 -0
- package/src/sap/ui/integration/themes/base/ObjectContent.less +20 -2
- package/src/sap/ui/integration/themes/base/{ObjectStatusIcons.less → ObjectStatus.less} +12 -8
- package/src/sap/ui/integration/themes/base/library.source.less +2 -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/CacheAndRequestDataProvider.js +4 -4
- package/src/sap/ui/integration/util/CardMerger.js +4 -4
- package/src/sap/ui/integration/util/CardObserver.js +1 -1
- package/src/sap/ui/integration/util/ComboBoxHelper.js +59 -0
- package/src/sap/ui/integration/util/ContentFactory.js +1 -1
- package/src/sap/ui/integration/util/CsrfTokenHandler.js +130 -148
- package/src/sap/ui/integration/util/DataProvider.js +22 -9
- package/src/sap/ui/integration/util/DataProviderFactory.js +32 -12
- package/src/sap/ui/integration/util/Destinations.js +1 -1
- package/src/sap/ui/integration/util/ErrorHandler.js +3 -2
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
- package/src/sap/ui/integration/util/Form.js +9 -34
- package/src/sap/ui/integration/util/HeaderFactory.js +6 -4
- 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 +22 -7
- package/src/sap/ui/integration/util/ManifestResolver.js +3 -3
- package/src/sap/ui/integration/util/ParameterMap.js +5 -3
- package/src/sap/ui/integration/util/RequestDataProvider.js +27 -22
- 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/Utils.js +1 -1
- package/src/sap/ui/integration/util/Validators.js +1 -1
- package/src/sap/ui/integration/widgets/Card.js +47 -33
- package/src/sap/ui/integration/widgets/CardRenderer.js +6 -1
- package/src/sap-ui-integration.js +19 -17
- package/ui5.yaml +4 -0
- package/LICENSES/BSD-2-Clause.txt +0 -22
|
@@ -7,36 +7,47 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"../library",
|
|
9
9
|
"sap/m/library",
|
|
10
|
-
"sap/ui/core/
|
|
10
|
+
"sap/ui/core/library",
|
|
11
11
|
"sap/ui/core/Control",
|
|
12
|
+
"sap/ui/core/Element",
|
|
12
13
|
"sap/ui/integration/cards/actions/CardActions",
|
|
13
14
|
"sap/ui/integration/util/BindingHelper",
|
|
15
|
+
"sap/ui/integration/util/BindingResolver",
|
|
16
|
+
"sap/ui/model/json/JSONModel",
|
|
14
17
|
"sap/m/Button",
|
|
15
18
|
"sap/ui/integration/controls/LinkWithIcon",
|
|
16
19
|
"sap/m/OverflowToolbarButton",
|
|
17
20
|
"sap/m/OverflowToolbar",
|
|
18
21
|
"sap/m/OverflowToolbarLayoutData",
|
|
19
|
-
"sap/m/ToolbarSpacer"
|
|
22
|
+
"sap/m/ToolbarSpacer",
|
|
23
|
+
"sap/m/Label"
|
|
20
24
|
], function (
|
|
21
25
|
library,
|
|
22
26
|
mLibrary,
|
|
23
|
-
|
|
27
|
+
coreLibrary,
|
|
24
28
|
Control,
|
|
29
|
+
Element,
|
|
25
30
|
CardActions,
|
|
26
31
|
BindingHelper,
|
|
32
|
+
BindingResolver,
|
|
33
|
+
JSONModel,
|
|
27
34
|
Button,
|
|
28
35
|
LinkWithIcon,
|
|
29
36
|
OverflowToolbarButton,
|
|
30
37
|
OverflowToolbar,
|
|
31
38
|
OverflowToolbarLayoutData,
|
|
32
|
-
ToolbarSpacer
|
|
39
|
+
ToolbarSpacer,
|
|
40
|
+
Label
|
|
33
41
|
) {
|
|
34
42
|
"use strict";
|
|
35
43
|
|
|
36
|
-
|
|
37
|
-
|
|
44
|
+
const ToolbarStyle = mLibrary.ToolbarStyle;
|
|
45
|
+
const ToolbarDesign = mLibrary.ToolbarDesign;
|
|
38
46
|
|
|
39
|
-
|
|
47
|
+
const AriaHasPopup = coreLibrary.aria.HasPopup;
|
|
48
|
+
|
|
49
|
+
const ActionArea = library.CardActionArea;
|
|
50
|
+
const CardActionType = library.CardActionType;
|
|
40
51
|
|
|
41
52
|
/**
|
|
42
53
|
* Constructor for a new ActionsStrip.
|
|
@@ -49,7 +60,7 @@ sap.ui.define([
|
|
|
49
60
|
* @extends sap.ui.core.Control
|
|
50
61
|
*
|
|
51
62
|
* @author SAP SE
|
|
52
|
-
* @version 1.
|
|
63
|
+
* @version 1.121.1
|
|
53
64
|
*
|
|
54
65
|
* @constructor
|
|
55
66
|
* @private
|
|
@@ -63,6 +74,12 @@ sap.ui.define([
|
|
|
63
74
|
disableItemsInitially: {
|
|
64
75
|
type: "boolean",
|
|
65
76
|
defaultValue: false
|
|
77
|
+
},
|
|
78
|
+
configuration: {
|
|
79
|
+
type: "object"
|
|
80
|
+
},
|
|
81
|
+
cardActions: {
|
|
82
|
+
type: "object"
|
|
66
83
|
}
|
|
67
84
|
},
|
|
68
85
|
aggregations: {
|
|
@@ -99,6 +116,12 @@ sap.ui.define([
|
|
|
99
116
|
}
|
|
100
117
|
});
|
|
101
118
|
|
|
119
|
+
ActionsStrip.prototype.onDataChanged = function () {
|
|
120
|
+
if (this.getConfiguration()?.item) {
|
|
121
|
+
this._updateToolbar(this._createItemsFromTemplate(this.getBindingContext().getProperty(this.getConfiguration().item?.path)));
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
102
125
|
ActionsStrip.prototype._getToolbar = function () {
|
|
103
126
|
var oToolbar = this.getAggregation("_toolbar");
|
|
104
127
|
if (!oToolbar) {
|
|
@@ -112,77 +135,110 @@ sap.ui.define([
|
|
|
112
135
|
return oToolbar;
|
|
113
136
|
};
|
|
114
137
|
|
|
115
|
-
ActionsStrip.prototype.
|
|
116
|
-
if (!
|
|
138
|
+
ActionsStrip.prototype._updateToolbar = function (aItemsConfigs) {
|
|
139
|
+
if (!aItemsConfigs || !aItemsConfigs.length) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const oToolbar = this._getToolbar();
|
|
144
|
+
|
|
145
|
+
aItemsConfigs.forEach((oItemConfig) => {
|
|
146
|
+
oToolbar.addContent(this._createItem(oItemConfig));
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
const bHasSpacer = oToolbar.getContent().find((oItem) => oItem instanceof ToolbarSpacer);
|
|
150
|
+
|
|
151
|
+
if (!bHasSpacer) {
|
|
152
|
+
oToolbar.insertContent(new ToolbarSpacer(), 0);
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
ActionsStrip.prototype._createItems = function (aItems) {
|
|
157
|
+
if (!aItems || !aItems.length) {
|
|
117
158
|
return null;
|
|
118
159
|
}
|
|
119
160
|
|
|
120
|
-
|
|
121
|
-
oCard = Core.byId(this.getCard()),
|
|
122
|
-
oActions = new CardActions({
|
|
123
|
-
card: oCard
|
|
124
|
-
}),
|
|
125
|
-
bHasSpacer = false,
|
|
126
|
-
mActionsConfig;
|
|
161
|
+
const oCard = Element.getElementById(this.getCard());
|
|
127
162
|
|
|
128
|
-
|
|
163
|
+
aItems = BindingHelper.createBindingInfos(aItems, oCard.getBindingNamespaces());
|
|
129
164
|
|
|
130
|
-
|
|
165
|
+
return aItems;
|
|
166
|
+
};
|
|
131
167
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
168
|
+
ActionsStrip.prototype._createItemsFromTemplate = function (aData) {
|
|
169
|
+
if (!aData || !aData.length) {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
138
172
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
group: mConfig.overflowGroup,
|
|
142
|
-
priority: mConfig.overflowPriority
|
|
143
|
-
}),
|
|
144
|
-
oControl;
|
|
173
|
+
const oItemConfiguration = this.getConfiguration().item;
|
|
174
|
+
let sPath = oItemConfiguration.path + "/";
|
|
145
175
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
default:
|
|
152
|
-
oControl = this._createButton(mConfig);
|
|
153
|
-
break;
|
|
176
|
+
if (!BindingHelper.isAbsolutePath(sPath)) {
|
|
177
|
+
sPath = this.getBindingContext().getPath();
|
|
178
|
+
|
|
179
|
+
if (sPath !== "/") {
|
|
180
|
+
sPath += "/";
|
|
154
181
|
}
|
|
155
182
|
|
|
156
|
-
|
|
183
|
+
sPath += oItemConfiguration.path + "/";
|
|
184
|
+
}
|
|
157
185
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
control: oControl,
|
|
161
|
-
actions: aActions,
|
|
162
|
-
enabledPropertyName: "enabled"
|
|
163
|
-
};
|
|
186
|
+
const oParentData = this.getBindingContext().getProperty();
|
|
187
|
+
this.setModel(new JSONModel(oParentData), "parent");
|
|
164
188
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
189
|
+
return aData.map((oItemData, i) => {
|
|
190
|
+
return BindingResolver.resolveValue(oItemConfiguration.template, this, sPath + i);
|
|
191
|
+
});
|
|
192
|
+
};
|
|
170
193
|
|
|
171
|
-
|
|
194
|
+
ActionsStrip.prototype._createItem = function (oConfig) {
|
|
195
|
+
let oItem;
|
|
172
196
|
|
|
173
|
-
|
|
174
|
-
|
|
197
|
+
switch (oConfig.type) {
|
|
198
|
+
case "Label":
|
|
199
|
+
oItem = this._createLabel(oConfig);
|
|
200
|
+
break;
|
|
201
|
+
case "ToolbarSpacer":
|
|
202
|
+
return new ToolbarSpacer();
|
|
203
|
+
case "Link":
|
|
204
|
+
oItem = this._createLink(oConfig);
|
|
205
|
+
break;
|
|
206
|
+
case "Button":
|
|
207
|
+
default:
|
|
208
|
+
oItem = this._createButton(oConfig);
|
|
209
|
+
}
|
|
175
210
|
|
|
176
|
-
|
|
177
|
-
|
|
211
|
+
oItem.setLayoutData(new OverflowToolbarLayoutData({
|
|
212
|
+
group: oConfig.overflowGroup,
|
|
213
|
+
priority: oConfig.overflowPriority
|
|
214
|
+
}));
|
|
215
|
+
|
|
216
|
+
const oActionsConfig = {
|
|
217
|
+
area: ActionArea.ActionsStrip,
|
|
218
|
+
control: oItem,
|
|
219
|
+
actions: oConfig.actions,
|
|
220
|
+
enabledPropertyName: "enabled"
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
if (this.getDisableItemsInitially()) {
|
|
224
|
+
oActionsConfig.enabledPropertyValue = false;
|
|
225
|
+
oItem._mActionsConfig = oActionsConfig;
|
|
226
|
+
oItem._bIsDisabled = true;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if (oConfig.type !== "Label") {
|
|
230
|
+
this.getCardActions().attach(oActionsConfig);
|
|
178
231
|
}
|
|
232
|
+
|
|
233
|
+
return oItem;
|
|
179
234
|
};
|
|
180
235
|
|
|
181
236
|
ActionsStrip.prototype.disableItems = function () {
|
|
182
237
|
var aItems = this._getToolbar().getContent();
|
|
183
238
|
|
|
239
|
+
// TODO: find better way to disable the items
|
|
184
240
|
aItems.forEach(function (oItem) {
|
|
185
|
-
if (oItem.setEnabled && !oItem._bIsDisabled) {
|
|
241
|
+
if (oItem.setEnabled && !oItem._bIsDisabled && oItem.getEnabled()) {
|
|
186
242
|
oItem.setEnabled(false);
|
|
187
243
|
oItem._bIsDisabled = true;
|
|
188
244
|
}
|
|
@@ -191,15 +247,15 @@ sap.ui.define([
|
|
|
191
247
|
|
|
192
248
|
ActionsStrip.prototype.enableItems = function () {
|
|
193
249
|
var aItems = this._getToolbar().getContent(),
|
|
194
|
-
oActions = this._oActions,
|
|
195
250
|
mActionsConfig;
|
|
196
251
|
|
|
197
|
-
|
|
252
|
+
// TODO: find better way to enable the items
|
|
253
|
+
aItems.forEach((oItem) => {
|
|
198
254
|
if (oItem.setEnabled && oItem._bIsDisabled) {
|
|
199
255
|
mActionsConfig = oItem._mActionsConfig;
|
|
200
|
-
if (mActionsConfig
|
|
256
|
+
if (mActionsConfig?.action) {
|
|
201
257
|
mActionsConfig.enabledPropertyValue = true;
|
|
202
|
-
|
|
258
|
+
this.getCardActions()._setControlEnabledState(mActionsConfig);
|
|
203
259
|
} else {
|
|
204
260
|
oItem.setEnabled(true);
|
|
205
261
|
}
|
|
@@ -209,12 +265,21 @@ sap.ui.define([
|
|
|
209
265
|
});
|
|
210
266
|
};
|
|
211
267
|
|
|
268
|
+
ActionsStrip.prototype._createLabel = function (mConfig) {
|
|
269
|
+
var oLabel = new Label({
|
|
270
|
+
text: mConfig.text,
|
|
271
|
+
visible: mConfig.visible
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
return oLabel;
|
|
275
|
+
};
|
|
276
|
+
|
|
212
277
|
ActionsStrip.prototype._createLink = function (mConfig) {
|
|
213
278
|
var oLink = new LinkWithIcon({
|
|
214
279
|
icon: mConfig.icon,
|
|
215
280
|
text: mConfig.text,
|
|
216
281
|
tooltip: mConfig.tooltip,
|
|
217
|
-
ariaHasPopup: mConfig.ariaHasPopup,
|
|
282
|
+
ariaHasPopup: mConfig.ariaHasPopup ?? this._getAriaHasPopup(mConfig),
|
|
218
283
|
emphasized: mConfig.emphasized,
|
|
219
284
|
visible: mConfig.visible
|
|
220
285
|
});
|
|
@@ -223,45 +288,85 @@ sap.ui.define([
|
|
|
223
288
|
};
|
|
224
289
|
|
|
225
290
|
ActionsStrip.prototype._createButton = function (mConfig) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
if (mConfig.icon) {
|
|
229
|
-
oButton = new OverflowToolbarButton({
|
|
230
|
-
icon: mConfig.icon,
|
|
231
|
-
text: mConfig.text || mConfig.tooltip,
|
|
232
|
-
tooltip: mConfig.tooltip || mConfig.text,
|
|
233
|
-
type: mConfig.buttonType,
|
|
234
|
-
ariaHasPopup: mConfig.ariaHasPopup,
|
|
235
|
-
visible: mConfig.visible
|
|
236
|
-
});
|
|
291
|
+
const vAriaHasPopup = mConfig.ariaHasPopup ?? this._getAriaHasPopup(mConfig);
|
|
237
292
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
oButton = new Button({
|
|
293
|
+
const mButtonSettings = {
|
|
294
|
+
icon: mConfig.icon,
|
|
242
295
|
text: mConfig.text,
|
|
243
296
|
tooltip: mConfig.tooltip,
|
|
244
297
|
type: mConfig.buttonType,
|
|
245
|
-
ariaHasPopup:
|
|
298
|
+
ariaHasPopup: vAriaHasPopup,
|
|
246
299
|
visible: mConfig.visible
|
|
247
|
-
}
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
// @todo this will not work well if text is set to binding which later resolves to an empty string
|
|
303
|
+
if (mConfig.icon && (mConfig.preferIcon || !mConfig.text)) {
|
|
304
|
+
mButtonSettings.text = mConfig.text || mConfig.tooltip;
|
|
305
|
+
mButtonSettings.tooltip = mConfig.tooltip || mConfig.text;
|
|
306
|
+
|
|
307
|
+
return new OverflowToolbarButton(mButtonSettings);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return new Button(mButtonSettings);
|
|
311
|
+
};
|
|
248
312
|
|
|
249
|
-
|
|
313
|
+
/**
|
|
314
|
+
* Checks the correct value for ariaHasPopup for the given item configuration.
|
|
315
|
+
* Note: Only checks the first action since we support only one action for now.
|
|
316
|
+
* Note: If custom action opens a popup - the custom action developer is responsible to add the ariaHasPopup property.
|
|
317
|
+
* @param {map} mConfig The config for the item.
|
|
318
|
+
* @returns {sap.ui.core.aria.HasPopup|null} True if the item opens a popup. False otherwise.
|
|
319
|
+
*/
|
|
320
|
+
ActionsStrip.prototype._getAriaHasPopup = function (mConfig) {
|
|
321
|
+
const aActions = mConfig.actions;
|
|
322
|
+
|
|
323
|
+
if (aActions?.length > 0 && aActions[0].type === CardActionType.ShowCard) {
|
|
324
|
+
return AriaHasPopup.Dialog;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
return null;
|
|
250
328
|
};
|
|
251
329
|
|
|
252
|
-
ActionsStrip.create = function (
|
|
253
|
-
if (!
|
|
330
|
+
ActionsStrip.create = function (oConfiguration, oCard, bDisableItemsInitially) {
|
|
331
|
+
if (!oConfiguration) {
|
|
254
332
|
return null;
|
|
255
333
|
}
|
|
256
334
|
|
|
257
|
-
|
|
335
|
+
const oActionsStrip = new ActionsStrip({
|
|
258
336
|
card: oCard,
|
|
337
|
+
configuration: oConfiguration,
|
|
338
|
+
cardActions: new CardActions({
|
|
339
|
+
card: oCard
|
|
340
|
+
}),
|
|
259
341
|
disableItemsInitially: bDisableItemsInitially
|
|
260
342
|
});
|
|
261
|
-
|
|
343
|
+
|
|
344
|
+
if (Array.isArray(oConfiguration)) {
|
|
345
|
+
oActionsStrip._updateToolbar(oActionsStrip._createItems(oConfiguration));
|
|
346
|
+
}
|
|
262
347
|
|
|
263
348
|
return oActionsStrip;
|
|
264
349
|
};
|
|
265
350
|
|
|
351
|
+
ActionsStrip.hasVisibleTemplateItems = function (oConfiguration, oContent) {
|
|
352
|
+
const vActionsStrip = oConfiguration;
|
|
353
|
+
|
|
354
|
+
if (!Array.isArray(vActionsStrip)) {
|
|
355
|
+
//@todo fix this case
|
|
356
|
+
return false;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
const vResolvedConfig = BindingResolver.resolveValue(vActionsStrip, oContent);
|
|
360
|
+
|
|
361
|
+
return vResolvedConfig.some((oItem) => !oItem.hasOwnProperty("visible") || !!oItem.visible);
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
ActionsStrip.prototype.hasVisibleItems = function () {
|
|
365
|
+
const oToolbar = this._getToolbar(),
|
|
366
|
+
aContent = oToolbar.getContent();
|
|
367
|
+
|
|
368
|
+
return aContent.some((oItem) => !(oItem instanceof ToolbarSpacer) && oItem.getVisible());
|
|
369
|
+
};
|
|
370
|
+
|
|
266
371
|
return ActionsStrip;
|
|
267
372
|
});
|
|
@@ -10,27 +10,27 @@ sap.ui.define([
|
|
|
10
10
|
"sap/base/strings/capitalize",
|
|
11
11
|
"sap/ui/core/Control",
|
|
12
12
|
"sap/m/library",
|
|
13
|
+
"sap/ui/core/Element",
|
|
14
|
+
"sap/ui/core/Lib",
|
|
13
15
|
"sap/ui/core/library",
|
|
14
16
|
"sap/m/Button",
|
|
15
17
|
"sap/m/ActionSheet",
|
|
16
18
|
"sap/ui/base/ManagedObjectObserver",
|
|
17
|
-
"sap/ui/core/Core",
|
|
18
19
|
"sap/ui/integration/cards/actions/CardActions"
|
|
19
|
-
|
|
20
|
-
], function (
|
|
20
|
+
], function(
|
|
21
21
|
ActionsToolbarRenderer,
|
|
22
22
|
capitalize,
|
|
23
23
|
Control,
|
|
24
24
|
mLibrary,
|
|
25
|
+
Element,
|
|
26
|
+
Library,
|
|
25
27
|
coreLibrary,
|
|
26
28
|
Button,
|
|
27
29
|
ActionSheet,
|
|
28
30
|
ManagedObjectObserver,
|
|
29
|
-
Core,
|
|
30
31
|
CardActions
|
|
31
32
|
) {
|
|
32
33
|
"use strict";
|
|
33
|
-
/* global Map */
|
|
34
34
|
|
|
35
35
|
var ButtonType = mLibrary.ButtonType;
|
|
36
36
|
|
|
@@ -76,7 +76,7 @@ sap.ui.define([
|
|
|
76
76
|
* @extends sap.ui.core.Control
|
|
77
77
|
*
|
|
78
78
|
* @author SAP SE
|
|
79
|
-
* @version 1.
|
|
79
|
+
* @version 1.121.1
|
|
80
80
|
*
|
|
81
81
|
* @constructor
|
|
82
82
|
* @private
|
|
@@ -156,6 +156,9 @@ sap.ui.define([
|
|
|
156
156
|
aActions = aActions.concat(oHost.getActions() || []);
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
/**
|
|
160
|
+
* @deprecated As of version 1.85
|
|
161
|
+
*/
|
|
159
162
|
if (oExtension) {
|
|
160
163
|
aActions = aActions.concat(oExtension.getActions() || []);
|
|
161
164
|
}
|
|
@@ -190,7 +193,7 @@ sap.ui.define([
|
|
|
190
193
|
};
|
|
191
194
|
|
|
192
195
|
ActionsToolbar.prototype._getToolbar = function () {
|
|
193
|
-
var oResourceBundle =
|
|
196
|
+
var oResourceBundle = Library.getResourceBundleFor("sap.ui.integration");
|
|
194
197
|
var oToolbar = this.getAggregation('_toolbar');
|
|
195
198
|
if (!oToolbar) {
|
|
196
199
|
oToolbar = new Button({
|
|
@@ -306,7 +309,7 @@ sap.ui.define([
|
|
|
306
309
|
this._mActionObservers.set(oActionDefinition.getId(), oActionObserver);
|
|
307
310
|
this._updateVisibility();
|
|
308
311
|
} else if (oChanges.mutation === "remove") {
|
|
309
|
-
|
|
312
|
+
Element.getElementById(oActionDefinition.getAssociation("_menuButton")).destroy();
|
|
310
313
|
this._mActionObservers.get(oActionDefinition.getId()).disconnect();
|
|
311
314
|
this._mActionObservers.delete(oActionDefinition.getId());
|
|
312
315
|
}
|
|
@@ -315,7 +318,7 @@ sap.ui.define([
|
|
|
315
318
|
ActionsToolbar.prototype._observeSingleAction = function (oChanges) {
|
|
316
319
|
var oActionDefinition = oChanges.object,
|
|
317
320
|
sName = oChanges.name,
|
|
318
|
-
oButton =
|
|
321
|
+
oButton = Element.getElementById(oActionDefinition.getAssociation("_menuButton")),
|
|
319
322
|
vVal = oChanges.current;
|
|
320
323
|
|
|
321
324
|
if (["type", "parameters"].indexOf(sName) !== -1) {
|
|
@@ -16,10 +16,10 @@ sap.ui.define([
|
|
|
16
16
|
"sap/m/Title",
|
|
17
17
|
"sap/m/Text",
|
|
18
18
|
"sap/ui/Device",
|
|
19
|
-
"sap/ui/core/Core",
|
|
20
|
-
"sap/ui/core/Configuration",
|
|
21
19
|
"sap/ui/core/Control",
|
|
22
|
-
"sap/ui/core/
|
|
20
|
+
"sap/ui/core/Lib",
|
|
21
|
+
"sap/ui/core/library",
|
|
22
|
+
"sap/ui/core/Supportability"
|
|
23
23
|
], function (
|
|
24
24
|
library,
|
|
25
25
|
Log,
|
|
@@ -32,10 +32,10 @@ sap.ui.define([
|
|
|
32
32
|
Title,
|
|
33
33
|
Text,
|
|
34
34
|
Device,
|
|
35
|
-
Core,
|
|
36
|
-
Configuration,
|
|
37
35
|
Control,
|
|
38
|
-
|
|
36
|
+
Library,
|
|
37
|
+
coreLibrary,
|
|
38
|
+
Supportability
|
|
39
39
|
) {
|
|
40
40
|
"use strict";
|
|
41
41
|
|
|
@@ -53,7 +53,7 @@ sap.ui.define([
|
|
|
53
53
|
* @extends sap.ui.core.Control
|
|
54
54
|
*
|
|
55
55
|
* @author SAP SE
|
|
56
|
-
* @version 1.
|
|
56
|
+
* @version 1.121.1
|
|
57
57
|
*
|
|
58
58
|
* @constructor
|
|
59
59
|
* @private
|
|
@@ -98,6 +98,14 @@ sap.ui.define([
|
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
aggregations: {
|
|
101
|
+
additionalContent: {
|
|
102
|
+
type: "sap.m.Button",
|
|
103
|
+
multiple: true,
|
|
104
|
+
forwarding: {
|
|
105
|
+
getter: "_getIllustratedMessage",
|
|
106
|
+
aggregation: "additionalContent"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
101
109
|
_illustratedMessage: {
|
|
102
110
|
type: "sap.m.IllustratedMessage",
|
|
103
111
|
multiple: false
|
|
@@ -158,15 +166,6 @@ sap.ui.define([
|
|
|
158
166
|
sIllustratedMessageType = sIllustratedMessageType || IllustratedMessageType.NoData;
|
|
159
167
|
}
|
|
160
168
|
|
|
161
|
-
oCard._oContentMessage = {
|
|
162
|
-
type: mSettings.type === CardBlockingMessageType.NoData ? "noData" : "error",
|
|
163
|
-
illustrationType: sIllustratedMessageType,
|
|
164
|
-
illustrationSize: sIllustratedMessageSize,
|
|
165
|
-
title: sTitle,
|
|
166
|
-
description: sDescription,
|
|
167
|
-
details: sDetails
|
|
168
|
-
};
|
|
169
|
-
|
|
170
169
|
if (oCard.getCardContent() && oCard.getCardContent().getDomRef()) {
|
|
171
170
|
sBoxHeight = oCard.getCardContent().getDomRef().offsetHeight + "px";
|
|
172
171
|
}
|
|
@@ -178,49 +177,54 @@ sap.ui.define([
|
|
|
178
177
|
illustrationSize: sIllustratedMessageSize,
|
|
179
178
|
title: sTitle,
|
|
180
179
|
description: sDescription,
|
|
181
|
-
httpResponse: mSettings.httpResponse
|
|
180
|
+
httpResponse: mSettings.httpResponse,
|
|
181
|
+
details: sDetails,
|
|
182
|
+
additionalContent: BlockingMessage._createButtons(mSettings.additionalContent)
|
|
182
183
|
});
|
|
183
184
|
|
|
184
|
-
if (sDetails &&
|
|
185
|
-
oBlockingMessage.
|
|
186
|
-
|
|
187
|
-
Log.error(sDetails);
|
|
185
|
+
if (sDetails && Supportability.isDebugModeEnabled()) {
|
|
186
|
+
oBlockingMessage.addAdditionalContent(BlockingMessage._createDetailsButton(sDetails));
|
|
187
|
+
|
|
188
|
+
Log.error(sDetails); // @todo logging should happen at different place
|
|
188
189
|
}
|
|
189
190
|
|
|
190
191
|
return oBlockingMessage;
|
|
191
192
|
};
|
|
192
193
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
BlockingMessage.prototype.onBeforeRendering = function () {
|
|
201
|
-
var oIllustratedMessage = this.getAggregation("_illustratedMessage");
|
|
202
|
-
|
|
203
|
-
oIllustratedMessage
|
|
204
|
-
.setIllustrationType(this.getIllustrationType())
|
|
205
|
-
.setIllustrationSize(this.getIllustrationSize())
|
|
206
|
-
.setTitle(this.getTitle())
|
|
207
|
-
.setDescription(this.getDescription())
|
|
208
|
-
.destroyAdditionalContent();
|
|
194
|
+
/**
|
|
195
|
+
* Static method which creates all the buttons from the additionalContent settings.
|
|
196
|
+
* @param {array} aAdditionalContentSettings The additionalContent settings.
|
|
197
|
+
* @returns {sap.m.Button[]} An array of buttons.
|
|
198
|
+
*/
|
|
199
|
+
BlockingMessage._createButtons = function (aAdditionalContentSettings) {
|
|
200
|
+
const aButtons = aAdditionalContentSettings || [];
|
|
209
201
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
202
|
+
return aButtons.map((mButtonSettings) => {
|
|
203
|
+
return new Button({
|
|
204
|
+
text: mButtonSettings.text,
|
|
205
|
+
icon: mButtonSettings.icon,
|
|
206
|
+
tooltip: mButtonSettings.tooltip,
|
|
207
|
+
type: mButtonSettings.buttonType,
|
|
208
|
+
ariaHasPopup: mButtonSettings.ariaHasPopup,
|
|
209
|
+
press: mButtonSettings.press
|
|
210
|
+
});
|
|
211
|
+
});
|
|
213
212
|
};
|
|
214
213
|
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
/**
|
|
215
|
+
* Static method which creates the button to show additional details in a dialog.
|
|
216
|
+
* @param {string} sDetails The details.
|
|
217
|
+
* @returns {sap.m.Button} The button.
|
|
218
|
+
*/
|
|
219
|
+
BlockingMessage._createDetailsButton = function (sDetails) {
|
|
220
|
+
var oRb = Library.getResourceBundleFor("sap.ui.integration");
|
|
217
221
|
|
|
218
222
|
return new Button({
|
|
219
223
|
text: oRb.getText("CARD_BUTTON_SHOW_MORE"),
|
|
220
224
|
press: function () {
|
|
221
225
|
var oText = new Text({
|
|
222
226
|
renderWhitespace: true,
|
|
223
|
-
text:
|
|
227
|
+
text: sDetails
|
|
224
228
|
}).addStyleClass("sapUiSmallMargin");
|
|
225
229
|
|
|
226
230
|
var oDialog = new Dialog({
|
|
@@ -259,9 +263,54 @@ sap.ui.define([
|
|
|
259
263
|
});
|
|
260
264
|
|
|
261
265
|
oDialog.open();
|
|
262
|
-
}
|
|
266
|
+
}
|
|
263
267
|
});
|
|
264
268
|
};
|
|
265
269
|
|
|
270
|
+
BlockingMessage.prototype.onBeforeRendering = function () {
|
|
271
|
+
var oIllustratedMessage = this._getIllustratedMessage();
|
|
272
|
+
|
|
273
|
+
oIllustratedMessage
|
|
274
|
+
.setIllustrationType(this.getIllustrationType())
|
|
275
|
+
.setIllustrationSize(this.getIllustrationSize())
|
|
276
|
+
.setTitle(this.getTitle())
|
|
277
|
+
.setDescription(this.getDescription());
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Creates lazily the illustrated message which is shown.
|
|
282
|
+
* @returns {sap.m.IllustratedMessage} The illustrated message.
|
|
283
|
+
*/
|
|
284
|
+
BlockingMessage.prototype._getIllustratedMessage = function () {
|
|
285
|
+
let oIllustratedMessage = this.getAggregation("_illustratedMessage");
|
|
286
|
+
|
|
287
|
+
if (!oIllustratedMessage) {
|
|
288
|
+
oIllustratedMessage = new IllustratedMessage({
|
|
289
|
+
enableDefaultTitleAndDescription: false,
|
|
290
|
+
enableVerticalResponsiveness: true
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
this.setAggregation("_illustratedMessage", oIllustratedMessage);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
return oIllustratedMessage;
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* @private
|
|
301
|
+
* @ui5-restricted sap.ui.integration
|
|
302
|
+
* @returns {Object} The static configuration for the blocking message
|
|
303
|
+
*/
|
|
304
|
+
BlockingMessage.prototype.getStaticConfiguration = function () {
|
|
305
|
+
return {
|
|
306
|
+
type: this.getType() === CardBlockingMessageType.NoData ? "noData" : "error",
|
|
307
|
+
illustrationType: this.getIllustrationType(),
|
|
308
|
+
illustrationSize: this.getIllustrationSize(),
|
|
309
|
+
title: this.getTitle(),
|
|
310
|
+
description: this.getDescription() ? this.getDescription() : undefined,
|
|
311
|
+
details: this.getDetails() ? this.getDetails() : undefined
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
|
|
266
315
|
return BlockingMessage;
|
|
267
316
|
});
|