@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
|
@@ -14,9 +14,9 @@ sap.ui.define([
|
|
|
14
14
|
* modules such as the UIManager and the DefaultProviderRegistry.
|
|
15
15
|
*
|
|
16
16
|
* @author SAP SE
|
|
17
|
-
* @private
|
|
18
17
|
* @since 1.90
|
|
19
18
|
* @experimental As of version 1.90
|
|
19
|
+
* @private
|
|
20
20
|
* @ui5-restricted sap.ui.mdc
|
|
21
21
|
* @alias sap.ui.mdc.p13n.AdaptationProvider
|
|
22
22
|
*/
|
|
@@ -32,15 +32,16 @@ sap.ui.define([
|
|
|
32
32
|
var oEngine;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Constructor for a new Engine.
|
|
36
|
-
*
|
|
37
|
-
*
|
|
35
|
+
* Constructor for a new Engine.
|
|
36
|
+
*
|
|
37
|
+
* The Engine should always be accessed via 'getInstance' and not by creating a new instance of it.
|
|
38
|
+
* The class should only be used to create derivations.
|
|
38
39
|
*
|
|
39
40
|
* @class
|
|
40
|
-
* @extends sap.ui.
|
|
41
|
+
* @extends sap.ui.mdc.p13n.AdaptationProvider
|
|
41
42
|
*
|
|
42
43
|
* @author SAP SE
|
|
43
|
-
* @version 1.
|
|
44
|
+
* @version 1.100.1
|
|
44
45
|
*
|
|
45
46
|
* @private
|
|
46
47
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -392,15 +393,14 @@ sap.ui.define([
|
|
|
392
393
|
|
|
393
394
|
return Promise.resolve()
|
|
394
395
|
.then(function() {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
396
|
+
var oModificationHandler = this.getModificationHandler(vControl);
|
|
397
|
+
return oModificationHandler.enhanceConfig(oControl, mEnhanceConfig)
|
|
398
|
+
.then(function(oConfig){
|
|
399
|
+
if (oRegistryEntry) {
|
|
400
|
+
//to simplify debugging
|
|
399
401
|
oRegistryEntry.xConfig = oConfig;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
throw new Error("The control instance needs to be registered to use xConfig!");
|
|
403
|
-
}
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
404
|
}.bind(this));
|
|
405
405
|
};
|
|
406
406
|
|
|
@@ -559,7 +559,7 @@ sap.ui.define([
|
|
|
559
559
|
* @private
|
|
560
560
|
*
|
|
561
561
|
* @param {sap.ui.mdc.Control} vControl The registered control instance
|
|
562
|
-
* @param {string}
|
|
562
|
+
* @param {string|string[]} aKeys The key for the according Controller
|
|
563
563
|
* @param {Object[]} aCustomInfo A custom set of propertyinfos as base to create the UI
|
|
564
564
|
*
|
|
565
565
|
* @returns {Promise} A Promise resolving after the adaptation housekeeping has been initialized.
|
|
@@ -624,7 +624,7 @@ sap.ui.define([
|
|
|
624
624
|
* and the set of provided registered keys.
|
|
625
625
|
*
|
|
626
626
|
* @param {sap.ui.mdc.Control} vControl The registered Control instance.
|
|
627
|
-
* @param {string|array}
|
|
627
|
+
* @param {string|array} vKeys A key as string or an array of keys
|
|
628
628
|
*
|
|
629
629
|
* @returns {object} The requested UI settings of the control instance and provided keys
|
|
630
630
|
*/
|
|
@@ -761,6 +761,9 @@ sap.ui.define([
|
|
|
761
761
|
var sHandlerMode = aPersistenceProvider ? aPersistenceProvider[0].getMode() : "Standard";
|
|
762
762
|
|
|
763
763
|
var mHandlerMode = {
|
|
764
|
+
//During preprocessing, it might be necessary to calculate the modification handler instance
|
|
765
|
+
//without an initialized control instance --> use flex as default
|
|
766
|
+
undefined: FlexModificationHandler,
|
|
764
767
|
Global: FlexModificationHandler,
|
|
765
768
|
Transient: FlexModificationHandler,
|
|
766
769
|
Standard: FlexModificationHandler,
|
|
@@ -931,7 +934,7 @@ sap.ui.define([
|
|
|
931
934
|
/**
|
|
932
935
|
* Reads the current state of the subcontrollers and triggers a state appliance
|
|
933
936
|
*
|
|
934
|
-
* @param {sap.ui.mdc.Control}
|
|
937
|
+
* @param {sap.ui.mdc.Control} oControl The registered Control instance.
|
|
935
938
|
* @param {array} aKeys An array of keys
|
|
936
939
|
* @returns {Promise} A Promise resolving after all p13n changes have been calculated and processed
|
|
937
940
|
*/
|
|
@@ -1026,9 +1029,9 @@ sap.ui.define([
|
|
|
1026
1029
|
};
|
|
1027
1030
|
|
|
1028
1031
|
/**
|
|
1029
|
-
* @private
|
|
1030
|
-
*
|
|
1031
1032
|
* This method can be used for debugging to retrieve the complete registry.
|
|
1033
|
+
*
|
|
1034
|
+
* @private
|
|
1032
1035
|
*/
|
|
1033
1036
|
Engine.prototype._getRegistry = function() {
|
|
1034
1037
|
var oRegistry = {
|
|
@@ -100,11 +100,6 @@ sap.ui.define([
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
var aFilterConditionChanges = FlexUtil._diffConditionPath(sFieldPath, mNewConditionState[sFieldPath], mPreviousConditionState[sFieldPath], oAdaptationControl);
|
|
103
|
-
|
|
104
|
-
if (oAdaptationControl && oAdaptationControl.createPropertyInfoChanges && (aFilterConditionChanges.length > 0)) {
|
|
105
|
-
aFilterConditionChanges = oAdaptationControl.createPropertyInfoChanges(sFieldPath).concat(aFilterConditionChanges);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
103
|
aConditionChanges = aConditionChanges.concat(aFilterConditionChanges);
|
|
109
104
|
}
|
|
110
105
|
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
*
|
|
17
17
|
* @param {object[]} aProperties
|
|
18
18
|
* The properties to process in this helper
|
|
19
|
-
* @param {
|
|
19
|
+
* @param {Object<string, object>} [mExtensions]
|
|
20
20
|
* Key-value map, where the key is the name of the property and the value is the extension containing mode-specific information.
|
|
21
21
|
* The extension of a property is stored in a reserved <code>extension</code> attribute and its attributes must be specified with
|
|
22
22
|
* <code>mExtensionAttributeMetadata</code>.
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @extends sap.ui.mdc.util.PropertyHelper
|
|
30
30
|
*
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.100.1
|
|
33
33
|
*
|
|
34
34
|
* @private
|
|
35
35
|
* @experimental
|
|
@@ -43,6 +43,10 @@ sap.ui.define([
|
|
|
43
43
|
* <li><code>aggregated</code> - Set to <code>false</code> to remove an aggregation.</li>
|
|
44
44
|
* </ul>
|
|
45
45
|
*
|
|
46
|
+
* <b>Note:</b>To improve the performance, you should avoid additional calls of the control’s delegate.
|
|
47
|
+
* To do this, the <code>propertyInfo</code> property of the relevant control can be enriched with the properties used in the provided state.
|
|
48
|
+
*
|
|
49
|
+
*
|
|
46
50
|
* @private
|
|
47
51
|
* @ui5-restricted sap.fe
|
|
48
52
|
* @MDC_PUBLIC_CANDIDATE
|
|
@@ -10,8 +10,9 @@ sap.ui.define([
|
|
|
10
10
|
"sap/m/p13n/Container",
|
|
11
11
|
"sap/m/p13n/AbstractContainerItem",
|
|
12
12
|
"sap/base/util/UriParameters",
|
|
13
|
-
"sap/base/Log"
|
|
14
|
-
|
|
13
|
+
"sap/base/Log",
|
|
14
|
+
"sap/ui/thirdparty/jquery"
|
|
15
|
+
], function (BaseObject, P13nBuilder, P13nContainer, AbstractContainerItem, SAPUriParameters, Log, jQuery) {
|
|
15
16
|
"use strict";
|
|
16
17
|
|
|
17
18
|
var ERROR_INSTANCING = "UIManager: This class is a singleton and should not be used without an AdaptationProvider. Please use 'sap.ui.mdc.p13n.Engine.getInstance().uimanager' instead";
|
|
@@ -20,7 +21,7 @@ sap.ui.define([
|
|
|
20
21
|
var oUIManager;
|
|
21
22
|
|
|
22
23
|
//Used for experimental features (such as livemode)
|
|
23
|
-
var oURLParams =
|
|
24
|
+
var oURLParams = SAPUriParameters.fromQuery(window.location.search);
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* Constructor for a new UIManager.
|
|
@@ -32,7 +33,7 @@ sap.ui.define([
|
|
|
32
33
|
* @extends sap.ui.base.Object
|
|
33
34
|
*
|
|
34
35
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
36
|
+
* @version 1.100.1
|
|
36
37
|
*
|
|
37
38
|
* @private
|
|
38
39
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -73,7 +74,7 @@ sap.ui.define([
|
|
|
73
74
|
this.bLiveMode = false;
|
|
74
75
|
|
|
75
76
|
//!!!Warning: experimental and only for testing purposes!!!----------
|
|
76
|
-
if (oURLParams.
|
|
77
|
+
if (oURLParams.get("sap-ui-xx-p13nLiveMode") === "true"){
|
|
77
78
|
this.bLiveMode = true;
|
|
78
79
|
Log.warning("Please note that the p13n liveMode is experimental");
|
|
79
80
|
}
|
|
@@ -101,7 +102,7 @@ sap.ui.define([
|
|
|
101
102
|
* @ui5-restricted sap.ui.mdc
|
|
102
103
|
*
|
|
103
104
|
* @param {sap.ui.mdc.Control} vControl The registered control instance
|
|
104
|
-
* @param {string}
|
|
105
|
+
* @param {string|string[]} vKey The key for the according Controller
|
|
105
106
|
* @param {Object[]} aCustomInfo A custom set of propertyinfos as base to create the UI
|
|
106
107
|
*
|
|
107
108
|
* @returns {Promise} A Promise resolving in the P13n UI.
|
|
@@ -157,8 +158,8 @@ sap.ui.define([
|
|
|
157
158
|
*
|
|
158
159
|
* @private
|
|
159
160
|
*
|
|
160
|
-
* @param {sap.ui.mdc.Control}
|
|
161
|
-
* @param {string} aKeys The
|
|
161
|
+
* @param {sap.ui.mdc.Control} oControl The registered control instance.
|
|
162
|
+
* @param {string} aKeys The registered key to get the corresponding Controller.
|
|
162
163
|
*
|
|
163
164
|
* @returns {Promise} A Promise resolving in the according container
|
|
164
165
|
* (Depending on the Controllers livemode config).
|
|
@@ -233,9 +234,10 @@ sap.ui.define([
|
|
|
233
234
|
*
|
|
234
235
|
* @private
|
|
235
236
|
*
|
|
236
|
-
* @param {sap.ui.mdc.Control}
|
|
237
|
-
* @param {string}
|
|
238
|
-
* @param {
|
|
237
|
+
* @param {sap.ui.mdc.Control} oControl The registered control instance.
|
|
238
|
+
* @param {string[]} aKeys The registered keys to get the corresponding Controller.
|
|
239
|
+
* @param {*} oPopupContent
|
|
240
|
+
* @param {*} oUISettings
|
|
239
241
|
*
|
|
240
242
|
* @returns {Promise} Returns a Promise resolving in the container instance
|
|
241
243
|
*/
|
|
@@ -297,9 +299,10 @@ sap.ui.define([
|
|
|
297
299
|
*
|
|
298
300
|
* @private
|
|
299
301
|
*
|
|
300
|
-
* @param {sap.ui.mdc.Control}
|
|
301
|
-
* @param {string}
|
|
302
|
+
* @param {sap.ui.mdc.Control} oControl The registered control instance.
|
|
303
|
+
* @param {string[]} aKeys The registerd key to get the corresponding Controller.
|
|
302
304
|
* @param {sap.ui.core.Control} oPanel The control instance which is set in the content area of the container.
|
|
305
|
+
* @param {object} mUISettings
|
|
303
306
|
*
|
|
304
307
|
* @returns {sap.m.ResponsivePopover} The popover instance.
|
|
305
308
|
*/
|
|
@@ -123,7 +123,10 @@ sap.ui.define([
|
|
|
123
123
|
.then(function(oRetrievedXConfig) {
|
|
124
124
|
oXConfig = oRetrievedXConfig;
|
|
125
125
|
if (oXConfig) {
|
|
126
|
-
return oModifier.getProperty(oXConfig, "value")
|
|
126
|
+
return oModifier.getProperty(oXConfig, "value")
|
|
127
|
+
.then(function(sConfig){
|
|
128
|
+
return merge({}, JSON.parse(sConfig.replace(/\\/g, '')));
|
|
129
|
+
});
|
|
127
130
|
}
|
|
128
131
|
return {
|
|
129
132
|
aggregations: {}
|
|
@@ -160,19 +163,20 @@ sap.ui.define([
|
|
|
160
163
|
|
|
161
164
|
var oAppComponent = mPropertyBag ? mPropertyBag.appComponent : undefined;
|
|
162
165
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
var pDelete = Promise.resolve();
|
|
167
|
+
if (oXConfig && oControl.isA) {
|
|
168
|
+
pDelete = oModifier.removeAggregation(oControl, "customData", oXConfig)
|
|
166
169
|
.then(function(){
|
|
167
|
-
return
|
|
168
|
-
});
|
|
169
|
-
} else {
|
|
170
|
-
oControl._pXConfigCreation
|
|
171
|
-
.then(function(oCustomData){
|
|
172
|
-
oModifier.setProperty(oCustomData, "value", oConfig);
|
|
173
|
-
return oConfig;
|
|
170
|
+
return oModifier.destroy(oXConfig);
|
|
174
171
|
});
|
|
175
172
|
}
|
|
173
|
+
|
|
174
|
+
return pDelete.then(function(){
|
|
175
|
+
return oModifier.createAndAddCustomData(oControl, "xConfig", JSON.stringify(oConfig), oAppComponent)
|
|
176
|
+
.then(function(){
|
|
177
|
+
return merge({}, oConfig);
|
|
178
|
+
});
|
|
179
|
+
});
|
|
176
180
|
});
|
|
177
181
|
};
|
|
178
182
|
|
|
@@ -203,8 +207,8 @@ sap.ui.define([
|
|
|
203
207
|
.then(function(oAggregationConfig) {
|
|
204
208
|
if (oAggregationConfig) {
|
|
205
209
|
return oModifier.getProperty(oAggregationConfig, "value")
|
|
206
|
-
.then(function(
|
|
207
|
-
return merge({},
|
|
210
|
+
.then(function(sValue) {
|
|
211
|
+
return merge({}, JSON.parse(sValue.replace(/\\/g, '')));
|
|
208
212
|
});
|
|
209
213
|
}
|
|
210
214
|
return null;
|
|
@@ -246,7 +250,7 @@ sap.ui.define([
|
|
|
246
250
|
oAggregationConfig = fnGetAggregationSync(oControl, "customData").find(function(oCustomData){
|
|
247
251
|
return fnGetPropertySync(oCustomData, "key") == "xConfig";
|
|
248
252
|
});
|
|
249
|
-
oConfig = oAggregationConfig ? merge({}, fnGetPropertySync(oAggregationConfig, "value")) : null;
|
|
253
|
+
oConfig = oAggregationConfig ? merge({}, JSON.parse(fnGetPropertySync(oAggregationConfig, "value").replace(/\\/g, ''))) : null;
|
|
250
254
|
return oConfig;
|
|
251
255
|
};
|
|
252
256
|
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
"
|
|
7
|
+
"sap/m/p13n/SelectionPanel",
|
|
8
8
|
"sap/ui/model/Sorter"
|
|
9
|
-
], function(
|
|
9
|
+
], function(SelectionPanel, Sorter) {
|
|
10
10
|
"use strict";
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -15,7 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
16
16
|
* @param {object} [mSettings] initial settings for the new control
|
|
17
17
|
* @class
|
|
18
|
-
* @extends sap.
|
|
18
|
+
* @extends sap.m.p13n.SelectionPanel
|
|
19
19
|
* @author SAP SE
|
|
20
20
|
* @constructor The ActionToolbarPanel is a list based view to personalize selection and ordering of a Control aggregation.
|
|
21
21
|
* @private
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @alias sap.ui.mdc.p13n.panels.ActionToolbarPanel
|
|
25
25
|
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
26
26
|
*/
|
|
27
|
-
var ActionToolbarPanel =
|
|
27
|
+
var ActionToolbarPanel = SelectionPanel.extend("sap.ui.mdc.p13n.panels.ActionToolbarPanel", {
|
|
28
28
|
metadata: {
|
|
29
29
|
library: "sap.ui.mdc"
|
|
30
30
|
},
|
|
@@ -34,7 +34,7 @@ sap.ui.define([
|
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
ActionToolbarPanel.prototype._bindListItems = function(mBindingInfo) {
|
|
37
|
-
var oTemplate = this.
|
|
37
|
+
var oTemplate = this.getAggregation("_template");
|
|
38
38
|
if (oTemplate) {
|
|
39
39
|
var fnGetAlignment = function(oContext) {
|
|
40
40
|
return oContext.getProperty("alignment");
|
|
@@ -49,7 +49,7 @@ sap.ui.define([
|
|
|
49
49
|
sorter: oSorter,
|
|
50
50
|
key: "name",
|
|
51
51
|
templateShareable: false,
|
|
52
|
-
template: this.
|
|
52
|
+
template: this.getAggregation("_template").clone()
|
|
53
53
|
}, mBindingInfo));
|
|
54
54
|
}
|
|
55
55
|
};
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
"sap/
|
|
8
|
-
"sap/
|
|
9
|
-
"
|
|
7
|
+
"sap/m/p13n/AbstractContainer",
|
|
8
|
+
"sap/m/p13n/AbstractContainerItem",
|
|
9
|
+
"sap/m/p13n/SelectionPanel",
|
|
10
10
|
"./GroupView",
|
|
11
11
|
"sap/ui/model/Filter",
|
|
12
12
|
"sap/m/Button",
|
|
@@ -18,9 +18,9 @@ sap.ui.define([
|
|
|
18
18
|
"sap/m/SearchField",
|
|
19
19
|
"sap/m/OverflowToolbarLayoutData",
|
|
20
20
|
"sap/ui/core/Item",
|
|
21
|
-
"sap/
|
|
22
|
-
"sap/
|
|
23
|
-
], function(
|
|
21
|
+
"sap/m/library",
|
|
22
|
+
"sap/ui/model/json/JSONModel"
|
|
23
|
+
], function(AbstractContainer, AbstractContainerItem, SelectionPanel, GroupView, Filter, Button, Bar, ToolbarSpacer, Select, SegmentedButton, SegmentedButtonItem, SearchField, OverflowToolbarLayoutData, Item, mLibrary, JSONModel) {
|
|
24
24
|
"use strict";
|
|
25
25
|
|
|
26
26
|
// shortcut for sap.m.BarDesign
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
33
33
|
* @param {object} [mSettings] initial settings for the new control
|
|
34
34
|
* @class The AdaptFiltersPanel is meant to provide a container for different filter personalization views.
|
|
35
|
-
* @extends sap.
|
|
35
|
+
* @extends sap.m.p13n.AbstractContainer
|
|
36
36
|
* @author SAP SE
|
|
37
37
|
* @private
|
|
38
38
|
* @experimental
|
|
@@ -40,7 +40,7 @@ sap.ui.define([
|
|
|
40
40
|
* @alias sap.ui.mdc.p13n.panels.AdaptFiltersPanel
|
|
41
41
|
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
42
42
|
*/
|
|
43
|
-
var AdaptFiltersPanel =
|
|
43
|
+
var AdaptFiltersPanel = AbstractContainer.extend("sap.ui.mdc.p13n.panels.AdaptFiltersPanel", {
|
|
44
44
|
metadata: {
|
|
45
45
|
library: "sap.ui.mdc",
|
|
46
46
|
properties: {
|
|
@@ -70,17 +70,26 @@ sap.ui.define([
|
|
|
70
70
|
|
|
71
71
|
AdaptFiltersPanel.prototype.applySettings = function(mSettings) {
|
|
72
72
|
|
|
73
|
-
this.addView(new
|
|
73
|
+
this.addView(new AbstractContainerItem({
|
|
74
74
|
key: this.LIST_KEY,
|
|
75
|
-
content: new
|
|
75
|
+
content: new SelectionPanel(this.getId() + "-listView", {
|
|
76
|
+
activeColumn: this._getResourceText("p13nDialog.LIST_VIEW_ACTIVE"),
|
|
77
|
+
change: function(oEvt) {
|
|
78
|
+
this.getP13nModel().setProperty("/items", oEvt.getSource().getP13nData());
|
|
79
|
+
}.bind(this)
|
|
80
|
+
})
|
|
76
81
|
}));
|
|
77
82
|
|
|
78
|
-
this.addView(new
|
|
83
|
+
this.addView(new AbstractContainerItem({
|
|
79
84
|
key: this.GROUP_KEY,
|
|
80
|
-
content: new GroupView(this.getId() + "-groupView", {
|
|
85
|
+
content: new GroupView(this.getId() + "-groupView", {
|
|
86
|
+
change: function(oEvt) {
|
|
87
|
+
this.getP13nModel().setProperty("/itemsGrouped", oEvt.getSource().getP13nData());
|
|
88
|
+
}.bind(this)
|
|
89
|
+
})
|
|
81
90
|
}));
|
|
82
91
|
|
|
83
|
-
|
|
92
|
+
AbstractContainer.prototype.applySettings.apply(this, arguments);
|
|
84
93
|
|
|
85
94
|
this.getView(this.LIST_KEY).getContent().setEnableReorder(this.getEnableReorder());
|
|
86
95
|
|
|
@@ -142,7 +151,7 @@ sap.ui.define([
|
|
|
142
151
|
|
|
143
152
|
var sSwitchId = sKey;
|
|
144
153
|
|
|
145
|
-
|
|
154
|
+
AbstractContainer.prototype.switchView.call(this, sSwitchId);
|
|
146
155
|
|
|
147
156
|
//Only allow show/hide non custom view
|
|
148
157
|
this._getShowHideBtn().setVisible(!this._isCustomView());
|
|
@@ -151,7 +160,7 @@ sap.ui.define([
|
|
|
151
160
|
|
|
152
161
|
//Factory logic should only be executed for non custom panels
|
|
153
162
|
if (!this._isCustomView(sKey)){
|
|
154
|
-
this.showFactory(this.getCurrentViewContent().
|
|
163
|
+
this.showFactory(this.getCurrentViewContent()._getShowFactory());
|
|
155
164
|
}
|
|
156
165
|
|
|
157
166
|
//execute filtering
|
|
@@ -217,7 +226,7 @@ sap.ui.define([
|
|
|
217
226
|
}.bind(this));
|
|
218
227
|
}
|
|
219
228
|
|
|
220
|
-
this.addView(new
|
|
229
|
+
this.addView(new AbstractContainerItem({
|
|
221
230
|
key: sKey,
|
|
222
231
|
content: oContent.addStyleClass("sapUiMDCPanelPadding")
|
|
223
232
|
}));
|
|
@@ -261,13 +270,21 @@ sap.ui.define([
|
|
|
261
270
|
*/
|
|
262
271
|
AdaptFiltersPanel.prototype.setP13nModel = function(oModel) {
|
|
263
272
|
this.setModel(oModel, this.P13N_MODEL);
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
oP13nPanel.setP13nModel(oModel);
|
|
267
|
-
});
|
|
273
|
+
this.getView(this.LIST_KEY).getContent().setP13nData(oModel.getProperty("/items"));
|
|
274
|
+
this.getView(this.GROUP_KEY).getContent().setP13nData(oModel.getProperty("/itemsGrouped"));
|
|
268
275
|
this._filterByModeAndSearch();
|
|
269
276
|
};
|
|
270
277
|
|
|
278
|
+
AdaptFiltersPanel.prototype.setP13nData = function(oP13nData) {
|
|
279
|
+
var oP13nModel = this.getP13nModel();
|
|
280
|
+
if (!oP13nModel) {
|
|
281
|
+
this.setP13nModel(new JSONModel(oP13nData));
|
|
282
|
+
} else {
|
|
283
|
+
this.getView(this.LIST_KEY).getContent().setP13nData(oP13nModel.getProperty("/items"));
|
|
284
|
+
this.getView(this.GROUP_KEY).getContent().setP13nData(oP13nModel.getProperty("/itemsGrouped"));
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
|
|
271
288
|
/**
|
|
272
289
|
* Restores the default ui state of the <code>AdaptFiltersPanel</code>.
|
|
273
290
|
*/
|
|
@@ -295,7 +312,7 @@ sap.ui.define([
|
|
|
295
312
|
if (!this._oShowHideBtn) {
|
|
296
313
|
this._oShowHideBtn = new Button({
|
|
297
314
|
press: function(oEvt) {
|
|
298
|
-
this.showFactory(!this.getCurrentViewContent().
|
|
315
|
+
this.showFactory(!this.getCurrentViewContent()._getShowFactory());
|
|
299
316
|
var oBtn = oEvt.oSource;
|
|
300
317
|
var sNewText = oBtn.getText() === sShowText ? sHideText : sShowText;
|
|
301
318
|
oBtn.setText(sNewText);
|
|
@@ -303,7 +320,7 @@ sap.ui.define([
|
|
|
303
320
|
});
|
|
304
321
|
}
|
|
305
322
|
|
|
306
|
-
this._oShowHideBtn.setText(!this._isCustomView() && this.getCurrentViewContent().
|
|
323
|
+
this._oShowHideBtn.setText(!this._isCustomView() && this.getCurrentViewContent()._getShowFactory() ? sHideText : sShowText);
|
|
307
324
|
return this._oShowHideBtn;
|
|
308
325
|
};
|
|
309
326
|
|
|
@@ -381,7 +398,7 @@ sap.ui.define([
|
|
|
381
398
|
],
|
|
382
399
|
selectionChange: function(oEvt) {
|
|
383
400
|
if (this.getCurrentViewKey() === this.LIST_KEY) {
|
|
384
|
-
this.getCurrentViewContent().
|
|
401
|
+
this.getCurrentViewContent()._removeMoveButtons();
|
|
385
402
|
}
|
|
386
403
|
var sKey = oEvt.getParameter("item").getKey();
|
|
387
404
|
this.switchView(sKey);
|
|
@@ -410,11 +427,16 @@ sap.ui.define([
|
|
|
410
427
|
//Update value - necessary due to view switch
|
|
411
428
|
this._getSearchField().setValue(this._sSearchString);
|
|
412
429
|
|
|
413
|
-
this.getCurrentViewContent().
|
|
430
|
+
this.getCurrentViewContent().filterContent(aFilters);
|
|
414
431
|
|
|
415
432
|
return aFilters;
|
|
416
433
|
};
|
|
417
434
|
|
|
435
|
+
|
|
436
|
+
AdaptFiltersPanel.prototype._getResourceText = function(sKey) {
|
|
437
|
+
return sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc").getText(sKey);
|
|
438
|
+
};
|
|
439
|
+
|
|
418
440
|
//TODO: Renable with refactoring
|
|
419
441
|
/*
|
|
420
442
|
function matchTermToSearchRegex(term){
|
|
@@ -446,14 +468,14 @@ sap.ui.define([
|
|
|
446
468
|
vFilterMode = new Filter("visible", "EQ", true);
|
|
447
469
|
break;
|
|
448
470
|
case "active":
|
|
449
|
-
vFilterMode = new Filter("
|
|
471
|
+
vFilterMode = new Filter("active", "EQ", true);
|
|
450
472
|
break;
|
|
451
473
|
case "mandatory":
|
|
452
474
|
vFilterMode = new Filter("required", "EQ", true);
|
|
453
475
|
break;
|
|
454
476
|
case "visibleactive":
|
|
455
477
|
vFilterMode = new Filter([
|
|
456
|
-
new Filter("
|
|
478
|
+
new Filter("active", "EQ", true),
|
|
457
479
|
new Filter("visible", "EQ", true)
|
|
458
480
|
], true);
|
|
459
481
|
break;
|
|
@@ -467,7 +489,7 @@ sap.ui.define([
|
|
|
467
489
|
};
|
|
468
490
|
|
|
469
491
|
AdaptFiltersPanel.prototype.exit = function() {
|
|
470
|
-
|
|
492
|
+
AbstractContainer.prototype.exit.apply(this, arguments);
|
|
471
493
|
this._sModeKey = null;
|
|
472
494
|
this._sSearchString = null;
|
|
473
495
|
};
|
|
@@ -24,8 +24,9 @@ sap.ui.define([
|
|
|
24
24
|
"sap/m/library",
|
|
25
25
|
"sap/ui/Device",
|
|
26
26
|
"sap/ui/core/ResizeHandler",
|
|
27
|
-
"sap/ui/core/CustomData"
|
|
28
|
-
|
|
27
|
+
"sap/ui/core/CustomData",
|
|
28
|
+
"sap/ui/thirdparty/jquery"
|
|
29
|
+
], function (BasePanel, Label, ColumnListItem, Select, Text, Item, MDCLib, Button, Column, Table, Filter, FilterOperator, VBox, HBox, ComboBox, Sorter, Log, mLibrary, Device, ResizeHandler, CustomData, jQuery) {
|
|
29
30
|
"use strict";
|
|
30
31
|
|
|
31
32
|
// shortcut for sap.m.FlexJustifyContent
|
|
@@ -40,7 +41,7 @@ sap.ui.define([
|
|
|
40
41
|
* @class TODO
|
|
41
42
|
* <h3><b>Note:</b></h3>
|
|
42
43
|
* The control is experimental and the API/behaviour is not finalised and hence this should not be used for productive usage.
|
|
43
|
-
* @extends sap.
|
|
44
|
+
* @extends sap.m.p13n.BasePanel
|
|
44
45
|
* @author SAP SE
|
|
45
46
|
* @constructor The API/behaviour is not finalised and hence this control should not be used for productive usage.
|
|
46
47
|
* @private
|