@sapui5/sap.fe.macros 1.141.1 → 1.142.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/package.json +1 -1
- package/src/sap/fe/macros/.library +1 -1
- package/src/sap/fe/macros/Breadcrumbs.js +4 -10
- package/src/sap/fe/macros/Breadcrumbs.tsx +2 -8
- package/src/sap/fe/macros/Chart.js +34 -23
- package/src/sap/fe/macros/Chart.tsx +25 -11
- package/src/sap/fe/macros/CollaborativeDraftHandler.js +48 -31
- package/src/sap/fe/macros/CollaborativeDraftHandler.tsx +51 -26
- package/src/sap/fe/macros/CollectionBindingInfo.js +8 -2
- package/src/sap/fe/macros/CollectionBindingInfo.ts +11 -6
- package/src/sap/fe/macros/CommonHelper.js +14 -24
- package/src/sap/fe/macros/CommonHelper.ts +18 -25
- package/src/sap/fe/macros/Field.js +30 -13
- package/src/sap/fe/macros/Field.ts +60 -30
- package/src/sap/fe/macros/FooterContent.js +5 -2
- package/src/sap/fe/macros/FooterContent.tsx +6 -3
- package/src/sap/fe/macros/KPITag.js +1 -1
- package/src/sap/fe/macros/KPITag.tsx +3 -1
- package/src/sap/fe/macros/MacroAPI.js +3 -2
- package/src/sap/fe/macros/MacroAPI.ts +2 -2
- package/src/sap/fe/macros/MessageButton.js +3 -2
- package/src/sap/fe/macros/MessageButton.tsx +5 -2
- package/src/sap/fe/macros/MicroChart.js +10 -6
- package/src/sap/fe/macros/MicroChart.tsx +8 -2
- package/src/sap/fe/macros/MultiValueField.js +22 -36
- package/src/sap/fe/macros/MultiValueField.tsx +34 -66
- package/src/sap/fe/macros/RichTextEditor.js +3 -4
- package/src/sap/fe/macros/RichTextEditor.tsx +2 -3
- package/src/sap/fe/macros/Status.js +35 -8
- package/src/sap/fe/macros/Status.tsx +23 -2
- package/src/sap/fe/macros/ValueHelp.js +5 -2
- package/src/sap/fe/macros/ValueHelp.tsx +5 -0
- package/src/sap/fe/macros/ai/EasyFilterBar.js +7 -34
- package/src/sap/fe/macros/ai/EasyFilterBar.tsx +6 -35
- package/src/sap/fe/macros/ai/EasyFilterDataFetcher.js +31 -7
- package/src/sap/fe/macros/ai/EasyFilterDataFetcher.ts +33 -6
- package/src/sap/fe/macros/chart/Action.js +25 -2
- package/src/sap/fe/macros/chart/Action.ts +13 -0
- package/src/sap/fe/macros/chart/ActionGroup.js +25 -2
- package/src/sap/fe/macros/chart/ActionGroup.ts +13 -0
- package/src/sap/fe/macros/chart/ChartDelegate.js +8 -8
- package/src/sap/fe/macros/chart/ChartDelegate.ts +17 -12
- package/src/sap/fe/macros/chart/MdcChartTemplate.js +54 -11
- package/src/sap/fe/macros/chart/MdcChartTemplate.tsx +70 -11
- package/src/sap/fe/macros/chart/OverflowGroup.js +62 -0
- package/src/sap/fe/macros/chart/OverflowGroup.ts +22 -0
- package/src/sap/fe/macros/controls/FilterBar.js +39 -3
- package/src/sap/fe/macros/controls/FilterBar.ts +42 -1
- package/src/sap/fe/macros/controls/RadioButtons.js +18 -5
- package/src/sap/fe/macros/controls/RadioButtons.tsx +10 -1
- package/src/sap/fe/macros/coreUI/CreateDialog.js +2 -2
- package/src/sap/fe/macros/coreUI/CreateDialog.tsx +1 -1
- package/src/sap/fe/macros/coreUI/OperationParameterDialog.js +37 -9
- package/src/sap/fe/macros/coreUI/OperationParameterDialog.tsx +45 -6
- package/src/sap/fe/macros/draftIndicator/DraftIndicator.js +4 -2
- package/src/sap/fe/macros/draftIndicator/DraftIndicator.tsx +3 -1
- package/src/sap/fe/macros/field/FieldFormatOptions.js +3 -3
- package/src/sap/fe/macros/field/FieldFormatOptions.ts +1 -1
- package/src/sap/fe/macros/field/FieldHelper.js +4 -3
- package/src/sap/fe/macros/field/FieldHelper.ts +7 -1
- package/src/sap/fe/macros/field/FieldRuntime.js +38 -8
- package/src/sap/fe/macros/field/FieldRuntime.ts +65 -7
- package/src/sap/fe/macros/field/FieldRuntimeHelper.js +3 -34
- package/src/sap/fe/macros/field/FieldRuntimeHelper.ts +28 -53
- package/src/sap/fe/macros/field/FieldTemplating.js +5 -4
- package/src/sap/fe/macros/field/FieldTemplating.ts +6 -4
- package/src/sap/fe/macros/filter/FilterFieldHelper.js +6 -4
- package/src/sap/fe/macros/filter/FilterFieldHelper.ts +7 -2
- package/src/sap/fe/macros/filter/FilterUtils.js +100 -36
- package/src/sap/fe/macros/filter/FilterUtils.ts +127 -39
- package/src/sap/fe/macros/filterBar/ExtendedSemanticDateOperators.js +2 -2
- package/src/sap/fe/macros/filterBar/ExtendedSemanticDateOperators.ts +1 -1
- package/src/sap/fe/macros/filterBar/FilterBar.block.js +4 -3
- package/src/sap/fe/macros/filterBar/FilterBar.block.tsx +19 -8
- package/src/sap/fe/macros/filterBar/FilterBarAPI.js +10 -7
- package/src/sap/fe/macros/filterBar/FilterBarAPI.ts +31 -16
- package/src/sap/fe/macros/filterBar/FilterBarDelegate.js +4 -3
- package/src/sap/fe/macros/filterBar/FilterBarDelegate.ts +5 -2
- package/src/sap/fe/macros/filterBar/mixin/FilterBarAPIStateHandler.js +4 -3
- package/src/sap/fe/macros/filterBar/mixin/FilterBarAPIStateHandler.ts +3 -2
- package/src/sap/fe/macros/form/Form.block.js +27 -2
- package/src/sap/fe/macros/form/Form.block.ts +31 -11
- package/src/sap/fe/macros/form/FormActionButtons.fragment.xml +13 -3
- package/src/sap/fe/macros/form/FormContainer.block.js +96 -65
- package/src/sap/fe/macros/form/FormContainer.block.ts +104 -65
- package/src/sap/fe/macros/formatters/TableFormatter.js +13 -10
- package/src/sap/fe/macros/formatters/TableFormatter.ts +11 -9
- package/src/sap/fe/macros/formatters/VisualFilterFormatter.js +6 -4
- package/src/sap/fe/macros/formatters/VisualFilterFormatter.ts +5 -5
- package/src/sap/fe/macros/inlineEdit/InlineEdit.js +5 -5
- package/src/sap/fe/macros/inlineEdit/InlineEdit.ts +4 -4
- package/src/sap/fe/macros/insights/InsightsService.js +3 -2
- package/src/sap/fe/macros/insights/InsightsService.ts +2 -1
- package/src/sap/fe/macros/internal/DataPoint.js +7 -8
- package/src/sap/fe/macros/internal/DataPoint.tsx +6 -9
- package/src/sap/fe/macros/internal/field/DisplayStyle.js +8 -6
- package/src/sap/fe/macros/internal/field/DisplayStyle.tsx +7 -8
- package/src/sap/fe/macros/internal/field/EditStyle.js +9 -20
- package/src/sap/fe/macros/internal/field/EditStyle.tsx +17 -41
- package/src/sap/fe/macros/internal/field/FieldBlockStructure.js +2 -2
- package/src/sap/fe/macros/internal/field/FieldBlockStructure.tsx +1 -1
- package/src/sap/fe/macros/internal/field/FieldStructure.js +1 -2
- package/src/sap/fe/macros/internal/field/FieldStructure.tsx +0 -2
- package/src/sap/fe/macros/internal/field/FieldStructureHelper.js +7 -7
- package/src/sap/fe/macros/internal/field/FieldStructureHelper.ts +17 -11
- package/src/sap/fe/macros/internal/helpers/DataPointTemplating.js +6 -2
- package/src/sap/fe/macros/internal/helpers/DataPointTemplating.ts +5 -1
- package/src/sap/fe/macros/internal/valuehelp/AdditionalValueFormatter.js +9 -6
- package/src/sap/fe/macros/internal/valuehelp/AdditionalValueFormatter.ts +7 -5
- package/src/sap/fe/macros/internal/valuehelp/TableDelegate.js +4 -4
- package/src/sap/fe/macros/internal/valuehelp/TableDelegate.ts +6 -6
- package/src/sap/fe/macros/internal/valuehelp/ValueListDialogTable.fragment.xml +5 -2
- package/src/sap/fe/macros/library.js +3 -3
- package/src/sap/fe/macros/library.ts +2 -0
- package/src/sap/fe/macros/mdc/adapter/StateHelper.js +15 -5
- package/src/sap/fe/macros/mdc/adapter/StateHelper.ts +21 -5
- package/src/sap/fe/macros/messagebundle.properties +7 -5
- package/src/sap/fe/macros/messagebundle_ar.properties +12 -3
- package/src/sap/fe/macros/messagebundle_bg.properties +13 -4
- package/src/sap/fe/macros/messagebundle_ca.properties +12 -3
- package/src/sap/fe/macros/messagebundle_cnr.properties +12 -3
- package/src/sap/fe/macros/messagebundle_cs.properties +11 -2
- package/src/sap/fe/macros/messagebundle_cy.properties +12 -3
- package/src/sap/fe/macros/messagebundle_da.properties +12 -3
- package/src/sap/fe/macros/messagebundle_de.properties +16 -7
- package/src/sap/fe/macros/messagebundle_el.properties +13 -4
- package/src/sap/fe/macros/messagebundle_en.properties +13 -4
- package/src/sap/fe/macros/messagebundle_en_GB.properties +13 -4
- package/src/sap/fe/macros/messagebundle_en_US_saprigi.properties +12 -3
- package/src/sap/fe/macros/messagebundle_es.properties +12 -3
- package/src/sap/fe/macros/messagebundle_es_MX.properties +12 -3
- package/src/sap/fe/macros/messagebundle_et.properties +12 -3
- package/src/sap/fe/macros/messagebundle_fi.properties +12 -3
- package/src/sap/fe/macros/messagebundle_fr.properties +12 -3
- package/src/sap/fe/macros/messagebundle_fr_CA.properties +12 -3
- package/src/sap/fe/macros/messagebundle_hi.properties +12 -3
- package/src/sap/fe/macros/messagebundle_hr.properties +13 -4
- package/src/sap/fe/macros/messagebundle_hu.properties +12 -3
- package/src/sap/fe/macros/messagebundle_id.properties +18 -9
- package/src/sap/fe/macros/messagebundle_it.properties +12 -3
- package/src/sap/fe/macros/messagebundle_iw.properties +12 -3
- package/src/sap/fe/macros/messagebundle_ja.properties +12 -3
- package/src/sap/fe/macros/messagebundle_kk.properties +11 -2
- package/src/sap/fe/macros/messagebundle_ko.properties +13 -4
- package/src/sap/fe/macros/messagebundle_lt.properties +12 -3
- package/src/sap/fe/macros/messagebundle_lv.properties +12 -3
- package/src/sap/fe/macros/messagebundle_mk.properties +12 -3
- package/src/sap/fe/macros/messagebundle_ms.properties +12 -3
- package/src/sap/fe/macros/messagebundle_nl.properties +12 -3
- package/src/sap/fe/macros/messagebundle_no.properties +12 -3
- package/src/sap/fe/macros/messagebundle_pl.properties +12 -3
- package/src/sap/fe/macros/messagebundle_pt.properties +12 -3
- package/src/sap/fe/macros/messagebundle_pt_PT.properties +12 -3
- package/src/sap/fe/macros/messagebundle_ro.properties +13 -4
- package/src/sap/fe/macros/messagebundle_ru.properties +12 -3
- package/src/sap/fe/macros/messagebundle_sh.properties +12 -3
- package/src/sap/fe/macros/messagebundle_sk.properties +12 -3
- package/src/sap/fe/macros/messagebundle_sl.properties +13 -4
- package/src/sap/fe/macros/messagebundle_sr.properties +12 -3
- package/src/sap/fe/macros/messagebundle_sv.properties +12 -3
- package/src/sap/fe/macros/messagebundle_th.properties +11 -2
- package/src/sap/fe/macros/messagebundle_tr.properties +12 -3
- package/src/sap/fe/macros/messagebundle_uk.properties +12 -3
- package/src/sap/fe/macros/messagebundle_vi.properties +13 -4
- package/src/sap/fe/macros/messagebundle_zh_CN.properties +12 -3
- package/src/sap/fe/macros/messagebundle_zh_TW.properties +12 -3
- package/src/sap/fe/macros/richtexteditor/ButtonGroup.js +2 -2
- package/src/sap/fe/macros/richtexteditor/ButtonGroup.ts +2 -2
- package/src/sap/fe/macros/table/Action.js +15 -2
- package/src/sap/fe/macros/table/Action.ts +11 -1
- package/src/sap/fe/macros/table/ActionGroup.js +15 -2
- package/src/sap/fe/macros/table/ActionGroup.ts +8 -0
- package/src/sap/fe/macros/table/ActionGroupOverride.js +14 -2
- package/src/sap/fe/macros/table/ActionGroupOverride.ts +7 -0
- package/src/sap/fe/macros/table/ActionOverride.js +14 -2
- package/src/sap/fe/macros/table/ActionOverride.ts +7 -0
- package/src/sap/fe/macros/table/ActionsTemplating.js +16 -2
- package/src/sap/fe/macros/table/ActionsTemplating.tsx +15 -0
- package/src/sap/fe/macros/table/MdcTableTemplate.js +91 -10
- package/src/sap/fe/macros/table/MdcTableTemplate.tsx +131 -10
- package/src/sap/fe/macros/table/OverflowGroups.js +59 -0
- package/src/sap/fe/macros/table/OverflowGroups.ts +27 -0
- package/src/sap/fe/macros/table/Table.block.js +70 -29
- package/src/sap/fe/macros/table/Table.block.tsx +65 -12
- package/src/sap/fe/macros/table/TableAPI.js +169 -131
- package/src/sap/fe/macros/table/TableAPI.ts +58 -28
- package/src/sap/fe/macros/table/TableDefinition.js +19 -2
- package/src/sap/fe/macros/table/TableDefinition.ts +17 -1
- package/src/sap/fe/macros/table/TableEventHandlerProvider.js +4 -3
- package/src/sap/fe/macros/table/TableEventHandlerProvider.ts +8 -9
- package/src/sap/fe/macros/table/TableHelper.js +5 -2
- package/src/sap/fe/macros/table/TableHelper.ts +5 -2
- package/src/sap/fe/macros/table/TableRuntime.js +2 -2
- package/src/sap/fe/macros/table/TableRuntime.ts +4 -6
- package/src/sap/fe/macros/table/TableSizeHelper.js +4 -4
- package/src/sap/fe/macros/table/TableSizeHelper.ts +6 -11
- package/src/sap/fe/macros/table/delegates/TableDelegate.js +67 -26
- package/src/sap/fe/macros/table/delegates/TableDelegate.ts +108 -118
- package/src/sap/fe/macros/table/massEdit/MassEditDialogHelper.js +2 -2
- package/src/sap/fe/macros/table/massEdit/MassEditDialogHelper.tsx +1 -1
- package/src/sap/fe/macros/table/massEdit/MassEditField.js +1 -1
- package/src/sap/fe/macros/table/massEdit/MassEditField.tsx +3 -6
- package/src/sap/fe/macros/table/mixin/EmptyRowsHandler.js +6 -5
- package/src/sap/fe/macros/table/mixin/EmptyRowsHandler.ts +10 -4
- package/src/sap/fe/macros/table/mixin/TableAPIStateHandler.js +7 -9
- package/src/sap/fe/macros/table/mixin/TableAPIStateHandler.ts +7 -8
- package/src/sap/fe/macros/table/mixin/TableExport.js +1 -1
- package/src/sap/fe/macros/table/mixin/TableExport.ts +3 -3
- package/src/sap/fe/macros/visualfilters/InteractiveChartHelper.js +4 -4
- package/src/sap/fe/macros/visualfilters/InteractiveChartHelper.ts +3 -3
- package/src/sap/fe/macros/visualfilters/VisualFilter.js +20 -2
- package/src/sap/fe/macros/visualfilters/VisualFilter.tsx +28 -6
- package/src/sap/fe/macros/visualfilters/VisualFilterRuntime.js +6 -3
- package/src/sap/fe/macros/visualfilters/VisualFilterRuntime.ts +4 -3
- package/src/sap/fe/macros/visualfilters/fragments/InteractiveCharts.js +3 -3
- package/src/sap/fe/macros/visualfilters/fragments/InteractiveCharts.tsx +10 -4
- package/src/sap/fe/macros/visualfilters/fragments/InteractiveDonutChart.fragment.xml +1 -1
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EntitySet, NavigationProperty, Property } from "@sap-ux/vocabularies-types";
|
|
2
|
+
import type {
|
|
3
|
+
ConnectedFields,
|
|
4
|
+
DataField,
|
|
5
|
+
DataFieldAbstractTypes,
|
|
6
|
+
DataFieldForAnnotation,
|
|
7
|
+
DataPointType,
|
|
8
|
+
FieldGroupType
|
|
9
|
+
} from "@sap-ux/vocabularies-types/vocabularies/UI";
|
|
2
10
|
import Log from "sap/base/Log";
|
|
3
11
|
import deepEqual from "sap/base/util/deepEqual";
|
|
4
12
|
import deepExtend from "sap/base/util/deepExtend";
|
|
@@ -11,12 +19,12 @@ import type { FEView } from "sap/fe/core/BaseController";
|
|
|
11
19
|
import type { BaseTreeModifier } from "sap/fe/core/CommonUtils";
|
|
12
20
|
import CommonUtils from "sap/fe/core/CommonUtils";
|
|
13
21
|
import type TemplateComponent from "sap/fe/core/TemplateComponent";
|
|
22
|
+
import CollaborationManager from "sap/fe/core/controllerextensions/cards/CollaborationManager";
|
|
14
23
|
import type { ListReportManifestSettings } from "sap/fe/core/converters/ManifestSettings";
|
|
24
|
+
import * as MetaModelConverter from "sap/fe/core/converters/MetaModelConverter";
|
|
15
25
|
import { getInvolvedDataModelObjects } from "sap/fe/core/converters/MetaModelConverter";
|
|
16
|
-
import type {
|
|
17
|
-
|
|
18
|
-
import type { EntitySet, NavigationProperty } from "@sap-ux/vocabularies-types";
|
|
19
|
-
import CollaborationManager from "sap/fe/core/controllerextensions/cards/CollaborationManager";
|
|
26
|
+
import type { PageContextPathTarget } from "sap/fe/core/converters/TemplateConverter";
|
|
27
|
+
import FilterRestrictions from "sap/fe/core/converters/controls/Common/filter/FilterRestrictions";
|
|
20
28
|
import type {
|
|
21
29
|
AnnotationTableColumn,
|
|
22
30
|
ColumnExportSettings,
|
|
@@ -26,6 +34,7 @@ import type {
|
|
|
26
34
|
} from "sap/fe/core/converters/controls/Common/table/Columns";
|
|
27
35
|
import { ColumnType } from "sap/fe/core/converters/controls/Common/table/Columns";
|
|
28
36
|
import type { CustomElement } from "sap/fe/core/converters/helpers/ConfigurableObject";
|
|
37
|
+
import { getConnectedFieldsData, getConnectedFieldsSeparator } from "sap/fe/core/converters/helpers/DataFieldHelper";
|
|
29
38
|
import ValueFormatter from "sap/fe/core/formatters/ValueFormatter";
|
|
30
39
|
import DeleteHelper from "sap/fe/core/helpers/DeleteHelper";
|
|
31
40
|
import ExcelFormat from "sap/fe/core/helpers/ExcelFormatHelper";
|
|
@@ -34,10 +43,11 @@ import ModelHelper from "sap/fe/core/helpers/ModelHelper";
|
|
|
34
43
|
import PromiseKeeper from "sap/fe/core/helpers/PromiseKeeper";
|
|
35
44
|
import { getLocalizedText, getResourceModel } from "sap/fe/core/helpers/ResourceModelHelper";
|
|
36
45
|
import SizeHelper from "sap/fe/core/helpers/SizeHelper";
|
|
46
|
+
import type { WrappedCard } from "sap/fe/core/services/CollaborationManagerServiceFactory";
|
|
37
47
|
import type { DataModelObjectPath } from "sap/fe/core/templating/DataModelPathHelper";
|
|
38
48
|
import { isPathFilterable } from "sap/fe/core/templating/DataModelPathHelper";
|
|
39
49
|
import { isTypeFilterable } from "sap/fe/core/type/EDM";
|
|
40
|
-
import type {
|
|
50
|
+
import type { SerializedCollectionBindingInfo } from "sap/fe/macros/CollectionBindingInfo";
|
|
41
51
|
import CollectionBindingInfoAPI from "sap/fe/macros/CollectionBindingInfo";
|
|
42
52
|
import CommonHelper from "sap/fe/macros/CommonHelper";
|
|
43
53
|
import DelegateUtil from "sap/fe/macros/DelegateUtil";
|
|
@@ -79,12 +89,17 @@ import type ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
|
|
|
79
89
|
import type ODataModel from "sap/ui/model/odata/v4/ODataModel";
|
|
80
90
|
import type QuickFilterSelector from "../QuickFilterSelector";
|
|
81
91
|
import TableEventHandlerProvider from "../TableEventHandlerProvider";
|
|
82
|
-
|
|
83
92
|
const SEMANTICKEY_HAS_DRAFTINDICATOR = "/semanticKeyHasDraftIndicator";
|
|
84
93
|
const SEARCH_HAS_BEEN_FIRED = "searchFired";
|
|
85
94
|
const COLUMN_HAS_BEEN_ADDED = "columnAdded";
|
|
86
95
|
const PREVIOUS_SORTERS = "previousSorters";
|
|
87
96
|
|
|
97
|
+
async function delayFor(delay: number): Promise<void> {
|
|
98
|
+
return new Promise<void>((resolve) => {
|
|
99
|
+
setTimeout(resolve, delay);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
88
103
|
/**
|
|
89
104
|
* Helper class for sap.ui.mdc.Table.
|
|
90
105
|
* <h3><b>Note:</b></h3>
|
|
@@ -137,10 +152,11 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
137
152
|
case "com.sap.vocabularies.UI.v1.DataField":
|
|
138
153
|
oDataFieldWidth = TableSizeHelper.getWidthForDataField(
|
|
139
154
|
oData,
|
|
140
|
-
showDataFieldsLabel,
|
|
141
155
|
propertyInfos,
|
|
142
156
|
convertedMetaData,
|
|
143
|
-
false
|
|
157
|
+
false,
|
|
158
|
+
involvedDataModelObjects as DataModelObjectPath<Property | DataFieldAbstractTypes | DataPointType>,
|
|
159
|
+
showDataFieldsLabel
|
|
144
160
|
);
|
|
145
161
|
break;
|
|
146
162
|
case "com.sap.vocabularies.UI.v1.DataFieldForAction":
|
|
@@ -166,7 +182,54 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
166
182
|
});
|
|
167
183
|
}
|
|
168
184
|
},
|
|
169
|
-
|
|
185
|
+
/**
|
|
186
|
+
* This function calculates the width of a ConnectedFields column.
|
|
187
|
+
* The width of the ConnectedFields is the sum of the width of the 2 properties contained in the ConnectedFields
|
|
188
|
+
* The result of this calculation is stored in the visualSettings.widthCalculation.minWidth property, which is used by the MDCtable.
|
|
189
|
+
* @param table Instance of the MDCtable
|
|
190
|
+
* @param propertyInfo Current propertyInfo
|
|
191
|
+
* @param propertyInfos Array of properties
|
|
192
|
+
* @private
|
|
193
|
+
* @alias sap.fe.macros.TableDelegate
|
|
194
|
+
*/
|
|
195
|
+
_computeVisualSettingsForConnectedField: function (
|
|
196
|
+
table: Table,
|
|
197
|
+
propertyInfo: EnhancedFEPropertyInfo,
|
|
198
|
+
propertyInfos: EnhancedFEPropertyInfo[]
|
|
199
|
+
) {
|
|
200
|
+
if (propertyInfo.key.indexOf("DataFieldForAnnotation::ConnectedFields::") === 0) {
|
|
201
|
+
const metaModel = (table.getModel() as ODataModel).getMetaModel();
|
|
202
|
+
const involvedDataModelObjects = getInvolvedDataModelObjects(metaModel.getContext(propertyInfo.annotationPath));
|
|
203
|
+
const convertedMetaData = involvedDataModelObjects.convertedTypes;
|
|
204
|
+
const dataField = involvedDataModelObjects.targetObject as DataFieldForAnnotation;
|
|
205
|
+
const connectedFields = dataField.Target.$target as ConnectedFields;
|
|
206
|
+
const connectedFieldsSeparator = getConnectedFieldsSeparator(connectedFields);
|
|
207
|
+
const fieldWidths: number[] = [];
|
|
208
|
+
getConnectedFieldsData(connectedFields).forEach(function (data: DataFieldAbstractTypes) {
|
|
209
|
+
const dataFieldWidth = TableSizeHelper.getWidthForDataField(
|
|
210
|
+
data as DataField,
|
|
211
|
+
propertyInfos,
|
|
212
|
+
convertedMetaData,
|
|
213
|
+
false,
|
|
214
|
+
involvedDataModelObjects as DataModelObjectPath<Property | DataFieldAbstractTypes | DataPointType>
|
|
215
|
+
);
|
|
216
|
+
if (dataFieldWidth) {
|
|
217
|
+
fieldWidths.push(dataFieldWidth.propertyWidth);
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
const separatorWidth = SizeHelper.getButtonWidth(connectedFieldsSeparator);
|
|
221
|
+
fieldWidths.push(separatorWidth);
|
|
222
|
+
const columnWidth = fieldWidths.reduce(function (acc: number, value: number) {
|
|
223
|
+
return acc + value;
|
|
224
|
+
}, 0);
|
|
225
|
+
propertyInfo.visualSettings = deepExtend(propertyInfo.visualSettings as object, {
|
|
226
|
+
widthCalculation: {
|
|
227
|
+
verticalArrangement: true,
|
|
228
|
+
minWidth: Math.ceil(columnWidth)
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
},
|
|
170
233
|
_computeVisualSettingsForPropertyWithValueHelp: function (table: Table, property: EnhancedFEPropertyInfo) {
|
|
171
234
|
const tableAPI = this._getTableAPI(table);
|
|
172
235
|
if (!property.propertyInfos) {
|
|
@@ -183,7 +246,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
183
246
|
}
|
|
184
247
|
}
|
|
185
248
|
},
|
|
186
|
-
|
|
187
249
|
_computeVisualSettingsForPropertyWithUnit: function (
|
|
188
250
|
table: Table,
|
|
189
251
|
propertyInfo: PropertyInfo,
|
|
@@ -210,7 +272,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
210
272
|
});
|
|
211
273
|
}
|
|
212
274
|
},
|
|
213
|
-
|
|
214
275
|
_computeLabel: function (property: EnhancedFEPropertyInfo, labelMap: { [label: string]: EnhancedFEPropertyInfo[] }) {
|
|
215
276
|
if (property.label) {
|
|
216
277
|
const propertiesWithSameLabel = labelMap[property.label];
|
|
@@ -252,12 +313,14 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
252
313
|
});
|
|
253
314
|
properties.forEach((property) => {
|
|
254
315
|
this._computeVisualSettingsForFieldGroup(table, property, properties);
|
|
316
|
+
this._computeVisualSettingsForConnectedField(table, property, properties);
|
|
255
317
|
this._computeVisualSettingsForPropertyWithValueHelp(table, property);
|
|
256
318
|
this._computeLabel(property, labelMap);
|
|
257
319
|
});
|
|
258
320
|
// Add the $editState property
|
|
259
321
|
properties.push({
|
|
260
322
|
key: "$editState",
|
|
323
|
+
name: "$editState",
|
|
261
324
|
path: "$editState",
|
|
262
325
|
groupLabel: "",
|
|
263
326
|
group: "",
|
|
@@ -270,7 +333,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
270
333
|
} as EnhancedFEPropertyInfo);
|
|
271
334
|
return properties;
|
|
272
335
|
},
|
|
273
|
-
|
|
274
336
|
_getTableAPI(table: Table): TableAPI {
|
|
275
337
|
let tableAPI: TableAPI | undefined = table.getParent() as TableAPI;
|
|
276
338
|
if (!tableAPI) {
|
|
@@ -278,12 +340,10 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
278
340
|
}
|
|
279
341
|
return tableAPI;
|
|
280
342
|
},
|
|
281
|
-
|
|
282
343
|
getColumnsFor: function (table: Table): TableColumn[] {
|
|
283
344
|
const tableAPI = this._getTableAPI(table);
|
|
284
345
|
return tableAPI.getTableDefinition().columns;
|
|
285
346
|
},
|
|
286
|
-
|
|
287
347
|
/**
|
|
288
348
|
* Returns the export capabilities for the given sap.ui.mdc.Table instance.
|
|
289
349
|
* @param oTable Instance of the table
|
|
@@ -319,7 +379,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
319
379
|
return oCapabilities;
|
|
320
380
|
});
|
|
321
381
|
},
|
|
322
|
-
|
|
323
382
|
/**
|
|
324
383
|
* Filtering on navigation properties that are not part of the LineItem annotation nor of the custom columns is forbidden.
|
|
325
384
|
* @param columnInfo
|
|
@@ -337,7 +396,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
337
396
|
!(isConstant(isFilterable) && isFilterable.value === false))
|
|
338
397
|
);
|
|
339
398
|
},
|
|
340
|
-
|
|
341
399
|
_fetchPropertyInfo: function (
|
|
342
400
|
metaModel: MetaModel,
|
|
343
401
|
columnInfo: AnnotationTableColumn,
|
|
@@ -379,23 +437,19 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
379
437
|
// if I set this clipBoardSettings the copy provider extract the data according to the template in the html property and it is properly copied in excel
|
|
380
438
|
// but when we copy elsewhere we only get the raw data and not the templated data
|
|
381
439
|
}
|
|
382
|
-
|
|
383
440
|
// Set visualSettings only if it exists
|
|
384
441
|
if (columnInfo.visualSettings && Object.keys(columnInfo.visualSettings).length > 0) {
|
|
385
442
|
propertyInfo.visualSettings = columnInfo.visualSettings;
|
|
386
443
|
}
|
|
387
|
-
|
|
388
444
|
if (columnInfo.exportDataPointTargetValue) {
|
|
389
445
|
propertyInfo.exportDataPointTargetValue = columnInfo.exportDataPointTargetValue;
|
|
390
446
|
}
|
|
391
|
-
|
|
392
447
|
// MDC expects 'propertyInfos' only for complex properties.
|
|
393
448
|
// An empty array throws validation error and undefined value is unhandled.
|
|
394
449
|
if (columnInfo.propertyInfos?.length) {
|
|
395
450
|
propertyInfo.propertyInfos = columnInfo.propertyInfos;
|
|
396
451
|
} else {
|
|
397
452
|
// Add properties which are supported only by simple PropertyInfos.
|
|
398
|
-
|
|
399
453
|
//get the DataModelObjectPath for the column
|
|
400
454
|
const columnDataModelObjectPath = getInvolvedDataModelObjects(
|
|
401
455
|
metaModel.getContext(columnInfo.annotationPath),
|
|
@@ -429,12 +483,9 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
429
483
|
});
|
|
430
484
|
}
|
|
431
485
|
}
|
|
432
|
-
|
|
433
486
|
this._computeVisualSettingsForPropertyWithUnit(table, propertyInfo, columnInfo.unit, columnInfo.unitText, columnInfo.timezoneText);
|
|
434
|
-
|
|
435
487
|
return propertyInfo;
|
|
436
488
|
},
|
|
437
|
-
|
|
438
489
|
/**
|
|
439
490
|
* Extend the export settings based on the column info.
|
|
440
491
|
* @param exportSettings The export settings to be extended
|
|
@@ -451,7 +502,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
451
502
|
}
|
|
452
503
|
return exportSettings;
|
|
453
504
|
},
|
|
454
|
-
|
|
455
505
|
/**
|
|
456
506
|
* Gets the type config for the given column info.
|
|
457
507
|
* @param columnInfo The columnInfo object.
|
|
@@ -488,7 +538,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
488
538
|
}
|
|
489
539
|
propertyInfo.text = columnInfo.textArrangement?.textProperty;
|
|
490
540
|
},
|
|
491
|
-
|
|
492
541
|
_updateAnalyticalPropertyInfoAttributes(propertyInfo: PropertyInfo, columnInfo: AnnotationTableColumn) {
|
|
493
542
|
if (columnInfo.aggregatable) {
|
|
494
543
|
propertyInfo.aggregatable = columnInfo.aggregatable;
|
|
@@ -497,7 +546,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
497
546
|
propertyInfo.extension = columnInfo.extension;
|
|
498
547
|
}
|
|
499
548
|
},
|
|
500
|
-
|
|
501
549
|
_fetchComputedPropertyInfo: function (columnInfo: ComputedTableColumn, table: Table) {
|
|
502
550
|
const label = getLocalizedText(columnInfo.label, table); // Todo: To be removed once MDC provides translation support
|
|
503
551
|
const propertyInfo: PropertyInfo = {
|
|
@@ -516,7 +564,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
516
564
|
}
|
|
517
565
|
return propertyInfo;
|
|
518
566
|
},
|
|
519
|
-
|
|
520
567
|
_fetchCustomPropertyInfo: function (columnInfo: CustomBasedTableColumn, table: Table, appComponent: AppComponent) {
|
|
521
568
|
let label;
|
|
522
569
|
if (columnInfo.header) {
|
|
@@ -536,7 +583,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
536
583
|
exportSettings: columnInfo.exportSettings,
|
|
537
584
|
visualSettings: columnInfo.visualSettings as PropertyInfo["visualSettings"]
|
|
538
585
|
};
|
|
539
|
-
|
|
540
586
|
// MDC expects 'propertyInfos' only for complex properties.
|
|
541
587
|
// An empty array throws validation error and undefined value is unhandled.
|
|
542
588
|
if (columnInfo.propertyInfos && columnInfo.propertyInfos.length) {
|
|
@@ -580,9 +626,11 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
580
626
|
appComponent: AppComponent
|
|
581
627
|
): Promise<PropertyInfo[]> {
|
|
582
628
|
// when fetching properties, this binding context is needed - so lets create it only once and use if for all properties/data-fields/line-items
|
|
583
|
-
const bindingPath = ModelHelper.getEntitySetPath(entityTypePath);
|
|
584
629
|
let fetchedProperties: PropertyInfo[] = [];
|
|
585
|
-
const
|
|
630
|
+
const dataModel = MetaModelConverter.getInvolvedDataModelObjects(metaModel.getContext(entityTypePath));
|
|
631
|
+
const nonFilterableProperties = FilterRestrictions.getFilterRestrictionsByDataModel(
|
|
632
|
+
dataModel as DataModelObjectPath<PageContextPathTarget>
|
|
633
|
+
).NonFilterableProperties;
|
|
586
634
|
return Promise.resolve(this.getColumnsFor(table))
|
|
587
635
|
.then((columns: TableColumn[]) => {
|
|
588
636
|
// DraftAdministrativeData does not work via 'entitySet/$NavigationPropertyBinding/DraftAdministrativeData'
|
|
@@ -626,7 +674,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
626
674
|
return fetchedProperties;
|
|
627
675
|
});
|
|
628
676
|
},
|
|
629
|
-
|
|
630
677
|
_getCachedOrFetchPropertiesForEntity: async function (
|
|
631
678
|
table: Table,
|
|
632
679
|
entityTypePath: string,
|
|
@@ -638,6 +685,10 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
638
685
|
if (fetchedProperties.length) {
|
|
639
686
|
return Promise.resolve(fetchedProperties);
|
|
640
687
|
}
|
|
688
|
+
if (appComponent.delayTime > 0) {
|
|
689
|
+
// First call let's add a small delay to ensure this doesn't block the initial view creation
|
|
690
|
+
await delayFor(appComponent.delayTime);
|
|
691
|
+
}
|
|
641
692
|
return this._fetchPropertiesForEntity(table, entityTypePath, metaModel, appComponent).then(function (
|
|
642
693
|
subFetchedProperties: PropertyInfo[]
|
|
643
694
|
) {
|
|
@@ -661,28 +712,25 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
661
712
|
table.setNoData(illustratedMessage);
|
|
662
713
|
}
|
|
663
714
|
},
|
|
664
|
-
|
|
665
|
-
setTableNoDataIllustratedMessage: function (table: Table, bindingInfo: CollectionBindingInfo) {
|
|
715
|
+
setTableNoDataIllustratedMessage: function (table: Table, bindingInfo: SerializedCollectionBindingInfo) {
|
|
666
716
|
const tableFilterInfo = TableUtils.getAllFilterInfo(table);
|
|
667
717
|
const resourceModel = getResourceModel(table);
|
|
668
718
|
const suffixResourceKey = bindingInfo.path?.startsWith("/") ? bindingInfo.path.substring(1) : bindingInfo.path;
|
|
669
719
|
let illustratedInformation: $IllustratedMessageSettings;
|
|
670
|
-
|
|
671
720
|
const getNoDataIllustratedMessageWithFilters = function (): $IllustratedMessageSettings {
|
|
672
721
|
if (table.data("hiddenFilters") || table.getQuickFilter()) {
|
|
673
722
|
return {
|
|
674
|
-
title: resourceModel.getText("T_ILLUSTRATED_MESSAGE_TITLE_NOSEARCHRESULTS"),
|
|
723
|
+
title: resourceModel.getText("T_ILLUSTRATED_MESSAGE_TITLE_NOSEARCHRESULTS", undefined, suffixResourceKey),
|
|
675
724
|
description: resourceModel.getText("M_TABLE_AND_CHART_NO_DATA_TEXT_MULTI_VIEW", undefined, suffixResourceKey),
|
|
676
|
-
illustrationType: IllustratedMessageType.
|
|
725
|
+
illustrationType: IllustratedMessageType.NoFilterResults
|
|
677
726
|
};
|
|
678
727
|
}
|
|
679
728
|
return {
|
|
680
|
-
title: resourceModel.getText("T_ILLUSTRATED_MESSAGE_TITLE_NOSEARCHRESULTS"),
|
|
729
|
+
title: resourceModel.getText("T_ILLUSTRATED_MESSAGE_TITLE_NOSEARCHRESULTS", undefined, suffixResourceKey),
|
|
681
730
|
description: resourceModel.getText("T_TABLE_AND_CHART_NO_DATA_TEXT_WITH_FILTER", undefined, suffixResourceKey),
|
|
682
|
-
illustrationType: IllustratedMessageType.
|
|
731
|
+
illustrationType: IllustratedMessageType.NoFilterResults
|
|
683
732
|
};
|
|
684
733
|
};
|
|
685
|
-
|
|
686
734
|
const filterAssociation = table.getFilter();
|
|
687
735
|
const hasFilterOrSearch = tableFilterInfo.search || tableFilterInfo.filters?.length;
|
|
688
736
|
if (filterAssociation && !/BasicSearch$/.test(filterAssociation)) {
|
|
@@ -692,9 +740,9 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
692
740
|
illustratedInformation = getNoDataIllustratedMessageWithFilters();
|
|
693
741
|
} else {
|
|
694
742
|
illustratedInformation = {
|
|
695
|
-
title: resourceModel.getText("T_ILLUSTRATED_MESSAGE_TITLE_NOSEARCHRESULTS"),
|
|
743
|
+
title: resourceModel.getText("T_ILLUSTRATED_MESSAGE_TITLE_NOSEARCHRESULTS", undefined, suffixResourceKey),
|
|
696
744
|
description: resourceModel.getText("T_TABLE_AND_CHART_NO_DATA_TEXT", undefined, suffixResourceKey),
|
|
697
|
-
illustrationType: IllustratedMessageType.
|
|
745
|
+
illustrationType: IllustratedMessageType.NoFilterResults
|
|
698
746
|
};
|
|
699
747
|
}
|
|
700
748
|
} else if (hasFilterOrSearch) {
|
|
@@ -702,9 +750,9 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
702
750
|
illustratedInformation = getNoDataIllustratedMessageWithFilters();
|
|
703
751
|
} else {
|
|
704
752
|
illustratedInformation = {
|
|
705
|
-
title: resourceModel.getText("T_ILLUSTRATED_MESSAGE_TITLE_NODATA"),
|
|
753
|
+
title: resourceModel.getText("T_ILLUSTRATED_MESSAGE_TITLE_NODATA", undefined, suffixResourceKey),
|
|
706
754
|
description: resourceModel.getText("M_TABLE_AND_CHART_NO_FILTERS_NO_DATA_TEXT", undefined, suffixResourceKey),
|
|
707
|
-
illustrationType: IllustratedMessageType.
|
|
755
|
+
illustrationType: IllustratedMessageType.NoEntries
|
|
708
756
|
};
|
|
709
757
|
}
|
|
710
758
|
if (CommonUtils.getTargetView(table).getViewData().liveMode) {
|
|
@@ -712,15 +760,14 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
712
760
|
illustratedInformation = getNoDataIllustratedMessageWithFilters();
|
|
713
761
|
} else {
|
|
714
762
|
illustratedInformation = {
|
|
715
|
-
title: resourceModel.getText("T_ILLUSTRATED_MESSAGE_TITLE_NOSEARCHRESULTS"),
|
|
716
|
-
description: resourceModel.getText("M_TABLE_AND_CHART_NO_FILTERS_NO_DATA_TEXT"),
|
|
717
|
-
illustrationType: IllustratedMessageType.
|
|
763
|
+
title: resourceModel.getText("T_ILLUSTRATED_MESSAGE_TITLE_NOSEARCHRESULTS", undefined, suffixResourceKey),
|
|
764
|
+
description: resourceModel.getText("M_TABLE_AND_CHART_NO_FILTERS_NO_DATA_TEXT", undefined, suffixResourceKey),
|
|
765
|
+
illustrationType: IllustratedMessageType.NoFilterResults
|
|
718
766
|
};
|
|
719
767
|
}
|
|
720
768
|
}
|
|
721
769
|
const tableAPI = this._getTableAPI(table);
|
|
722
770
|
illustratedInformation.illustrationSize = tableAPI.getNoDataMessageMode();
|
|
723
|
-
|
|
724
771
|
if (illustratedInformation.illustrationSize === "text") {
|
|
725
772
|
const currentNoData = table.getNoData();
|
|
726
773
|
if (typeof currentNoData === "string" && currentNoData === illustratedInformation.description) {
|
|
@@ -732,7 +779,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
732
779
|
this.setNoDataInformation(table, illustratedInformation);
|
|
733
780
|
}
|
|
734
781
|
},
|
|
735
|
-
|
|
736
782
|
/**
|
|
737
783
|
* Handles the dataRequested event for the table binding to set up table defaults.
|
|
738
784
|
* @param oTable The MDC table instance
|
|
@@ -757,7 +803,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
757
803
|
oInternalModelContext.setProperty("dataRequestedAttached", true);
|
|
758
804
|
}
|
|
759
805
|
},
|
|
760
|
-
|
|
761
806
|
handleTableDataReceived: function (oTable: Table, oInternalModelContext: InternalModelContext): void {
|
|
762
807
|
const oBinding = oTable && oTable.getRowBinding(),
|
|
763
808
|
bDataReceivedAttached = oInternalModelContext && oInternalModelContext.getProperty("dataReceivedAttached");
|
|
@@ -789,7 +834,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
789
834
|
oInternalModelContext.setProperty("dataReceivedAttached", true);
|
|
790
835
|
}
|
|
791
836
|
},
|
|
792
|
-
|
|
793
837
|
/**
|
|
794
838
|
* Set the optimistic batch promise for the enabler callback function.
|
|
795
839
|
* @param controller The controller
|
|
@@ -802,7 +846,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
802
846
|
this.setOptimisticBatchForModel(controller, model, tableAPI);
|
|
803
847
|
}
|
|
804
848
|
},
|
|
805
|
-
|
|
806
849
|
/**
|
|
807
850
|
* Enable the optimistic batch mode if available.
|
|
808
851
|
* @param controller
|
|
@@ -814,7 +857,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
814
857
|
const tableAPI = this._getTableAPI(table);
|
|
815
858
|
tableAPI.getOptimisticBatchEnablerPromise()?.resolve(!filtersPropertiesAsPotentiallySensitiveDataOrDateType);
|
|
816
859
|
},
|
|
817
|
-
|
|
818
860
|
/**
|
|
819
861
|
* Setter for the optimistic batch enabler callback function.
|
|
820
862
|
* @param controller
|
|
@@ -831,10 +873,8 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
831
873
|
});
|
|
832
874
|
}
|
|
833
875
|
},
|
|
834
|
-
|
|
835
876
|
rebind: async function (oTable: Table, oBindingInfo: BaseAggregationBindingInfo): Promise<void> {
|
|
836
877
|
const tableAPI = this._getTableAPI(oTable);
|
|
837
|
-
|
|
838
878
|
const bIsSuspended = tableAPI?.getProperty("bindingSuspended");
|
|
839
879
|
tableAPI?.setProperty("outDatedBinding", bIsSuspended);
|
|
840
880
|
if (!bIsSuspended) {
|
|
@@ -853,7 +893,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
853
893
|
}
|
|
854
894
|
return Promise.resolve();
|
|
855
895
|
},
|
|
856
|
-
|
|
857
896
|
/**
|
|
858
897
|
* Fetches the relevant metadata for the table and returns property info array.
|
|
859
898
|
* @param table Instance of the MDCtable
|
|
@@ -875,7 +914,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
875
914
|
return properties;
|
|
876
915
|
});
|
|
877
916
|
},
|
|
878
|
-
|
|
879
917
|
preInit: async function (table: Table): Promise<void> {
|
|
880
918
|
return (TableDelegateBase.preInit as (table: Table) => Promise<void>).apply(this, [table]).then(() => {
|
|
881
919
|
/**
|
|
@@ -890,7 +928,7 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
890
928
|
return;
|
|
891
929
|
});
|
|
892
930
|
},
|
|
893
|
-
updateBindingInfo: function (table: Table, bindingInfo:
|
|
931
|
+
updateBindingInfo: function (table: Table, bindingInfo: SerializedCollectionBindingInfo) {
|
|
894
932
|
const internalBindingContext = table.getBindingContext("internal") as InternalModelContext | undefined;
|
|
895
933
|
const tableAPI = this._getTableAPI(table);
|
|
896
934
|
const quickFilter = table.getQuickFilter() as QuickFilterSelector | undefined;
|
|
@@ -903,7 +941,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
903
941
|
this.setTableNoDataIllustratedMessage(table, bindingInfo);
|
|
904
942
|
this._handleRecommendationOutputFields(table, bindingInfo);
|
|
905
943
|
this._handleFiltersForExternalID(table, bindingInfo);
|
|
906
|
-
|
|
907
944
|
tableAPI?.fireEvent("beforeRebindTable", {
|
|
908
945
|
collectionBindingInfo: collectionBindingInfoAPI,
|
|
909
946
|
quickFilterKey: quickFilter?.getSelectedKey()
|
|
@@ -931,8 +968,7 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
931
968
|
Log.error("Error while updating the binding info", e as string);
|
|
932
969
|
}
|
|
933
970
|
},
|
|
934
|
-
|
|
935
|
-
_handleSortersOnCurrenciesOrUoM: function (table: Table, bindingInfo: CollectionBindingInfo) {
|
|
971
|
+
_handleSortersOnCurrenciesOrUoM: function (table: Table, bindingInfo: SerializedCollectionBindingInfo) {
|
|
936
972
|
const sorters: Sorter[] | undefined = bindingInfo.sorter;
|
|
937
973
|
const newSortersToBeApplied: Sorter[] = [];
|
|
938
974
|
if (sorters?.length) {
|
|
@@ -952,8 +988,7 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
952
988
|
bindingInfo.sorter = newSortersToBeApplied;
|
|
953
989
|
}
|
|
954
990
|
},
|
|
955
|
-
|
|
956
|
-
_handleFiltersForExternalID: function (table: Table, bindingInfo: CollectionBindingInfo) {
|
|
991
|
+
_handleFiltersForExternalID: function (table: Table, bindingInfo: SerializedCollectionBindingInfo) {
|
|
957
992
|
const metaModel = (table.getModel() as ODataModel)?.getMetaModel();
|
|
958
993
|
const entityTypePath = bindingInfo.path + "/";
|
|
959
994
|
const filters = bindingInfo.filters?.getFilters();
|
|
@@ -961,8 +996,7 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
961
996
|
TableUtils.updateFiltersForExternalID(metaModel, filters as unknown as ConditionObject[], entityTypePath);
|
|
962
997
|
}
|
|
963
998
|
},
|
|
964
|
-
|
|
965
|
-
_handleRecommendationOutputFields: function (table: Table, oBindingInfo: CollectionBindingInfo) {
|
|
999
|
+
_handleRecommendationOutputFields: function (table: Table, oBindingInfo: SerializedCollectionBindingInfo) {
|
|
966
1000
|
const tableAPI = this._getTableAPI(table);
|
|
967
1001
|
const controller = tableAPI?.getPageController();
|
|
968
1002
|
if (controller?.recommendations.isRecommendationEnabled()) {
|
|
@@ -976,7 +1010,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
976
1010
|
}
|
|
977
1011
|
}
|
|
978
1012
|
},
|
|
979
|
-
|
|
980
1013
|
/**
|
|
981
1014
|
* Update the cards when the binding is refreshed.
|
|
982
1015
|
* @param table The mdc table control.
|
|
@@ -996,7 +1029,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
996
1029
|
appComponent.getCollaborationManagerService().shareAvailableCards();
|
|
997
1030
|
}
|
|
998
1031
|
},
|
|
999
|
-
|
|
1000
1032
|
/**
|
|
1001
1033
|
* The hook implemented by MDC that we can override.
|
|
1002
1034
|
* This allows us to define properties to be requested in the MDC table (Main case is for the analytical table).
|
|
@@ -1014,7 +1046,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1014
1046
|
Object.keys(tableAPI.tableDefinition.requestAtLeast)
|
|
1015
1047
|
// for analytic tables with aggregationOnLeafLevel we should not request the semanticKey expected when all keys are requested -> it will permits to navigate from a node level when semanticKey are enabled
|
|
1016
1048
|
// restriction are also excluded as we cannot destinguish between a node and a aggregation level
|
|
1017
|
-
|
|
1018
1049
|
.filter((fieldName: string) =>
|
|
1019
1050
|
!allKkeysRequested
|
|
1020
1051
|
? tableAPI.tableDefinition.requestAtLeast[fieldName].some(
|
|
@@ -1026,7 +1057,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1026
1057
|
}
|
|
1027
1058
|
return Object.keys(tableAPI.tableDefinition.requestAtLeast ?? {});
|
|
1028
1059
|
},
|
|
1029
|
-
|
|
1030
1060
|
/**
|
|
1031
1061
|
* Check if all keys() excepted IsActiveEntity) are requested in the table.
|
|
1032
1062
|
* @param tableAPI The table API
|
|
@@ -1038,11 +1068,9 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1038
1068
|
const keyPropertyNames = allColumns
|
|
1039
1069
|
.filter((c) => c.isKey && c.relativePath && c.relativePath !== "IsActiveEntity")
|
|
1040
1070
|
.map((c) => c.relativePath);
|
|
1041
|
-
|
|
1042
1071
|
const displayedColumns = table
|
|
1043
1072
|
.getColumns()
|
|
1044
1073
|
.map((column) => tableAPI.getTableDefinition().columns.find((c) => c.name === column.getPropertyKey()));
|
|
1045
|
-
|
|
1046
1074
|
// Store all properties referenced by displayed columns in a Set
|
|
1047
1075
|
const referencedPropertyPaths = new Set<string>();
|
|
1048
1076
|
function processColumn(col: AnnotationTableColumn): void {
|
|
@@ -1050,7 +1078,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1050
1078
|
if (col.relativePath && col.propertyInfos === undefined) {
|
|
1051
1079
|
referencedPropertyPaths.add(col.relativePath);
|
|
1052
1080
|
}
|
|
1053
|
-
|
|
1054
1081
|
// Add the additional properties referenced by the column
|
|
1055
1082
|
col.extension?.additionalProperties?.forEach((additionalColumnName) => {
|
|
1056
1083
|
const additionalColumn = allColumns.find((c) => c.name === additionalColumnName);
|
|
@@ -1065,7 +1092,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1065
1092
|
}
|
|
1066
1093
|
// Process the column itself
|
|
1067
1094
|
processColumn(column as AnnotationTableColumn);
|
|
1068
|
-
|
|
1069
1095
|
// Process the columns referenced by the column
|
|
1070
1096
|
column.propertyInfos?.forEach((relatedColumnName) => {
|
|
1071
1097
|
const relatedColumn = allColumns.find((c) => c.name === relatedColumnName);
|
|
@@ -1074,7 +1100,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1074
1100
|
}
|
|
1075
1101
|
});
|
|
1076
1102
|
});
|
|
1077
|
-
|
|
1078
1103
|
return keyPropertyNames.every((propName) => propName && referencedPropertyPaths.has(propName));
|
|
1079
1104
|
},
|
|
1080
1105
|
/**
|
|
@@ -1091,7 +1116,7 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1091
1116
|
// If not found in aggregation, check the query options
|
|
1092
1117
|
return binding.getQueryOptionsFromParameters().$search;
|
|
1093
1118
|
},
|
|
1094
|
-
updateBinding: function (table: MDCTable, bindingInfo:
|
|
1119
|
+
updateBinding: function (table: MDCTable, bindingInfo: SerializedCollectionBindingInfo, binding?: ODataListBinding): void {
|
|
1095
1120
|
const tableAPI = this._getTableAPI(table);
|
|
1096
1121
|
const bIsSuspended = tableAPI?.getProperty("bindingSuspended");
|
|
1097
1122
|
if (!bIsSuspended) {
|
|
@@ -1108,14 +1133,12 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1108
1133
|
delete bindingInfo.parameters.$$getKeepAliveContext;
|
|
1109
1134
|
}
|
|
1110
1135
|
}
|
|
1111
|
-
|
|
1112
1136
|
let needManualRefresh = false;
|
|
1113
1137
|
const view = CommonUtils.getTargetView(table);
|
|
1114
1138
|
const internalBindingContext = table.getBindingContext("internal");
|
|
1115
1139
|
const manualUpdatePropertyKey = "pendingManualBindingUpdate";
|
|
1116
1140
|
const pendingManualUpdate = internalBindingContext?.getProperty(manualUpdatePropertyKey) as boolean;
|
|
1117
1141
|
const newSorters = JSON.stringify(bindingInfo.sorter ?? []);
|
|
1118
|
-
|
|
1119
1142
|
if (binding) {
|
|
1120
1143
|
/**
|
|
1121
1144
|
* Manual refresh if filters are not changed by binding.refresh() since updating the bindingInfo
|
|
@@ -1125,7 +1148,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1125
1148
|
const viewData = view?.getViewData() as ListReportManifestSettings;
|
|
1126
1149
|
const oldFilters = binding.getFilters("Application");
|
|
1127
1150
|
const previousSorters = internalBindingContext?.getProperty(PREVIOUS_SORTERS) ?? "[]";
|
|
1128
|
-
|
|
1129
1151
|
const filterNotChanged =
|
|
1130
1152
|
((bindingInfo.filters === null && oldFilters.length === 0) || // on analytical tables, the filters are set to null when no filters
|
|
1131
1153
|
deepEqual(bindingInfo.filters, oldFilters[0])) &&
|
|
@@ -1133,7 +1155,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1133
1155
|
bindingInfo.path === binding.getPath() && // The path can be changed in case of a parametrized entity
|
|
1134
1156
|
this.getSearchQuery(binding) === bindingInfo?.parameters?.$search;
|
|
1135
1157
|
const LRMultiViewEnabled = !!viewData.views;
|
|
1136
|
-
|
|
1137
1158
|
needManualRefresh =
|
|
1138
1159
|
filterNotChanged &&
|
|
1139
1160
|
(internalBindingContext?.getProperty(SEARCH_HAS_BEEN_FIRED) || // check if the search has been triggered
|
|
@@ -1145,7 +1166,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1145
1166
|
if (tableAPI.getTableDefinition().enableAnalytics !== true) {
|
|
1146
1167
|
// Aggregate conditions never make sense outside of an analytical table
|
|
1147
1168
|
table.setAggregateConditions();
|
|
1148
|
-
|
|
1149
1169
|
// Group conditions don't make sense in a Tree or Grid table
|
|
1150
1170
|
if (
|
|
1151
1171
|
tableAPI.getTableDefinition().control.type === "GridTable" ||
|
|
@@ -1161,7 +1181,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1161
1181
|
tableAPI.setTableBindingInfo(bindingInfo);
|
|
1162
1182
|
// we make the call to update the download url but do not await it
|
|
1163
1183
|
tableAPI.setDownloadUrl();
|
|
1164
|
-
|
|
1165
1184
|
table.fireEvent("bindingUpdated");
|
|
1166
1185
|
if (needManualRefresh && table.getFilter() && binding) {
|
|
1167
1186
|
binding
|
|
@@ -1177,12 +1196,10 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1177
1196
|
internalBindingContext?.setProperty(SEARCH_HAS_BEEN_FIRED, false);
|
|
1178
1197
|
internalBindingContext?.setProperty(COLUMN_HAS_BEEN_ADDED, false);
|
|
1179
1198
|
internalBindingContext?.setProperty(PREVIOUS_SORTERS, newSorters);
|
|
1180
|
-
|
|
1181
1199
|
//for Treetable, it's necessary to clear the pastableContexts since the binding destroys previous contexts.
|
|
1182
1200
|
if (tableAPI.getTableDefinition().control.type === "TreeTable") {
|
|
1183
1201
|
internalBindingContext?.setProperty("pastableContexts", []);
|
|
1184
1202
|
}
|
|
1185
|
-
|
|
1186
1203
|
const attachedEvents = tableAPI.storedEvents ?? [];
|
|
1187
1204
|
attachedEvents.forEach(({ eventId, callback, listener, data }) => {
|
|
1188
1205
|
table.getRowBinding()?.attachEvent(eventId, data, callback, listener);
|
|
@@ -1190,8 +1207,7 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1190
1207
|
}
|
|
1191
1208
|
tableAPI?.setProperty("outDatedBinding", bIsSuspended);
|
|
1192
1209
|
},
|
|
1193
|
-
|
|
1194
|
-
_computeRowBindingInfoFromTemplate: function (oTable: Table): CollectionBindingInfo {
|
|
1210
|
+
_computeRowBindingInfoFromTemplate: function (oTable: Table): SerializedCollectionBindingInfo {
|
|
1195
1211
|
const tableAPI = this._getTableAPI(oTable);
|
|
1196
1212
|
const rowBindingInfo = tableAPI.getTableTemplateBindingInfo();
|
|
1197
1213
|
const bindingContext = oTable.getBindingContext();
|
|
@@ -1207,15 +1223,13 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1207
1223
|
) {
|
|
1208
1224
|
tableCanBeInInlineEdit = true;
|
|
1209
1225
|
}
|
|
1210
|
-
|
|
1211
1226
|
if (tableCanBeInInlineEdit) {
|
|
1212
1227
|
rowBindingInfo.parameters ??= {};
|
|
1213
1228
|
rowBindingInfo.parameters.$$updateGroupId = CommonUtils.INLINEEDIT_UPDATEGROUPID;
|
|
1214
1229
|
}
|
|
1215
|
-
|
|
1216
1230
|
return rowBindingInfo;
|
|
1217
1231
|
},
|
|
1218
|
-
_internalUpdateBindingInfo: function (oTable: Table, oBindingInfo:
|
|
1232
|
+
_internalUpdateBindingInfo: function (oTable: Table, oBindingInfo: SerializedCollectionBindingInfo) {
|
|
1219
1233
|
const oInternalModelContext = oTable.getBindingContext("internal") as InternalModelContext | undefined;
|
|
1220
1234
|
Object.assign(oBindingInfo, this._computeRowBindingInfoFromTemplate(oTable));
|
|
1221
1235
|
/**
|
|
@@ -1232,7 +1246,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1232
1246
|
if (oInternalModelContext) {
|
|
1233
1247
|
oInternalModelContext.setProperty("dataReceivedAttached", false);
|
|
1234
1248
|
}
|
|
1235
|
-
|
|
1236
1249
|
let oFilter;
|
|
1237
1250
|
const oFilterInfo = TableUtils.getAllFilterInfo(oTable);
|
|
1238
1251
|
// Prepare binding info with filter/search parameters
|
|
@@ -1242,7 +1255,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1242
1255
|
if (oFilterInfo.bindingPath) {
|
|
1243
1256
|
oBindingInfo.path = oFilterInfo.bindingPath;
|
|
1244
1257
|
}
|
|
1245
|
-
|
|
1246
1258
|
const oDataStateIndicator = oTable.getDataStateIndicator();
|
|
1247
1259
|
if (oDataStateIndicator && oDataStateIndicator.isFiltering()) {
|
|
1248
1260
|
// Include filters on messageStrip
|
|
@@ -1253,11 +1265,13 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1253
1265
|
} else {
|
|
1254
1266
|
this.updateBindingInfoWithSearchQuery(oBindingInfo, oFilterInfo, oFilter);
|
|
1255
1267
|
}
|
|
1256
|
-
|
|
1257
1268
|
this.addFilterOnActiveEntities(oTable, oBindingInfo);
|
|
1258
1269
|
},
|
|
1259
|
-
|
|
1260
|
-
|
|
1270
|
+
updateBindingInfoWithSearchQuery: function (
|
|
1271
|
+
bindingInfo: SerializedCollectionBindingInfo,
|
|
1272
|
+
filterInfo: InternalBindingInfo,
|
|
1273
|
+
filter?: Filter
|
|
1274
|
+
) {
|
|
1261
1275
|
bindingInfo.filters = filter;
|
|
1262
1276
|
bindingInfo.parameters ??= {};
|
|
1263
1277
|
if (filterInfo.search) {
|
|
@@ -1271,9 +1285,8 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1271
1285
|
* @param table
|
|
1272
1286
|
* @param bindingInfo
|
|
1273
1287
|
*/
|
|
1274
|
-
addFilterOnActiveEntities: function (table: Table, bindingInfo:
|
|
1288
|
+
addFilterOnActiveEntities: function (table: Table, bindingInfo: SerializedCollectionBindingInfo) {
|
|
1275
1289
|
const payload = table.getPayload() as { filterOnActiveEntities?: boolean };
|
|
1276
|
-
|
|
1277
1290
|
if (payload?.filterOnActiveEntities === true) {
|
|
1278
1291
|
const filterOnActive = new Filter({ path: "IsActiveEntity", operator: "EQ", value1: true });
|
|
1279
1292
|
if (bindingInfo.filters) {
|
|
@@ -1283,7 +1296,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1283
1296
|
}
|
|
1284
1297
|
}
|
|
1285
1298
|
},
|
|
1286
|
-
|
|
1287
1299
|
/**
|
|
1288
1300
|
* Creates a template from the fragment of a slot column.
|
|
1289
1301
|
* @param columnInfo The custom table column
|
|
@@ -1308,7 +1320,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1308
1320
|
return Promise.resolve(null);
|
|
1309
1321
|
}
|
|
1310
1322
|
const slotXML = slotColumnsXML.getElementsByTagName("slot")[0];
|
|
1311
|
-
|
|
1312
1323
|
if (columnInfo.template) {
|
|
1313
1324
|
if (slotXML) {
|
|
1314
1325
|
const oTemplate = new DOMParser().parseFromString(columnInfo.template as string, "text/xml");
|
|
@@ -1336,7 +1347,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1336
1347
|
controller: view.getController()
|
|
1337
1348
|
}) as Promise<Control | Control[]>;
|
|
1338
1349
|
},
|
|
1339
|
-
|
|
1340
1350
|
_getExportFormat: function (dataType?: string) {
|
|
1341
1351
|
switch (dataType) {
|
|
1342
1352
|
case "Edm.Date":
|
|
@@ -1349,11 +1359,9 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1349
1359
|
return undefined;
|
|
1350
1360
|
}
|
|
1351
1361
|
},
|
|
1352
|
-
|
|
1353
1362
|
_getVHRelevantFields: function (oMetaModel: ODataMetaModel, sMetadataPath: string, sBindingPath?: string): string[] {
|
|
1354
1363
|
let aFields: string[] = [],
|
|
1355
1364
|
oDataFieldData = oMetaModel.getObject(sMetadataPath);
|
|
1356
|
-
|
|
1357
1365
|
if (oDataFieldData.$kind && oDataFieldData.$kind === "Property") {
|
|
1358
1366
|
oDataFieldData = oMetaModel.getObject(`${sMetadataPath}@com.sap.vocabularies.UI.v1.DataFieldDefault`);
|
|
1359
1367
|
sMetadataPath = `${sMetadataPath}@com.sap.vocabularies.UI.v1.DataFieldDefault`;
|
|
@@ -1470,7 +1478,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1470
1478
|
}
|
|
1471
1479
|
return;
|
|
1472
1480
|
},
|
|
1473
|
-
|
|
1474
1481
|
/**
|
|
1475
1482
|
* Invoked when a column is added using the table personalization dialog.
|
|
1476
1483
|
* @param table Instance of table control
|
|
@@ -1495,7 +1502,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1495
1502
|
// We return null here because everything should apply at runtime
|
|
1496
1503
|
return Promise.resolve(null);
|
|
1497
1504
|
}
|
|
1498
|
-
|
|
1499
1505
|
const columnInfo = aColumns.find(function (oColumn) {
|
|
1500
1506
|
return oColumn.name === propertyInfoName;
|
|
1501
1507
|
});
|
|
@@ -1518,26 +1524,21 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1518
1524
|
mPropertyBag.view ||
|
|
1519
1525
|
CommonUtils.getTargetView(table as UI5Element) ||
|
|
1520
1526
|
(mPropertyBag.appComponent ? CommonUtils.getCurrentPageView(mPropertyBag.appComponent) : undefined);
|
|
1521
|
-
|
|
1522
1527
|
if (columnInfo.type === "Default") {
|
|
1523
1528
|
Log.error("Custom columns defined in the manifest are not supported when using a table building block.");
|
|
1524
1529
|
throw new Error("Custom columns defined in the manifest are not supported when using a table building block.");
|
|
1525
1530
|
}
|
|
1526
|
-
|
|
1527
1531
|
if (columnInfo.type === "Slot") {
|
|
1528
1532
|
return this._templateSlotColumnFragment(columnInfo as CustomElement<CustomBasedTableColumn>, view, oModifier, sTableId);
|
|
1529
1533
|
}
|
|
1530
|
-
|
|
1531
1534
|
if (columnInfo.type === "Computed") {
|
|
1532
1535
|
const enableAnalytics = this._getTableAPI(table as Table).getTableDefinition().enableAnalytics;
|
|
1533
1536
|
return getComputedColumn(sTableId, columnInfo as ComputedTableColumn, oTableContext, enableAnalytics);
|
|
1534
1537
|
}
|
|
1535
|
-
|
|
1536
1538
|
// fall-back
|
|
1537
1539
|
if (!oMetaModel) {
|
|
1538
1540
|
return Promise.resolve(null);
|
|
1539
1541
|
}
|
|
1540
|
-
|
|
1541
1542
|
let propertyInfos = tableAPI.getEnhancedFetchedPropertyInfos();
|
|
1542
1543
|
if (!propertyInfos.length) {
|
|
1543
1544
|
// If the propertyInfos are not fetched yet, we need to fetch them
|
|
@@ -1548,9 +1549,7 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1548
1549
|
const propertyInfo = propertyInfos.find(function (propInfo: EnhancedFEPropertyInfo) {
|
|
1549
1550
|
return propInfo.name === propertyInfoName;
|
|
1550
1551
|
});
|
|
1551
|
-
|
|
1552
1552
|
const oPropertyContext: Context = oMetaModel.createBindingContext(propertyInfo!.annotationPath)!;
|
|
1553
|
-
|
|
1554
1553
|
const fnTemplateFragment = async (
|
|
1555
1554
|
oInPropertyInfo: unknown,
|
|
1556
1555
|
oView: FEView
|
|
@@ -1558,7 +1557,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1558
1557
|
let bDisplayMode: boolean | undefined;
|
|
1559
1558
|
let sTableTypeCustomData: string | undefined;
|
|
1560
1559
|
let sCreationModeCustomData: string | undefined;
|
|
1561
|
-
|
|
1562
1560
|
return Promise.all([
|
|
1563
1561
|
DelegateUtil.getCustomDataWithModifier<string | boolean>(table, "displayModePropertyBinding", oModifier),
|
|
1564
1562
|
DelegateUtil.getCustomDataWithModifier<string>(table, "tableType", oModifier),
|
|
@@ -1574,7 +1572,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1574
1572
|
if (bDisplayMode !== undefined && typeof bDisplayMode !== "boolean") {
|
|
1575
1573
|
bDisplayMode = bDisplayMode === "true";
|
|
1576
1574
|
}
|
|
1577
|
-
|
|
1578
1575
|
const oThis = new JSONModel({
|
|
1579
1576
|
enableAutoColumnWidth: tableAPI.getTableDefinition().control.enableAutoColumnWidth,
|
|
1580
1577
|
readOnly: bDisplayMode,
|
|
@@ -1604,7 +1601,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1604
1601
|
},
|
|
1605
1602
|
appComponent: mPropertyBag.appComponent
|
|
1606
1603
|
};
|
|
1607
|
-
|
|
1608
1604
|
const tableCollection = getInvolvedDataModelObjects<EntitySet | NavigationProperty>(
|
|
1609
1605
|
oMetaModel.createBindingContext(tableAPI.tableDefinition.annotation.collection)!
|
|
1610
1606
|
);
|
|
@@ -1635,10 +1631,8 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1635
1631
|
});
|
|
1636
1632
|
});
|
|
1637
1633
|
};
|
|
1638
|
-
|
|
1639
1634
|
return fnTemplateFragment(propertyInfo, view);
|
|
1640
1635
|
},
|
|
1641
|
-
|
|
1642
1636
|
/**
|
|
1643
1637
|
* Provide the Table's filter delegate to provide basic filter functionality such as adding FilterFields.
|
|
1644
1638
|
* @returns Object for the Tables filter personalization.
|
|
@@ -1660,7 +1654,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1660
1654
|
}
|
|
1661
1655
|
);
|
|
1662
1656
|
},
|
|
1663
|
-
|
|
1664
1657
|
/**
|
|
1665
1658
|
* Returns the TypeMap attached to this delegate.
|
|
1666
1659
|
* @returns Any instance of TypeMap
|
|
@@ -1668,7 +1661,6 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1668
1661
|
getTypeMap: function (/*oPayload: object*/) {
|
|
1669
1662
|
return TypeMap;
|
|
1670
1663
|
},
|
|
1671
|
-
|
|
1672
1664
|
/**
|
|
1673
1665
|
* Format the title of the group header .
|
|
1674
1666
|
* @param table Instance of table control
|
|
@@ -1696,14 +1688,12 @@ export default Object.assign({}, TableDelegateBase, {
|
|
|
1696
1688
|
case "Description":
|
|
1697
1689
|
value = propertyInfo.descriptionProperty ? context.getProperty(propertyInfo.descriptionProperty, externalFormat) : null;
|
|
1698
1690
|
break;
|
|
1699
|
-
|
|
1700
1691
|
case "DescriptionValue":
|
|
1701
1692
|
value = ValueFormatter.formatWithBrackets(
|
|
1702
1693
|
propertyInfo.descriptionProperty ? context.getProperty(propertyInfo.descriptionProperty, externalFormat) : null,
|
|
1703
1694
|
propertyInfo.valueProperty ? context.getProperty(propertyInfo.valueProperty, externalFormat) : null
|
|
1704
1695
|
);
|
|
1705
1696
|
break;
|
|
1706
|
-
|
|
1707
1697
|
case "ValueDescription":
|
|
1708
1698
|
value = ValueFormatter.formatWithBrackets(
|
|
1709
1699
|
propertyInfo.valueProperty ? context.getProperty(propertyInfo.valueProperty, externalFormat) : null,
|