@openui5/sap.ui.mdc 1.99.0 → 1.100.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/THIRDPARTY.txt +2 -2
- 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 +50 -32
- package/src/sap/ui/mdc/ChartDelegate.js +66 -21
- package/src/sap/ui/mdc/ChartRenderer.js +1 -1
- package/src/sap/ui/mdc/Control.js +11 -6
- package/src/sap/ui/mdc/Element.js +10 -6
- package/src/sap/ui/mdc/Field.js +19 -4
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
- package/src/sap/ui/mdc/FilterField.js +41 -3
- package/src/sap/ui/mdc/Link.js +3 -3
- package/src/sap/ui/mdc/MultiValueField.js +11 -1
- package/src/sap/ui/mdc/Table.js +73 -39
- package/src/sap/ui/mdc/TableDelegate.js +28 -1
- package/src/sap/ui/mdc/ValueHelp.js +8 -3
- package/src/sap/ui/mdc/ValueHelpDelegate.js +2 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/ChartToolbar.js +13 -6
- package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +7 -7
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +6 -6
- package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
- 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 +4 -2
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +133 -25
- package/src/sap/ui/mdc/condition/Operator.js +4 -2
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +78 -24
- package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
- package/src/sap/ui/mdc/designtime/Util.js +63 -0
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +3 -0
- package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +39 -52
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionType.js +15 -4
- package/src/sap/ui/mdc/field/ConditionsType.js +2 -1
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +16 -5
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +76 -19
- package/src/sap/ui/mdc/field/FieldBase.js +62 -11
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldInfoBase.js +2 -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/FieldValueHelp.js +4 -1
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +5 -4
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +5 -3
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +7 -7
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.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/OutParameter.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/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +5 -1
- package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +0 -6
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +76 -208
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +127 -57
- package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
- package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
- package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +37 -19
- package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
- package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +47 -10
- 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 +0 -1
- package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +2 -85
- package/src/sap/ui/mdc/library.js +11 -4
- 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/PanelListItem.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 +2 -1
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +20 -19
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -141
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -9
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +348 -0
- package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +70 -3
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
- package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +11 -33
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -4
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +281 -263
- package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +21 -18
- package/src/sap/ui/mdc/p13n/FlexUtil.js +0 -5
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
- package/src/sap/ui/mdc/p13n/StateUtil.js +4 -0
- package/src/sap/ui/mdc/p13n/UIManager.js +16 -13
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +18 -14
- package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +4 -3
- package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +136 -0
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +53 -28
- package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +54 -18
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +1 -2
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +8 -4
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +1 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +2 -2
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +75 -27
- package/src/sap/ui/mdc/table/PropertyHelper.js +20 -13
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +86 -13
- package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
- package/src/sap/ui/mdc/table/RowSettings.js +42 -1
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
- package/src/sap/ui/mdc/themes/base/Chart.less +2 -0
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +1 -0
- package/src/sap/ui/mdc/util/DateUtil.js +32 -7
- package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +201 -76
- package/src/sap/ui/mdc/util/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Popover.js +5 -3
- 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/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +4 -4
- 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 +13 -10
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +4 -10
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +6 -4
- package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +2 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +0 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +8 -6
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
- package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -408
- package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
- package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
- package/src/sap/ui/mdc/ui/Container.js +0 -240
- package/src/sap/ui/mdc/ui/ContainerItem.js +0 -79
|
@@ -3,41 +3,34 @@
|
|
|
3
3
|
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
|
-
sap.ui.define([
|
|
6
|
+
sap.ui.define([
|
|
7
|
+
"sap/ui/mdc/ActionToolbar",
|
|
8
|
+
"../Util"
|
|
9
|
+
], function (ActionToolbar, Util) {
|
|
7
10
|
"use strict";
|
|
8
11
|
|
|
9
12
|
var oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
// ActionToolbarActions
|
|
14
|
+
var oDesignTime = {
|
|
15
|
+
description: "{description}",
|
|
16
|
+
name: "{name}",
|
|
17
|
+
aggregations: {},
|
|
18
|
+
properties: {},
|
|
17
19
|
actions: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ignore: true
|
|
20
|
+
settings: {
|
|
21
|
+
name: oResourceBundle.getText("actiontoolbar.RTA_SETTINGS_NAME"),
|
|
22
|
+
handler: function (oControl, mPropertyBag) {
|
|
23
|
+
return sap.ui.mdc.p13n.Engine.getInstance().getRTASettingsActionHandler(oControl, mPropertyBag, "actionsKey").then(function(aChanges){
|
|
24
|
+
return aChanges;
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
CAUTION_variantIndependent: true
|
|
28
|
+
}
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return sap.ui.mdc.p13n.Engine.getInstance().getRTASettingsActionHandler(oControl, mPropertyBag, "actionsKey").then(function(aChanges){
|
|
35
|
-
return aChanges;
|
|
36
|
-
});
|
|
37
|
-
},
|
|
38
|
-
CAUTION_variantIndependent: true
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
30
|
+
},
|
|
31
|
+
aAllowedAggregations = [],
|
|
32
|
+
aAllProperties = [];
|
|
33
|
+
|
|
34
|
+
return Util.getDesignTime(ActionToolbar, aAllProperties, aAllowedAggregations, oDesignTime);
|
|
42
35
|
|
|
43
36
|
});
|
|
@@ -5,67 +5,54 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/mdc/p13n/Engine",
|
|
8
|
-
"sap/ui/mdc/Table"
|
|
9
|
-
|
|
8
|
+
"sap/ui/mdc/Table",
|
|
9
|
+
"../Util"
|
|
10
|
+
], function (Engine, Table, Util) {
|
|
10
11
|
"use strict";
|
|
11
12
|
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
// initial structure of designTime object
|
|
14
|
+
var oDesignTime = {
|
|
15
|
+
name: "{name}",
|
|
16
|
+
description: "{description}",
|
|
17
|
+
actions: {
|
|
18
|
+
settings: function () {
|
|
19
|
+
//RTA expects the settings to be returned as function
|
|
20
|
+
return {
|
|
21
|
+
handler: function (oControl, mPropertyBag) {
|
|
22
|
+
return Engine.getInstance().getRTASettingsActionHandler(oControl, mPropertyBag, oControl.getP13nMode());
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
properties: {},
|
|
28
|
+
aggregations: {
|
|
29
|
+
_content: {
|
|
30
|
+
propagateMetadata: function(oElement) {
|
|
31
|
+
if (oElement.isA("sap.ui.mdc.ActionToolbar")) {
|
|
32
|
+
return {
|
|
33
|
+
actions: {
|
|
34
|
+
settings: {}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
23
38
|
|
|
24
|
-
// Returns the designTime object for RTA/DTA
|
|
25
|
-
function getDesignTime() {
|
|
26
|
-
// initial structure of designTime object
|
|
27
|
-
var oDesignTime = {
|
|
28
|
-
name: "{name}",
|
|
29
|
-
description: "{description}",
|
|
30
|
-
actions: {
|
|
31
|
-
settings: function () {
|
|
32
|
-
//RTA expects the settings to be returned as function
|
|
33
39
|
return {
|
|
34
|
-
|
|
35
|
-
return Engine.getInstance().getRTASettingsActionHandler(oControl, mPropertyBag, oControl.getP13nMode());
|
|
36
|
-
}
|
|
40
|
+
actions: "not-adaptable" // other controls within the conten aggregation will not be adaptable for RTA and Visual Editor
|
|
37
41
|
};
|
|
38
42
|
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var oTableMetadata = Table.getMetadata(),
|
|
45
|
-
// array containing all allowed control properties. Update the aAllowedProperties to enable a property for DTA
|
|
46
|
-
aAllowedProperties = ["width", "height", "headerLevel",
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
// array containing all allowed control properties. Update the aAllowedProperties to enable a property for DTA
|
|
47
|
+
var aAllowedProperties = ["width", "height", "headerLevel",
|
|
47
48
|
"header", "headerVisible", "showRowCount", "threshold",
|
|
48
49
|
"noDataText", "enableExport", "busyIndicatorDelay","enableColumnResize",
|
|
49
50
|
"showPasteButton", "multiSelectMode"],
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
// array containing all control aggregations
|
|
55
|
-
aAllAggregations = Object.keys(oTableMetadata.getAllAggregations()).concat(Object.keys(oTableMetadata.getAllPrivateAggregations()));
|
|
56
|
-
|
|
57
|
-
// populate the oDesignTime.properties with the control properties (allowed/disallowed). By default all properties are ignored.
|
|
58
|
-
aAllProperties.forEach(function(sPropertyName) {
|
|
59
|
-
enhanceDesignTimeMetadata(aAllowedProperties, sPropertyName, oDesignTime.properties);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
// populate the oDesignTime.aggregations with the control aggregations (allowed/disallowed). By default all aggregations are ignored.
|
|
63
|
-
aAllAggregations.forEach(function(sAggregationName) {
|
|
64
|
-
enhanceDesignTimeMetadata(aAllowedAggregations, sAggregationName, oDesignTime.aggregations);
|
|
65
|
-
});
|
|
51
|
+
// array containing all allowed control aggregations. Update the aAllowedAggregations to enable an aggregation for DTA
|
|
52
|
+
aAllowedAggregations = [
|
|
53
|
+
"_content"
|
|
54
|
+
];
|
|
66
55
|
|
|
67
|
-
|
|
68
|
-
}
|
|
56
|
+
return Util.getDesignTime(Table, aAllowedProperties, aAllowedAggregations, oDesignTime);
|
|
69
57
|
|
|
70
|
-
return getDesignTime();
|
|
71
58
|
});
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
* @param {object} [mSettings] Initial settings for the new control
|
|
36
36
|
* @class A field help used in the <code>FieldHelp</code> association in <code>FieldBase</code> controls that shows a list for Boolean values.
|
|
37
37
|
* @extends sap.ui.mdc.field.FieldHelpBase
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.100.1
|
|
39
39
|
* @constructor
|
|
40
40
|
* @private
|
|
41
41
|
* @ui5-restricted sap.ui.mdc.field.FieldBase
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
* @param {object} [mSettings] Initial settings for the new control
|
|
36
36
|
* @class A field help used in the <code>FieldHelp</code> association in <code>FieldBase</code> controls to show a popover of conditions.
|
|
37
37
|
* @extends sap.ui.mdc.field.FieldHelpBase
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.100.1
|
|
39
39
|
* @constructor
|
|
40
40
|
* @private
|
|
41
41
|
* @ui5-restricted sap.ui.mdc.field.FieldBase, sap.fe
|
|
@@ -18,6 +18,7 @@ sap.ui.define([
|
|
|
18
18
|
'sap/ui/mdc/enum/BaseType',
|
|
19
19
|
'sap/ui/mdc/enum/ConditionValidated',
|
|
20
20
|
'sap/base/util/merge',
|
|
21
|
+
'sap/base/strings/whitespaceReplacer',
|
|
21
22
|
'sap/ui/base/SyncPromise'
|
|
22
23
|
],
|
|
23
24
|
function(
|
|
@@ -33,6 +34,7 @@ sap.ui.define([
|
|
|
33
34
|
BaseType,
|
|
34
35
|
ConditionValidated,
|
|
35
36
|
merge,
|
|
37
|
+
whitespaceReplacer,
|
|
36
38
|
SyncPromise
|
|
37
39
|
) {
|
|
38
40
|
"use strict";
|
|
@@ -46,7 +48,7 @@ sap.ui.define([
|
|
|
46
48
|
* @extends sap.ui.model.SimpleType
|
|
47
49
|
*
|
|
48
50
|
* @author SAP SE
|
|
49
|
-
* @version 1.
|
|
51
|
+
* @version 1.100.1
|
|
50
52
|
*
|
|
51
53
|
* @since 1.62.0
|
|
52
54
|
* @private
|
|
@@ -72,6 +74,7 @@ sap.ui.define([
|
|
|
72
74
|
* @param {sap.ui.mdc.condition.ConditionModel} [oFormatOptions.conditionModel] <code>ConditionModel</code>, if bound to one
|
|
73
75
|
* @param {string} [oFormatOptions.conditionModelName] Name of the <code>ConditionModel</code>, if bound to one
|
|
74
76
|
* @param {string} [oFormatOptions.defaultOperatorName] Name of the default <code>Operator</code>
|
|
77
|
+
* @param {boolean} [oFormatOptions.convertWhitespaces] If set, whitespaces will be replaced by special characters to display whitespaces in HTML
|
|
75
78
|
* @param {object} [oConstraints] Value constraints
|
|
76
79
|
* @alias sap.ui.mdc.field.ConditionType
|
|
77
80
|
*/
|
|
@@ -204,7 +207,15 @@ sap.ui.define([
|
|
|
204
207
|
throw new FormatException("No valid condition provided, Operator wrong.");
|
|
205
208
|
}
|
|
206
209
|
|
|
207
|
-
|
|
210
|
+
var sResult = oOperator.format(oCondition, oType, sDisplay, bHideOperator);
|
|
211
|
+
var bConvertWhitespaces = this.oFormatOptions.convertWhitespaces;
|
|
212
|
+
|
|
213
|
+
if (bConvertWhitespaces && (_getBaseType.call(this, oType) === BaseType.String || sDisplay !== FieldDisplay.Value)) {
|
|
214
|
+
// convert only string types to prevent unwanted side effects
|
|
215
|
+
sResult = whitespaceReplacer(sResult);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return sResult;
|
|
208
219
|
|
|
209
220
|
}
|
|
210
221
|
|
|
@@ -635,14 +646,14 @@ sap.ui.define([
|
|
|
635
646
|
throw new ValidateException(this._oResourceBundle.getText("field.VALUE_NOT_VALID"));
|
|
636
647
|
}
|
|
637
648
|
|
|
638
|
-
var oOperator = FilterOperatorUtil.getOperator(oCondition.operator
|
|
649
|
+
var oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
|
|
639
650
|
|
|
640
651
|
if (bIsUnit) {
|
|
641
652
|
// only use unit in condition
|
|
642
653
|
oOperator = FilterOperatorUtil.getEQOperator(); // as only EQ is allowed for unit
|
|
643
654
|
}
|
|
644
655
|
|
|
645
|
-
if (!oOperator) {
|
|
656
|
+
if (!oOperator || aOperators.indexOf(oOperator.name) === -1) {
|
|
646
657
|
throw new ValidateException("No valid condition provided, Operator wrong.");
|
|
647
658
|
}
|
|
648
659
|
|
|
@@ -36,7 +36,7 @@ sap.ui.define([
|
|
|
36
36
|
* @extends sap.ui.model.SimpleType
|
|
37
37
|
*
|
|
38
38
|
* @author SAP SE
|
|
39
|
-
* @version 1.
|
|
39
|
+
* @version 1.100.1
|
|
40
40
|
*
|
|
41
41
|
* @since 1.62.0
|
|
42
42
|
* @private
|
|
@@ -62,6 +62,7 @@ sap.ui.define([
|
|
|
62
62
|
* @param {sap.ui.mdc.condition.ConditionModel} [oFormatOptions.conditionModel] <code>ConditionModel</code>, if bound to one
|
|
63
63
|
* @param {string} [oFormatOptions.conditionModelName] Name of the <code>ConditionModel</code>, if bound to one
|
|
64
64
|
* @param {string} [oFormatOptions.defaultOperatorName] Name of the default <code>Operator</code>
|
|
65
|
+
* @param {boolean} [oFormatOptions.convertWhitespaces] If set, whitespaces will be replaced by special characters to display whitespaces in HTML
|
|
65
66
|
* @param {object} [oConstraints] Value constraints
|
|
66
67
|
* @alias sap.ui.mdc.field.ConditionsType
|
|
67
68
|
*/
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @param {object} [mSettings] Initial settings for the new control
|
|
17
17
|
* @class A field help used in the <code>FieldHelp</code> association in <code>FieldBase</code> controls that allows you to add custom content.
|
|
18
18
|
* @extends sap.ui.mdc.field.FieldHelpBase
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.100.1
|
|
20
20
|
* @constructor
|
|
21
21
|
* @private
|
|
22
22
|
* @ui5-restricted sap.fe
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @param {object} [mSettings] Initial settings for the new control
|
|
17
17
|
* @class A field help used in the <code>FieldInfo</code> aggregation in <code>FieldBase</code> controls that allows you to add custom content.
|
|
18
18
|
* @extends sap.ui.mdc.field.FieldInfoBase
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.100.1
|
|
20
20
|
* @constructor
|
|
21
21
|
* @private
|
|
22
22
|
* @ui5-restricted sap.fe
|
|
@@ -32,7 +32,8 @@ sap.ui.define([
|
|
|
32
32
|
'sap/m/Button',
|
|
33
33
|
'sap/m/Panel',
|
|
34
34
|
'sap/base/Log',
|
|
35
|
-
'sap/ui/core/InvisibleMessage'
|
|
35
|
+
'sap/ui/core/InvisibleMessage',
|
|
36
|
+
'sap/ui/thirdparty/jquery'
|
|
36
37
|
], function(
|
|
37
38
|
Control,
|
|
38
39
|
ManagedObjectObserver,
|
|
@@ -62,7 +63,8 @@ sap.ui.define([
|
|
|
62
63
|
Button,
|
|
63
64
|
Panel,
|
|
64
65
|
Log,
|
|
65
|
-
InvisibleMessage
|
|
66
|
+
InvisibleMessage,
|
|
67
|
+
jQuery
|
|
66
68
|
) {
|
|
67
69
|
"use strict";
|
|
68
70
|
|
|
@@ -89,7 +91,7 @@ sap.ui.define([
|
|
|
89
91
|
* @extends sap.ui.core.Control
|
|
90
92
|
*
|
|
91
93
|
* @author SAP SE
|
|
92
|
-
* @version 1.
|
|
94
|
+
* @version 1.100.1
|
|
93
95
|
*
|
|
94
96
|
* @constructor
|
|
95
97
|
* @alias sap.ui.mdc.field.DefineConditionPanel
|
|
@@ -280,6 +282,12 @@ sap.ui.define([
|
|
|
280
282
|
}
|
|
281
283
|
}
|
|
282
284
|
|
|
285
|
+
if (aConditions.length === 1 && iIndex === 0) {
|
|
286
|
+
// the only one existing condition is removed. -> add dummy condition to have it in update in one step
|
|
287
|
+
this.addDummyCondition(1); // TODO: without setProperty to update condition at once?
|
|
288
|
+
aConditions = this.getConditions();
|
|
289
|
+
}
|
|
290
|
+
|
|
283
291
|
aConditions.splice(iIndex, 1);
|
|
284
292
|
this.setProperty("conditions", aConditions, true); // do not invalidate whole DefineConditionPanel
|
|
285
293
|
_checkInvalidInput.call(this, undefined); // check if invalid condition was removed
|
|
@@ -700,6 +708,7 @@ sap.ui.define([
|
|
|
700
708
|
delegate: _getDelegate.call(this),
|
|
701
709
|
value: { path: "$this>", type: oNullableType, mode: 'TwoWay', targetType: 'raw' },
|
|
702
710
|
editMode: {parts: [{path: "$condition>operator"}, {path: "$condition>invalid"}], formatter: _getEditModeFromOperator},
|
|
711
|
+
multipleLines: false,
|
|
703
712
|
width: "100%"
|
|
704
713
|
});
|
|
705
714
|
}
|
|
@@ -980,7 +989,7 @@ sap.ui.define([
|
|
|
980
989
|
if (oOperator && oOperator.valueTypes[0] === Operator.ValueType.Static && (oCondition.values.length === 0 || bTypeChange)) {
|
|
981
990
|
// if type changed the text needs to be new formatted (setting of type and conditions might be async.)
|
|
982
991
|
if (oOperator.getStaticText) {
|
|
983
|
-
var sText = oOperator.getStaticText(oDataType);
|
|
992
|
+
var sText = oOperator.getStaticText(oDataType, _getBaseType.call(this, oDataType));
|
|
984
993
|
if (oCondition.values.length > 0) {
|
|
985
994
|
oCondition.values[0] = sText;
|
|
986
995
|
} else {
|
|
@@ -1167,7 +1176,9 @@ sap.ui.define([
|
|
|
1167
1176
|
var oOperatorField = new Field(sIdPrefix + "-operator", {
|
|
1168
1177
|
value: {path: "$this>operator", type: this._oOperatorFieldType},
|
|
1169
1178
|
width: "100%",
|
|
1170
|
-
display:
|
|
1179
|
+
display: FieldDisplay.Description,
|
|
1180
|
+
editMode: EditMode.Editable,
|
|
1181
|
+
multipleLines: false,
|
|
1171
1182
|
fieldHelp: this.getId() + "--rowSelect-help",
|
|
1172
1183
|
change: this.onSelectChange.bind(this),
|
|
1173
1184
|
ariaLabelledBy: this.getId() + "--ivtOperator"
|
|
@@ -46,7 +46,7 @@ sap.ui.define([
|
|
|
46
46
|
* @extends sap.ui.mdc.field.ConditionsType
|
|
47
47
|
*
|
|
48
48
|
* @author SAP SE
|
|
49
|
-
* @version 1.
|
|
49
|
+
* @version 1.100.1
|
|
50
50
|
*
|
|
51
51
|
* @since 1.96.0
|
|
52
52
|
* @private
|
|
@@ -120,20 +120,22 @@ sap.ui.define([
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
var aValues = [];
|
|
123
|
-
var
|
|
124
|
-
|
|
125
|
-
sOption = oOperator.alias || sOption;
|
|
126
|
-
}
|
|
123
|
+
var sBaseType = _getBaseType.call(this);
|
|
124
|
+
var sOption = FilterOperatorUtil.getDynamicDateOptionForOperator(oOperator, mLibrary.StandardDynamicDateRangeKeys, sBaseType);
|
|
127
125
|
|
|
128
126
|
for (var i = 0; i < oOperator.valueTypes.length; i++) {
|
|
129
|
-
if (
|
|
127
|
+
if (sOption && oOperator.valueTypes[i] === Operator.ValueType.Self) { // only for standard operators
|
|
130
128
|
aValues.push(_dateToTimestamp.call(this, oCondition.values[i]));
|
|
131
129
|
} else if (oOperator.valueTypes[i] && oOperator.valueTypes[i] !== Operator.ValueType.Static) {
|
|
132
130
|
aValues.push(oCondition.values[i]);
|
|
133
131
|
}
|
|
134
132
|
}
|
|
135
133
|
|
|
136
|
-
|
|
134
|
+
if (!sOption) {
|
|
135
|
+
sOption = FilterOperatorUtil.getCustomDynamicDateOptionForOperator(oOperator, sBaseType);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
var oDynamicDateType = _getDynamicDateType.call(this, sBaseType);
|
|
137
139
|
vResult = oDynamicDateType.formatValue({operator: sOption, values: aValues}, sInternalType);
|
|
138
140
|
}
|
|
139
141
|
|
|
@@ -141,7 +143,7 @@ sap.ui.define([
|
|
|
141
143
|
|
|
142
144
|
};
|
|
143
145
|
|
|
144
|
-
function _getDynamicDateType(
|
|
146
|
+
function _getDynamicDateType(sBaseType) {
|
|
145
147
|
|
|
146
148
|
if (!this._oDynamicDateType) {
|
|
147
149
|
var oDynamicDateFormatOptions = {
|
|
@@ -150,6 +152,11 @@ sap.ui.define([
|
|
|
150
152
|
},
|
|
151
153
|
"int": {}
|
|
152
154
|
};
|
|
155
|
+
if (sBaseType === BaseType.DateTime) {
|
|
156
|
+
oDynamicDateFormatOptions.datetime = {
|
|
157
|
+
source: {pattern: "timestamp"}
|
|
158
|
+
};
|
|
159
|
+
}
|
|
153
160
|
|
|
154
161
|
this._oDynamicDateType = new DynamicDateType(oDynamicDateFormatOptions);
|
|
155
162
|
}
|
|
@@ -160,12 +167,30 @@ sap.ui.define([
|
|
|
160
167
|
function _dateToTimestamp(vValue) {
|
|
161
168
|
|
|
162
169
|
var oType = _getInternalType.call(this);
|
|
170
|
+
var sBaseType = _getBaseType.call(this);
|
|
163
171
|
var sDate = oType.formatValue(vValue, "string");
|
|
164
|
-
var
|
|
165
|
-
var
|
|
166
|
-
var
|
|
167
|
-
var
|
|
168
|
-
var
|
|
172
|
+
var aParts;
|
|
173
|
+
var iHour = 0;
|
|
174
|
+
var iMinute = 0;
|
|
175
|
+
var iSecond = 0;
|
|
176
|
+
var iMillisecond = 0;
|
|
177
|
+
|
|
178
|
+
if (sBaseType === BaseType.DateTime) {
|
|
179
|
+
aParts = sDate.split("T");
|
|
180
|
+
sDate = aParts[0];
|
|
181
|
+
var sTime = aParts[1];
|
|
182
|
+
aParts = sTime.split(":");
|
|
183
|
+
iHour = parseInt(aParts[0]);
|
|
184
|
+
iMinute = parseInt(aParts[1]);
|
|
185
|
+
iSecond = parseInt(aParts[2]);
|
|
186
|
+
iMillisecond = parseInt(aParts[3]);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
aParts = sDate.split("-");
|
|
190
|
+
var iYear = parseInt(aParts[0]);
|
|
191
|
+
var iMonth = parseInt(aParts[1]) - 1;
|
|
192
|
+
var iDate = parseInt(aParts[2]);
|
|
193
|
+
var iTimeStamp = new Date(iYear, iMonth, iDate, iHour, iMinute, iSecond, iMillisecond).getTime();
|
|
169
194
|
|
|
170
195
|
return iTimeStamp;
|
|
171
196
|
|
|
@@ -174,11 +199,20 @@ sap.ui.define([
|
|
|
174
199
|
function _timestampToDate(iTimeStamp) {
|
|
175
200
|
|
|
176
201
|
var oType = _getInternalType.call(this);
|
|
202
|
+
var sBaseType = _getBaseType.call(this);
|
|
177
203
|
var oDate = new Date(iTimeStamp);
|
|
178
204
|
var iYear = oDate.getFullYear();
|
|
179
205
|
var iMonth = oDate.getMonth() + 1;
|
|
180
206
|
var iDate = oDate.getDate();
|
|
181
207
|
var sDate = iYear.toString() + "-" + ((iMonth < 10) ? "0" : "") + iMonth.toString() + "-" + ((iDate < 10) ? "0" : "") + iDate.toString();
|
|
208
|
+
|
|
209
|
+
if (sBaseType === BaseType.DateTime) {
|
|
210
|
+
var iHour = oDate.getHours();
|
|
211
|
+
var iMinute = oDate.getMinutes();
|
|
212
|
+
var iSecond = oDate.getSeconds();
|
|
213
|
+
var iMillisecond = oDate.getMilliseconds();
|
|
214
|
+
sDate = sDate + "T" + ((iHour < 10) ? "0" : "") + iHour.toString() + ":" + ((iMinute < 10) ? "0" : "") + iMinute.toString() + ":" + ((iSecond < 10) ? "0" : "") + iSecond.toString() + ":" + ((iMillisecond < 100) ? "0" : "") + ((iMillisecond < 10) ? "0" : "") + iMillisecond.toString();
|
|
215
|
+
}
|
|
182
216
|
var vDate = oType.parseValue(sDate, "string");
|
|
183
217
|
|
|
184
218
|
return vDate;
|
|
@@ -189,7 +223,15 @@ sap.ui.define([
|
|
|
189
223
|
|
|
190
224
|
if (!this._oInternalType) {
|
|
191
225
|
var oType = _getValueType.call(this);
|
|
192
|
-
|
|
226
|
+
var sBaseType = _getBaseType.call(this);
|
|
227
|
+
var sPattern;
|
|
228
|
+
|
|
229
|
+
if (sBaseType === BaseType.DateTime) {
|
|
230
|
+
sPattern = "yyyy-MM-dd'T'HH:mm:ss:SSS";
|
|
231
|
+
} else {
|
|
232
|
+
sPattern = "yyyy-MM-dd";
|
|
233
|
+
}
|
|
234
|
+
this._oInternalType = DateUtil.createInternalType(oType, sPattern);
|
|
193
235
|
}
|
|
194
236
|
|
|
195
237
|
return this._oInternalType;
|
|
@@ -214,11 +256,12 @@ sap.ui.define([
|
|
|
214
256
|
}
|
|
215
257
|
|
|
216
258
|
var sOperator = oValue.operator; // sOperator is the Option name
|
|
217
|
-
var oOperator = FilterOperatorUtil.
|
|
259
|
+
var oOperator = FilterOperatorUtil.getOperatorForDynamicDateOption(sOperator, _getBaseType.call(this)); // search via name and alias
|
|
218
260
|
sOperator = oOperator.name; // map it back to the real Operator name
|
|
219
261
|
|
|
220
262
|
if (oOperator) {
|
|
221
|
-
var
|
|
263
|
+
var sBaseType = _getBaseType.call(this);
|
|
264
|
+
var oDynamicDateType = _getDynamicDateType.call(this, sBaseType);
|
|
222
265
|
var vResult = oDynamicDateType.parseValue(oValue, sInternalType);
|
|
223
266
|
var aValues = [];
|
|
224
267
|
|
|
@@ -261,9 +304,9 @@ sap.ui.define([
|
|
|
261
304
|
throw new ValidateException(this._oResourceBundle.getText("field.VALUE_NOT_VALID"));
|
|
262
305
|
}
|
|
263
306
|
|
|
264
|
-
var oOperator = FilterOperatorUtil.getOperator(oCondition.operator
|
|
307
|
+
var oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
|
|
265
308
|
|
|
266
|
-
if (!oOperator) {
|
|
309
|
+
if (!oOperator || aOperators.indexOf(oOperator.name) === -1) {
|
|
267
310
|
throw new ValidateException("No valid condition provided, Operator wrong.");
|
|
268
311
|
}
|
|
269
312
|
|
|
@@ -299,13 +342,27 @@ sap.ui.define([
|
|
|
299
342
|
|
|
300
343
|
var aOperators = this.oFormatOptions.operators;
|
|
301
344
|
if (!aOperators || aOperators.length === 0) {
|
|
302
|
-
aOperators = FilterOperatorUtil.getOperatorsForType(
|
|
345
|
+
aOperators = FilterOperatorUtil.getOperatorsForType(_getBaseType.call(this));
|
|
303
346
|
}
|
|
304
347
|
|
|
305
348
|
return aOperators;
|
|
306
349
|
|
|
307
350
|
}
|
|
308
351
|
|
|
352
|
+
function _getBaseType() {
|
|
353
|
+
|
|
354
|
+
var oType = _getValueType.call(this);
|
|
355
|
+
var sType = oType.getMetadata().getName();
|
|
356
|
+
var oFormatOptions = oType.getFormatOptions();
|
|
357
|
+
var oConstraints = oType.getConstraints();
|
|
358
|
+
var oDelegate = this.oFormatOptions.delegate;
|
|
359
|
+
var oPayload = this.oFormatOptions.payload;
|
|
360
|
+
var sBaseType = oDelegate ? oDelegate.getTypeUtil(oPayload).getBaseType(sType, oFormatOptions, oConstraints) : BaseType.Date;
|
|
361
|
+
|
|
362
|
+
return sBaseType;
|
|
363
|
+
|
|
364
|
+
}
|
|
365
|
+
|
|
309
366
|
return DynamicDateRangeConditionsType;
|
|
310
367
|
|
|
311
368
|
});
|