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