@openui5/sap.ui.mdc 1.111.6 → 1.112.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/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +1 -1
- package/src/sap/ui/mdc/Chart.js +21 -23
- package/src/sap/ui/mdc/ChartDelegate.js +1 -1
- package/src/sap/ui/mdc/ChartRenderer.js +0 -2
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +6 -6
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterBarDelegate.js +0 -37
- package/src/sap/ui/mdc/FilterField.js +4 -4
- package/src/sap/ui/mdc/Link.js +1 -1
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/Table.js +3 -11
- package/src/sap/ui/mdc/TableDelegate.js +5 -3
- package/src/sap/ui/mdc/ValueHelp.js +28 -15
- 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/ChartImplementationContainerRenderer.js +0 -2
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/ChartToolbar.js +2 -2
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +2 -2
- package/src/sap/ui/mdc/chart/PropertyHelper.js +35 -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 +43 -1
- package/src/sap/ui/mdc/condition/Operator.js +1 -1
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +10 -17
- package/src/sap/ui/mdc/condition/RangeOperator.js +7 -8
- package/src/sap/ui/mdc/field/ConditionType.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/DefineConditionPanel.js +6 -6
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +49 -62
- package/src/sap/ui/mdc/field/FieldBase.js +93 -33
- 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/ListFieldHelpItem.js +1 -1
- 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/DateContent.js +1 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +4 -4
- 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 +29 -2
- 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/GroupFlex.js +56 -9
- package/src/sap/ui/mdc/flexibility/SortFlex.js +56 -9
- package/src/sap/ui/mdc/flexibility/Util.js +7 -1
- package/src/sap/ui/mdc/library.js +108 -2
- package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
- package/src/sap/ui/mdc/link/Factory.js +1 -1
- package/src/sap/ui/mdc/link/FakeFlpConnector.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 -0
- package/src/sap/ui/mdc/messagebundle_ar.properties +11 -1
- package/src/sap/ui/mdc/messagebundle_bg.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_ca.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_cs.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_cy.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_da.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_de.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_el.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_en.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +2 -0
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_es.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_et.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_fi.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_fr.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_hi.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_hr.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_hu.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_id.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_it.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_iw.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_ja.properties +11 -1
- package/src/sap/ui/mdc/messagebundle_kk.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_ko.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_lt.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_lv.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_ms.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_nl.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_no.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_pl.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_pt.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_ro.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_ru.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_sh.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_sk.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_sl.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_sv.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_th.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_tr.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_uk.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_vi.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +10 -0
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +10 -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/FilterIntegrationMixin.js +4 -3
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -71
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +7 -0
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +382 -376
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +5 -3
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnWidthController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +158 -11
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +7 -7
- package/src/sap/ui/mdc/p13n/subcontroller/SelectionController.js +1 -1
- 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/GridTableType.js +19 -0
- 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/RowActionItem.js +1 -1
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/table/menu/Item.js +6 -0
- package/src/sap/ui/mdc/themes/base/Chart.less +1 -1
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +5 -1
- package/src/sap/ui/mdc/util/DateUtil.js +84 -95
- package/src/sap/ui/mdc/util/InfoBar.js +88 -60
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +5 -1
- package/src/sap/ui/mdc/util/TypeUtil.js +6 -3
- package/src/sap/ui/mdc/valuehelp/Dialog.js +67 -58
- package/src/sap/ui/mdc/valuehelp/Popover.js +19 -1
- package/src/sap/ui/mdc/valuehelp/base/Container.js +12 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +1 -1
- 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/MDCTable.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +6 -8
- package/src/sap/ui/mdc/p13n/Engine.js +0 -1200
- package/src/sap/ui/mdc/p13n/FlexUtil.js +0 -276
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +0 -438
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
'sap/ui/core/library',
|
|
8
|
-
'sap/ui/core/date/
|
|
8
|
+
'sap/ui/core/date/UI5Date',
|
|
9
9
|
'sap/ui/mdc/enum/BaseType',
|
|
10
10
|
'sap/base/util/merge'
|
|
11
11
|
],
|
|
12
12
|
function(
|
|
13
13
|
coreLibrary,
|
|
14
|
-
|
|
14
|
+
UI5Date,
|
|
15
15
|
BaseType,
|
|
16
16
|
merge
|
|
17
17
|
) {
|
|
@@ -31,74 +31,6 @@ sap.ui.define([
|
|
|
31
31
|
*/
|
|
32
32
|
var DateUtil = {
|
|
33
33
|
|
|
34
|
-
/**
|
|
35
|
-
* Converts a data type specific date to a UniversalDate.
|
|
36
|
-
*
|
|
37
|
-
* @param {any} vDate Date
|
|
38
|
-
* @param {sap.ui.model.SimpleType} oType Data type
|
|
39
|
-
* @param {sap.ui.mdc.enum.BaseType} [sBaseType] Basic type
|
|
40
|
-
* @return {sap.ui.core.date.UniversalDate} UniversalDate
|
|
41
|
-
* @private
|
|
42
|
-
* @ui5-restricted sap.ui.mdc
|
|
43
|
-
* @since 1.74.0
|
|
44
|
-
*/
|
|
45
|
-
typeToUniversalDate: function(vDate, oType, sBaseType) {
|
|
46
|
-
|
|
47
|
-
var sPattern;
|
|
48
|
-
if (sBaseType && sBaseType === BaseType.DateTime) {
|
|
49
|
-
sPattern = "yyyyMMdd-HHmmssSSS";
|
|
50
|
-
} else {
|
|
51
|
-
sPattern = "yyyyMMdd";
|
|
52
|
-
}
|
|
53
|
-
var sDate = this.typeToString(vDate, oType, sPattern);
|
|
54
|
-
var iYear = parseInt(sDate.slice(0,4));
|
|
55
|
-
var iMonth = parseInt(sDate.slice(4,6)) - 1;
|
|
56
|
-
var iDate = parseInt(sDate.slice(6,8));
|
|
57
|
-
var iHour = sBaseType === BaseType.DateTime ? parseInt(sDate.slice(9,11)) : 0;
|
|
58
|
-
var iMinute = sBaseType === BaseType.DateTime ? parseInt(sDate.slice(11,13)) : 0;
|
|
59
|
-
var iSecond = sBaseType === BaseType.DateTime ? parseInt(sDate.slice(13,15)) : 0;
|
|
60
|
-
var iMillisecond = sBaseType === BaseType.DateTime ? parseInt(sDate.slice(15,18)) : 0;
|
|
61
|
-
var oUniversalDate = new UniversalDate(UniversalDate.UTC(iYear, iMonth, iDate, iHour, iMinute, iSecond, iMillisecond));
|
|
62
|
-
|
|
63
|
-
return oUniversalDate;
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Converts a UniversalDate to data type specific date.
|
|
69
|
-
*
|
|
70
|
-
* @param {sap.ui.core.date.UniversalDate} oDate UniversalDate
|
|
71
|
-
* @param {sap.ui.model.SimpleType} oType Data type
|
|
72
|
-
* @param {sap.ui.mdc.enum.BaseType} [sBaseType] Basic type
|
|
73
|
-
* @return {any} type specific date
|
|
74
|
-
* @private
|
|
75
|
-
* @ui5-restricted sap.ui.mdc
|
|
76
|
-
* @since 1.74.0
|
|
77
|
-
*/
|
|
78
|
-
universalDateToType: function(oDate, oType, sBaseType) {
|
|
79
|
-
|
|
80
|
-
var iYear = oDate.getUTCFullYear();
|
|
81
|
-
var iMonth = oDate.getUTCMonth() + 1;
|
|
82
|
-
var iDate = oDate.getUTCDate();
|
|
83
|
-
var sYear = (iYear < 10 ? "0" : "") + (iYear < 100 ? "0" : "") + (iYear < 1000 ? "0" : "") + iYear.toString();
|
|
84
|
-
var sDate = sYear + ((iMonth < 10) ? "0" : "") + iMonth.toString() + ((iDate < 10) ? "0" : "") + iDate.toString();
|
|
85
|
-
var sPattern;
|
|
86
|
-
if (sBaseType && sBaseType === BaseType.DateTime) {
|
|
87
|
-
sPattern = "yyyyMMdd-HHmmssSSS";
|
|
88
|
-
var iHour = oDate.getUTCHours();
|
|
89
|
-
var iMinute = oDate.getUTCMinutes();
|
|
90
|
-
var iSecond = oDate.getUTCSeconds();
|
|
91
|
-
var iMillisecond = oDate.getUTCMilliseconds();
|
|
92
|
-
sDate = sDate + "-" + ((iHour < 10) ? "0" : "") + iHour.toString() + ((iMinute < 10) ? "0" : "") + iMinute.toString() + ((iSecond < 10) ? "0" : "") + iSecond.toString() + ((iMillisecond < 100) ? "0" : "") + ((iMillisecond < 10) ? "0" : "") + iMillisecond.toString();
|
|
93
|
-
} else {
|
|
94
|
-
sPattern = "yyyyMMdd";
|
|
95
|
-
}
|
|
96
|
-
var vDate = this.stringToType(sDate, oType, sPattern);
|
|
97
|
-
|
|
98
|
-
return vDate;
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
|
|
102
34
|
/**
|
|
103
35
|
* "Clones" a given data type to use a given pattern.
|
|
104
36
|
*
|
|
@@ -189,44 +121,101 @@ sap.ui.define([
|
|
|
189
121
|
},
|
|
190
122
|
|
|
191
123
|
/**
|
|
192
|
-
*
|
|
124
|
+
* Converts a data type representation of a dateTime to a ISO-string.
|
|
193
125
|
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
126
|
+
* @param {any} vDate Date
|
|
127
|
+
* @param {sap.ui.model.SimpleType} oType Data type
|
|
128
|
+
* @param {sap.ui.mdc.enum.BaseType} [sBaseType] Basic type
|
|
129
|
+
* @return {string} Date as ISOString
|
|
130
|
+
* @private
|
|
131
|
+
* @ui5-restricted sap.ui.mdc
|
|
132
|
+
* @since 1.112.0
|
|
133
|
+
*/
|
|
134
|
+
typeToISO: function(vDate, oType, sBaseType) {
|
|
135
|
+
|
|
136
|
+
var oDate = this.typeToDate(vDate, oType, sBaseType);
|
|
137
|
+
|
|
138
|
+
// if (oType.getFormatOptions().UTC) { // in UTC date we need to bring the local date to UTC
|
|
139
|
+
// oDate = UI5Date.getInstance(Date.UTC(oDate.getFullYear(), oDate.getMonth(), oDate.getDate(), oDate.getHours(), oDate.getMinutes(), oDate.getSeconds(), oDate.getMilliseconds()));
|
|
140
|
+
// }
|
|
141
|
+
|
|
142
|
+
return oDate.toISOString();
|
|
143
|
+
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Converts a ISO representation of a DateTime into the data-type representation.
|
|
199
148
|
*
|
|
200
|
-
* @param {
|
|
201
|
-
* @
|
|
149
|
+
* @param {string} sISODate Date
|
|
150
|
+
* @param {sap.ui.model.SimpleType} oType Data type
|
|
151
|
+
* @param {sap.ui.mdc.enum.BaseType} [sBaseType] Basic type
|
|
152
|
+
* @return {any} Date for type
|
|
202
153
|
* @private
|
|
154
|
+
* @ui5-restricted sap.ui.mdc
|
|
155
|
+
* @since 1.112.0
|
|
203
156
|
*/
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
157
|
+
ISOToType: function(sISODate, oType, sBaseType) {
|
|
158
|
+
|
|
159
|
+
var oDate = UI5Date.getInstance(sISODate); // can also interpret string with pattern "yyyy-MM-ddTHH:mm:ssZ"
|
|
160
|
+
|
|
161
|
+
if (oType.getFormatOptions().UTC) { // in UTC date we need to bring the UTC to local date
|
|
162
|
+
oDate = UI5Date.getInstance(oDate.getUTCFullYear(), oDate.getUTCMonth(), oDate.getUTCDate(), oDate.getUTCHours(), oDate.getUTCMinutes(), oDate.getUTCSeconds(), oDate.getUTCMilliseconds());
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return this.dateToType(oDate, oType, sBaseType);
|
|
166
|
+
|
|
208
167
|
},
|
|
209
168
|
|
|
210
169
|
/**
|
|
211
|
-
* Convert time part of a JS Date
|
|
170
|
+
* Convert time part of a JS Date ino the type representation
|
|
212
171
|
*
|
|
213
|
-
*
|
|
214
|
-
* the UTC time on the original date object.
|
|
172
|
+
* The incomming date is a local date, so for Date and Time the local value needs to be used, for DateTime it depends on the UTC configuration.
|
|
215
173
|
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
174
|
+
* @param {Date} oDate the date to convert
|
|
175
|
+
* @param {sap.ui.model.SimpleType} oType Data type
|
|
176
|
+
* @param {sap.ui.mdc.enum.BaseType} [sBaseType] Basic type
|
|
177
|
+
* @returns {any} date in type representation
|
|
178
|
+
* @private
|
|
179
|
+
*/
|
|
180
|
+
dateToType: function(oDate, oType, sBaseType) {
|
|
181
|
+
var vDate;
|
|
182
|
+
|
|
183
|
+
if (oType.getModelValue) {
|
|
184
|
+
vDate = oType.getModelValue(oDate);
|
|
185
|
+
} else { // older types don't support the new getModelValue
|
|
186
|
+
var oModelFormat = oType.getModelFormat();
|
|
187
|
+
var oFormatOptions = oType.getFormatOptions();
|
|
188
|
+
var bUTC = sBaseType === BaseType.DateTime ? !!oFormatOptions.UTC : false;
|
|
189
|
+
vDate = oModelFormat.format(oDate, bUTC);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return vDate;
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Convert time part of a JS Date ino the type representation
|
|
218
197
|
*
|
|
219
|
-
*
|
|
220
|
-
* not all times can be converted to local time.
|
|
198
|
+
* The needed date is a local date, so for Date and Time the local value needs to be used, for DateTime it depends on the UTC configuration.
|
|
221
199
|
*
|
|
222
|
-
* @param {
|
|
223
|
-
* @
|
|
200
|
+
* @param {any} vDate date in type representation
|
|
201
|
+
* @param {sap.ui.model.SimpleType} oType Data type
|
|
202
|
+
* @param {sap.ui.mdc.enum.BaseType} [sBaseType] Basic type
|
|
203
|
+
* @returns {Date} JSDate (local)
|
|
224
204
|
* @private
|
|
225
205
|
*/
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
)
|
|
206
|
+
typeToDate: function(vDate, oType, sBaseType) {
|
|
207
|
+
var oDate;
|
|
208
|
+
|
|
209
|
+
if (oType.isA("sap.ui.model.odata.type.DateTime") && oType.getConstraints().displayFormat === "Date") { // TODO: need some type-function to convert
|
|
210
|
+
oDate = UI5Date.getInstance(vDate.getUTCFullYear(), vDate.getUTCMonth(), vDate.getUTCDate());
|
|
211
|
+
} else {
|
|
212
|
+
var oModelFormat = oType.getModelFormat();
|
|
213
|
+
var oFormatOptions = oType.getFormatOptions();
|
|
214
|
+
var bUTC = sBaseType === BaseType.DateTime ? !!oFormatOptions.UTC : false;
|
|
215
|
+
oDate = oModelFormat.parse(vDate, bUTC);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return oDate;
|
|
230
219
|
}
|
|
231
220
|
};
|
|
232
221
|
|
|
@@ -5,82 +5,105 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
'sap/ui/core/Control',
|
|
8
|
-
|
|
8
|
+
'sap/m/OverflowToolbar',
|
|
9
9
|
"sap/ui/mdc/util/InfoBarRenderer",
|
|
10
10
|
"sap/m/Text",
|
|
11
11
|
"sap/ui/core/InvisibleText",
|
|
12
|
-
"sap/m/Label"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
12
|
+
"sap/m/Label",
|
|
13
|
+
"sap/m/Button",
|
|
14
|
+
"sap/m/library",
|
|
15
|
+
"sap/m/ToolbarSpacer"
|
|
16
|
+
], function (Control, Toolbar, InfoBarRenderer, Text, InvisibleText, Label, Button, mLibrary, ToolbarSpacer) {
|
|
17
|
+
"use strict";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Constructor for a new InfoBar.
|
|
21
|
+
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
22
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
23
|
+
* @class The <code>InfoBar</code> control provides an easy way of displaying filter information inside an <code>sap.ui.mdc.Chart</code> and an <code>sap.ui.mdc.Table</code>.
|
|
24
|
+
* @extends sap.ui.core.Control
|
|
25
|
+
* @author SAP SE
|
|
26
|
+
* @version 1.112.1
|
|
27
|
+
* @constructor
|
|
28
|
+
* @experimental As of version 1.111
|
|
29
|
+
* @private
|
|
30
|
+
* @ui5-restricted sap.ui.mdc
|
|
31
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
32
|
+
* @since 1.111.0
|
|
33
|
+
* @alias sap.ui.mdc.util.InfoBar
|
|
34
|
+
*/
|
|
35
|
+
var InfoBar = Control.extend("sap.ui.mdc.util.InfoBar", {
|
|
36
|
+
metadata: {
|
|
37
|
+
properties: {
|
|
35
38
|
infoText: {
|
|
36
39
|
type: "string"
|
|
37
40
|
}
|
|
38
|
-
|
|
41
|
+
},
|
|
39
42
|
aggregations: {
|
|
40
|
-
_toolbar
|
|
43
|
+
_toolbar: {
|
|
41
44
|
type: "sap.m.Toolbar",
|
|
42
45
|
multiple: false,
|
|
43
46
|
visibility: "hidden"
|
|
44
47
|
}
|
|
45
48
|
},
|
|
46
49
|
events: {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
/**
|
|
51
|
+
* This event is fired when the user clicks on the infobar.
|
|
52
|
+
*/
|
|
53
|
+
press: {
|
|
54
|
+
parameters: {
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The toolbar item that was pressed
|
|
58
|
+
*/
|
|
59
|
+
srcControl: { type: "sap.ui.core.Control" }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* This event is fired when the user clicks on the RemoveAllfilters button.
|
|
64
|
+
*/
|
|
65
|
+
removeAllFilters: {
|
|
66
|
+
parameters: {
|
|
67
|
+
}
|
|
68
|
+
}
|
|
59
69
|
}
|
|
60
|
-
|
|
70
|
+
},
|
|
61
71
|
renderer: InfoBarRenderer
|
|
62
|
-
|
|
72
|
+
});
|
|
63
73
|
|
|
64
|
-
InfoBar.prototype.init = function() {
|
|
65
74
|
|
|
66
|
-
|
|
67
|
-
this
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
InfoBar.prototype.applySettings = function () {
|
|
76
|
+
Control.prototype.applySettings.apply(this, arguments);
|
|
77
|
+
|
|
78
|
+
this.setInfoText(this.getInfoText());
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
InfoBar.prototype.init = function () {
|
|
82
|
+
|
|
83
|
+
this.setVisible(false);
|
|
84
|
+
this.oText = new Text({ wrapping: false });
|
|
85
|
+
this.oInvisibleText = new InvisibleText().toStatic();
|
|
86
|
+
|
|
87
|
+
this.oRemoveAllFiltersBtn = new Button(this.getId() + "-RemoveAllFilters", {
|
|
88
|
+
press: function (oEvent) {
|
|
89
|
+
this.fireRemoveAllFilters();
|
|
90
|
+
// TODO this.oInvisibleMessage.announce(oMessageBundle.getText("valuehelp.REMOVEALLTOKEN_ANNOUNCE"), InvisibleMessageMode.Polite);
|
|
91
|
+
}.bind(this),
|
|
92
|
+
icon: "sap-icon://decline",
|
|
93
|
+
tooltip: sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText("infobar.REMOVEALLFILTERS")
|
|
70
94
|
});
|
|
71
|
-
this.oInvisibleText = new InvisibleText({text: this.getInfoText()}).toStatic();
|
|
72
95
|
|
|
73
|
-
var oToolbar = new Toolbar(this.getId() + "--bar", { design: "Info", active: true, content: [this.oText]});
|
|
74
|
-
oToolbar.attachPress(function(oSrc){
|
|
96
|
+
var oToolbar = new Toolbar(this.getId() + "--bar", { design: "Info", active: true, content: [this.oText, new ToolbarSpacer(), this.oRemoveAllFiltersBtn] });
|
|
97
|
+
oToolbar.attachPress(function (oSrc) {
|
|
75
98
|
this.firePress({
|
|
76
|
-
|
|
77
|
-
|
|
99
|
+
srcControl: oSrc
|
|
100
|
+
});
|
|
78
101
|
}.bind(this));
|
|
79
102
|
this.setAggregation("_toolbar", oToolbar);
|
|
80
103
|
|
|
81
104
|
};
|
|
82
105
|
|
|
83
|
-
InfoBar.prototype.setInfoText = function(sText){
|
|
106
|
+
InfoBar.prototype.setInfoText = function (sText) {
|
|
84
107
|
this.setProperty("infoText", sText);
|
|
85
108
|
this.setVisible(!!sText);
|
|
86
109
|
|
|
@@ -96,23 +119,28 @@ sap.ui.define([
|
|
|
96
119
|
* Provides the ID of the invisible text created by the <code>InfoBar</code>. Can be used to set ARIA labels correctly.
|
|
97
120
|
* @returns {string} ID of the invisible text control
|
|
98
121
|
*/
|
|
99
|
-
InfoBar.prototype.getACCTextId = function() {
|
|
122
|
+
InfoBar.prototype.getACCTextId = function () {
|
|
100
123
|
return this.oInvisibleText.getId();
|
|
101
124
|
};
|
|
102
125
|
|
|
103
|
-
InfoBar.prototype.exit = function() {
|
|
126
|
+
InfoBar.prototype.exit = function () {
|
|
104
127
|
if (this.oInvisibleText) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
128
|
+
this.oInvisibleText.destroy();
|
|
129
|
+
this.oInvisibleText = null;
|
|
130
|
+
}
|
|
108
131
|
|
|
109
132
|
if (this.oText) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
133
|
+
this.oText.destroy();
|
|
134
|
+
this.oText = null;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (this.oRemoveAllFiltersBtn) {
|
|
138
|
+
this.oRemoveAllFiltersBtn.destroy();
|
|
139
|
+
this.oRemoveAllFiltersBtn = null;
|
|
140
|
+
}
|
|
113
141
|
};
|
|
114
142
|
|
|
115
143
|
|
|
116
|
-
|
|
144
|
+
return InfoBar;
|
|
117
145
|
|
|
118
146
|
});
|
|
@@ -45,7 +45,7 @@ sap.ui.define(
|
|
|
45
45
|
* Destroying the cache will cancel all registered promises and delete references. Convenience methods for promise creation, wrapping and replacement are offered.
|
|
46
46
|
*
|
|
47
47
|
* @author SAP SE
|
|
48
|
-
* @version 1.
|
|
48
|
+
* @version 1.112.1
|
|
49
49
|
* @alias sap.ui.mdc.util.PromiseCache
|
|
50
50
|
* @since 1.85.0
|
|
51
51
|
* @private
|
|
@@ -274,6 +274,10 @@ sap.ui.define([
|
|
|
274
274
|
function reportInvalidProperty(sMessage, oAdditionalInfo) {
|
|
275
275
|
// TODO: warning is logged momentarily so that consumers can adapt to have valid property definitions
|
|
276
276
|
// valid use case would be to throw an error
|
|
277
|
+
if (Log.getLevel() < Log.WARNING) {
|
|
278
|
+
return; // Avoid stringification overhead if logging is not required.
|
|
279
|
+
}
|
|
280
|
+
|
|
277
281
|
var sAdditionalInfo = stringifyPlainObject(oAdditionalInfo);
|
|
278
282
|
Log.warning("Invalid property definition: " + sMessage + (sAdditionalInfo ? "\n" + sAdditionalInfo : ""));
|
|
279
283
|
}
|
|
@@ -527,7 +531,7 @@ sap.ui.define([
|
|
|
527
531
|
* @extends sap.ui.base.Object
|
|
528
532
|
*
|
|
529
533
|
* @author SAP SE
|
|
530
|
-
* @version 1.
|
|
534
|
+
* @version 1.112.1
|
|
531
535
|
*
|
|
532
536
|
* @private
|
|
533
537
|
* @experimental
|
|
@@ -14,7 +14,7 @@ sap.ui.define([
|
|
|
14
14
|
], function(BaseType, ObjectPath, isEmptyObject, merge, SimpleType, DateUtil) {
|
|
15
15
|
"use strict";
|
|
16
16
|
|
|
17
|
-
var sDateTimePattern = "yyyy-MM-ddTHH:mm:ssZ"; // milliseconds missing
|
|
17
|
+
// var sDateTimePattern = "yyyy-MM-ddTHH:mm:ssZ"; // milliseconds missing
|
|
18
18
|
var sDatePattern = "yyyy-MM-dd";
|
|
19
19
|
var sTimePattern = "HH:mm:ss";
|
|
20
20
|
|
|
@@ -194,9 +194,12 @@ sap.ui.define([
|
|
|
194
194
|
var sBaseType = this.getBaseTypeForType(oTypeInstance);
|
|
195
195
|
switch (sBaseType) {
|
|
196
196
|
case BaseType.DateTime:
|
|
197
|
-
return DateUtil.
|
|
197
|
+
return DateUtil.ISOToType(sValue, oTypeInstance, sBaseType);
|
|
198
198
|
|
|
199
199
|
case BaseType.Date:
|
|
200
|
+
if (sValue.indexOf("T") >= 0) { // old variant with DateTime for DateValues
|
|
201
|
+
sValue = sValue.substr(0, sValue.indexOf("T")); // just take the date part
|
|
202
|
+
}
|
|
200
203
|
return DateUtil.stringToType(sValue, oTypeInstance, sDatePattern);
|
|
201
204
|
|
|
202
205
|
case BaseType.Time:
|
|
@@ -235,7 +238,7 @@ sap.ui.define([
|
|
|
235
238
|
var sBaseType = this.getBaseTypeForType(oTypeInstance);
|
|
236
239
|
switch (sBaseType) {
|
|
237
240
|
case BaseType.DateTime:
|
|
238
|
-
return DateUtil.
|
|
241
|
+
return DateUtil.typeToISO(vValue, oTypeInstance, sBaseType);
|
|
239
242
|
|
|
240
243
|
case BaseType.Date:
|
|
241
244
|
return DateUtil.typeToString(vValue, oTypeInstance, sDatePattern);
|