@openui5/sap.ui.mdc 1.97.1 → 1.98.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 +25 -30
- package/THIRDPARTY.txt +13 -20
- 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 +1 -1
- package/src/sap/ui/mdc/BaseDelegate.js +1 -1
- package/src/sap/ui/mdc/Chart.js +1016 -1796
- package/src/sap/ui/mdc/ChartDelegate.js +429 -270
- package/src/sap/ui/mdc/ChartRenderer.js +73 -77
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +2 -2
- package/src/sap/ui/mdc/FilterBar.js +3 -2
- package/src/sap/ui/mdc/FilterField.js +11 -8
- package/src/sap/ui/mdc/Link.js +4 -3
- package/src/sap/ui/mdc/LinkDelegate.js +1 -1
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/Table.js +48 -44
- package/src/sap/ui/mdc/TableDelegate.js +23 -10
- package/src/sap/ui/mdc/ValueHelp.js +19 -9
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
- package/src/sap/ui/mdc/{chartNew/ChartSelectionDetailsNew.js → chart/ChartSelectionDetails.js} +8 -8
- package/src/sap/ui/mdc/{chartNew/ChartToolbarNew.js → chart/ChartToolbar.js} +10 -10
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +48 -52
- package/src/sap/ui/mdc/{chartNew/DrillBreadcrumbsNew.js → chart/DrillBreadcrumbs.js} +3 -3
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +38 -249
- package/src/sap/ui/mdc/chart/Item.js +62 -92
- package/src/sap/ui/mdc/{chartNew/PropertyHelperNew.js → chart/PropertyHelper.js} +3 -3
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +17 -21
- package/src/sap/ui/mdc/condition/Condition.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +1 -1
- package/src/sap/ui/mdc/condition/Operator.js +1 -1
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +1 -1
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +77 -5
- package/src/sap/ui/mdc/designtime/field/Field.designtime.js +81 -5
- package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.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 +1 -1
- package/src/sap/ui/mdc/field/ConditionsType.js +1 -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 +58 -21
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +4 -4
- package/src/sap/ui/mdc/field/FieldBase.js +30 -6
- package/src/sap/ui/mdc/field/FieldBaseRenderer.js +0 -3
- package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -1
- 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 +2 -2
- 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 +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +10 -2
- 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/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/DateContent.js +2 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +301 -124
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +8 -2
- package/src/sap/ui/mdc/filterbar/vh/CollectiveSearchSelect.js +3 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +7 -1
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +6 -6
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +4 -3
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/GroupFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +9 -3
- package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +110 -0
- package/src/sap/ui/mdc/flexibility/SortFlex.js +2 -2
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +1 -1
- package/src/sap/ui/mdc/library.js +32 -37
- 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 +2 -2
- 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 +140 -178
- 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 +6 -0
- package/src/sap/ui/mdc/messagebundle_ar.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_bg.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_ca.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_cs.properties +18 -15
- package/src/sap/ui/mdc/messagebundle_cy.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_da.properties +10 -7
- package/src/sap/ui/mdc/messagebundle_de.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_el.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_en.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_es.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +16 -13
- package/src/sap/ui/mdc/messagebundle_et.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_fi.properties +9 -6
- package/src/sap/ui/mdc/messagebundle_fr.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_hi.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_hr.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_hu.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_id.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_it.properties +18 -15
- package/src/sap/ui/mdc/messagebundle_iw.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_ja.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_kk.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_ko.properties +7 -4
- package/src/sap/ui/mdc/messagebundle_lt.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_lv.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_ms.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_nl.properties +8 -5
- package/src/sap/ui/mdc/messagebundle_no.properties +11 -8
- package/src/sap/ui/mdc/messagebundle_pl.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_pt.properties +10 -7
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_ro.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_ru.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_sh.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_sk.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_sl.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_sv.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_th.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_tr.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_uk.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_vi.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +3 -0
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +3 -0
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +2 -3
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +14 -9
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +2 -3
- package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +29 -483
- package/src/sap/ui/mdc/odata/v4/{ChartPropertyHelperNew.js → ChartPropertyHelper.js} +5 -5
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +109 -93
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/{ChartDelegateNew.js → ChartDelegate.js} +125 -46
- package/src/sap/ui/mdc/p13n/Engine.js +24 -10
- package/src/sap/ui/mdc/p13n/FlexUtil.js +11 -118
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +1 -1
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/StateUtil.js +20 -6
- package/src/sap/ui/mdc/p13n/UIManager.js +5 -7
- package/src/sap/ui/mdc/p13n/modification/FlexModificationHandler.js +4 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +9 -6
- package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1092 -48
- package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +72 -0
- package/src/sap/ui/mdc/p13n/panels/ListView.js +6 -2
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +6 -5
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +156 -11
- package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +15 -26
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +6 -5
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +6 -5
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +173 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +10 -17
- package/src/sap/ui/mdc/table/Column.js +12 -12
- package/src/sap/ui/mdc/table/CreationRow.js +11 -11
- package/src/sap/ui/mdc/table/GridTableType.js +5 -6
- package/src/sap/ui/mdc/table/PropertyHelper.js +44 -7
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +8 -10
- package/src/sap/ui/mdc/table/RowSettings.js +4 -4
- package/src/sap/ui/mdc/table/TableTypeBase.js +2 -2
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/themes/base/FieldBase.less +0 -5
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +12 -1
- package/src/sap/ui/mdc/ui/Container.js +2 -2
- package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
- package/src/sap/ui/mdc/util/Common.js +1 -1
- package/src/sap/ui/mdc/util/DateUtil.js +1 -1
- package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
- package/src/sap/ui/mdc/util/FormatUtil.js +1 -1
- package/src/sap/ui/mdc/util/IdentifierUtil.js +1 -1
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +43 -12
- package/src/sap/ui/mdc/util/TypeUtil.js +5 -4
- package/src/sap/ui/mdc/valuehelp/Dialog.js +11 -8
- package/src/sap/ui/mdc/valuehelp/Popover.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/Container.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +2 -1
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +2 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -2
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +11 -5
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +36 -6
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +43 -24
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +2 -1
- package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +3 -3
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsBase.js +3 -3
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsViz.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsBase.js +1 -1
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsViz.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ChartNew.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +289 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +5 -5
- package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +12 -11
- package/test/sap/ui/mdc/testutils/opa/link/Actions.js +85 -0
- package/test/sap/ui/mdc/testutils/opa/link/Assertions.js +79 -0
- package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +112 -0
- package/test/sap/ui/mdc/testutils/opa/link/waitForLink.js +50 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +264 -141
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +27 -26
- package/src/sap/ui/mdc/ChartDelegateNew.js +0 -395
- package/src/sap/ui/mdc/ChartNew.js +0 -1114
- package/src/sap/ui/mdc/ChartNewRenderer.js +0 -91
- package/src/sap/ui/mdc/chart/DimensionItem.js +0 -281
- package/src/sap/ui/mdc/chart/MeasureItem.js +0 -318
- package/src/sap/ui/mdc/chart/MetadataDelegate.js +0 -31
- package/src/sap/ui/mdc/chart/SelectionHandler.js +0 -127
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +0 -328
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +0 -295
- package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +0 -212
- package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -72
- package/src/sap/ui/mdc/chartNew/SelectionDetailsActionsNew.js +0 -34
- package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +0 -91
- package/src/sap/ui/mdc/link/SelectionDialog.control.xml +0 -66
- package/src/sap/ui/mdc/link/SelectionDialog.js +0 -213
- package/src/sap/ui/mdc/link/SelectionDialogItem.js +0 -86
- package/src/sap/ui/mdc/odata/v4/ChartDelegateNew.js +0 -35
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +0 -1179
|
@@ -35,26 +35,28 @@ sap.ui.define([
|
|
|
35
35
|
var TableMap = new window.WeakMap(); // To store table-related information for easy access in the delegate.
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* Delegate
|
|
38
|
+
* Delegate for {@link sap.ui.mdc.Table} and <code>ODataV4</code>.
|
|
39
39
|
* Enables additional analytical capabilities.
|
|
40
40
|
*
|
|
41
41
|
* @author SAP SE
|
|
42
|
+
* @namespace
|
|
43
|
+
* @alias module:sap/ui/mdc/odata/v4/TableDelegate
|
|
44
|
+
* @extends module:sap/ui/mdc/TableDelegate
|
|
42
45
|
* @experimental
|
|
43
46
|
* @private
|
|
44
47
|
* @ui5-restricted sap.fe
|
|
45
48
|
* @MDC_PUBLIC_CANDIDATE
|
|
46
49
|
* @since 1.85
|
|
47
|
-
* @alias sap.ui.mdc.odata.v4.TableDelegate
|
|
48
50
|
*/
|
|
49
51
|
var Delegate = Object.assign({}, TableDelegate);
|
|
50
52
|
|
|
51
53
|
/**
|
|
52
54
|
* Fetches the model-specific <code>PropertyHelper</code> class or instance.
|
|
53
55
|
*
|
|
54
|
-
* <b>Note:</b> The PropertyHelper adds the extension of a property to the reserved attribute "extension". It is not allowed to
|
|
55
|
-
* attribute in the standard
|
|
56
|
+
* <b>Note:</b> The <code>PropertyHelper</code> class adds the extension of a property to the reserved attribute "extension". It is not allowed to
|
|
57
|
+
* add an <code>extension</code> attribute in the standard <code>PropertyInfo</code>.
|
|
56
58
|
*
|
|
57
|
-
* @example <caption>
|
|
59
|
+
* @example <caption>Initializing a <code>PropertyHelper</code> with extensions:</caption>
|
|
58
60
|
* new PropertyHelper(
|
|
59
61
|
* [{
|
|
60
62
|
* name: "propA",
|
|
@@ -68,8 +70,8 @@ sap.ui.define([
|
|
|
68
70
|
* }]
|
|
69
71
|
* )
|
|
70
72
|
*
|
|
71
|
-
* @param {sap.ui.mdc.Table} oTable Instance of the
|
|
72
|
-
* @param {object[]} aProperties
|
|
73
|
+
* @param {sap.ui.mdc.Table} oTable Instance of the table
|
|
74
|
+
* @param {object[]} aProperties <code>PropertyInfo</code>
|
|
73
75
|
* @param {Promise<object<string, object>|null>} mExtensions The property extensions
|
|
74
76
|
* @returns {Promise<sap.ui.mdc.table.V4AnalyticsPropertyHelper>} A <code>Promise</code> that resolves with the <code>PropertyHelper</code> class
|
|
75
77
|
* or instance
|
|
@@ -85,13 +87,13 @@ sap.ui.define([
|
|
|
85
87
|
/**
|
|
86
88
|
* Fetches the property extensions.
|
|
87
89
|
*
|
|
88
|
-
* <b>Note:</b> Property extensions
|
|
89
|
-
*
|
|
90
|
+
* <b>Note:</b> Property extensions add model-specific information. To ensure a clear separation from the standard property information, the
|
|
91
|
+
* extensions need to be passed separately to the constructor, together with their attribute metadata. An extension has to be provided as a
|
|
90
92
|
* key-value pair, where the key is the name of the property and the value is the extension of this property. It is not allowed to provide
|
|
91
93
|
* extensions without the corresponding attribute metadata.
|
|
92
94
|
*
|
|
93
|
-
* @param {sap.ui.mdc.Table} oTable Instance of the
|
|
94
|
-
* @param {object[]} aProperties
|
|
95
|
+
* @param {sap.ui.mdc.Table} oTable Instance of the table
|
|
96
|
+
* @param {object[]} aProperties <code>PropertyInfo</code>
|
|
95
97
|
* @returns {Promise<object<string, object>|null>} Key-value map, where the key is the name of the property, and the value is the extension
|
|
96
98
|
* @protected
|
|
97
99
|
*/
|
|
@@ -100,11 +102,11 @@ sap.ui.define([
|
|
|
100
102
|
};
|
|
101
103
|
|
|
102
104
|
/**
|
|
103
|
-
* Retrieves the relevant metadata that will be used for the table binding, and returns the
|
|
105
|
+
* Retrieves the relevant metadata that will be used for the table binding, and returns the <code>PropertyInfo</code> array.
|
|
104
106
|
* If it is not overridden, this method returns the same as <code>fetchProperties</code>.
|
|
105
107
|
* When overriding the method make sure the returned result is consistent with what is returned by <code>fetchProperties</code>.
|
|
106
108
|
*
|
|
107
|
-
* @param {sap.ui.mdc.Table} oTable Instance of the
|
|
109
|
+
* @param {sap.ui.mdc.Table} oTable Instance of the table
|
|
108
110
|
* @returns {Promise} Once resolved, an array of <code>PropertyInfo</code> objects is returned
|
|
109
111
|
* @protected
|
|
110
112
|
*/
|
|
@@ -117,8 +119,8 @@ sap.ui.define([
|
|
|
117
119
|
* If it is not overridden, this method returns the same as <code>fetchPropertyExtensions</code>.
|
|
118
120
|
* When overriding the method make sure the returned result is consistent with what is returned by <code>fetchPropertyExtensions</code>.
|
|
119
121
|
*
|
|
120
|
-
* @param {sap.ui.mdc.Table} oTable Instance of the
|
|
121
|
-
* @param {object[]} aProperties
|
|
122
|
+
* @param {sap.ui.mdc.Table} oTable Instance of the table
|
|
123
|
+
* @param {object[]} aProperties <code>PropertyInfo</code>
|
|
122
124
|
* @returns {Promise<object<string, object>|null>} Key-value map, where the key is the name of the property, and the value is the extension
|
|
123
125
|
* @protected
|
|
124
126
|
*/
|
|
@@ -129,7 +131,7 @@ sap.ui.define([
|
|
|
129
131
|
/**
|
|
130
132
|
* Formats the title text of a group header row of the table.
|
|
131
133
|
*
|
|
132
|
-
* @param {sap.ui.mdc.Table} oTable Instance of the
|
|
134
|
+
* @param {sap.ui.mdc.Table} oTable Instance of the table
|
|
133
135
|
* @param {sap.ui.model.Context} oContext Binding context
|
|
134
136
|
* @param {string} sProperty The name of the grouped property
|
|
135
137
|
* @returns {string | undefined} The group header title. If <code>undefined</code> is returned, the default group header title is set.
|
|
@@ -144,7 +146,6 @@ sap.ui.define([
|
|
|
144
146
|
|
|
145
147
|
return configureInnerTable(oTable).then(function() {
|
|
146
148
|
setAggregation(oTable);
|
|
147
|
-
setUpTableObserver(oTable);
|
|
148
149
|
});
|
|
149
150
|
};
|
|
150
151
|
|
|
@@ -209,13 +210,12 @@ sap.ui.define([
|
|
|
209
210
|
* {@link sap.ui.model.odata.v4.ODataListBinding#changeParameters}.
|
|
210
211
|
*
|
|
211
212
|
* @param {sap.ui.mdc.Table} oTable Instance of the MDC table
|
|
212
|
-
* @param {object} oDelegatePayload The delegate payload
|
|
213
213
|
* @param {sap.ui.base.ManagedObject.AggregationBindingInfo} oBindingInfo The binding info object to be used to bind the table to the model
|
|
214
214
|
* @function
|
|
215
|
-
* @name sap
|
|
215
|
+
* @name module:sap/ui/mdc/odata/v4/TableDelegate.updateBindingInfo
|
|
216
216
|
* @abstract
|
|
217
217
|
*/
|
|
218
|
-
//Delegate.updateBindingInfo = function(oTable,
|
|
218
|
+
//Delegate.updateBindingInfo = function(oTable, oBindingInfo) { };
|
|
219
219
|
|
|
220
220
|
/**
|
|
221
221
|
* Updates the row binding of the table if possible, rebinds otherwise.
|
|
@@ -226,14 +226,14 @@ sap.ui.define([
|
|
|
226
226
|
* <code>model</code>... must be provided in the {@link #updateBindingInfo updateBindingInfo} method always,
|
|
227
227
|
* and those keys must not be changed conditionally.
|
|
228
228
|
*
|
|
229
|
-
* @param {sap.ui.mdc.Table} oMDCTable Instance of the
|
|
229
|
+
* @param {sap.ui.mdc.Table} oMDCTable Instance of the table
|
|
230
230
|
* @param {sap.ui.base.ManagedObject.AggregationBindingInfo} oBindingInfo The binding info object to be used to bind the table to the model.
|
|
231
231
|
* @param {sap.ui.model.ListBinding} [oBinding] The binding instance of the table
|
|
232
232
|
* @protected
|
|
233
233
|
* @override
|
|
234
234
|
*/
|
|
235
235
|
Delegate.updateBinding = function(oTable, oBindingInfo, oBinding) {
|
|
236
|
-
if (!oBinding || oBinding.
|
|
236
|
+
if (!oBinding || oBinding.getPath() != oBindingInfo.path) {
|
|
237
237
|
this.rebindTable(oTable, oBindingInfo);
|
|
238
238
|
return;
|
|
239
239
|
}
|
|
@@ -269,29 +269,37 @@ sap.ui.define([
|
|
|
269
269
|
* @override
|
|
270
270
|
* @inheritDoc
|
|
271
271
|
*/
|
|
272
|
-
Delegate.
|
|
272
|
+
Delegate.rebind = function (oTable, oBindingInfo) {
|
|
273
273
|
setAggregation(oTable, oBindingInfo);
|
|
274
274
|
TableDelegate.rebindTable(oTable, oBindingInfo);
|
|
275
275
|
};
|
|
276
276
|
|
|
277
277
|
Delegate.addColumnMenuItems = function(oTable, oMDCColumn) {
|
|
278
|
-
if (!isInnerTableReadyForAnalytics(oTable)) {
|
|
279
|
-
return [];
|
|
280
|
-
}
|
|
281
|
-
|
|
282
278
|
var oPropertyHelper = oTable.getPropertyHelper();
|
|
283
279
|
var oProperty = oPropertyHelper.getProperty(oMDCColumn.getDataProperty());
|
|
280
|
+
var aItems = [];
|
|
284
281
|
|
|
285
282
|
if (!oProperty) {
|
|
286
283
|
return [];
|
|
287
284
|
}
|
|
288
285
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
286
|
+
if (oTable.isGroupingEnabled() && supportsGrouping(oTable)) {
|
|
287
|
+
var aGroupProperties = oProperty.getGroupableProperties();
|
|
288
|
+
|
|
289
|
+
if (aGroupProperties.length > 0) {
|
|
290
|
+
aItems.push(createGroupPopoverItem(aGroupProperties, oMDCColumn));
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if (oTable.isAggregationEnabled() && supportsAggregation(oTable)) {
|
|
295
|
+
var aAggregateProperties = oProperty.getAggregatableProperties();
|
|
296
|
+
|
|
297
|
+
if (aAggregateProperties.length > 0) {
|
|
298
|
+
aItems.push(createAggregatePopoverItem(aAggregateProperties, oMDCColumn));
|
|
299
|
+
}
|
|
300
|
+
}
|
|
294
301
|
|
|
302
|
+
var oPopover = oTable._oPopover;
|
|
295
303
|
if (oPopover) {
|
|
296
304
|
oPopover.getItems().forEach(function(oItem, iIndex, aItems) {
|
|
297
305
|
var sLabel = oItem.getLabel();
|
|
@@ -307,15 +315,7 @@ sap.ui.define([
|
|
|
307
315
|
});
|
|
308
316
|
}
|
|
309
317
|
|
|
310
|
-
|
|
311
|
-
oGroupPopoverItem = createGroupPopoverItem(aGroupProperties, oMDCColumn);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
if (oTable.isAggregationEnabled() && aAggregateProperties.length > 0) {
|
|
315
|
-
oAggregatePopoverItem = createAggregatePopoverItem(aAggregateProperties, oMDCColumn);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
return [oGroupPopoverItem, oAggregatePopoverItem];
|
|
318
|
+
return aItems;
|
|
319
319
|
};
|
|
320
320
|
|
|
321
321
|
function createGroupPopoverItem(aGroupProperties, oMDCColumn) {
|
|
@@ -431,30 +431,36 @@ sap.ui.define([
|
|
|
431
431
|
/**
|
|
432
432
|
* Updates the aggregation info if the plugin is enabled.
|
|
433
433
|
*
|
|
434
|
-
* @param {sap.ui.mdc.Table} oTable Instance of the
|
|
434
|
+
* @param {sap.ui.mdc.Table} oTable Instance of the table
|
|
435
435
|
* @param {sap.ui.base.ManagedObject.AggregationBindingInfo} [oBindingInfo] The binding info object to be used to bind the table to the model
|
|
436
436
|
*/
|
|
437
437
|
function setAggregation(oTable, oBindingInfo) {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}
|
|
444
|
-
var aGroupLevels = oTable._getGroupedProperties().map(function (mGroupLevel) {
|
|
445
|
-
return mGroupLevel.name;
|
|
446
|
-
});
|
|
447
|
-
var oAggregationInfo = {
|
|
448
|
-
visible: getVisibleProperties(oTable),
|
|
449
|
-
groupLevels: aGroupLevels,
|
|
450
|
-
grandTotal: aAggregates,
|
|
451
|
-
subtotals: aAggregates,
|
|
452
|
-
columnState: getColumnState(oTable, aAggregates),
|
|
453
|
-
search: sSearch
|
|
454
|
-
};
|
|
438
|
+
var oPlugin = TableMap.get(oTable).plugin;
|
|
439
|
+
|
|
440
|
+
if (!oPlugin || oPlugin.isDestroyed()) {
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
455
443
|
|
|
456
|
-
|
|
444
|
+
var aGroupLevels = oTable._getGroupedProperties().map(function (mGroupLevel) {
|
|
445
|
+
return mGroupLevel.name;
|
|
446
|
+
});
|
|
447
|
+
var aAggregates = Object.keys(oTable._getAggregatedProperties());
|
|
448
|
+
var sSearch = oBindingInfo ? oBindingInfo.parameters["$search"] : undefined;
|
|
449
|
+
|
|
450
|
+
if (sSearch ) {
|
|
451
|
+
delete oBindingInfo.parameters["$search"];
|
|
457
452
|
}
|
|
453
|
+
|
|
454
|
+
var oAggregationInfo = {
|
|
455
|
+
visible: getVisibleProperties(oTable),
|
|
456
|
+
groupLevels: aGroupLevels,
|
|
457
|
+
grandTotal: aAggregates,
|
|
458
|
+
subtotals: aAggregates,
|
|
459
|
+
columnState: getColumnState(oTable, aAggregates),
|
|
460
|
+
search: sSearch
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
oPlugin.setAggregationInfo(oAggregationInfo);
|
|
458
464
|
}
|
|
459
465
|
|
|
460
466
|
function getVisibleProperties(oTable) {
|
|
@@ -469,7 +475,7 @@ sap.ui.define([
|
|
|
469
475
|
}
|
|
470
476
|
|
|
471
477
|
if (oProperty.isComplex()) {
|
|
472
|
-
// Add the names of all related (simple)
|
|
478
|
+
// Add the names of all related (simple) PropertyInfo in the list.
|
|
473
479
|
oProperty.getReferencedProperties().forEach(function(oProperty) {
|
|
474
480
|
oVisiblePropertiesSet.add(oProperty.name);
|
|
475
481
|
});
|
|
@@ -584,7 +590,7 @@ sap.ui.define([
|
|
|
584
590
|
*
|
|
585
591
|
* @param {Object} oBaseState Message set by the base <code>TableDelegate</code>
|
|
586
592
|
* @param {Object} oValidationState Message set by the <code>ODataV4Delegate</code>
|
|
587
|
-
* @
|
|
593
|
+
* @returns {Object} The message with higher priority
|
|
588
594
|
* @private
|
|
589
595
|
*/
|
|
590
596
|
function mergeValidation(oBaseState, oValidationState) {
|
|
@@ -598,39 +604,56 @@ sap.ui.define([
|
|
|
598
604
|
}
|
|
599
605
|
|
|
600
606
|
/**
|
|
601
|
-
*
|
|
607
|
+
* Checks whether the inner table supports grouping.
|
|
602
608
|
*
|
|
603
|
-
* @param {sap.ui.mdc.Table} oTable Instance of the
|
|
604
|
-
* @
|
|
609
|
+
* @param {sap.ui.mdc.Table} oTable Instance of the table
|
|
610
|
+
* @returns {boolean} Whether the inner table supports grouping
|
|
605
611
|
*/
|
|
606
|
-
function
|
|
607
|
-
return oTable._isOfType(TableType.Table)
|
|
612
|
+
function supportsGrouping(oTable) {
|
|
613
|
+
return oTable._isOfType(TableType.Table);
|
|
608
614
|
}
|
|
609
615
|
|
|
610
616
|
/**
|
|
611
|
-
* Checks whether the inner table supports
|
|
617
|
+
* Checks whether the inner table supports aggregation.
|
|
612
618
|
*
|
|
613
|
-
* @param {sap.ui.mdc.Table} oTable Instance of the
|
|
614
|
-
* @
|
|
619
|
+
* @param {sap.ui.mdc.Table} oTable Instance of the table
|
|
620
|
+
* @returns {boolean} Whether the inner table supports aggregation
|
|
615
621
|
*/
|
|
616
|
-
function
|
|
617
|
-
|
|
618
|
-
var oPlugin = TableMap.get(oTable).plugin;
|
|
619
|
-
return oPlugin != null && !oPlugin.bIsDestroyed;
|
|
620
|
-
} else {
|
|
621
|
-
return false;
|
|
622
|
-
}
|
|
622
|
+
function supportsAggregation(oTable) {
|
|
623
|
+
return oTable._isOfType(TableType.Table);
|
|
623
624
|
}
|
|
624
625
|
|
|
625
|
-
|
|
626
|
-
|
|
626
|
+
/**
|
|
627
|
+
* Checks whether aggregation features of the model are used.
|
|
628
|
+
*
|
|
629
|
+
* @param {sap.ui.mdc.Table} oTable Instance of the table
|
|
630
|
+
* @returns {boolean} Whether aggregation features are used
|
|
631
|
+
* @see sap.ui.model.odata.v4.ODataListBinding#setAggregation
|
|
632
|
+
*/
|
|
633
|
+
function isAnalyticsEnabled(oTable) {
|
|
634
|
+
return (oTable.isGroupingEnabled() || oTable.isAggregationEnabled()) && oTable._isOfType(TableType.Table);
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Configures the inner table to support the personalization settings of the table.
|
|
639
|
+
*
|
|
640
|
+
* @param {sap.ui.mdc.Table} oTable Instance of the table
|
|
641
|
+
* @return {Promise} A <code>Promise</code> that resolves when the inner table is configured
|
|
642
|
+
*/
|
|
643
|
+
function configureInnerTable(oTable) {
|
|
644
|
+
if (oTable._isOfType(TableType.Table)) {
|
|
645
|
+
return (isAnalyticsEnabled(oTable) ? enableGridTablePlugin(oTable) : disableGridTablePlugin(oTable)).then(function() {
|
|
646
|
+
return setUpTableObserver(oTable);
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
return Promise.resolve();
|
|
627
650
|
}
|
|
628
651
|
|
|
629
652
|
function enableGridTablePlugin(oTable) {
|
|
630
653
|
var mTableMap = TableMap.get(oTable);
|
|
631
654
|
var oPlugin = mTableMap.plugin;
|
|
632
655
|
|
|
633
|
-
if (oPlugin && !oPlugin.
|
|
656
|
+
if (oPlugin && !oPlugin.isDestroyed()) {
|
|
634
657
|
oPlugin.activate();
|
|
635
658
|
return Promise.resolve();
|
|
636
659
|
}
|
|
@@ -668,10 +691,6 @@ sap.ui.define([
|
|
|
668
691
|
return Promise.resolve();
|
|
669
692
|
}
|
|
670
693
|
|
|
671
|
-
function configureResponsiveTable(oTable) {
|
|
672
|
-
return Promise.resolve();
|
|
673
|
-
}
|
|
674
|
-
|
|
675
694
|
function fetchPropertyHelperForBinding(oTable) {
|
|
676
695
|
var mTableMap = TableMap.get(oTable);
|
|
677
696
|
|
|
@@ -706,20 +725,17 @@ sap.ui.define([
|
|
|
706
725
|
if (mTableMap.oPropertyHelperForBinding) {
|
|
707
726
|
mTableMap.oPropertyHelperForBinding.destroy();
|
|
708
727
|
}
|
|
728
|
+
|
|
709
729
|
} else {
|
|
710
730
|
configureInnerTable(oTable);
|
|
711
731
|
}
|
|
712
732
|
});
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
mTableMap.observer.observe(oTable, {
|
|
716
|
-
properties: ["p13nMode"],
|
|
717
|
-
destroy: true
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
733
|
|
|
721
|
-
|
|
722
|
-
|
|
734
|
+
mTableMap.observer.observe(oTable, {
|
|
735
|
+
properties: ["p13nMode"],
|
|
736
|
+
destroy: true
|
|
737
|
+
});
|
|
738
|
+
}
|
|
723
739
|
}
|
|
724
740
|
|
|
725
741
|
return Delegate;
|