@openui5/sap.ui.mdc 1.92.0 → 1.95.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/.reuse/dep5 +1 -6
- package/THIRDPARTY.txt +4 -10
- 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/AggregationBaseDelegate.js +2 -1
- package/src/sap/ui/mdc/Chart.js +14 -6
- package/src/sap/ui/mdc/ChartDelegate.js +1 -1
- package/src/sap/ui/mdc/ChartNew.js +104 -32
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +2 -2
- package/src/sap/ui/mdc/Field.js +15 -2
- package/src/sap/ui/mdc/FilterBar.js +11 -1
- package/src/sap/ui/mdc/FilterField.js +28 -4
- package/src/sap/ui/mdc/Link.js +2 -2
- package/src/sap/ui/mdc/MultiValueField.js +406 -0
- package/src/sap/ui/mdc/Table.js +166 -102
- package/src/sap/ui/mdc/TableDelegate.js +30 -21
- package/src/sap/ui/mdc/ValueHelp.js +1459 -0
- package/src/sap/ui/mdc/ValueHelpDelegate.js +41 -0
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +233 -223
- package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +9 -18
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ItemNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/PropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +2 -2
- 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 +27 -15
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +15 -9
- package/src/sap/ui/mdc/condition/Operator.js +13 -8
- package/src/sap/ui/mdc/condition/RangeOperator.js +3 -6
- package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +1 -0
- package/src/sap/ui/mdc/enum/SelectType.js +43 -0
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +5 -4
- package/src/sap/ui/mdc/field/ConditionType.js +69 -33
- package/src/sap/ui/mdc/field/ConditionsType.js +4 -3
- 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 +38 -24
- package/src/sap/ui/mdc/field/FieldBase.js +106 -42
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +25 -2
- package/src/sap/ui/mdc/field/FieldHelpBase.js +64 -4
- package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelp.js +55 -33
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +52 -32
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +8 -10
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +2 -1
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +3 -3
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldDelegate.js +49 -0
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +70 -0
- package/src/sap/ui/mdc/field/OutParameter.js +1 -1
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +2 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +146 -76
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +52 -0
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +4 -20
- package/src/sap/ui/mdc/filterbar/p13n/FilterGroupLayout.js +9 -3
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +55 -39
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +31 -22
- package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +33 -29
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +10 -5
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +18 -6
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +15 -4
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +92 -79
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/GroupFlex.js +70 -52
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +184 -115
- package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +59 -41
- package/src/sap/ui/mdc/flexibility/SortFlex.js +72 -54
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +2 -1
- package/src/sap/ui/mdc/library.js +618 -7
- 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/SelectionDialog.js +1 -1
- package/src/sap/ui/mdc/link/SelectionDialogItem.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 +20 -8
- package/src/sap/ui/mdc/messagebundle_ar.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_bg.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_ca.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_cs.properties +17 -7
- package/src/sap/ui/mdc/messagebundle_cy.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_da.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_de.properties +23 -13
- package/src/sap/ui/mdc/messagebundle_el.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_en.properties +14 -4
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +12 -4
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +3 -1
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +12 -4
- package/src/sap/ui/mdc/messagebundle_es.properties +40 -30
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_et.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_fi.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_fr.properties +27 -17
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_hi.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_hu.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_id.properties +14 -4
- package/src/sap/ui/mdc/messagebundle_it.properties +38 -28
- package/src/sap/ui/mdc/messagebundle_iw.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_ja.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_kk.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_ko.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_lt.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_lv.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_ms.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_nl.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_no.properties +22 -12
- package/src/sap/ui/mdc/messagebundle_pl.properties +19 -9
- package/src/sap/ui/mdc/messagebundle_pt.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +14 -4
- package/src/sap/ui/mdc/messagebundle_ro.properties +18 -8
- package/src/sap/ui/mdc/messagebundle_ru.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_sh.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_sk.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_sl.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_sv.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_th.properties +19 -9
- package/src/sap/ui/mdc/messagebundle_tr.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_uk.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_vi.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +13 -3
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +28 -16
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +94 -0
- package/src/sap/ui/mdc/odata/json/FilterBarDelegate.js +9 -8
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +5 -5
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +9 -0
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +88 -80
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +37 -10
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +17 -0
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
- package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +45 -53
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegateNew.js +302 -179
- package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +21 -16
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +5 -59
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +130 -53
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +16 -7
- package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ListView.js +58 -2
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +17 -10
- package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +6 -1
- package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +10 -11
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +13 -1
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +11 -2
- package/src/sap/ui/mdc/table/Column.js +21 -4
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +176 -4
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +11 -1
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableSettings.js +4 -49
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/themes/base/FieldBase.less +4 -0
- package/src/sap/ui/mdc/themes/base/FilterBar.less +2 -2
- package/src/sap/ui/mdc/themes/base/GroupView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ListView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +56 -21
- package/src/sap/ui/mdc/ui/Container.js +3 -3
- package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
- package/src/sap/ui/mdc/util/Common.js +26 -0
- package/src/sap/ui/mdc/util/FilterUtil.js +68 -16
- package/src/sap/ui/mdc/util/IdentifierUtil.js +4 -0
- package/src/sap/ui/mdc/util/PromiseCache.js +266 -0
- package/src/sap/ui/mdc/util/PropertyHelper.js +27 -2
- package/src/sap/ui/mdc/valuehelp/Dialog.js +475 -0
- package/src/sap/ui/mdc/valuehelp/Popover.js +346 -0
- package/src/sap/ui/mdc/valuehelp/base/Container.js +440 -0
- package/src/sap/ui/mdc/valuehelp/base/Content.js +442 -0
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +96 -0
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +537 -0
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +105 -0
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +232 -0
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +250 -0
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +504 -0
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +619 -0
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +881 -0
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +2 -2
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +250 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +91 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +137 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +25 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +256 -94
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +2 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/{waitForP13nButtonWithParentAndIcon.js → waitForP13nButtonWithMatchers.js} +5 -18
- package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +0 -1
package/src/sap/ui/mdc/Table.js
CHANGED
|
@@ -37,8 +37,6 @@ sap.ui.define([
|
|
|
37
37
|
"sap/ui/mdc/p13n/subcontroller/GroupController",
|
|
38
38
|
"sap/ui/mdc/p13n/subcontroller/AggregateController",
|
|
39
39
|
"sap/m/ColumnPopoverSelectListItem",
|
|
40
|
-
"sap/m/ColumnPopoverActionItem",
|
|
41
|
-
"sap/base/util/UriParameters",
|
|
42
40
|
"sap/ui/mdc/p13n/subcontroller/ColumnWidthController"
|
|
43
41
|
], function(
|
|
44
42
|
Control,
|
|
@@ -73,8 +71,6 @@ sap.ui.define([
|
|
|
73
71
|
GroupController,
|
|
74
72
|
AggregateController,
|
|
75
73
|
ColumnPopoverSelectListItem,
|
|
76
|
-
ColumnPopoverActionItem,
|
|
77
|
-
SAPUriParameters,
|
|
78
74
|
ColumnWidthController
|
|
79
75
|
) {
|
|
80
76
|
"use strict";
|
|
@@ -84,6 +80,7 @@ sap.ui.define([
|
|
|
84
80
|
var RowAction = library.RowAction;
|
|
85
81
|
var ToolbarDesign = MLibrary.ToolbarDesign;
|
|
86
82
|
var ToolbarStyle = MLibrary.ToolbarStyle;
|
|
83
|
+
var MultiSelectMode = library.MultiSelectMode;
|
|
87
84
|
var sFilterInterface = "sap.ui.mdc.IFilter";
|
|
88
85
|
var internalMap = new window.WeakMap();
|
|
89
86
|
var internal = function(oTable) {
|
|
@@ -354,6 +351,37 @@ sap.ui.define([
|
|
|
354
351
|
type: "boolean",
|
|
355
352
|
group: "Behavior",
|
|
356
353
|
defaultValue: false
|
|
354
|
+
},
|
|
355
|
+
/**
|
|
356
|
+
* Defines the multi-selection mode for the control.
|
|
357
|
+
* If this property is set to the <code>Default</code> value, the <code>ResponsiveTable</code> type control renders
|
|
358
|
+
* the Select All checkbox in the column header, otherwise the Deselect All icon is rendered.
|
|
359
|
+
*
|
|
360
|
+
* This property is used with the <code>selectionMode="Multi"</code>.
|
|
361
|
+
* @since 1.93
|
|
362
|
+
*/
|
|
363
|
+
multiSelectMode : {
|
|
364
|
+
type: "sap.ui.mdc.MultiSelectMode",
|
|
365
|
+
group: "Behavior",
|
|
366
|
+
defaultValue: MultiSelectMode.Default
|
|
367
|
+
},
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Enables automatic column width calculation based on metadata information if set to <code>true</code>.
|
|
371
|
+
* The column width calculation takes the type, column label, referenced properties, and many other metadata parameters into account.
|
|
372
|
+
* Providing a more precise <code>maxLength</code> value for the <code>String</code> type or <code>precision</code> value for numeric types can help this algorithm to produce better results.
|
|
373
|
+
* The calculated column widths can have a minimum of 3rem and a maximum of 20rem.
|
|
374
|
+
*
|
|
375
|
+
* <b>Note:</b> To customize the automatic column width calculation the <code>visualSettings.widthSettings</code> key of the <code>PropertyInfo</code> can be used.
|
|
376
|
+
* To avoid the heuristic column width calculation for a particular column, the <code>visualSettings.widthSettings</code> key of the <code>PropertyInfo</code> can be set to <code>false</code>.
|
|
377
|
+
* This feature has no effect if the <code>width</code> property of the column is bound or its value is set.
|
|
378
|
+
*
|
|
379
|
+
* @since 1.95
|
|
380
|
+
*/
|
|
381
|
+
enableAutoColumnWidth: {
|
|
382
|
+
type: "boolean",
|
|
383
|
+
group: "Behavior",
|
|
384
|
+
defaultValue: false
|
|
357
385
|
}
|
|
358
386
|
},
|
|
359
387
|
aggregations: {
|
|
@@ -519,10 +547,6 @@ sap.ui.define([
|
|
|
519
547
|
this._oTableReady = new Deferred();
|
|
520
548
|
this._oFullInitialize = new Deferred();
|
|
521
549
|
|
|
522
|
-
//Note: parameter should be removed once the new p13n is the default
|
|
523
|
-
var oURLParams = new SAPUriParameters(window.location.search);
|
|
524
|
-
this._bNewP13n = oURLParams.getAll("sap-ui-xx-mdcTableP13n").length > 0;
|
|
525
|
-
|
|
526
550
|
Control.apply(this, arguments);
|
|
527
551
|
this.bCreated = true;
|
|
528
552
|
this._doOneTimeOperations();
|
|
@@ -627,10 +651,44 @@ sap.ui.define([
|
|
|
627
651
|
};
|
|
628
652
|
|
|
629
653
|
Table.prototype.getDataStateIndicatorPluginOwner = function(oDataStateIndicator) {
|
|
630
|
-
oDataStateIndicator.setEnableFiltering(false);
|
|
631
654
|
return this._oTable || this._oFullInitialize.promise;
|
|
632
655
|
};
|
|
633
656
|
|
|
657
|
+
Table.prototype.setDataStateIndicator = function(oDataStateIndicator) {
|
|
658
|
+
this._handleDataStateEvents(this.getDataStateIndicator(), "detach");
|
|
659
|
+
this.setAggregation("dataStateIndicator", oDataStateIndicator, true);
|
|
660
|
+
this._handleDataStateEvents(this.getDataStateIndicator(), "attach");
|
|
661
|
+
return this;
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
Table.prototype._handleDataStateEvents = function(oDataStateIndicator, sAction) {
|
|
665
|
+
if (oDataStateIndicator) {
|
|
666
|
+
oDataStateIndicator[sAction + "ApplyFilter"](this._onApplyMessageFilter, this);
|
|
667
|
+
oDataStateIndicator[sAction + "ClearFilter"](this._onClearMessageFilter, this);
|
|
668
|
+
oDataStateIndicator[sAction + "Event"]("filterInfoPress", onShowFilterDialog, this);
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* This gets called from the DataStateIndicator plugin when data state message filter is applied
|
|
674
|
+
* @private
|
|
675
|
+
*/
|
|
676
|
+
Table.prototype._onApplyMessageFilter = function(oEvent) {
|
|
677
|
+
this._oMessageFilter = oEvent.getParameter("filter");
|
|
678
|
+
oEvent.preventDefault();
|
|
679
|
+
this.rebind();
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* This gets called from the DataStateIndicator plugin when the data state message filter is cleared
|
|
684
|
+
* @private
|
|
685
|
+
*/
|
|
686
|
+
Table.prototype._onClearMessageFilter = function(oEvent) {
|
|
687
|
+
this._oMessageFilter = null;
|
|
688
|
+
oEvent.preventDefault();
|
|
689
|
+
this.rebind();
|
|
690
|
+
};
|
|
691
|
+
|
|
634
692
|
// ----Type----
|
|
635
693
|
Table.prototype._getStringType = function(oTypeInput) {
|
|
636
694
|
var sType, oType = sType = oTypeInput || this.getType();
|
|
@@ -690,7 +748,7 @@ sap.ui.define([
|
|
|
690
748
|
this._oTable.scrollToIndex(iIndex).then(resolve).catch(reject);
|
|
691
749
|
} else {
|
|
692
750
|
if (iIndex === -1) {
|
|
693
|
-
iIndex = this.
|
|
751
|
+
iIndex = this._getRowCount(false);
|
|
694
752
|
}
|
|
695
753
|
|
|
696
754
|
if (this._oTable._setFirstVisibleRowIndex(iIndex)) {
|
|
@@ -847,6 +905,15 @@ sap.ui.define([
|
|
|
847
905
|
return this;
|
|
848
906
|
};
|
|
849
907
|
|
|
908
|
+
Table.prototype.setMultiSelectMode = function(sMultiSelectMode) {
|
|
909
|
+
var sOldMultiSelectMode = this.getMultiSelectMode();
|
|
910
|
+
this.setProperty("multiSelectMode", sMultiSelectMode, true);
|
|
911
|
+
if (this._oTable && sOldMultiSelectMode != this.getMultiSelectMode()) {
|
|
912
|
+
this._updateMultiSelectMode();
|
|
913
|
+
}
|
|
914
|
+
return this;
|
|
915
|
+
};
|
|
916
|
+
|
|
850
917
|
Table.prototype.setRowAction = function(aActions) {
|
|
851
918
|
var aOldActions = this.getRowAction();
|
|
852
919
|
|
|
@@ -873,7 +940,7 @@ sap.ui.define([
|
|
|
873
940
|
var bOldEnableColumnResize = this.getEnableColumnResize();
|
|
874
941
|
this.setProperty("enableColumnResize", bEnableColumnResize, true);
|
|
875
942
|
|
|
876
|
-
if (
|
|
943
|
+
if (this.getEnableColumnResize() !== bOldEnableColumnResize) {
|
|
877
944
|
this._updateColumnResizer();
|
|
878
945
|
this._updateAdaptation(this.getP13nMode());
|
|
879
946
|
}
|
|
@@ -1023,6 +1090,7 @@ sap.ui.define([
|
|
|
1023
1090
|
}
|
|
1024
1091
|
|
|
1025
1092
|
oFilterInfoBar.setVisible(false);
|
|
1093
|
+
oTable._oTable.removeAriaLabelledBy(oFilterInfoBarText);
|
|
1026
1094
|
|
|
1027
1095
|
return;
|
|
1028
1096
|
}
|
|
@@ -1035,7 +1103,11 @@ sap.ui.define([
|
|
|
1035
1103
|
var oListFormat = ListFormat.getInstance();
|
|
1036
1104
|
var sFilterText = oResourceBundle.getText("table.FILTER_INFO", oListFormat.format(aPropertyLabels));
|
|
1037
1105
|
|
|
1038
|
-
oFilterInfoBar.
|
|
1106
|
+
if (!oFilterInfoBar.getVisible()) {
|
|
1107
|
+
oFilterInfoBar.setVisible(true);
|
|
1108
|
+
oTable._oTable.addAriaLabelledBy(oFilterInfoBarText);
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1039
1111
|
oFilterInfoBarText.setText(sFilterText);
|
|
1040
1112
|
});
|
|
1041
1113
|
}
|
|
@@ -1054,10 +1126,12 @@ sap.ui.define([
|
|
|
1054
1126
|
if (oTable._bMobileTable) {
|
|
1055
1127
|
if (oTable._oTable.getInfoToolbar() !== oFilterInfoBar) {
|
|
1056
1128
|
oTable._oTable.setInfoToolbar(oFilterInfoBar);
|
|
1057
|
-
oTable._oTable.addAriaLabelledBy(getFilterInfoBarText(oTable));
|
|
1058
1129
|
}
|
|
1059
1130
|
} else if (oTable._oTable.indexOfExtension(oFilterInfoBar) === -1) {
|
|
1060
1131
|
oTable._oTable.insertExtension(oFilterInfoBar, 1);
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
if (oFilterInfoBar.getVisible()) {
|
|
1061
1135
|
oTable._oTable.addAriaLabelledBy(getFilterInfoBarText(oTable));
|
|
1062
1136
|
}
|
|
1063
1137
|
}
|
|
@@ -1081,9 +1155,7 @@ sap.ui.define([
|
|
|
1081
1155
|
wrapping: false
|
|
1082
1156
|
})
|
|
1083
1157
|
],
|
|
1084
|
-
press:
|
|
1085
|
-
TableSettings.showPanel(oTable, "Filter", oFilterInfoToolbar);
|
|
1086
|
-
}
|
|
1158
|
+
press: [onShowFilterDialog, oTable]
|
|
1087
1159
|
});
|
|
1088
1160
|
|
|
1089
1161
|
// If the toolbar is hidden while it has the focus, the focus moves to the body. This can happen, for example, when all filters are removed in
|
|
@@ -1312,6 +1384,12 @@ sap.ui.define([
|
|
|
1312
1384
|
return this;
|
|
1313
1385
|
};
|
|
1314
1386
|
|
|
1387
|
+
Table.prototype.setShowRowCount = function(bShowCount) {
|
|
1388
|
+
this.setProperty("showRowCount", bShowCount, true);
|
|
1389
|
+
this._updateHeaderText();
|
|
1390
|
+
return this;
|
|
1391
|
+
};
|
|
1392
|
+
|
|
1315
1393
|
Table.prototype.setEnableExport = function(bEnableExport) {
|
|
1316
1394
|
if (bEnableExport !== this.getEnableExport()) {
|
|
1317
1395
|
this.setProperty("enableExport", bEnableExport, true);
|
|
@@ -1341,6 +1419,10 @@ sap.ui.define([
|
|
|
1341
1419
|
};
|
|
1342
1420
|
|
|
1343
1421
|
Table.prototype._createToolbar = function() {
|
|
1422
|
+
if (this.isDestroyStarted() || this.isDestroyed()) {
|
|
1423
|
+
return;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1344
1426
|
if (!this._oToolbar) {
|
|
1345
1427
|
// Create Title
|
|
1346
1428
|
this._oTitle = new Title(this.getId() + "-title", {
|
|
@@ -1497,29 +1579,10 @@ sap.ui.define([
|
|
|
1497
1579
|
var aP13nMode = this.getP13nMode();
|
|
1498
1580
|
var aButtons = [];
|
|
1499
1581
|
|
|
1500
|
-
//
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
]));
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
if (this.isFilteringEnabled() && !this._bNewP13n) {
|
|
1508
|
-
aButtons.push(TableSettings.createFilterButton(this.getId(), [
|
|
1509
|
-
this._showFilter, this
|
|
1510
|
-
]));
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
if (aP13nMode.indexOf("Column") > -1 || (this._bNewP13n && aP13nMode.length > 0)) {
|
|
1514
|
-
aButtons.push(TableSettings.createColumnsButton(this.getId(), [
|
|
1515
|
-
this._showSettings, this
|
|
1516
|
-
]));
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
if (this.isGroupingEnabled() && !this._bNewP13n) {
|
|
1520
|
-
aButtons.push(TableSettings.createGroupButton(this.getId(), [
|
|
1521
|
-
this._showGroup, this
|
|
1522
|
-
]));
|
|
1582
|
+
// Note: 'Aggregate' does not have a p13n UI, if only 'Aggregate' is enabled no settings icon is necessary
|
|
1583
|
+
var bAggregateP13nOnly = aP13nMode.length === 1 && aP13nMode[0] === "Aggregate";
|
|
1584
|
+
if (aP13nMode.length > 0 && !bAggregateP13nOnly) {
|
|
1585
|
+
aButtons.push(TableSettings.createSettingsButton(this.getId(), [onShowSettingsDialog, this]));
|
|
1523
1586
|
}
|
|
1524
1587
|
|
|
1525
1588
|
return aButtons;
|
|
@@ -1527,7 +1590,10 @@ sap.ui.define([
|
|
|
1527
1590
|
|
|
1528
1591
|
Table.prototype._getPasteButton = function() {
|
|
1529
1592
|
if (this.getShowPasteButton()) {
|
|
1530
|
-
|
|
1593
|
+
if (!this._oPasteButton) {
|
|
1594
|
+
this._oPasteButton = TableSettings.createPasteButton(this.getId());
|
|
1595
|
+
}
|
|
1596
|
+
return this._oPasteButton;
|
|
1531
1597
|
}
|
|
1532
1598
|
};
|
|
1533
1599
|
|
|
@@ -1576,9 +1642,8 @@ sap.ui.define([
|
|
|
1576
1642
|
* @private
|
|
1577
1643
|
*/
|
|
1578
1644
|
Table.prototype._updateExportState = function(bUpdateFilename) {
|
|
1579
|
-
var oRowBinding = this._getRowBinding();
|
|
1580
1645
|
if (this._oExportButton) {
|
|
1581
|
-
this._oExportButton.setEnabled(
|
|
1646
|
+
this._oExportButton.setEnabled(this._getRowCount(false) > 0);
|
|
1582
1647
|
if (bUpdateFilename && this._cachedExportSettings) {
|
|
1583
1648
|
this._cachedExportSettings.fileName = this.getHeader();
|
|
1584
1649
|
}
|
|
@@ -1815,6 +1880,9 @@ sap.ui.define([
|
|
|
1815
1880
|
// Update the selection handlers
|
|
1816
1881
|
this._updateSelectionBehavior();
|
|
1817
1882
|
|
|
1883
|
+
// Update the multiSelectMode
|
|
1884
|
+
this._updateMultiSelectMode();
|
|
1885
|
+
|
|
1818
1886
|
var oDDI = new DragDropInfo({
|
|
1819
1887
|
sourceAggregation: "columns",
|
|
1820
1888
|
targetAggregation: "columns",
|
|
@@ -1862,6 +1930,12 @@ sap.ui.define([
|
|
|
1862
1930
|
oTableType.updateSelection(this);
|
|
1863
1931
|
};
|
|
1864
1932
|
|
|
1933
|
+
Table.prototype._updateMultiSelectMode = function() {
|
|
1934
|
+
if (this._bMobileTable) {
|
|
1935
|
+
ResponsiveTableType.updateMultiSelectMode(this);
|
|
1936
|
+
}
|
|
1937
|
+
};
|
|
1938
|
+
|
|
1865
1939
|
Table.prototype._onColumnRearrange = function(oEvent) {
|
|
1866
1940
|
var oDraggedColumn = oEvent.getParameter("draggedControl");
|
|
1867
1941
|
var oDroppedColumn = oEvent.getParameter("droppedControl");
|
|
@@ -1877,14 +1951,10 @@ sap.ui.define([
|
|
|
1877
1951
|
};
|
|
1878
1952
|
|
|
1879
1953
|
Table.prototype._onColumnPress = function(oColumn) {
|
|
1880
|
-
var
|
|
1881
|
-
|
|
1882
|
-
oMDCColumn,
|
|
1883
|
-
bResizeButton =
|
|
1884
|
-
|
|
1885
|
-
iIndex = oParent.indexOfColumn(oColumn);
|
|
1886
|
-
|
|
1887
|
-
oMDCColumn = this.getColumns()[iIndex];
|
|
1954
|
+
var oParent = oColumn.getParent(),
|
|
1955
|
+
iIndex = oParent.indexOfColumn(oColumn),
|
|
1956
|
+
oMDCColumn = this.getColumns()[iIndex],
|
|
1957
|
+
bResizeButton = this._bMobileTable && this.getEnableColumnResize();
|
|
1888
1958
|
|
|
1889
1959
|
this._fullyInitialized().then(function() {
|
|
1890
1960
|
var oResourceBundle = Core.getLibraryResourceBundle("sap.ui.mdc");
|
|
@@ -1942,25 +2012,19 @@ sap.ui.define([
|
|
|
1942
2012
|
var oFilter = new ColumnPopoverSelectListItem({
|
|
1943
2013
|
label: oResourceBundle.getText("table.SETTINGS_FILTER"),
|
|
1944
2014
|
icon: "sap-icon://filter",
|
|
1945
|
-
action: [
|
|
2015
|
+
action: [onShowFilterDialog, this]
|
|
1946
2016
|
});
|
|
1947
2017
|
aHeaderItems.unshift(oFilter);
|
|
1948
2018
|
}
|
|
1949
2019
|
|
|
1950
2020
|
if (bResizeButton) {
|
|
1951
|
-
var oColumnResize =
|
|
1952
|
-
|
|
1953
|
-
icon: "sap-icon://resize-horizontal",
|
|
1954
|
-
press: [function() {
|
|
1955
|
-
ResponsiveTableType.startColumnResize(this._oTable, oColumn);
|
|
1956
|
-
}, this]
|
|
1957
|
-
});
|
|
1958
|
-
aHeaderItems.push(oColumnResize);
|
|
2021
|
+
var oColumnResize = ResponsiveTableType.startColumnResize(this._oTable, oColumn);
|
|
2022
|
+
oColumnResize && aHeaderItems.push(oColumnResize);
|
|
1959
2023
|
}
|
|
1960
2024
|
|
|
1961
|
-
aHeaderItems
|
|
1962
|
-
|
|
1963
|
-
}
|
|
2025
|
+
aHeaderItems.forEach(function(oItem) {
|
|
2026
|
+
this._createPopover(oItem, oColumn);
|
|
2027
|
+
}, this);
|
|
1964
2028
|
this._oPopover && this._oPopover.openBy(oColumn);
|
|
1965
2029
|
}.bind(this));
|
|
1966
2030
|
};
|
|
@@ -2000,11 +2064,26 @@ sap.ui.define([
|
|
|
2000
2064
|
TableSettings.createAggregation(this, sSortProperty);
|
|
2001
2065
|
};
|
|
2002
2066
|
|
|
2067
|
+
Table.prototype._setColumnWidth = function(oMDCColumn) {
|
|
2068
|
+
if (!this.getEnableAutoColumnWidth() || oMDCColumn.getWidth() || oMDCColumn.isBound("width")) {
|
|
2069
|
+
return;
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
var oPropertyHelper = this._oPropertyHelper;
|
|
2073
|
+
if (oPropertyHelper) {
|
|
2074
|
+
oPropertyHelper.setColumnWidth(oMDCColumn);
|
|
2075
|
+
} else {
|
|
2076
|
+
this.awaitPropertyHelper().then(this._setColumnWidth.bind(this, oMDCColumn));
|
|
2077
|
+
}
|
|
2078
|
+
};
|
|
2079
|
+
|
|
2003
2080
|
Table.prototype._insertInnerColumn = function(oMDCColumn, iIndex) {
|
|
2004
2081
|
if (!this._oTable) {
|
|
2005
2082
|
return;
|
|
2006
2083
|
}
|
|
2007
2084
|
|
|
2085
|
+
this._setColumnWidth(oMDCColumn);
|
|
2086
|
+
|
|
2008
2087
|
var oColumn = this._createColumn(oMDCColumn);
|
|
2009
2088
|
setColumnTemplate(this, oMDCColumn, oColumn, iIndex);
|
|
2010
2089
|
this._bForceRebind = true;
|
|
@@ -2136,7 +2215,7 @@ sap.ui.define([
|
|
|
2136
2215
|
oMDCColumn = this.removeAggregation("columns", oMDCColumn, true);
|
|
2137
2216
|
if (this._oTable) {
|
|
2138
2217
|
var oColumn = this._oTable.removeColumn(oMDCColumn.getId() + "-innerColumn");
|
|
2139
|
-
oColumn.destroy();
|
|
2218
|
+
oColumn.destroy("KeepDom");
|
|
2140
2219
|
|
|
2141
2220
|
// update template for ResponsiveTable
|
|
2142
2221
|
if (this._bMobileTable) {
|
|
@@ -2326,12 +2405,7 @@ sap.ui.define([
|
|
|
2326
2405
|
return;
|
|
2327
2406
|
}
|
|
2328
2407
|
|
|
2329
|
-
|
|
2330
|
-
var oBindingInfo = {
|
|
2331
|
-
parameters: {},
|
|
2332
|
-
filters: [],
|
|
2333
|
-
sorter: this._getSorters()
|
|
2334
|
-
};
|
|
2408
|
+
var oBindingInfo = {};
|
|
2335
2409
|
|
|
2336
2410
|
this.getControlDelegate().updateBindingInfo(this, this.getPayload(), oBindingInfo);
|
|
2337
2411
|
|
|
@@ -2398,9 +2472,9 @@ sap.ui.define([
|
|
|
2398
2472
|
if (this._oTitle && this.getHeader()) {
|
|
2399
2473
|
sHeader = this.getHeader();
|
|
2400
2474
|
if (this.getShowRowCount()) {
|
|
2401
|
-
iRowCount = this._getRowCount();
|
|
2402
|
-
|
|
2403
|
-
|
|
2475
|
+
iRowCount = this._getRowCount(true);
|
|
2476
|
+
if (iRowCount > 0) {
|
|
2477
|
+
var sValue = this._oNumberFormatInstance.format(iRowCount);
|
|
2404
2478
|
sHeader += " (" + sValue + ")";
|
|
2405
2479
|
}
|
|
2406
2480
|
}
|
|
@@ -2428,7 +2502,7 @@ sap.ui.define([
|
|
|
2428
2502
|
var sText = this.getHeader();
|
|
2429
2503
|
|
|
2430
2504
|
// iRowCount will be undefined if table property showRowCount is set to false
|
|
2431
|
-
if (iRowCount === undefined && this._getRowCount() > 0) {
|
|
2505
|
+
if (iRowCount === undefined && this._getRowCount(false) > 0) {
|
|
2432
2506
|
oInvisibleMessage.announce(oResourceBundle.getText("table.ANNOUNCEMENT_TABLE_UPDATED", [sText]));
|
|
2433
2507
|
} else if (iRowCount > 1) {
|
|
2434
2508
|
oInvisibleMessage.announce(oResourceBundle.getText("table.ANNOUNCEMENT_TABLE_UPDATED_MULT", [sText, iRowCount]));
|
|
@@ -2473,19 +2547,25 @@ sap.ui.define([
|
|
|
2473
2547
|
* @private
|
|
2474
2548
|
* @returns {int} the row count
|
|
2475
2549
|
*/
|
|
2476
|
-
Table.prototype._getRowCount = function() {
|
|
2550
|
+
Table.prototype._getRowCount = function(bConsiderTotal) {
|
|
2477
2551
|
var oRowBinding = this._getRowBinding();
|
|
2478
2552
|
|
|
2479
2553
|
if (!oRowBinding) {
|
|
2480
|
-
return 0;
|
|
2554
|
+
return bConsiderTotal ? undefined : 0;
|
|
2481
2555
|
}
|
|
2482
2556
|
|
|
2483
2557
|
var iRowCount;
|
|
2484
|
-
|
|
2485
|
-
if (oRowBinding.getCount) {
|
|
2486
|
-
iRowCount = oRowBinding.getCount();
|
|
2487
|
-
} else if (oRowBinding.isLengthFinal()) {
|
|
2558
|
+
if (!bConsiderTotal) {
|
|
2488
2559
|
iRowCount = oRowBinding.getLength();
|
|
2560
|
+
} else {
|
|
2561
|
+
if (typeof oRowBinding.getCount === 'function') {
|
|
2562
|
+
iRowCount = oRowBinding.getCount();
|
|
2563
|
+
} else if (oRowBinding.isLengthFinal()) {
|
|
2564
|
+
// This branch is only fallback and for TreeBindings (TreeBindings should be excluded when MDCTable will support TreeBinding,
|
|
2565
|
+
// see corresponding function in SmartTable for reference)
|
|
2566
|
+
// ListBindings should in general get a getCount function in nearer future (5341464)
|
|
2567
|
+
iRowCount = oRowBinding.getLength();
|
|
2568
|
+
}
|
|
2489
2569
|
}
|
|
2490
2570
|
|
|
2491
2571
|
if (iRowCount < 0 || iRowCount === "0") {
|
|
@@ -2547,6 +2627,7 @@ sap.ui.define([
|
|
|
2547
2627
|
}
|
|
2548
2628
|
};
|
|
2549
2629
|
|
|
2630
|
+
// TODO: Delete!
|
|
2550
2631
|
Table.prototype.rebindTable = function() {
|
|
2551
2632
|
this.rebind();
|
|
2552
2633
|
};
|
|
@@ -2560,27 +2641,13 @@ sap.ui.define([
|
|
|
2560
2641
|
}
|
|
2561
2642
|
};
|
|
2562
2643
|
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
* @param {object} oEvt Event object that gets processed
|
|
2567
|
-
* @experimental
|
|
2568
|
-
*/
|
|
2569
|
-
Table.prototype._showSettings = function(oEvt) {
|
|
2570
|
-
TableSettings.showPanel(this, "Columns", oEvt.getSource());
|
|
2571
|
-
};
|
|
2572
|
-
|
|
2573
|
-
Table.prototype._showSort = function(oEvt) {
|
|
2574
|
-
TableSettings.showPanel(this, "Sort", oEvt.getSource());
|
|
2575
|
-
};
|
|
2576
|
-
|
|
2577
|
-
Table.prototype._showFilter = function(oEvt) {
|
|
2578
|
-
TableSettings.showPanel(this, "Filter", oEvt.getSource());
|
|
2579
|
-
};
|
|
2644
|
+
function onShowSettingsDialog(oEvent) {
|
|
2645
|
+
TableSettings.showPanel(this, "Columns", oEvent.getSource());
|
|
2646
|
+
}
|
|
2580
2647
|
|
|
2581
|
-
|
|
2582
|
-
TableSettings.showPanel(this, "
|
|
2583
|
-
}
|
|
2648
|
+
function onShowFilterDialog(oEvent) {
|
|
2649
|
+
TableSettings.showPanel(this, "Filter", oEvent.getSource());
|
|
2650
|
+
}
|
|
2584
2651
|
|
|
2585
2652
|
// TODO: move to a base util that can be used by most aggregations
|
|
2586
2653
|
Table.prototype._getSorters = function() {
|
|
@@ -2611,9 +2678,6 @@ sap.ui.define([
|
|
|
2611
2678
|
this._oTemplate.destroy();
|
|
2612
2679
|
}
|
|
2613
2680
|
|
|
2614
|
-
//TODO: remove once new p13n is the default
|
|
2615
|
-
this._bNewP13n = null;
|
|
2616
|
-
|
|
2617
2681
|
this._oTemplate = null;
|
|
2618
2682
|
this._oTable = null;
|
|
2619
2683
|
// Destroy toolbar if Table is not yet created, normally it is destroyed automatically due to table being destroyed!
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
// ---------------------------------------------------------------------------------------
|
|
10
10
|
// ---------------------------------------------------------------------------------------
|
|
11
11
|
sap.ui.define([
|
|
12
|
-
"sap/ui/mdc/AggregationBaseDelegate"
|
|
13
|
-
], function(AggregationBaseDelegate) {
|
|
12
|
+
"sap/ui/mdc/AggregationBaseDelegate", "sap/ui/core/library", "sap/ui/core/Core"
|
|
13
|
+
], function(AggregationBaseDelegate, coreLibrary, Core) {
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -25,26 +25,22 @@ sap.ui.define([
|
|
|
25
25
|
*/
|
|
26
26
|
var TableDelegate = Object.assign({}, AggregationBaseDelegate);
|
|
27
27
|
|
|
28
|
-
TableDelegate.addItem = function(sPropertyName, oTable, mPropertyBag) {
|
|
29
|
-
return Promise.resolve(null);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
TableDelegate.removeItem = function(sPropertyName, oTable, mPropertyBag) {
|
|
33
|
-
// return true within the Promise for default behaviour (e.g. continue to destroy the column)
|
|
34
|
-
return Promise.resolve(true);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
28
|
/**
|
|
38
29
|
* Provides hook to update the binding info object that is used to bind the table to the model.
|
|
39
30
|
*
|
|
40
|
-
* @abstract
|
|
41
31
|
* @param {sap.ui.mdc.Table} oMDCTable The MDC table instance
|
|
42
32
|
* @param {object} oDelegatePayload The delegate payload
|
|
43
33
|
* @param {sap.ui.base.ManagedObject.AggregationBindingInfo} oBindingInfo The binding info object to be used to bind the table to the model
|
|
34
|
+
* @protected
|
|
44
35
|
*/
|
|
45
36
|
TableDelegate.updateBindingInfo = function(oMDCTable, oDelegatePayload, oBindingInfo) {
|
|
46
37
|
oBindingInfo.parameters = {};
|
|
47
|
-
|
|
38
|
+
|
|
39
|
+
if (oMDCTable._oMessageFilter) {
|
|
40
|
+
oBindingInfo.filters = [oMDCTable._oMessageFilter];
|
|
41
|
+
} else {
|
|
42
|
+
oBindingInfo.filters = [];
|
|
43
|
+
}
|
|
48
44
|
oBindingInfo.sorter = oMDCTable._getSorters();
|
|
49
45
|
};
|
|
50
46
|
|
|
@@ -53,20 +49,33 @@ sap.ui.define([
|
|
|
53
49
|
*
|
|
54
50
|
* The default implementation rebinds the table but model-specific subclasses must call dedicated binding methods to update the binding instead of using {@link #rebindTable}.
|
|
55
51
|
*
|
|
56
|
-
* @virtual
|
|
57
52
|
* @param {sap.ui.mdc.Table} oMDCTable The MDC table instance
|
|
58
53
|
* @param {sap.ui.base.ManagedObject.AggregationBindingInfo} oBindingInfo The binding info object to be used to bind the table to the model
|
|
59
54
|
* @param {sap.ui.model.ListBinding} [oBinding] The binding instance of the table
|
|
55
|
+
* @protected
|
|
60
56
|
*/
|
|
61
57
|
TableDelegate.updateBinding = function(oMDCTable, oBindingInfo, oBinding) {
|
|
62
58
|
this.rebindTable(oMDCTable, oBindingInfo);
|
|
63
59
|
};
|
|
64
60
|
|
|
61
|
+
TableDelegate.validateState = function(oControl, oState, sKey) {
|
|
62
|
+
if (sKey == "Filter" && oControl._oMessageFilter) {
|
|
63
|
+
var oResourceBundle = Core.getLibraryResourceBundle("sap.ui.mdc");
|
|
64
|
+
return {
|
|
65
|
+
validation: coreLibrary.MessageType.Information,
|
|
66
|
+
message: oResourceBundle.getText("table.PERSONALIZATION_DIALOG_FILTER_MESSAGESTRIP")
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return AggregationBaseDelegate.validateState.apply(this, arguments);
|
|
71
|
+
};
|
|
72
|
+
|
|
65
73
|
/**
|
|
66
74
|
* Rebinds the table.
|
|
67
75
|
*
|
|
68
76
|
* @param {sap.ui.mdc.Table} oMDCTable The MDC table instance
|
|
69
77
|
* @param {sap.ui.base.ManagedObject.AggregationBindingInfo} oBindingInfo The binding info object to be used to bind the table to the model
|
|
78
|
+
* @protected
|
|
70
79
|
*/
|
|
71
80
|
TableDelegate.rebindTable = function(oMDCTable, oBindingInfo) {
|
|
72
81
|
if (oMDCTable._oTable) {
|
|
@@ -86,18 +95,18 @@ sap.ui.define([
|
|
|
86
95
|
* return oFilterFieldPromise;
|
|
87
96
|
* }
|
|
88
97
|
* }
|
|
89
|
-
* @returns {
|
|
90
|
-
* @
|
|
98
|
+
* @returns {{addItem: (function(string, sap.ui.mdc.Table): Promise<sap.ui.mdc.FilterField>)}} Object for the tables filter personalization
|
|
99
|
+
* @protected
|
|
91
100
|
*/
|
|
92
101
|
TableDelegate.getFilterDelegate = function() {
|
|
93
102
|
return {
|
|
94
103
|
/**
|
|
104
|
+
* Creates an instance of a <code>sap.ui.mdc.FilterField</code>.
|
|
95
105
|
*
|
|
96
|
-
* @param {
|
|
97
|
-
* @param {
|
|
98
|
-
*
|
|
99
|
-
* @
|
|
100
|
-
* For more information, see {@link sap.ui.mdc.AggregationBaseDelegate#addItem AggregationBaseDelegate}.
|
|
106
|
+
* @param {string} sPropertyName The property name
|
|
107
|
+
* @param {sap.ui.mdc.Table} oTable Instance of the table
|
|
108
|
+
* @returns {Promise<sap.ui.mdc.FilterField>} Promise that resolves with an instance of a <code>sap.ui.mdc.FilterField</code>.
|
|
109
|
+
* @see sap.ui.mdc.AggregationBaseDelegate#addItem
|
|
101
110
|
*/
|
|
102
111
|
addItem: function(sPropertyName, oTable) {
|
|
103
112
|
return Promise.resolve(null);
|