@openui5/sap.ui.mdc 1.99.1 → 1.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +19 -0
- package/THIRDPARTY.txt +5 -5
- 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 +77 -77
- package/src/sap/ui/mdc/ChartDelegate.js +76 -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 +26 -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/LinkDelegate.js +7 -5
- package/src/sap/ui/mdc/MultiValueField.js +11 -1
- package/src/sap/ui/mdc/Table.js +340 -417
- package/src/sap/ui/mdc/TableDelegate.js +115 -35
- package/src/sap/ui/mdc/ValueHelp.js +150 -632
- package/src/sap/ui/mdc/ValueHelpDelegate.js +161 -8
- 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 +18 -6
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +11 -2
- package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +9 -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 +14 -9
- package/src/sap/ui/mdc/condition/ConditionConverter.js +58 -6
- 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 +146 -34
- package/src/sap/ui/mdc/condition/Operator.js +98 -16
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +80 -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 +16 -1
- package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +3 -1
- 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/enum/PropagationReason.js +43 -0
- package/src/sap/ui/mdc/enum/SelectType.js +3 -0
- 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 +70 -22
- package/src/sap/ui/mdc/field/ConditionsType.js +8 -2
- 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 +30 -23
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +76 -19
- package/src/sap/ui/mdc/field/FieldBase.js +84 -17
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +41 -19
- 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 +9 -4
- 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 +7 -4
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +11 -3
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +3 -3
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +31 -32
- 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 +13 -1
- package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +42 -7
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +128 -239
- package/src/sap/ui/mdc/filterbar/IFilterContainer.js +5 -0
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
- package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +1 -0
- package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +1 -0
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +164 -64
- 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 +73 -23
- 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 +4 -41
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
- package/src/sap/ui/mdc/flexibility/ChartTypeFlex.js +54 -0
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +49 -12
- 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 +30 -27
- package/src/sap/ui/mdc/link/ContactDetails.js +107 -23
- 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/ContactDetailsRenderer.js +26 -0
- 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 +197 -22
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/PanelRenderer.js +26 -0
- 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 +11 -6
- package/src/sap/ui/mdc/messagebundle_ar.properties +9 -7
- package/src/sap/ui/mdc/messagebundle_bg.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_ca.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_cs.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_cy.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_da.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_de.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_el.properties +6 -4
- package/src/sap/ui/mdc/messagebundle_en.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_es.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_et.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_fi.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_fr.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_hi.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_hr.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_hu.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_id.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_it.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_iw.properties +6 -4
- package/src/sap/ui/mdc/messagebundle_ja.properties +8 -6
- package/src/sap/ui/mdc/messagebundle_kk.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_ko.properties +6 -4
- package/src/sap/ui/mdc/messagebundle_lt.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_lv.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_ms.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_nl.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_no.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_pl.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_pt.properties +13 -11
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_ro.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_ru.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_sh.properties +10 -8
- package/src/sap/ui/mdc/messagebundle_sk.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_sl.properties +8 -6
- package/src/sap/ui/mdc/messagebundle_sv.properties +8 -6
- package/src/sap/ui/mdc/messagebundle_th.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_tr.properties +10 -8
- package/src/sap/ui/mdc/messagebundle_uk.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_vi.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +7 -5
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +23 -29
- 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 +354 -0
- package/src/sap/ui/mdc/odata/TypeUtil.js +2 -1
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +70 -3
- package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +8 -6
- 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 +29 -66
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -4
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +65 -5
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +353 -262
- package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +172 -69
- package/src/sap/ui/mdc/p13n/FlexUtil.js +26 -19
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
- package/src/sap/ui/mdc/p13n/StateUtil.js +34 -51
- package/src/sap/ui/mdc/p13n/UIManager.js +21 -14
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +0 -174
- package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +15 -12
- package/src/sap/ui/mdc/p13n/modules/xConfigAPI.js +219 -0
- 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 +75 -15
- package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +160 -0
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +54 -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/AggregateController.js +2 -2
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +30 -2
- package/src/sap/ui/mdc/p13n/subcontroller/ChartTypeController.js +46 -0
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnWidthController.js +37 -6
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +32 -10
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +9 -2
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +1 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +4 -4
- package/src/sap/ui/mdc/table/Column.js +271 -132
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +70 -27
- package/src/sap/ui/mdc/table/PropertyHelper.js +92 -163
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +133 -40
- 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/TableSettings.js +10 -22
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
- package/src/sap/ui/mdc/table/menu/Item.js +78 -0
- package/src/sap/ui/mdc/table/menu/ItemContainer.js +60 -0
- package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +151 -0
- package/src/sap/ui/mdc/themes/base/Chart.less +11 -0
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +1 -0
- package/src/sap/ui/mdc/ui/Container.js +0 -240
- package/src/sap/ui/mdc/util/DateUtil.js +56 -6
- package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
- package/src/sap/ui/mdc/util/IdentifierUtil.js +3 -3
- package/src/sap/ui/mdc/util/PromiseCache.js +6 -2
- package/src/sap/ui/mdc/util/PropertyHelper.js +205 -76
- package/src/sap/ui/mdc/util/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +291 -66
- package/src/sap/ui/mdc/valuehelp/Popover.js +8 -5
- package/src/sap/ui/mdc/valuehelp/base/Container.js +71 -52
- package/src/sap/ui/mdc/valuehelp/base/Content.js +57 -24
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +196 -283
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +6 -6
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +4 -4
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -4
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +16 -13
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +66 -66
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +100 -185
- package/test/sap/ui/mdc/testutils/opa/chart/ActionsBase.js +48 -2
- package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +6 -5
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +4 -5
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +55 -4
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +2 -3
- package/test/sap/ui/mdc/testutils/opa/link/Actions.js +53 -12
- package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +6 -6
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +111 -128
- package/test/sap/ui/mdc/testutils/opa/p13n/waitForSelectWithSelectedTextOnPanel.js +5 -2
- package/test/sap/ui/mdc/testutils/opa/table/Actions.js +70 -0
- package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +9 -7
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +2 -2
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
- package/src/sap/ui/mdc/link/ContactDetails.control.xml +0 -29
- package/src/sap/ui/mdc/link/Panel.control.xml +0 -36
- package/src/sap/ui/mdc/link/PanelListItem.control.xml +0 -24
- package/src/sap/ui/mdc/link/PanelListItem.js +0 -101
- 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/ContainerItem.js +0 -79
|
@@ -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>.
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @extends sap.ui.mdc.util.PropertyHelper
|
|
34
34
|
*
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.102.0
|
|
37
37
|
*
|
|
38
38
|
* @private
|
|
39
39
|
* @experimental
|
|
@@ -48,5 +48,30 @@ sap.ui.define([
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Applies defaults and resolves property references.
|
|
54
|
+
*
|
|
55
|
+
* @param {object} oProperty The property to prepare
|
|
56
|
+
* @protected
|
|
57
|
+
*/
|
|
58
|
+
PropertyHelper.prototype.prepareProperty = function(oProperty) {
|
|
59
|
+
|
|
60
|
+
if (!oProperty.typeConfig) {
|
|
61
|
+
|
|
62
|
+
var oParent = this.getParent();
|
|
63
|
+
if (oParent && oParent._oDelegate) {
|
|
64
|
+
var oTypeUtil = oParent._oDelegate.getTypeUtil();
|
|
65
|
+
try {
|
|
66
|
+
oProperty.typeConfig = oTypeUtil.getTypeConfig(oProperty.dataType, oProperty.formatOptions, oProperty.constraints);
|
|
67
|
+
} catch (ex) {
|
|
68
|
+
//
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
PropertyHelperBase.prototype.prepareProperty.apply(this, arguments);
|
|
74
|
+
};
|
|
75
|
+
|
|
51
76
|
return PropertyHelper;
|
|
52
77
|
});
|
|
@@ -16,6 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @extends sap.ui.mdc.filterbar.IFilterContainer
|
|
17
17
|
* @constructor
|
|
18
18
|
* @private
|
|
19
|
+
* @ui5-restricted sap.ui.mdc, sap.fe
|
|
19
20
|
* @since 1.80.0
|
|
20
21
|
* @alias sap.ui.mdc.filterbar.aligned.FilterContainer
|
|
21
22
|
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
@@ -17,6 +17,7 @@ sap.ui.define(['sap/ui/layout/VerticalLayout', 'sap/ui/layout/VerticalLayoutRend
|
|
|
17
17
|
* @extends sap.ui.layout.VerticalLayout
|
|
18
18
|
* @constructor
|
|
19
19
|
* @private
|
|
20
|
+
* @ui5-restricted sap.ui.mdc, sap.fe
|
|
20
21
|
* @since 1.61.0
|
|
21
22
|
* @alias sap.ui.mdc.filterbar.aligned.FilterItemLayout
|
|
22
23
|
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
"sap/ui/mdc/filterbar/p13n/GroupContainer", "sap/ui/mdc/filterbar/p13n/
|
|
8
|
-
], function( GroupContainer, FilterGroupLayout, TableContainer,
|
|
7
|
+
"sap/ui/mdc/filterbar/p13n/GroupContainer", "sap/ui/mdc/filterbar/p13n/FilterColumnLayout", "sap/ui/mdc/filterbar/p13n/FilterGroupLayout","sap/ui/mdc/filterbar/p13n/TableContainer", "sap/ui/mdc/filterbar/FilterBarBase", "sap/ui/mdc/filterbar/FilterBarBaseRenderer", "sap/base/util/merge", "sap/base/util/UriParameters", "sap/ui/core/Core", "sap/ui/mdc/enum/PersistenceMode"
|
|
8
|
+
], function( GroupContainer, FilterColumnLayout, FilterGroupLayout, TableContainer, FilterBarBase, FilterBarBaseRenderer, merge, SAPUriParameters, Core, PersistenceMode) {
|
|
9
9
|
"use strict";
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -18,7 +18,7 @@ sap.ui.define([
|
|
|
18
18
|
*
|
|
19
19
|
* @extends sap.ui.mdc.filterbar.FilterBarBase
|
|
20
20
|
* @author SAP SE
|
|
21
|
-
* @version 1.
|
|
21
|
+
* @version 1.102.0
|
|
22
22
|
* @constructor
|
|
23
23
|
* @private
|
|
24
24
|
* @since 1.80.0
|
|
@@ -28,12 +28,13 @@ sap.ui.define([
|
|
|
28
28
|
var AdaptationFilterBar = FilterBarBase.extend("sap.ui.mdc.filterbar.p13n.AdaptationFilterBar", {
|
|
29
29
|
metadata: {
|
|
30
30
|
library: "sap.ui.mdc",
|
|
31
|
-
|
|
31
|
+
associations: {
|
|
32
32
|
/**
|
|
33
33
|
* Determines the parent on which the condition changes should be applied on.
|
|
34
34
|
*/
|
|
35
35
|
adaptationControl: {
|
|
36
|
-
type: "
|
|
36
|
+
type: "sap.ui.mdc.Control",
|
|
37
|
+
multiple: false
|
|
37
38
|
}
|
|
38
39
|
},
|
|
39
40
|
events: {
|
|
@@ -49,15 +50,81 @@ sap.ui.define([
|
|
|
49
50
|
|
|
50
51
|
AdaptationFilterBar.prototype.init = function() {
|
|
51
52
|
FilterBarBase.prototype.init.apply(this,arguments);
|
|
53
|
+
this.addStyleClass("sapUIAdaptationFilterBar");
|
|
52
54
|
this._bPersistValues = true;
|
|
55
|
+
this.getEngine().defaultProviderRegistry.attach(this, PersistenceMode.Transient);
|
|
56
|
+
this._fnResolveAdaptationControlPromise = null;
|
|
57
|
+
this._oAdaptationControlPromise = new Promise(function(resolve, reject) {
|
|
58
|
+
this._fnResolveAdaptationControlPromise = resolve;
|
|
59
|
+
}.bind(this));
|
|
60
|
+
};
|
|
61
|
+
AdaptationFilterBar.prototype.applySettings = function() {
|
|
62
|
+
FilterBarBase.prototype._applySettings.apply(this, arguments);
|
|
63
|
+
this._waitForAdaptControlAndPropertyHelper().then(function() {
|
|
64
|
+
this._initControlDelegate();
|
|
65
|
+
}.bind(this));
|
|
53
66
|
};
|
|
54
67
|
|
|
68
|
+
// FIXME: currently the FilterBar key handling is tightly coupled to the path
|
|
69
|
+
// as the FilterFields themselves are referenced through the path in the conditions binding path
|
|
70
|
+
// of the according FilterField. In use cases as for the AdaptationFilterBar, the Table's propertyinfo
|
|
71
|
+
// is being propagated to the FilterBar, where the name does not neessarily need to reflect the technical
|
|
72
|
+
// path in the model. Once the key reference between FilterFields, Columns and property info object has been aligned,
|
|
73
|
+
// the below fallback logic will become obsolete.
|
|
74
|
+
AdaptationFilterBar.prototype._getPropertyByName = function(sName) {
|
|
75
|
+
var oPropertyHelper = this.getPropertyHelper();
|
|
76
|
+
if (oPropertyHelper) {
|
|
77
|
+
var oProperty = oPropertyHelper.getProperties().find(function(oProp){
|
|
78
|
+
return oProp.path === sName;
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
if (!oProperty) {
|
|
82
|
+
oProperty = oPropertyHelper.getPropertyMap()[sName] || null;
|
|
83
|
+
}
|
|
84
|
+
return oProperty;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
AdaptationFilterBar.prototype._waitForAdaptControlAndPropertyHelper = function(){
|
|
89
|
+
return this._oAdaptationControlPromise.then(function() {
|
|
90
|
+
return this._getAdaptationControlInstance().awaitPropertyHelper().then(function(oPropertyHelper) {
|
|
91
|
+
this._oPropertyHelper = oPropertyHelper;
|
|
92
|
+
}.bind(this));
|
|
93
|
+
}.bind(this));
|
|
94
|
+
};
|
|
55
95
|
AdaptationFilterBar.prototype._initControlDelegate = function() {
|
|
56
|
-
this.
|
|
57
|
-
this.
|
|
96
|
+
return this.initControlDelegate().then(function() {
|
|
97
|
+
//this.getTypeUtil();
|
|
98
|
+
if (!this._bIsBeingDestroyed) {
|
|
99
|
+
this._applyInitialFilterConditions();
|
|
100
|
+
}
|
|
101
|
+
}.bind(this));
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
AdaptationFilterBar.prototype.getControlDelegate = function() {
|
|
105
|
+
return this._getAdaptationControlInstance().getControlDelegate();
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
AdaptationFilterBar.prototype.initControlDelegate = function() {
|
|
109
|
+
return this._oAdaptationControlPromise.then(function() {
|
|
110
|
+
return this._getAdaptationControlInstance().initControlDelegate();
|
|
58
111
|
}.bind(this));
|
|
59
112
|
};
|
|
60
113
|
|
|
114
|
+
AdaptationFilterBar.prototype.initPropertyHelper = function() {
|
|
115
|
+
return this._oAdaptationControlPromise.then(function() {
|
|
116
|
+
return this._getAdaptationControlInstance().initPropertyHelper();
|
|
117
|
+
}.bind(this));
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
AdaptationFilterBar.prototype.getTypeUtil = function() {
|
|
121
|
+
if (!this._getAdaptationControlInstance()) {
|
|
122
|
+
throw new Error("No adaptation control assigned yet.");
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return this._getAdaptationControlInstance().getTypeUtil();
|
|
126
|
+
};
|
|
127
|
+
|
|
61
128
|
AdaptationFilterBar.prototype.setMessageStrip = function(oStrip) {
|
|
62
129
|
this._oFilterBarLayout.setMessageStrip(oStrip);
|
|
63
130
|
};
|
|
@@ -65,22 +132,16 @@ sap.ui.define([
|
|
|
65
132
|
AdaptationFilterBar.prototype.setLiveMode = function(bLive, bSuppressInvalidate) {
|
|
66
133
|
FilterBarBase.prototype.setLiveMode.apply(this, arguments);
|
|
67
134
|
|
|
68
|
-
//Dialog
|
|
69
|
-
if (!bLive) {
|
|
70
|
-
this._oConditionModel.detachPropertyChange(this._handleConditionModelPropertyChange, this);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
135
|
//update adaptationModel while dialog is open
|
|
74
136
|
this._oConditionModel.attachPropertyChange(function(oEvt){
|
|
75
137
|
var sKey = oEvt.getParameter("path").substring(12);
|
|
76
|
-
if (this.
|
|
77
|
-
var aItems = this.
|
|
138
|
+
if (this.oAdaptationData){
|
|
139
|
+
var aItems = this.oAdaptationData.items;
|
|
78
140
|
var oItem = aItems.find(function(o){
|
|
79
141
|
return o.name == sKey;
|
|
80
142
|
});
|
|
81
143
|
if (oItem) {
|
|
82
|
-
oItem.
|
|
83
|
-
this.oAdaptationModel.setProperty("/items", aItems);
|
|
144
|
+
oItem.active = this._getConditionModel().getConditions(sKey).length > 0 ? true : false;
|
|
84
145
|
}
|
|
85
146
|
}
|
|
86
147
|
}.bind(this));
|
|
@@ -88,37 +149,53 @@ sap.ui.define([
|
|
|
88
149
|
return this;
|
|
89
150
|
};
|
|
90
151
|
|
|
152
|
+
AdaptationFilterBar.prototype._retrieveMetadata = function() {
|
|
153
|
+
|
|
154
|
+
return this._oAdaptationControlPromise.then(function() {
|
|
155
|
+
return this._getAdaptationControlInstance().awaitPropertyHelper().then(function(oPropertyHelper) {
|
|
156
|
+
this._oMetadataAppliedPromise = Promise.resolve();
|
|
157
|
+
if (!this._getAdaptationControlInstance().isPropertyHelperFinal()) {
|
|
158
|
+
return this.finalizePropertyHelper();
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return FilterBarBase.prototype._retrieveMetadata.apply(this, arguments);
|
|
162
|
+
}.bind(this));
|
|
163
|
+
}.bind(this));
|
|
164
|
+
};
|
|
165
|
+
|
|
91
166
|
AdaptationFilterBar.prototype.createConditionChanges = function() {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
167
|
+
return Promise.all([this._oAdaptationControlPromise, this._getAdaptationControlInstance().awaitControlDelegate()]).then(function() {
|
|
168
|
+
var mConditions = this._getModelConditions(this._getConditionModel(), false, true);
|
|
169
|
+
if (this._bPersistValues) {
|
|
170
|
+
//this._getAdaptationControlInstance(), "Filter", mConditions, true, true
|
|
171
|
+
return this.getEngine().createChanges({
|
|
172
|
+
control: this._getAdaptationControlInstance(),
|
|
173
|
+
key: "Filter",
|
|
174
|
+
state: mConditions,
|
|
175
|
+
suppressAppliance: true
|
|
176
|
+
});
|
|
177
|
+
} else {
|
|
178
|
+
//TODO: currently only required once the parent FilterBar has p13nMode 'value' disabled.
|
|
179
|
+
this._getAdaptationControlInstance()._setXConditions(mConditions, true);
|
|
180
|
+
return Promise.resolve(null);
|
|
181
|
+
}
|
|
182
|
+
}.bind(this));
|
|
106
183
|
};
|
|
107
184
|
|
|
108
185
|
/**
|
|
109
186
|
*
|
|
110
187
|
* Please note that the provided model should be created with sap.ui.mdc.p13n.P13nBuilder
|
|
111
188
|
*
|
|
112
|
-
* @param {object}
|
|
189
|
+
* @param {object} oP13nData Necessary data to display and create <code>FilterColumnLayout</code> instances.
|
|
113
190
|
*
|
|
114
191
|
*/
|
|
115
|
-
AdaptationFilterBar.prototype.
|
|
116
|
-
this.
|
|
117
|
-
this._oFilterBarLayout.update();
|
|
192
|
+
AdaptationFilterBar.prototype.setP13nData = function(oP13nData) {
|
|
193
|
+
this.oAdaptationData = oP13nData;
|
|
194
|
+
this._oFilterBarLayout.update(oP13nData);
|
|
118
195
|
};
|
|
119
196
|
|
|
120
|
-
AdaptationFilterBar.prototype.
|
|
121
|
-
return this.
|
|
197
|
+
AdaptationFilterBar.prototype.getP13nData = function() {
|
|
198
|
+
return this.oAdaptationData;
|
|
122
199
|
};
|
|
123
200
|
|
|
124
201
|
AdaptationFilterBar.prototype._handleFilterItemSubmit = function() {
|
|
@@ -127,19 +204,14 @@ sap.ui.define([
|
|
|
127
204
|
|
|
128
205
|
AdaptationFilterBar.prototype._getWaitForChangesPromise = function() {
|
|
129
206
|
//Change is applied on parent --> wait for the parent promise not the child
|
|
130
|
-
return this.getEngine().waitForChanges(this.
|
|
207
|
+
return this.getEngine().waitForChanges(this._getAdaptationControlInstance());
|
|
131
208
|
};
|
|
132
209
|
|
|
133
|
-
AdaptationFilterBar.prototype.applyConditionsAfterChangesApplied = function() {
|
|
210
|
+
AdaptationFilterBar.prototype.applyConditionsAfterChangesApplied = function(oControl) {
|
|
134
211
|
FilterBarBase.prototype.applyConditionsAfterChangesApplied.apply(this, arguments);
|
|
135
|
-
this.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
AdaptationFilterBar.prototype.initPropertyHelper = function(){
|
|
140
|
-
return this.getAdaptationControl().awaitPropertyHelper().then(function(oPropertyHelper) {
|
|
141
|
-
this._oPropertyHelper = oPropertyHelper;
|
|
142
|
-
}.bind(this));
|
|
212
|
+
if (oControl === this._getAdaptationControlInstance()) {
|
|
213
|
+
this.triggerSearch();
|
|
214
|
+
}
|
|
143
215
|
};
|
|
144
216
|
|
|
145
217
|
/**
|
|
@@ -149,14 +221,17 @@ sap.ui.define([
|
|
|
149
221
|
*/
|
|
150
222
|
AdaptationFilterBar.prototype.createFilterFields = function(){
|
|
151
223
|
return this.initialized().then(function(){
|
|
152
|
-
var mConditions = this._bPersistValues ? this.
|
|
224
|
+
var mConditions = this._bPersistValues ? this._getAdaptationControlInstance().getFilterConditions() : this._getAdaptationControlInstance()._getXConditions();
|
|
225
|
+
|
|
226
|
+
this.setFilterConditions(mConditions);
|
|
153
227
|
this._setXConditions(mConditions, true);
|
|
154
228
|
|
|
155
229
|
if (this._bFilterFieldsCreated) {
|
|
230
|
+
this._oFilterBarLayout.setP13nData(this.oAdaptationData);
|
|
156
231
|
return this;
|
|
157
232
|
}
|
|
158
233
|
|
|
159
|
-
var oAdaptationControl = this.
|
|
234
|
+
var oAdaptationControl = this._getAdaptationControlInstance();
|
|
160
235
|
var oDelegate = oAdaptationControl.getControlDelegate();
|
|
161
236
|
var oFilterDelegate = this._checkAdvancedParent(oAdaptationControl) ? oDelegate : oDelegate.getFilterDelegate();
|
|
162
237
|
|
|
@@ -165,7 +240,7 @@ sap.ui.define([
|
|
|
165
240
|
|
|
166
241
|
var aFieldPromises = [];
|
|
167
242
|
|
|
168
|
-
this.
|
|
243
|
+
this.oAdaptationData.items.forEach(function(oItem, iIndex){
|
|
169
244
|
var oFilterFieldPromise;
|
|
170
245
|
|
|
171
246
|
oFilterFieldPromise = this._checkExisting(oItem, oFilterDelegate);
|
|
@@ -198,14 +273,12 @@ sap.ui.define([
|
|
|
198
273
|
}.bind(this));
|
|
199
274
|
|
|
200
275
|
return Promise.all(aFieldPromises).then(function(){
|
|
201
|
-
this.
|
|
276
|
+
this.oAdaptationData.items.forEach(function(oItem){
|
|
202
277
|
this.addAggregation("filterItems", oItem.filterfield);
|
|
203
278
|
delete oItem.filterfield;
|
|
204
279
|
}.bind(this));
|
|
205
280
|
|
|
206
|
-
|
|
207
|
-
this._oFilterBarLayout.getInner().setP13nModel(this.oAdaptationModel);
|
|
208
|
-
}
|
|
281
|
+
this._oFilterBarLayout.setP13nData(this.oAdaptationData);
|
|
209
282
|
this._bFilterFieldsCreated = true;
|
|
210
283
|
|
|
211
284
|
return this;
|
|
@@ -226,7 +299,7 @@ sap.ui.define([
|
|
|
226
299
|
AdaptationFilterBar.prototype._checkExisting = function(oItem, oFilterDelegate) {
|
|
227
300
|
var oFilterFieldPromise;
|
|
228
301
|
|
|
229
|
-
var oAdaptationControl = this.
|
|
302
|
+
var oAdaptationControl = this._getAdaptationControlInstance();
|
|
230
303
|
var aExistingItems = this._checkAdvancedParent(oAdaptationControl) ? oAdaptationControl.getFilterItems() : [];
|
|
231
304
|
|
|
232
305
|
var mExistingFilterItems = aExistingItems.reduce(function(mMap, oField){
|
|
@@ -238,7 +311,7 @@ sap.ui.define([
|
|
|
238
311
|
oFilterFieldPromise = Promise.resolve(mExistingFilterItems[oItem.name]);
|
|
239
312
|
} else {
|
|
240
313
|
|
|
241
|
-
oFilterFieldPromise = oFilterDelegate.addItem(oItem.name, this.
|
|
314
|
+
oFilterFieldPromise = oFilterDelegate.addItem(oItem.name, this._getAdaptationControlInstance());
|
|
242
315
|
|
|
243
316
|
oFilterFieldPromise = oFilterFieldPromise.then(function(oFilterField){
|
|
244
317
|
|
|
@@ -260,10 +333,10 @@ sap.ui.define([
|
|
|
260
333
|
var aOriginalsToRemove = [];
|
|
261
334
|
|
|
262
335
|
Object.keys(this._mOriginalsForClone).forEach(function(sKey){
|
|
263
|
-
var oDelegate = this.
|
|
336
|
+
var oDelegate = this._getAdaptationControlInstance().getControlDelegate();
|
|
264
337
|
|
|
265
338
|
if (aExistingItems.indexOf(sKey) < 0) {//Originals that have not been selected --> use continue similar to 'ItemBaseFlex'
|
|
266
|
-
var oRemovePromise = oDelegate.removeItem.call(oDelegate, sKey, this.
|
|
339
|
+
var oRemovePromise = oDelegate.removeItem.call(oDelegate, sKey, this._getAdaptationControlInstance()).then(function(bContinue){
|
|
267
340
|
if (bContinue && this._mOriginalsForClone[sKey]) {
|
|
268
341
|
// destroy the item
|
|
269
342
|
this._mOriginalsForClone[sKey].destroy();
|
|
@@ -292,32 +365,59 @@ sap.ui.define([
|
|
|
292
365
|
* @param {boolean} bSuppressInvalidate suppress invalidation
|
|
293
366
|
*/
|
|
294
367
|
AdaptationFilterBar.prototype.setAdaptationControl = function(oControl, bSuppressInvalidate) {
|
|
295
|
-
this.setProperty("adaptationControl", oControl, bSuppressInvalidate);
|
|
296
368
|
|
|
297
|
-
this.
|
|
369
|
+
if (this._fnResolveAdaptationControlPromise) {
|
|
370
|
+
this._fnResolveAdaptationControlPromise();
|
|
371
|
+
this._fnResolveAdaptationControlPromise = null;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
this.setAssociation("adaptationControl", oControl, bSuppressInvalidate);
|
|
375
|
+
|
|
376
|
+
//FIXME: remove once the UI has been decided
|
|
377
|
+
var bUseQueryPanel = new SAPUriParameters(window.location.search).getAll("sap-ui-xx-filterQueryPanel")[0] === "true";
|
|
378
|
+
this._cLayoutItem = bUseQueryPanel || this._checkAdvancedParent(oControl) ? FilterGroupLayout : FilterColumnLayout; //Note: once the URL parameter is removed, FilterColumnLayout can be deleted
|
|
298
379
|
|
|
299
|
-
//TODO: use 'GroupView' for inbuilt filtering enabled Controls
|
|
300
|
-
this._cLayoutItem = this._checkAdvancedParent(oControl) ? FilterGroupLayout : FilterColumnLayout;
|
|
301
380
|
this._oFilterBarLayout = this._checkAdvancedParent(oControl) ? new GroupContainer() : new TableContainer();
|
|
381
|
+
|
|
302
382
|
this._oFilterBarLayout.getInner().setParent(this);
|
|
303
383
|
this.setAggregation("layout", this._oFilterBarLayout, true);
|
|
304
|
-
this.addStyleClass("sapUIAdaptationFilterBar");
|
|
305
384
|
|
|
306
385
|
if (this._oFilterBarLayout.getInner().attachChange) {
|
|
307
|
-
this._oFilterBarLayout.getInner().attachChange(function(){
|
|
386
|
+
this._oFilterBarLayout.getInner().attachChange(function(oEvt){
|
|
387
|
+
if (oEvt.getParameter("reason") === "Remove") {
|
|
388
|
+
var oItem = oEvt.getParameter("item");
|
|
389
|
+
var mConditions = this._bPersistValues ? merge({}, this._getAdaptationControlInstance().getFilterConditions()) : this._getAdaptationControlInstance()._getXConditions();
|
|
390
|
+
mConditions[oItem.name] = [];
|
|
391
|
+
this._setXConditions(mConditions, true);
|
|
392
|
+
}
|
|
308
393
|
this.fireChange();
|
|
309
394
|
}.bind(this));
|
|
310
395
|
}
|
|
311
396
|
return this;
|
|
312
397
|
};
|
|
313
398
|
|
|
399
|
+
/**
|
|
400
|
+
* Returns an instance of the associated adaptation control, if available.
|
|
401
|
+
* @private
|
|
402
|
+
* @ui5-restricted sap.ui.mdc
|
|
403
|
+
* @returns {sap.ui.mdc.Control} The adaptation control instance.
|
|
404
|
+
*/
|
|
405
|
+
AdaptationFilterBar.prototype._getAdaptationControlInstance = function () {
|
|
406
|
+
var sAdaptationControlId = this.getAdaptationControl();
|
|
407
|
+
return sAdaptationControlId && Core.byId(sAdaptationControlId);
|
|
408
|
+
};
|
|
409
|
+
|
|
314
410
|
AdaptationFilterBar.prototype.exit = function() {
|
|
411
|
+
this.getEngine().defaultProviderRegistry.detach(this);
|
|
315
412
|
FilterBarBase.prototype.exit.apply(this, arguments);
|
|
316
413
|
for (var sKey in this._mOriginalsForClone) {
|
|
317
414
|
this._mOriginalsForClone[sKey].destroy();
|
|
318
415
|
}
|
|
319
416
|
this._mOriginalsForClone = null;
|
|
320
|
-
this.
|
|
417
|
+
this.oAdaptationData = null;
|
|
418
|
+
|
|
419
|
+
this._fnResolveAdaptationControlPromise = null;
|
|
420
|
+
this._oAdaptationControlPromise = null;
|
|
321
421
|
};
|
|
322
422
|
|
|
323
423
|
return AdaptationFilterBar;
|
|
@@ -12,7 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Constructor for a new filterBar/p13n/GroupContainer.
|
|
15
|
-
* Used for a complex groupable FilterBar UI, should be used in combination with <code>
|
|
15
|
+
* Used for a complex groupable FilterBar UI, should be used in combination with <code>FilterGroupLayout</code>
|
|
16
16
|
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
17
17
|
* @class The GroupContainer is a IFilterContainer implementation for <code>sap.m.Table</code>
|
|
18
18
|
* @extends sap.ui.mdc.filterbar.IFilterContainer
|
|
@@ -34,7 +34,7 @@ sap.ui.define([
|
|
|
34
34
|
this.oLayout = new AdaptFiltersPanel();
|
|
35
35
|
|
|
36
36
|
this.oLayout.setItemFactory(function(oBindingContext){
|
|
37
|
-
var sKey =
|
|
37
|
+
var sKey = oBindingContext.getProperty(oBindingContext.sPath).name;
|
|
38
38
|
var oFilterItem = this.mFilterItems[sKey];
|
|
39
39
|
return oFilterItem;
|
|
40
40
|
}.bind(this));
|
|
@@ -62,10 +62,14 @@ sap.ui.define([
|
|
|
62
62
|
return aFilterItems;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
GroupContainer.prototype.update = function() {
|
|
65
|
+
GroupContainer.prototype.update = function(oP13nData) {
|
|
66
66
|
this.oLayout.restoreDefaults();
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
+
GroupContainer.prototype.setP13nData = function(oAdaptationData) {
|
|
70
|
+
this.oLayout.setP13nData(oAdaptationData);
|
|
71
|
+
};
|
|
72
|
+
|
|
69
73
|
GroupContainer.prototype.exit = function() {
|
|
70
74
|
this.mFilterItems = null;
|
|
71
75
|
this.mFilterFields = null;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
// Provides control sap.ui.mdc.filterbar.FilterItemLayout.
|
|
8
8
|
sap.ui.define([
|
|
9
|
-
'sap/ui/mdc/filterbar/IFilterContainer','sap/m/Table', 'sap/m/Column', 'sap/m/Text', 'sap/m/VBox'
|
|
10
|
-
], function(IFilterContainer, Table, Column, Text, VBox) {
|
|
9
|
+
'sap/ui/mdc/filterbar/IFilterContainer','sap/m/Table', 'sap/m/Column', 'sap/m/Text', 'sap/m/VBox', 'sap/ui/mdc/p13n/panels/FilterPanel', 'sap/base/util/UriParameters'
|
|
10
|
+
], function(IFilterContainer, Table, Column, Text, VBox, FilterPanel, SAPUriParameters) {
|
|
11
11
|
"use strict";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Constructor for a new filterBar/p13n/TableContainer.
|
|
15
|
-
* Used for a simple FilterBar table like view, should be used in combination with <code>
|
|
15
|
+
* Used for a simple FilterBar table like view, should be used in combination with <code>FilterGroupLayout</code>
|
|
16
16
|
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
17
17
|
* @class The TableContainer is a IFilterContainer implementation for <code>sap.m.Table</code>
|
|
18
18
|
* @extends sap.ui.mdc.filterbar.IFilterContainer
|
|
@@ -44,18 +44,51 @@ sap.ui.define([
|
|
|
44
44
|
]
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
var oURLParams = new SAPUriParameters(window.location.search);
|
|
48
|
+
this._bUseQueryPanel = oURLParams.getAll("sap-ui-xx-filterQueryPanel")[0] === "true";
|
|
49
|
+
|
|
50
|
+
//FIXME: remove check once the UI has been decided
|
|
51
|
+
if (this._bUseQueryPanel) {
|
|
52
|
+
this.oLayout = new FilterPanel({
|
|
53
|
+
enableReorder: false
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
this.mFilterItems = {};
|
|
57
|
+
|
|
58
|
+
this.oLayout.setItemFactory(function(oItem){
|
|
59
|
+
var sKey = oItem.name;
|
|
60
|
+
var oFilterItem = this.mFilterItems[sKey];
|
|
61
|
+
return oFilterItem;
|
|
62
|
+
}.bind(this));
|
|
63
|
+
} else {
|
|
64
|
+
this._oMessageStripContainer = new VBox(this.getId() + "-messageStripContainer");
|
|
65
|
+
|
|
66
|
+
this.oLayout = new VBox({
|
|
67
|
+
items: [
|
|
68
|
+
this._oMessageStripContainer,
|
|
69
|
+
this._oTable
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
48
73
|
|
|
49
|
-
this.oLayout = new VBox({
|
|
50
|
-
items: [
|
|
51
|
-
this._oMessageStripContainer,
|
|
52
|
-
this._oTable
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
74
|
};
|
|
56
75
|
|
|
57
76
|
TableContainer.prototype.insertFilterField = function(oControl, iIndex) {
|
|
58
|
-
|
|
77
|
+
|
|
78
|
+
//FIXME: remove check once the UI has been decided
|
|
79
|
+
if (this._bUseQueryPanel) {
|
|
80
|
+
this.mFilterItems[oControl._getFieldPath()] = oControl;
|
|
81
|
+
} else {
|
|
82
|
+
this._oTable.insertItem(oControl, iIndex);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
TableContainer.prototype.setP13nData = function(oAdaptationData) {
|
|
88
|
+
//FIXME: remove check once the UI has been decided
|
|
89
|
+
if (this._bUseQueryPanel) {
|
|
90
|
+
this.oLayout.setP13nData(oAdaptationData.items);
|
|
91
|
+
}
|
|
59
92
|
};
|
|
60
93
|
|
|
61
94
|
TableContainer.prototype.removeFilterField = function(oControl) {
|
|
@@ -63,15 +96,20 @@ sap.ui.define([
|
|
|
63
96
|
};
|
|
64
97
|
|
|
65
98
|
TableContainer.prototype.setMessageStrip = function(oStrip) {
|
|
66
|
-
|
|
67
|
-
this.
|
|
99
|
+
//FIXME: remove check once the UI has been decided
|
|
100
|
+
if (this._bUseQueryPanel) {
|
|
101
|
+
this.oLayout.setMessageStrip(oStrip);
|
|
102
|
+
} else {
|
|
103
|
+
this._oMessageStripContainer.removeAllItems();
|
|
104
|
+
this._oMessageStripContainer.addItem(oStrip);
|
|
105
|
+
}
|
|
68
106
|
};
|
|
69
107
|
|
|
70
108
|
TableContainer.prototype.getFilterFields = function() {
|
|
71
109
|
return this._oTable.getItems();
|
|
72
110
|
};
|
|
73
111
|
|
|
74
|
-
TableContainer.prototype.update = function() {
|
|
112
|
+
TableContainer.prototype.update = function(oP13nModel) {
|
|
75
113
|
//Called when the UI model is being set - trigger update logic here
|
|
76
114
|
};
|
|
77
115
|
|