@openui5/sap.ui.mdc 1.141.2 → 1.143.0
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/README.md +2 -2
- package/REUSE.toml +39 -1
- package/THIRDPARTY.txt +36 -3
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +89 -63
- package/src/sap/ui/mdc/Chart.js +1 -1
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/DefaultTypeMap.js +1 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +31 -8
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterField.js +11 -11
- package/src/sap/ui/mdc/Geomap.js +571 -0
- package/src/sap/ui/mdc/GeomapDelegate.js +285 -0
- package/src/sap/ui/mdc/GeomapRenderer.js +76 -0
- package/src/sap/ui/mdc/Link.js +1 -1
- package/src/sap/ui/mdc/MultiValueField.js +7 -7
- package/src/sap/ui/mdc/Table.js +141 -116
- package/src/sap/ui/mdc/TableDelegate.js +3 -2
- package/src/sap/ui/mdc/ValueHelp.js +1 -1
- package/src/sap/ui/mdc/ValueHelpDelegate.js +4 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
- package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +1 -1
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/chart/ToolbarControlFactory.js +1 -1
- package/src/sap/ui/mdc/chart/Util.js +5 -2
- package/src/sap/ui/mdc/condition/Condition.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +1 -1
- package/src/sap/ui/mdc/condition/Operator.js +1 -1
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +1 -1
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/geomap/Geomap.designtime.js +23 -0
- package/src/sap/ui/mdc/enums/GeomapControlPosition.js +46 -0
- package/src/sap/ui/mdc/enums/TableActionPosition.js +123 -0
- package/src/sap/ui/mdc/enums/TablePopinDisplay.js +36 -0
- package/src/sap/ui/mdc/field/ConditionType.js +1 -1
- package/src/sap/ui/mdc/field/ConditionTypeMixin.js +1 -1
- package/src/sap/ui/mdc/field/ConditionsType.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +1 -1
- package/src/sap/ui/mdc/field/FieldBase.js +137 -66
- package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldSelect.js +7 -1
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldDelegate.js +22 -0
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/TokenDisplay.js +1 -1
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +3 -0
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +35 -1
- package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +3 -0
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +1 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/SortFlex.js +12 -5
- package/src/sap/ui/mdc/flexibility/Table.flexibility.js +17 -11
- package/src/sap/ui/mdc/flexibility/actiontoolbar/CombineAction.js +1 -1
- package/src/sap/ui/mdc/flexibility/actiontoolbar/SplitAction.js +1 -1
- package/src/sap/ui/mdc/flexibility/helpers/getAffectedSorter.js +25 -0
- package/src/sap/ui/mdc/geomap/Item.js +48 -0
- package/src/sap/ui/mdc/geomap/PropertyHelper.js +70 -0
- package/src/sap/ui/mdc/library.js +19 -4
- package/src/sap/ui/mdc/link/Factory.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +1 -1
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/messagebundle.properties +15 -1
- package/src/sap/ui/mdc/messagebundle_ar.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_bg.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_ca.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_cnr.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_cs.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_cy.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_da.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_de.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_el.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_en.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +12 -1
- package/src/sap/ui/mdc/messagebundle_es.properties +10 -2
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_et.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_fi.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_fr.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_hi.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_hr.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_hu.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_id.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_it.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_iw.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_ja.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_kk.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_ko.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_lt.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_lv.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_mk.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_ms.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_nl.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_no.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_pl.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_pt.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_ro.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_ru.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_sh.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_sk.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_sl.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_sr.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_sv.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_th.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_tr.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_uk.properties +8 -0
- package/src/sap/ui/mdc/messagebundle_vi.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +9 -1
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +8 -0
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/FilterBarLayoutMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
- package/src/sap/ui/mdc/odata/TypeMap.js +1 -1
- package/src/sap/ui/mdc/odata/v4/GeomapDelegate.js +60 -0
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +53 -2
- package/src/sap/ui/mdc/odata/v4/TypeMap.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +16 -0
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/StateUtil.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +3 -0
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnFreezeController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ShowDetailsController.js +1 -1
- package/src/sap/ui/mdc/rules/Table.support.js +149 -118
- package/src/sap/ui/mdc/table/ActionLayoutData.js +47 -0
- package/src/sap/ui/mdc/table/Column.js +40 -186
- package/src/sap/ui/mdc/table/ColumnSettings.js +1 -1
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/DragDropConfig.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +35 -21
- package/src/sap/ui/mdc/table/ODataV4PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +1 -1
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +97 -14
- package/src/sap/ui/mdc/table/RowActionItem.js +1 -1
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableSettings.js +34 -7
- package/src/sap/ui/mdc/table/TableTypeBase.js +38 -7
- package/src/sap/ui/mdc/table/utils/Personalization.js +1 -1
- package/src/sap/ui/mdc/themes/base/Geomap.less +50 -0
- package/src/sap/ui/mdc/ushell/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/ushell/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/ushell/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/util/InfoBar.js +1 -1
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelperUtil.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +2 -2
- package/src/sap/ui/mdc/valuehelp/FilterBar.js +22 -3
- package/src/sap/ui/mdc/valuehelp/Popover.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/Container.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/DefineConditionPanel.js +140 -26
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +4 -3
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/FixedListItem.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +7 -5
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +36 -0
- package/test/sap/ui/mdc/testutils/opa/filterfield/Actions.js +20 -3
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +33 -1
|
@@ -0,0 +1,571 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2025 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/core/Lib",
|
|
9
|
+
"sap/ui/mdc/Control",
|
|
10
|
+
"./GeomapRenderer",
|
|
11
|
+
"sap/base/Log",
|
|
12
|
+
"sap/ui/mdc/ActionToolbar",
|
|
13
|
+
"./geomap/PropertyHelper",
|
|
14
|
+
"sap/ui/mdc/mixin/FilterIntegrationMixin",
|
|
15
|
+
"sap/ui/model/base/ManagedObjectModel",
|
|
16
|
+
"sap/ui/mdc/p13n/subcontroller/FilterController",
|
|
17
|
+
"sap/ui/base/ManagedObjectObserver"
|
|
18
|
+
],
|
|
19
|
+
(
|
|
20
|
+
Library,
|
|
21
|
+
Control,
|
|
22
|
+
GeomapRenderer,
|
|
23
|
+
Log,
|
|
24
|
+
ActionToolbar,
|
|
25
|
+
PropertyHelper,
|
|
26
|
+
FilterIntegrationMixin,
|
|
27
|
+
ManagedObjectModel,
|
|
28
|
+
FilterController,
|
|
29
|
+
ManagedObjectObserver
|
|
30
|
+
) => {
|
|
31
|
+
"use strict";
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Constructor for a new GeoMap.
|
|
35
|
+
*
|
|
36
|
+
* @param {string} [sId] ID for the new control, generated automatically if no id is given
|
|
37
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
38
|
+
*
|
|
39
|
+
* @class The <code>Geomap</code> control creates a geomap based on metadata and the configuration specified.<br>
|
|
40
|
+
* <b>Note:</b> The geomap needs to be created inside the <code>GeomapDelegate</code>.
|
|
41
|
+
* @extends sap.ui.mdc.Control
|
|
42
|
+
* @borrows sap.ui.mdc.mixin.FilterIntegrationMixin.rebind as #rebind
|
|
43
|
+
* @author SAP SE
|
|
44
|
+
* @version 1.143.0
|
|
45
|
+
* @constructor
|
|
46
|
+
*
|
|
47
|
+
* @public
|
|
48
|
+
*
|
|
49
|
+
* @alias sap.ui.mdc.Geomap
|
|
50
|
+
* @see {@link topic:1dd2aa91115d43409452a271d11be95b sap.ui.mdc}
|
|
51
|
+
* @ui5-experimental-since 1.142
|
|
52
|
+
*/
|
|
53
|
+
const Geomap = Control.extend("sap.ui.mdc.Geomap", /** @lends sap.ui.mdc.Geomp.prototype */ {
|
|
54
|
+
metadata: {
|
|
55
|
+
library: "sap.ui.mdc",
|
|
56
|
+
designtime: "sap/ui/mdc/designtime/geomap/Geomap.designtime",
|
|
57
|
+
interfaces: [
|
|
58
|
+
"sap.ui.mdc.IFilterSource", "sap.ui.mdc.IxState"
|
|
59
|
+
],
|
|
60
|
+
defaultAggregation: "items",
|
|
61
|
+
properties: {
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Defines the width of the geomap.
|
|
65
|
+
*/
|
|
66
|
+
width: {
|
|
67
|
+
type: "sap.ui.core.CSSSize",
|
|
68
|
+
group: "Dimension",
|
|
69
|
+
defaultValue: "700px",
|
|
70
|
+
invalidate: true
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Defines the height of the geomap.
|
|
75
|
+
*/
|
|
76
|
+
height: {
|
|
77
|
+
type: "sap.ui.core.CSSSize",
|
|
78
|
+
group: "Dimension",
|
|
79
|
+
defaultValue: "700px",
|
|
80
|
+
invalidate: true
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* Header text that appears in the geomap
|
|
84
|
+
*/
|
|
85
|
+
header: {
|
|
86
|
+
type: "string",
|
|
87
|
+
group: "Misc",
|
|
88
|
+
defaultValue: ""
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Latitude of the point where the map is centered
|
|
93
|
+
*/
|
|
94
|
+
centerLat: {
|
|
95
|
+
type: "float"
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Longitude of the point where the map is centered
|
|
100
|
+
*/
|
|
101
|
+
centerLng: {
|
|
102
|
+
type: "float"
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Zoom level of the map - the bigger, the more the map is zoomed
|
|
107
|
+
*/
|
|
108
|
+
zoom: {
|
|
109
|
+
type: "float"
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Enables the selection control for the map
|
|
114
|
+
*/
|
|
115
|
+
enableSelectionControl: {
|
|
116
|
+
type: "boolean",
|
|
117
|
+
defaultValue: false,
|
|
118
|
+
group: "Behavior"
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Enables the navigation & compas control for the map
|
|
123
|
+
*/
|
|
124
|
+
enableNavigationControl: {
|
|
125
|
+
type: "boolean",
|
|
126
|
+
defaultValue: true,
|
|
127
|
+
group: "Behavior"
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Enables the full screen control for the map
|
|
132
|
+
*/
|
|
133
|
+
enableFullscreenControl: {
|
|
134
|
+
type: "boolean",
|
|
135
|
+
defaultValue: true,
|
|
136
|
+
group: "Behavior"
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Enables the scale control for the map
|
|
141
|
+
*/
|
|
142
|
+
enableScaleControl: {
|
|
143
|
+
type: "boolean",
|
|
144
|
+
defaultValue: true,
|
|
145
|
+
group: "Behavior"
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Enables the copyright control for the map
|
|
150
|
+
*/
|
|
151
|
+
enableCopyrightControl: {
|
|
152
|
+
type: "boolean",
|
|
153
|
+
defaultValue: false,
|
|
154
|
+
group: "Behavior"
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Object related to the <code>Delegate</code> module that provides the required APIs to execute model-specific logic.<br>
|
|
159
|
+
* The object has the following properties:
|
|
160
|
+
* <ul>
|
|
161
|
+
* <li><code>name</code> defines the path to the <code>Delegate</code> module</li>
|
|
162
|
+
* <li><code>payload</code> (optional) defines application-specific information that can be used in the given delegate</li>
|
|
163
|
+
* </ul>
|
|
164
|
+
* <i>Sample delegate object:</i>
|
|
165
|
+
* <pre><code>{
|
|
166
|
+
* name: "sap/ui/mdc/BaseDelegate",
|
|
167
|
+
* payload: {}
|
|
168
|
+
* }</code></pre>
|
|
169
|
+
* <b>Note:</b> Ensure that the related file can be requested (any required library has to be loaded before that).<br>
|
|
170
|
+
* Do not bind or modify the module. This property can only be configured during control initialization.
|
|
171
|
+
* @experimental
|
|
172
|
+
*/
|
|
173
|
+
delegate: {
|
|
174
|
+
type: "object",
|
|
175
|
+
group: "Data",
|
|
176
|
+
defaultValue: {
|
|
177
|
+
name: "sap/ui/mdc/GeomapDelegate",
|
|
178
|
+
payload: {}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Specifies the geomap metadata.<br>
|
|
184
|
+
* <b>Note:</b> This property must not be bound.<br>
|
|
185
|
+
* <b>Note:</b> This property is exclusively used for handling SAPUI5 flexibility changes. Do not use it otherwise.<br>
|
|
186
|
+
* <b>Note</b>: Existing properties (set via <code>sap.ui.mdc.Geomap#setPropertyInfo</code>) must not be removed and their attributes must not be changed during the {@link module:sap/ui/mdc/GeoMapDelegate.fetchProperties fetchProperties} callback. Otherwise validation errors might occur whenever personalization-related control features (such as the opening of any personalization dialog) are activated.
|
|
187
|
+
*
|
|
188
|
+
* <b>Note</b>: For more information about the supported inner elements, see {@link sap.ui.mdc.geomap.PropertyInfo PropertyInfo}.
|
|
189
|
+
*/
|
|
190
|
+
propertyInfo: {
|
|
191
|
+
type: "object",
|
|
192
|
+
defaultValue: []
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
aggregations: {
|
|
196
|
+
_geomap: {
|
|
197
|
+
type: "sap.ui.core.Control",
|
|
198
|
+
multiple: false,
|
|
199
|
+
visibility: "hidden"
|
|
200
|
+
},
|
|
201
|
+
/**
|
|
202
|
+
* Aggregates the items to be displayed in the geomap.
|
|
203
|
+
* Note: As items are custom elements defined as part of the webc library the type here could not be strictly defined or used a generic one so supported types are limited to those supported by the webc library.
|
|
204
|
+
*/
|
|
205
|
+
items: {
|
|
206
|
+
type: "sap.ui.mdc.geomap.Item",
|
|
207
|
+
multiple: true
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
associations: {
|
|
211
|
+
},
|
|
212
|
+
events: {
|
|
213
|
+
/**
|
|
214
|
+
* This event is fired when zooming is performed on the map.
|
|
215
|
+
*/
|
|
216
|
+
zoomChange: {}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
|
|
220
|
+
renderer: GeomapRenderer
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* An object literal describing a data property in the context of a {@link sap.ui.mdc.GeoMap}.
|
|
226
|
+
*
|
|
227
|
+
* When specifying the <code>PropertyInfo</code> objects in the {@link sap.ui.mdc.GeoMap#getPropertyInfo propertyInfo} property, the following
|
|
228
|
+
* attributes need to be specified:
|
|
229
|
+
* <ul>
|
|
230
|
+
* <li><code>key</code></li>
|
|
231
|
+
* <li><code>label</code></li>
|
|
232
|
+
* <li><code>visible</code></li>
|
|
233
|
+
* <li><code>path</code></li>
|
|
234
|
+
* <li><code>dataType</code></li>
|
|
235
|
+
* <li><code>formatOptions</code></li>
|
|
236
|
+
* <li><code>constraints</code></li>
|
|
237
|
+
* </ul>
|
|
238
|
+
*
|
|
239
|
+
* @typedef {sap.ui.mdc.util.PropertyInfo} sap.ui.mdc.geomap.PropertyInfo
|
|
240
|
+
*
|
|
241
|
+
* @property {string} [key]
|
|
242
|
+
* Defines the key that the property is related to
|
|
243
|
+
* @property {string} [label]
|
|
244
|
+
* Defines the label of the property associated with the key.
|
|
245
|
+
* @property {boolean} [visible]
|
|
246
|
+
* Defines the visibility of the property.
|
|
247
|
+
* @property {string} [path]
|
|
248
|
+
* The path of the property in the data source.
|
|
249
|
+
* @property {string} [dataType]
|
|
250
|
+
* Defines the data type associated to the property.
|
|
251
|
+
* @property {object} [formatOptions]
|
|
252
|
+
* Defines if any format options are applied to the property.
|
|
253
|
+
* @property {object} [constraints]
|
|
254
|
+
* Defines if any constraints are applied to the property.
|
|
255
|
+
* @public
|
|
256
|
+
* @experimental As of version 1.142
|
|
257
|
+
*/
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Initialises the MDC Geomap
|
|
262
|
+
*
|
|
263
|
+
* @private
|
|
264
|
+
*/
|
|
265
|
+
Geomap.prototype.init = function() {
|
|
266
|
+
this._oManagedObjectModel = new ManagedObjectModel(this);
|
|
267
|
+
this.setModel(this._oManagedObjectModel, "$mdcGeomap");
|
|
268
|
+
Control.prototype.init.apply(this, arguments);
|
|
269
|
+
|
|
270
|
+
this._setPropertyHelperClass(PropertyHelper);
|
|
271
|
+
this._setupPropertyInfoStore("propertyInfo");
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
Geomap.prototype.onBeforeRendering = function () {
|
|
275
|
+
Control.prototype.onBeforeRendering.apply(this, arguments);
|
|
276
|
+
this._applyConfigurations();
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Applies given settings onto the MDC geomap, loads the delegate and initializes the MDC geomap
|
|
281
|
+
*
|
|
282
|
+
* @param {*} mSettings settings to apply
|
|
283
|
+
*
|
|
284
|
+
* @private
|
|
285
|
+
*/
|
|
286
|
+
Geomap.prototype.applySettings = function(mSettings, oScope) {
|
|
287
|
+
Control.prototype.applySettings.apply(this, arguments);
|
|
288
|
+
|
|
289
|
+
this.initializedPromise = new Promise((resolve, reject) => {
|
|
290
|
+
this._fnResolveInitialized = resolve;
|
|
291
|
+
this._fnRejectInitialized = reject;
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
this.geomapBoundPromise = new Promise((resolve, reject) => {
|
|
295
|
+
this._fnResolveGeomapBound = resolve;
|
|
296
|
+
this._fnRejectGeomapBound = reject;
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
this.initControlDelegate().then(() => {
|
|
300
|
+
if (!this.isDestroyed()) {
|
|
301
|
+
this._initMap();
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Initializes the webc in the MDC geomap (geomap instance, etc.)
|
|
309
|
+
* Geomap is initialized via the delegate
|
|
310
|
+
*/
|
|
311
|
+
Geomap.prototype._initMap = function() {
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
this.getControlDelegate().initializeGeomap(this).then((oGeomap) => {
|
|
315
|
+
|
|
316
|
+
this.setBusyIndicatorDelay(0);
|
|
317
|
+
this.getControlDelegate().createInitialGeomapContent(this);
|
|
318
|
+
|
|
319
|
+
//From now on, listen to changes on Items Aggregation and sync them with geomap
|
|
320
|
+
this._oObserver?.disconnect();
|
|
321
|
+
this._oObserver?.destroy();
|
|
322
|
+
this._oObserver = new ManagedObjectObserver(this._propagateItemChangeToGeomap.bind(this));
|
|
323
|
+
this._oObserver.observe(this, {
|
|
324
|
+
aggregations: [
|
|
325
|
+
"items"
|
|
326
|
+
]
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
this._fnResolveGeomapBound();
|
|
330
|
+
|
|
331
|
+
this._bGeomapReady = true;
|
|
332
|
+
this._fnResolveInitialized();
|
|
333
|
+
oGeomap.invalidate();
|
|
334
|
+
}).catch((error) => {
|
|
335
|
+
this._fnRejectInitialized(error);
|
|
336
|
+
Log.error("mdc Geomap", "Error during initialization of geomap.");
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
Geomap.prototype._applyConfigurations = function(){
|
|
342
|
+
const oInternalMap = this._getInnerGeomap();
|
|
343
|
+
if (oInternalMap) {
|
|
344
|
+
oInternalMap.setCenterLat(this.getCenterLat());
|
|
345
|
+
oInternalMap.setCenterLng(this.getCenterLng());
|
|
346
|
+
oInternalMap.setZoom(this.getZoom());
|
|
347
|
+
oInternalMap.setWidth(this.getWidth());
|
|
348
|
+
oInternalMap.setHeight(this.getHeight());
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
Geomap.prototype._geomapDataLoadComplete = function() {
|
|
353
|
+
this.setBusy(false);
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Loads the delegate for the MDC geomap
|
|
358
|
+
* @returns {Promise} resolved when delegate is loaded
|
|
359
|
+
*/
|
|
360
|
+
Geomap.prototype._loadDelegate = function() {
|
|
361
|
+
|
|
362
|
+
return new Promise((resolve) => {
|
|
363
|
+
const aNotLoadedModulePaths = [this.getDelegate().name];
|
|
364
|
+
|
|
365
|
+
function onModulesLoadedSuccess(oDelegate) {
|
|
366
|
+
resolve(oDelegate);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
sap.ui.require(aNotLoadedModulePaths, onModulesLoadedSuccess);
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
Geomap.prototype.getPropertyInfoSet = function() {
|
|
375
|
+
return this.getPropertyHelper() ? this.getPropertyHelper().getProperties() : [];
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Rebinds the inner geomap instance by calling oDelegate.rebind
|
|
380
|
+
*
|
|
381
|
+
* @param {boolean} [bForceRefresh] Indicates that the binding must be refreshed regardless of any <code>bindingInfo</code> change
|
|
382
|
+
* @returns {Promise} A <code>Promise</code> that resolves after rebind is executed
|
|
383
|
+
* @private
|
|
384
|
+
*/
|
|
385
|
+
Geomap.prototype._rebind = async function(bForceRefresh) {
|
|
386
|
+
|
|
387
|
+
if (!this._bGeomapReady) {
|
|
388
|
+
this.setBusy(true);
|
|
389
|
+
// Wait with rebind until geomap is ready
|
|
390
|
+
await this.initialized();
|
|
391
|
+
this.setBusy(false);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
if (!this.getControlDelegate().getGeomapBound(this)) {
|
|
395
|
+
this._initMap();
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
const oGeomapDelegate = this.getControlDelegate();
|
|
400
|
+
let oBindingInfo;
|
|
401
|
+
if (oGeomapDelegate._getBindingInfo) {
|
|
402
|
+
oBindingInfo = oGeomapDelegate._getBindingInfo(this);
|
|
403
|
+
Log.warning("mdc Geomap", "calling the private delegate._getBindingInfo. Please make the function public!");
|
|
404
|
+
} else {
|
|
405
|
+
oBindingInfo = oGeomapDelegate.getBindingInfo(this);
|
|
406
|
+
}
|
|
407
|
+
oGeomapDelegate.updateBindingInfo(this, oBindingInfo);
|
|
408
|
+
oGeomapDelegate.rebind(this, oBindingInfo);
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Handler for theme changes
|
|
413
|
+
*/
|
|
414
|
+
Geomap.prototype.onThemeChanged = function() {
|
|
415
|
+
Log.info("THEME CHANGES");
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Checks whether the geomap is initialized.
|
|
420
|
+
* After initialization the delegate is loaded and the geomap is created.
|
|
421
|
+
* @returns {Promise} <code>Promise</code> that resolves once MDC geomap is initialized. Contains reference to MDC geomap
|
|
422
|
+
*
|
|
423
|
+
* @private
|
|
424
|
+
* @ui5-restricted sap.ui.mdc, sap.fe
|
|
425
|
+
*/
|
|
426
|
+
Geomap.prototype.initialized = function() {
|
|
427
|
+
return this.initializedPromise;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
Geomap.prototype.destroy = function() {
|
|
431
|
+
this._bIsDestroyed = true;
|
|
432
|
+
Control.prototype.destroy.apply(this, arguments);
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Gets the managed object model.
|
|
437
|
+
* @returns {sap.ui.model.base.ManagedObjectModel} the managed object model
|
|
438
|
+
*
|
|
439
|
+
* @private
|
|
440
|
+
*/
|
|
441
|
+
Geomap.prototype.getManagedObjectModel = function() {
|
|
442
|
+
return this._oManagedObjectModel;
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Fetches the current state of the geomap (as a JSON)<br>
|
|
448
|
+
* Needed for P13n to fetch current state
|
|
449
|
+
*
|
|
450
|
+
* @returns {Object} Current state of the geomap
|
|
451
|
+
*
|
|
452
|
+
* @private
|
|
453
|
+
*/
|
|
454
|
+
Geomap.prototype.getCurrentState = function() {
|
|
455
|
+
const oState = {};
|
|
456
|
+
|
|
457
|
+
return oState;
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Propagates a change on the "item" aggregation to the geomap via the delegate
|
|
462
|
+
* The delegate must then update the geomap accordingly
|
|
463
|
+
*
|
|
464
|
+
* @param {object} oChange the change object from the ManagedObjectModel observer
|
|
465
|
+
*/
|
|
466
|
+
Geomap.prototype._propagateItemChangeToGeomap = function(oChange) {
|
|
467
|
+
|
|
468
|
+
if (this._bIsDestroyed) {
|
|
469
|
+
return; //Don't propagate changes when Geomap is destroyed
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// this.setBusy(true);
|
|
473
|
+
|
|
474
|
+
this.getControlDelegate().propagateItemChangeToGeomap(this, oChange);
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Can be used to check whether the inner geomap is initialized and bound.
|
|
480
|
+
* @returns {Promise} Promise that resolves once MDC geomap is bound
|
|
481
|
+
*
|
|
482
|
+
* @private
|
|
483
|
+
* @ui5-restricted sap.ui.mdc, sap.fe
|
|
484
|
+
*/
|
|
485
|
+
Geomap.prototype.innerGeomapBound = function() {
|
|
486
|
+
return this.innerGeomapBoundPromise;
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Zooms in from the inner geomap.
|
|
491
|
+
*
|
|
492
|
+
* @private
|
|
493
|
+
* @ui5-restricted sap.ui.mdc
|
|
494
|
+
*/
|
|
495
|
+
Geomap.prototype.zoomIn = function() {
|
|
496
|
+
this.getControlDelegate().zoomIn(this);
|
|
497
|
+
this.fireZoomChange();
|
|
498
|
+
return this;
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Zooms out from the inner geomap.
|
|
503
|
+
*
|
|
504
|
+
* @private
|
|
505
|
+
* @ui5-restricted sap.ui.mdc
|
|
506
|
+
*/
|
|
507
|
+
Geomap.prototype.zoomOut = function() {
|
|
508
|
+
this.getControlDelegate().zoomOut(this);
|
|
509
|
+
this.fireZoomChange();
|
|
510
|
+
return this;
|
|
511
|
+
};
|
|
512
|
+
/**
|
|
513
|
+
* Returns inner geomap instance.
|
|
514
|
+
*
|
|
515
|
+
* @private
|
|
516
|
+
* @ui5-restricted sap.ui.mdc
|
|
517
|
+
*/
|
|
518
|
+
Geomap.prototype._getInnerGeomap = function() {
|
|
519
|
+
return this.getAggregation("_geomap");
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
Geomap.prototype.exit = function() {
|
|
523
|
+
|
|
524
|
+
delete this.geomapBoundPromise;
|
|
525
|
+
delete this._fnResolveGeomapBound;
|
|
526
|
+
delete this._fnRejectGeomapBound;
|
|
527
|
+
|
|
528
|
+
delete this.initializedPromise;
|
|
529
|
+
delete this._fnResolveInitialized;
|
|
530
|
+
delete this._fnRejectInitialized;
|
|
531
|
+
|
|
532
|
+
delete this._oGeomapContentPromise;
|
|
533
|
+
|
|
534
|
+
Control.prototype.exit.apply(this, arguments);
|
|
535
|
+
|
|
536
|
+
this._oObserver?.destroy();
|
|
537
|
+
delete this._oObserver;
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* @name sap.ui.mdc.Geomap#addItem
|
|
542
|
+
* @private
|
|
543
|
+
* @ui5-restricted sap.ui.mdc, sap.ui.fl
|
|
544
|
+
*/
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* @name sap.ui.mdc.Geomap#removeItem
|
|
548
|
+
* @private
|
|
549
|
+
* @ui5-restricted sap.ui.mdc, sap.ui.fl
|
|
550
|
+
*/
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* @name sap.ui.mdc.Geomap#removeAllItems
|
|
554
|
+
* @private
|
|
555
|
+
* @ui5-restricted sap.ui.mdc, sap.ui.fl
|
|
556
|
+
*/
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* @name sap.ui.mdc.Geomap#setPropertyInfo
|
|
560
|
+
* @private
|
|
561
|
+
* @ui5-restricted sap.ui.mdc, sap.ui.fl
|
|
562
|
+
*/
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* @name sap.ui.mdc.Geomap#getPropertyInfo
|
|
566
|
+
* @private
|
|
567
|
+
* @ui5-restricted sap.ui.mdc, sap.ui.fl
|
|
568
|
+
*/
|
|
569
|
+
|
|
570
|
+
return Geomap;
|
|
571
|
+
});
|