@openui5/sap.ui.mdc 1.97.1 → 1.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +25 -30
- package/THIRDPARTY.txt +15 -22
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +6 -3
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -2
- package/src/sap/ui/mdc/BaseDelegate.js +1 -1
- package/src/sap/ui/mdc/Chart.js +1128 -1806
- package/src/sap/ui/mdc/ChartDelegate.js +454 -250
- package/src/sap/ui/mdc/ChartRenderer.js +73 -77
- package/src/sap/ui/mdc/Control.js +11 -6
- package/src/sap/ui/mdc/Element.js +10 -6
- package/src/sap/ui/mdc/Field.js +19 -4
- package/src/sap/ui/mdc/FilterBar.js +3 -2
- package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
- package/src/sap/ui/mdc/FilterField.js +50 -9
- package/src/sap/ui/mdc/Link.js +25 -6
- package/src/sap/ui/mdc/LinkDelegate.js +3 -3
- package/src/sap/ui/mdc/MultiValueField.js +30 -6
- package/src/sap/ui/mdc/Table.js +151 -102
- package/src/sap/ui/mdc/TableDelegate.js +68 -13
- package/src/sap/ui/mdc/ValueHelp.js +26 -11
- package/src/sap/ui/mdc/ValueHelpDelegate.js +2 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
- package/src/sap/ui/mdc/{chartNew/ChartSelectionDetailsNew.js → chart/ChartSelectionDetails.js} +8 -8
- package/src/sap/ui/mdc/{chartNew/ChartToolbarNew.js → chart/ChartToolbar.js} +60 -17
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +55 -54
- package/src/sap/ui/mdc/{chartNew/DrillBreadcrumbsNew.js → chart/DrillBreadcrumbs.js} +10 -10
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +43 -254
- package/src/sap/ui/mdc/chart/Item.js +62 -92
- package/src/sap/ui/mdc/{chartNew/PropertyHelperNew.js → chart/PropertyHelper.js} +3 -3
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +17 -21
- package/src/sap/ui/mdc/condition/Condition.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +4 -2
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +388 -67
- package/src/sap/ui/mdc/condition/Operator.js +4 -2
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +78 -24
- package/src/sap/ui/mdc/condition/RangeOperator.js +5 -5
- package/src/sap/ui/mdc/designtime/Util.js +63 -0
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +23 -30
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +83 -5
- package/src/sap/ui/mdc/designtime/field/Field.designtime.js +81 -5
- package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +3 -0
- package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +35 -8
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionType.js +17 -6
- package/src/sap/ui/mdc/field/ConditionsType.js +2 -1
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +88 -29
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +77 -20
- package/src/sap/ui/mdc/field/FieldBase.js +93 -16
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldBaseRenderer.js +0 -3
- package/src/sap/ui/mdc/field/FieldHelpBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldInfoBase.js +24 -10
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelp.js +5 -2
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +5 -4
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +6 -4
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +6 -3
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +7 -7
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +10 -2
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/OutParameter.js +1 -1
- package/src/sap/ui/mdc/field/TokenDisplay.js +70 -0
- package/src/sap/ui/mdc/field/TokenDisplayRenderer.js +24 -0
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +80 -0
- package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +69 -0
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +10 -6
- package/src/sap/ui/mdc/field/content/DateContent.js +27 -19
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +0 -6
- package/src/sap/ui/mdc/field/content/DefaultContent.js +35 -13
- package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +285 -208
- package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +132 -56
- package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +2 -2
- package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +7 -3
- package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +52 -14
- package/src/sap/ui/mdc/filterbar/vh/CollectiveSearchSelect.js +3 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +43 -19
- package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +6 -4
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +47 -10
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +4 -3
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/GroupFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +0 -1
- package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +9 -3
- package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +27 -0
- package/src/sap/ui/mdc/flexibility/SortFlex.js +2 -2
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +6 -6
- package/src/sap/ui/mdc/library.js +54 -44
- package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
- package/src/sap/ui/mdc/link/Factory.js +2 -2
- package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Log.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +140 -177
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/messagebundle.properties +57 -2
- package/src/sap/ui/mdc/messagebundle_ar.properties +39 -4
- package/src/sap/ui/mdc/messagebundle_bg.properties +54 -19
- package/src/sap/ui/mdc/messagebundle_ca.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_cs.properties +52 -17
- package/src/sap/ui/mdc/messagebundle_cy.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_da.properties +44 -9
- package/src/sap/ui/mdc/messagebundle_de.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_el.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_en.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +61 -4
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +51 -16
- package/src/sap/ui/mdc/messagebundle_et.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_fi.properties +43 -8
- package/src/sap/ui/mdc/messagebundle_fr.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_hi.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_hu.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_id.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_it.properties +53 -18
- package/src/sap/ui/mdc/messagebundle_iw.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_ja.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_kk.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_ko.properties +41 -6
- package/src/sap/ui/mdc/messagebundle_lt.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_lv.properties +41 -6
- package/src/sap/ui/mdc/messagebundle_ms.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_nl.properties +42 -7
- package/src/sap/ui/mdc/messagebundle_no.properties +45 -10
- package/src/sap/ui/mdc/messagebundle_pl.properties +38 -3
- package/src/sap/ui/mdc/messagebundle_pt.properties +44 -9
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_ro.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_ru.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_sh.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_sk.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_sl.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_sv.properties +39 -4
- package/src/sap/ui/mdc/messagebundle_th.properties +40 -5
- package/src/sap/ui/mdc/messagebundle_tr.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_uk.properties +41 -6
- package/src/sap/ui/mdc/messagebundle_vi.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +37 -2
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +37 -2
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +30 -15
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -142
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +14 -17
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +2 -3
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +348 -0
- package/src/sap/ui/mdc/odata/TypeUtil.js +2 -2
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +29 -483
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +106 -0
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +116 -20
- package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +117 -123
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +3 -5
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/{ChartDelegateNew.js → ChartDelegate.js} +459 -351
- package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +51 -30
- package/src/sap/ui/mdc/p13n/FlexUtil.js +6 -118
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +7 -7
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
- package/src/sap/ui/mdc/p13n/StateUtil.js +24 -6
- package/src/sap/ui/mdc/p13n/UIManager.js +20 -19
- package/src/sap/ui/mdc/p13n/modification/FlexModificationHandler.js +4 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +19 -12
- package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +6 -6
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +49 -27
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1094 -49
- package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +136 -0
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +53 -28
- package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +108 -0
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +7 -7
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +156 -11
- package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +15 -26
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +6 -5
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +22 -11
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +174 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +12 -19
- package/src/sap/ui/mdc/table/Column.js +12 -12
- package/src/sap/ui/mdc/table/CreationRow.js +11 -11
- package/src/sap/ui/mdc/table/GridTableType.js +80 -33
- package/src/sap/ui/mdc/table/PropertyHelper.js +63 -19
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +94 -23
- package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
- package/src/sap/ui/mdc/table/RowSettings.js +45 -4
- package/src/sap/ui/mdc/table/TableTypeBase.js +2 -2
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -2
- package/src/sap/ui/mdc/themes/base/Chart.less +2 -0
- package/src/sap/ui/mdc/themes/base/FieldBase.less +0 -5
- package/src/sap/ui/mdc/themes/base/TokenDisplay.less +89 -0
- package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +16 -4
- package/src/sap/ui/mdc/themes/base/library.source.less +2 -0
- package/src/sap/ui/mdc/util/Common.js +1 -1
- package/src/sap/ui/mdc/util/DateUtil.js +33 -8
- package/src/sap/ui/mdc/util/FilterUtil.js +2 -2
- package/src/sap/ui/mdc/util/FormatUtil.js +3 -3
- package/src/sap/ui/mdc/util/IdentifierUtil.js +6 -6
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +243 -87
- package/src/sap/ui/mdc/util/TypeUtil.js +6 -5
- package/src/sap/ui/mdc/valuehelp/Dialog.js +11 -8
- package/src/sap/ui/mdc/valuehelp/Popover.js +6 -3
- package/src/sap/ui/mdc/valuehelp/base/Container.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +5 -4
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +2 -1
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +2 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -2
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +23 -14
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +46 -17
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +48 -27
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -1
- package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +3 -3
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsBase.js +3 -3
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsViz.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsBase.js +1 -1
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsViz.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ChartNew.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +291 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +7 -7
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +8 -9
- package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +12 -11
- package/test/sap/ui/mdc/testutils/opa/link/Actions.js +85 -0
- package/test/sap/ui/mdc/testutils/opa/link/Assertions.js +79 -0
- package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +112 -0
- package/test/sap/ui/mdc/testutils/opa/link/waitForLink.js +50 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +264 -139
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +27 -26
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +54 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Assertions.js +5 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +40 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Util.js +28 -0
- package/src/sap/ui/mdc/ChartDelegateNew.js +0 -395
- package/src/sap/ui/mdc/ChartNew.js +0 -1114
- package/src/sap/ui/mdc/ChartNewRenderer.js +0 -91
- package/src/sap/ui/mdc/chart/DimensionItem.js +0 -281
- package/src/sap/ui/mdc/chart/MeasureItem.js +0 -318
- package/src/sap/ui/mdc/chart/MetadataDelegate.js +0 -31
- package/src/sap/ui/mdc/chart/SelectionHandler.js +0 -127
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +0 -328
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +0 -295
- package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +0 -212
- package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -72
- package/src/sap/ui/mdc/chartNew/SelectionDetailsActionsNew.js +0 -34
- package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +0 -91
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
- package/src/sap/ui/mdc/link/SelectionDialog.control.xml +0 -66
- package/src/sap/ui/mdc/link/SelectionDialog.js +0 -213
- package/src/sap/ui/mdc/link/SelectionDialogItem.js +0 -86
- package/src/sap/ui/mdc/odata/v4/ChartDelegateNew.js +0 -35
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +0 -39
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +0 -1179
- package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -404
- package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -92
- package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -150
- package/src/sap/ui/mdc/ui/Container.js +0 -240
- package/src/sap/ui/mdc/ui/ContainerItem.js +0 -79
|
@@ -21,28 +21,69 @@ sap.ui.define([
|
|
|
21
21
|
|
|
22
22
|
/*global Set, WeakMap */
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* @typedef {object} sap.ui.mdc.util.PropertyInfo
|
|
26
|
+
*
|
|
27
|
+
* @property {string} name
|
|
28
|
+
* Unique, stable key for the property. It must only contain characters allowed for IDs, see {@link sap.ui.core.ID}. Does not have to be an
|
|
29
|
+
* existing attribute in the data model or the technical name of an attribute in the data model.
|
|
30
|
+
* @property {string} [path]
|
|
31
|
+
* The technical path for a data source property.
|
|
32
|
+
* @property {string} label
|
|
33
|
+
* Translatable text that labels the property.
|
|
34
|
+
* @property {boolean} [visible=true]
|
|
35
|
+
* Whether the property is or can be visible to a user.
|
|
36
|
+
* @property {string[]} [propertyInfos]
|
|
37
|
+
* The availability of this property makes <code>PropertyInfo</code> a complex <code>PropertyInfo</code>. Provides a list of related properties
|
|
38
|
+
* (by name).
|
|
39
|
+
* These related properties must be no complex <code>PropertyInfo</code> to avoid deep nesting.
|
|
40
|
+
* @property {object} [typeConfig]
|
|
41
|
+
* Object which contains type-specific information about the property, especially the type instance (for example, for model filter creation in
|
|
42
|
+
* Table <code>rebind</code>).
|
|
43
|
+
* @property {object} [extension]
|
|
44
|
+
* Reserved attribute. Must not be provided by the delegate directly as part of the <code>PropertyInfo</code>, but separately in
|
|
45
|
+
* the <code>fetchPropertyExtensions</code> method of the delegate. The <code>PropertyInfoExtension</code> is a key-value map where the key is
|
|
46
|
+
* the property name and the value is the additional information. The structure of the additional information depends on the delegate.
|
|
47
|
+
* Used to add model-specific information. For example, for analytics in OData, see sap.ui.mdc.odata.v4.TableDelegate.
|
|
48
|
+
*
|
|
49
|
+
* @private
|
|
50
|
+
* @experimental
|
|
51
|
+
* @ui5-restricted sap.fe
|
|
52
|
+
* MDC_PUBLIC_CANDIDATE
|
|
53
|
+
*/
|
|
54
|
+
|
|
24
55
|
/*
|
|
25
56
|
* Key-value map to define the characteristics of a property attribute, where the key is the name of the attribute.
|
|
26
57
|
*
|
|
27
58
|
* Metadata information:
|
|
28
59
|
* - type
|
|
29
|
-
*
|
|
60
|
+
* Can be any type that is also allowed for a control property, plus "PropertyReference" for references to simple properties.
|
|
30
61
|
* Complex types can be specified with an object that describes sub-attributes.
|
|
31
62
|
* Examples: "string", "string[]", "sap.ui.mdc.MyEnum", "any", "PropertyReference",
|
|
32
63
|
* {
|
|
33
|
-
* subAttribute: {
|
|
64
|
+
* subAttribute: {
|
|
65
|
+
* type: "string",
|
|
66
|
+
* default: {
|
|
67
|
+
* value: "myDefaultValue"
|
|
68
|
+
* }
|
|
69
|
+
* }
|
|
34
70
|
* ...
|
|
35
71
|
* }
|
|
36
72
|
* - mandatory (optional, default=false, only for top-level attribute)
|
|
37
73
|
* Whether this attribute must be provided.
|
|
38
74
|
* - allowedForComplexProperty (optional, default=false)
|
|
39
|
-
*
|
|
75
|
+
* Whether it is allowed to provide this attribute for a complex property.
|
|
40
76
|
* - valueForComplexProperty (optional):
|
|
41
77
|
* For a complex property, this defines the value of an attribute that is not allowed for complex properties.
|
|
42
|
-
* -
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
78
|
+
* - default: { (optional, type: Object) - specifies the default value property of the attribute
|
|
79
|
+
* - value
|
|
80
|
+
* This can either be a value, or a reference to another attribute in the form "attribute:x", with x being the name of the other
|
|
81
|
+
* attribute. The default value of this attribute is then the value of the other attribute. This works only one level deep.
|
|
82
|
+
* Examples: "attribute:name", "attribute:attributeName.subAttributeName"
|
|
83
|
+
* - ignoreIfNull (default=false)
|
|
84
|
+
* Prevents setting the default value for this attribute if set to <code>true</code>.
|
|
85
|
+
* Defines the entire attribute as <code>null</code> if the attribute value itself is from type <code>null</code>.
|
|
86
|
+
* }
|
|
46
87
|
*/
|
|
47
88
|
var mAttributeMetadata = { // TODO: "allowedForComplexProperty" propagation to children + reserved reference attribute, e.g. unit -> unitProperty
|
|
48
89
|
// Common
|
|
@@ -58,7 +99,9 @@ sap.ui.define([
|
|
|
58
99
|
},
|
|
59
100
|
visible: { // Whether the property is visible in the "Items" personalization.
|
|
60
101
|
type: "boolean",
|
|
61
|
-
|
|
102
|
+
"default": {
|
|
103
|
+
value: true
|
|
104
|
+
},
|
|
62
105
|
allowedForComplexProperty: true
|
|
63
106
|
},
|
|
64
107
|
path: { // The technical path for a data source property.
|
|
@@ -84,12 +127,16 @@ sap.ui.define([
|
|
|
84
127
|
// TODO: What's the meaning? type = boolean? Is used only once in FilterBarBase: oProperty.maxConditions !== -1
|
|
85
128
|
maxConditions: {
|
|
86
129
|
type: "int",
|
|
87
|
-
|
|
130
|
+
"default": {
|
|
131
|
+
value: -1
|
|
132
|
+
},
|
|
88
133
|
valueForComplexProperty: null
|
|
89
134
|
},
|
|
90
135
|
caseSensitive: {
|
|
91
136
|
type: "boolean",
|
|
92
|
-
|
|
137
|
+
"default": {
|
|
138
|
+
value: true
|
|
139
|
+
}
|
|
93
140
|
},
|
|
94
141
|
group: { // Key of the group the property is inside. Used to visually group properties in personalization dialogs.
|
|
95
142
|
type: "string",
|
|
@@ -103,12 +150,16 @@ sap.ui.define([
|
|
|
103
150
|
// Table, Chart, P13N
|
|
104
151
|
filterable: { // Whether it is possible to filter by this property.
|
|
105
152
|
type: "boolean",
|
|
106
|
-
|
|
153
|
+
"default": {
|
|
154
|
+
value: true
|
|
155
|
+
},
|
|
107
156
|
valueForComplexProperty: false
|
|
108
157
|
},
|
|
109
158
|
sortable: { // Whether it is possible to sort by this property.
|
|
110
159
|
type: "boolean",
|
|
111
|
-
|
|
160
|
+
"default": {
|
|
161
|
+
value: true
|
|
162
|
+
},
|
|
112
163
|
valueForComplexProperty: false
|
|
113
164
|
},
|
|
114
165
|
|
|
@@ -136,7 +187,59 @@ sap.ui.define([
|
|
|
136
187
|
allowedForComplexProperty: true
|
|
137
188
|
},
|
|
138
189
|
visualSettings: { // This object contains all relevant properties for visual adjustments
|
|
139
|
-
type:
|
|
190
|
+
type: {
|
|
191
|
+
widthCalculation: { // This object contains all properties and their default values for the column width calculation
|
|
192
|
+
type: {
|
|
193
|
+
minWidth: {
|
|
194
|
+
type: "int",
|
|
195
|
+
"default": {
|
|
196
|
+
value: 2
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
maxWidth: {
|
|
200
|
+
type: "int",
|
|
201
|
+
"default": {
|
|
202
|
+
value: 19
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
defaultWidth: {
|
|
206
|
+
type: "int",
|
|
207
|
+
"default": {
|
|
208
|
+
value: 8
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
gap: {
|
|
212
|
+
type: "float",
|
|
213
|
+
"default": {
|
|
214
|
+
value: 0
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
includeLabel: {
|
|
218
|
+
type: "boolean",
|
|
219
|
+
"default": {
|
|
220
|
+
value: true
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
verticalArrangement: {
|
|
224
|
+
type: "boolean",
|
|
225
|
+
"default": {
|
|
226
|
+
value: false
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
excludeProperties: {
|
|
230
|
+
type: "PropertyReference[]"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"default": {
|
|
234
|
+
value: {},
|
|
235
|
+
ignoreIfNull: true
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"default": {
|
|
240
|
+
value: {}
|
|
241
|
+
},
|
|
242
|
+
allowedForComplexProperty: true
|
|
140
243
|
},
|
|
141
244
|
|
|
142
245
|
// Chart
|
|
@@ -150,11 +253,11 @@ sap.ui.define([
|
|
|
150
253
|
}
|
|
151
254
|
|
|
152
255
|
// Reserved attributes
|
|
153
|
-
// extension - Used to add model-specific information. For example, for analytics in OData, see sap
|
|
256
|
+
// extension - Used to add model-specific information. For example, for analytics in OData, see sap/ui/mdc/odata/v4/TableDelegate.
|
|
154
257
|
};
|
|
155
258
|
|
|
156
259
|
/**
|
|
157
|
-
* The methods listed in this map are added to every
|
|
260
|
+
* The methods listed in this map are added to every <code>PropertyInfo</code> object.
|
|
158
261
|
*/
|
|
159
262
|
var mPropertyMethods = {
|
|
160
263
|
/**
|
|
@@ -177,7 +280,7 @@ sap.ui.define([
|
|
|
177
280
|
return this.propertyInfosProperties || [];
|
|
178
281
|
},
|
|
179
282
|
/**
|
|
180
|
-
* Gets all sortable properties referenced by the property, including the property itself if it is
|
|
283
|
+
* Gets all sortable properties referenced by the property, including the property itself if it is not complex.
|
|
181
284
|
*
|
|
182
285
|
* @this PropertyInfo
|
|
183
286
|
* @returns {object[]} The sortable properties
|
|
@@ -188,7 +291,7 @@ sap.ui.define([
|
|
|
188
291
|
});
|
|
189
292
|
},
|
|
190
293
|
/**
|
|
191
|
-
* Gets all filterable properties referenced by the property, including the property itself if it is
|
|
294
|
+
* Gets all filterable properties referenced by the property, including the property itself if it is not complex.
|
|
192
295
|
*
|
|
193
296
|
* @this PropertyInfo
|
|
194
297
|
* @returns {object[]} The filterable properties
|
|
@@ -199,7 +302,7 @@ sap.ui.define([
|
|
|
199
302
|
});
|
|
200
303
|
},
|
|
201
304
|
/**
|
|
202
|
-
* Gets all groupable properties referenced by the property, including the property itself if it is
|
|
305
|
+
* Gets all groupable properties referenced by the property, including the property itself if it is not complex.
|
|
203
306
|
*
|
|
204
307
|
* @this PropertyInfo
|
|
205
308
|
* @returns {object[]} The groupable properties
|
|
@@ -210,7 +313,7 @@ sap.ui.define([
|
|
|
210
313
|
});
|
|
211
314
|
},
|
|
212
315
|
/**
|
|
213
|
-
* Gets all visible properties referenced by the property, including the property itself if it is
|
|
316
|
+
* Gets all visible properties referenced by the property, including the property itself if it is not complex.
|
|
214
317
|
*
|
|
215
318
|
* @this PropertyInfo
|
|
216
319
|
* @returns {object[]} The visible properties
|
|
@@ -351,7 +454,7 @@ sap.ui.define([
|
|
|
351
454
|
}
|
|
352
455
|
|
|
353
456
|
if (vValue == null) {
|
|
354
|
-
setAttributeDefault(oPropertySection, mAttribute, sPath, sAttribute, aDependenciesForDefaults);
|
|
457
|
+
setAttributeDefault(oPropertySection, mAttribute, sPath, sAttribute, aDependenciesForDefaults, vValue);
|
|
355
458
|
}
|
|
356
459
|
|
|
357
460
|
if (typeof mAttribute.type === "object") {
|
|
@@ -384,21 +487,30 @@ sap.ui.define([
|
|
|
384
487
|
});
|
|
385
488
|
}
|
|
386
489
|
|
|
387
|
-
function setAttributeDefault(oPropertySection, mAttributeSection, sSection, sAttribute, aDependenciesForDefaults) {
|
|
388
|
-
if ("
|
|
389
|
-
|
|
490
|
+
function setAttributeDefault(oPropertySection, mAttributeSection, sSection, sAttribute, aDependenciesForDefaults, vValue) {
|
|
491
|
+
if ("default" in mAttributeSection) {
|
|
492
|
+
var oDefault = mAttributeSection.default;
|
|
493
|
+
|
|
494
|
+
// ignoreIfNull will applies only if a default value for the attribute has been specified in its metadata
|
|
495
|
+
if (vValue === null && oDefault.ignoreIfNull && oDefault.value !== undefined) {
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
if (oDefault.value === undefined) {
|
|
500
|
+
oPropertySection[sAttribute] = getTypeDefault(mAttributeSection.type);
|
|
501
|
+
} else if (typeof oDefault.value === "string" && oDefault.value.startsWith("attribute:")) {
|
|
390
502
|
// Attributes that reference another attribute for the default value need to be processed in a second step.
|
|
391
503
|
// This is only supported 1 level deep.
|
|
392
504
|
aDependenciesForDefaults.push({
|
|
393
|
-
source:
|
|
505
|
+
source: oDefault.value.substring(oDefault.value.indexOf(":") + 1),
|
|
394
506
|
targetPath: sSection,
|
|
395
507
|
targetAttribute: sAttribute,
|
|
396
508
|
targetType: mAttributeSection.type
|
|
397
509
|
});
|
|
398
|
-
} else if (typeof
|
|
399
|
-
oPropertySection[sAttribute] = merge({},
|
|
510
|
+
} else if (typeof oDefault.value === "object") {
|
|
511
|
+
oPropertySection[sAttribute] = merge({}, oDefault.value);
|
|
400
512
|
} else {
|
|
401
|
-
oPropertySection[sAttribute] =
|
|
513
|
+
oPropertySection[sAttribute] = oDefault.value;
|
|
402
514
|
}
|
|
403
515
|
} else {
|
|
404
516
|
oPropertySection[sAttribute] = getTypeDefault(mAttributeSection.type);
|
|
@@ -422,16 +534,33 @@ sap.ui.define([
|
|
|
422
534
|
}
|
|
423
535
|
}
|
|
424
536
|
|
|
537
|
+
function finalizeAttributeMetadata(mAttributeSection, sPath, bParentAllowedForComplexProperty) {
|
|
538
|
+
for (var sAttribute in mAttributeSection) {
|
|
539
|
+
var mAttribute = mAttributeSection[sAttribute];
|
|
540
|
+
var sAttributePath = sPath == null ? sAttribute : sPath + "." + sAttribute;
|
|
541
|
+
|
|
542
|
+
if (sPath === "extension") {
|
|
543
|
+
finalizeAttributeMetadata(mAttribute.type, sAttributePath);
|
|
544
|
+
continue;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
if (bParentAllowedForComplexProperty && mAttribute.allowedForComplexProperty !== false) {
|
|
548
|
+
mAttribute.allowedForComplexProperty = true;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
if (typeof mAttribute.type === "object") {
|
|
552
|
+
finalizeAttributeMetadata(mAttribute.type, sAttributePath, mAttribute.allowedForComplexProperty);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
425
557
|
function mergeExtensionsIntoProperties(aProperties, mExtensions) {
|
|
426
558
|
var iMatchingExtensions = 0;
|
|
427
|
-
|
|
428
559
|
mExtensions = mExtensions || {};
|
|
429
|
-
|
|
430
560
|
for (var i = 0; i < aProperties.length; i++) {
|
|
431
561
|
if ("extension" in aProperties[i]) {
|
|
432
562
|
throwInvalidPropertyError("Property contains invalid attribute 'extension'.", aProperties[i]);
|
|
433
563
|
}
|
|
434
|
-
|
|
435
564
|
if (aProperties[i].name in mExtensions) {
|
|
436
565
|
aProperties[i].extension = mExtensions[aProperties[i].name];
|
|
437
566
|
iMatchingExtensions++;
|
|
@@ -439,39 +568,94 @@ sap.ui.define([
|
|
|
439
568
|
aProperties[i].extension = {};
|
|
440
569
|
}
|
|
441
570
|
}
|
|
442
|
-
|
|
443
571
|
if (iMatchingExtensions !== Object.keys(mExtensions).length) {
|
|
444
572
|
throw new Error("At least one property extension does not point to an existing property.");
|
|
445
573
|
}
|
|
446
574
|
}
|
|
447
575
|
|
|
576
|
+
function _createPrivate(oInstance, oParent, aProperties, mExtensions, aAllowedAttributes, mExtensionAttributeMetadata) {
|
|
577
|
+
var mPrivate = {};
|
|
578
|
+
var mInstanceAttributeMetadata = aCommonAttributes.concat(aAllowedAttributes || []).reduce(function(mMetadata, sAttribute) {
|
|
579
|
+
if (sAttribute in mAttributeMetadata) {
|
|
580
|
+
mMetadata[sAttribute] = mAttributeMetadata[sAttribute];
|
|
581
|
+
}
|
|
582
|
+
return mMetadata;
|
|
583
|
+
}, Object.assign({}, oInstance._mExperimentalAdditionalAttributes));
|
|
584
|
+
if (mExtensionAttributeMetadata) {
|
|
585
|
+
mPrivate.mAttributeMetadata = Object.assign({
|
|
586
|
+
extension: {
|
|
587
|
+
type: mExtensionAttributeMetadata,
|
|
588
|
+
mandatory: true,
|
|
589
|
+
allowedForComplexProperty: true
|
|
590
|
+
}
|
|
591
|
+
}, mInstanceAttributeMetadata);
|
|
592
|
+
mPrivate.aMandatoryExtensionAttributes = Object.keys(mExtensionAttributeMetadata).filter(function(sAttribute) {
|
|
593
|
+
return mExtensionAttributeMetadata[sAttribute].mandatory;
|
|
594
|
+
});
|
|
595
|
+
} else {
|
|
596
|
+
mPrivate.mAttributeMetadata = mInstanceAttributeMetadata;
|
|
597
|
+
mPrivate.aMandatoryExtensionAttributes = [];
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
finalizeAttributeMetadata(mPrivate.mAttributeMetadata);
|
|
601
|
+
|
|
602
|
+
mPrivate.aMandatoryAttributes = Object.keys(mPrivate.mAttributeMetadata).filter(function(sAttribute) {
|
|
603
|
+
return mPrivate.mAttributeMetadata[sAttribute].mandatory;
|
|
604
|
+
});
|
|
605
|
+
|
|
606
|
+
var aClonedProperties = merge([], aProperties);
|
|
607
|
+
var mProperties = createPropertyMap(aClonedProperties);
|
|
608
|
+
if (mExtensionAttributeMetadata) {
|
|
609
|
+
mergeExtensionsIntoProperties(aClonedProperties, merge({}, mExtensions));
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
var oPreviousPrivate = _private.get(oInstance);
|
|
613
|
+
var aPreviousProperties = oPreviousPrivate && oPreviousPrivate.aRawProperties;
|
|
614
|
+
_private.set(oInstance, mPrivate);
|
|
615
|
+
oInstance.validateProperties(aClonedProperties, aPreviousProperties);
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
mPrivate.oParent = oParent || null;
|
|
619
|
+
mPrivate.aRawProperties = aProperties;
|
|
620
|
+
mPrivate.aProperties = aClonedProperties;
|
|
621
|
+
mPrivate.mProperties = mProperties;
|
|
622
|
+
mPrivate._ = {
|
|
623
|
+
mExtensions: mExtensions,
|
|
624
|
+
aAllowedAttributes: aAllowedAttributes,
|
|
625
|
+
mExtensionAttributeMetadata: mExtensionAttributeMetadata
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
enrichProperties(oInstance, aClonedProperties);
|
|
629
|
+
prepareProperties(oInstance, aClonedProperties);
|
|
630
|
+
}
|
|
631
|
+
|
|
448
632
|
/**
|
|
449
633
|
* Constructor for a new helper for the given properties.
|
|
450
634
|
*
|
|
451
635
|
* @param {object[]} aProperties
|
|
452
636
|
* The properties to process in this helper
|
|
453
|
-
* @param {
|
|
637
|
+
* @param {Object<string, object>} [mExtensions]
|
|
454
638
|
* Key-value map, where the key is the name of the property and the value is the extension containing mode-specific information.
|
|
455
639
|
* The extension of a property is stored in a reserved <code>extension</code> attribute and its attributes must be specified with
|
|
456
640
|
* <code>mExtensionAttributeMetadata</code>.
|
|
457
641
|
* @param {sap.ui.base.ManagedObject} [oParent]
|
|
458
642
|
* A reference to an instance that will act as the parent of this helper
|
|
459
643
|
* @param {string[]} [aAllowedAttributes]
|
|
460
|
-
* List of attributes the
|
|
644
|
+
* List of attributes that the <code>PropertyInfo</code> may contain.
|
|
461
645
|
* The following common attributes are always allowed:
|
|
462
646
|
* name, label, visible, path, typeConfig, maxConditions, group, groupLabel
|
|
463
647
|
* @param {object} [mExtensionAttributeMetadata]
|
|
464
648
|
* The attribute metadata for the model-specific property extension
|
|
465
649
|
*
|
|
466
650
|
* @class
|
|
467
|
-
* Property helpers
|
|
651
|
+
* Property helpers in this SAPUI5 library provide a consistent and standardized structure of properties and their attributes.
|
|
468
652
|
* Validates the given properties, sets defaults, and provides utilities to work with these properties.
|
|
469
653
|
* The utilities can only be used for properties that are known to the helper. Known properties are all those that are passed to the constructor.
|
|
470
654
|
*
|
|
471
655
|
* @extends sap.ui.base.Object
|
|
472
656
|
*
|
|
473
657
|
* @author SAP SE
|
|
474
|
-
* @version 1.
|
|
658
|
+
* @version 1.100.0
|
|
475
659
|
*
|
|
476
660
|
* @private
|
|
477
661
|
* @experimental
|
|
@@ -494,7 +678,6 @@ sap.ui.define([
|
|
|
494
678
|
throw new Error("Property extensions must be a plain object.");
|
|
495
679
|
}
|
|
496
680
|
}
|
|
497
|
-
|
|
498
681
|
if (oParent && !BaseObject.isA(oParent, "sap.ui.base.ManagedObject")) {
|
|
499
682
|
throw new Error("The type of the parent is invalid.");
|
|
500
683
|
}
|
|
@@ -507,50 +690,7 @@ sap.ui.define([
|
|
|
507
690
|
}.bind(this));
|
|
508
691
|
}
|
|
509
692
|
|
|
510
|
-
|
|
511
|
-
var mInstanceAttributeMetadata = aCommonAttributes.concat(aAllowedAttributes || []).reduce(function(mMetadata, sAttribute) {
|
|
512
|
-
if (sAttribute in mAttributeMetadata) {
|
|
513
|
-
mMetadata[sAttribute] = mAttributeMetadata[sAttribute];
|
|
514
|
-
}
|
|
515
|
-
return mMetadata;
|
|
516
|
-
}, Object.assign({}, this._mExperimentalAdditionalAttributes));
|
|
517
|
-
|
|
518
|
-
if (mExtensionAttributeMetadata) {
|
|
519
|
-
mPrivate.mAttributeMetadata = Object.assign({
|
|
520
|
-
extension: {
|
|
521
|
-
type: mExtensionAttributeMetadata,
|
|
522
|
-
mandatory: true,
|
|
523
|
-
allowedForComplexProperty: true
|
|
524
|
-
}
|
|
525
|
-
}, mInstanceAttributeMetadata);
|
|
526
|
-
mPrivate.aMandatoryExtensionAttributes = Object.keys(mExtensionAttributeMetadata).filter(function(sAttribute) {
|
|
527
|
-
return mExtensionAttributeMetadata[sAttribute].mandatory;
|
|
528
|
-
});
|
|
529
|
-
} else {
|
|
530
|
-
mPrivate.mAttributeMetadata = mInstanceAttributeMetadata;
|
|
531
|
-
mPrivate.aMandatoryExtensionAttributes = [];
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
mPrivate.aMandatoryAttributes = Object.keys(mPrivate.mAttributeMetadata).filter(function(sAttribute) {
|
|
535
|
-
return mPrivate.mAttributeMetadata[sAttribute].mandatory;
|
|
536
|
-
});
|
|
537
|
-
|
|
538
|
-
var aClonedProperties = merge([], aProperties);
|
|
539
|
-
var mProperties = createPropertyMap(aClonedProperties);
|
|
540
|
-
|
|
541
|
-
if (mExtensionAttributeMetadata) {
|
|
542
|
-
mergeExtensionsIntoProperties(aClonedProperties, merge({}, mExtensions));
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
_private.set(this, mPrivate);
|
|
546
|
-
this.validateProperties(aClonedProperties);
|
|
547
|
-
|
|
548
|
-
mPrivate.oParent = oParent || null;
|
|
549
|
-
mPrivate.aProperties = aClonedProperties;
|
|
550
|
-
mPrivate.mProperties = mProperties;
|
|
551
|
-
|
|
552
|
-
enrichProperties(this, aClonedProperties);
|
|
553
|
-
prepareProperties(this, aClonedProperties);
|
|
693
|
+
_createPrivate(this, oParent, aProperties, mExtensions, aAllowedAttributes, mExtensionAttributeMetadata);
|
|
554
694
|
}
|
|
555
695
|
});
|
|
556
696
|
|
|
@@ -562,14 +702,15 @@ sap.ui.define([
|
|
|
562
702
|
* any method that tries to access them might not work as expected.
|
|
563
703
|
*
|
|
564
704
|
* @param {object[]} aProperties The properties to validate
|
|
705
|
+
* @param {object[]} [aPreviousProperties] The previous set of properties to validate against
|
|
565
706
|
* @throws {Error} If the properties are invalid
|
|
566
707
|
* @protected
|
|
567
708
|
*/
|
|
568
|
-
PropertyHelper.prototype.validateProperties = function(aProperties) {
|
|
709
|
+
PropertyHelper.prototype.validateProperties = function(aProperties, aPreviousProperties) {
|
|
569
710
|
var oUniquePropertiesSet = new Set();
|
|
570
711
|
|
|
571
712
|
for (var i = 0; i < aProperties.length; i++) {
|
|
572
|
-
this.validateProperty(aProperties[i], aProperties);
|
|
713
|
+
this.validateProperty(aProperties[i], aProperties, aPreviousProperties);
|
|
573
714
|
oUniquePropertiesSet.add(aProperties[i].name);
|
|
574
715
|
}
|
|
575
716
|
|
|
@@ -582,15 +723,16 @@ sap.ui.define([
|
|
|
582
723
|
* Validates a property. The entire array of properties needs to be provided for validation of a complex property.
|
|
583
724
|
*
|
|
584
725
|
* <b>Note for classes that override this method:</b>
|
|
585
|
-
* No other method of the helper
|
|
726
|
+
* No other method of the helper must be called from here. The properties are not yet stored in the helper, and therefore
|
|
586
727
|
* any method that tries to access them might not work as expected.
|
|
587
728
|
*
|
|
588
729
|
* @param {object} oProperty The property to validate
|
|
589
730
|
* @param {object[]} aProperties The entire array properties
|
|
731
|
+
* @param {object[]} [aPreviousProperties] The previous set of properties to validate against
|
|
590
732
|
* @throws {Error} If the property is invalid
|
|
591
733
|
* @protected
|
|
592
734
|
*/
|
|
593
|
-
PropertyHelper.prototype.validateProperty = function(oProperty, aProperties) {
|
|
735
|
+
PropertyHelper.prototype.validateProperty = function(oProperty, aProperties, aPreviousProperties) {
|
|
594
736
|
if (!isPlainObject(oProperty)) {
|
|
595
737
|
throwInvalidPropertyError("Property info must be a plain object.", oProperty);
|
|
596
738
|
}
|
|
@@ -610,7 +752,6 @@ sap.ui.define([
|
|
|
610
752
|
throwInvalidPropertyError("Property does not contain mandatory attribute '" + sMandatoryAttribute + "'.", oProperty);
|
|
611
753
|
}
|
|
612
754
|
});
|
|
613
|
-
|
|
614
755
|
_private.get(this).aMandatoryExtensionAttributes.forEach(function(sMandatoryAttribute) {
|
|
615
756
|
if (!(sMandatoryAttribute in oProperty.extension)) {
|
|
616
757
|
reportInvalidProperty("Property does not contain mandatory attribute 'extension." + sMandatoryAttribute + "'.", oProperty);
|
|
@@ -718,6 +859,21 @@ sap.ui.define([
|
|
|
718
859
|
return oPrivate ? oPrivate.oParent : null;
|
|
719
860
|
};
|
|
720
861
|
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* Sets all properties known to this helper.
|
|
865
|
+
*
|
|
866
|
+
* @param {object[]} aProperties The properties to process in this helper
|
|
867
|
+
* @returns {sap.ui.mdc.util.PropertyHelper} returns propertyhelper instance
|
|
868
|
+
* @public
|
|
869
|
+
* @since 1.100.0
|
|
870
|
+
*/
|
|
871
|
+
PropertyHelper.prototype.setProperties = function (aProperties) {
|
|
872
|
+
var mPrivate = _private.get(this);
|
|
873
|
+
_createPrivate(this, mPrivate.oParent, aProperties, mPrivate._.mExtensions, mPrivate._.aAllowedAttributes, mPrivate._.mExtensionAttributeMetadata);
|
|
874
|
+
return this;
|
|
875
|
+
};
|
|
876
|
+
|
|
721
877
|
/**
|
|
722
878
|
* Gets all properties known to this helper.
|
|
723
879
|
*
|
|
@@ -763,9 +919,9 @@ sap.ui.define([
|
|
|
763
919
|
};
|
|
764
920
|
|
|
765
921
|
/**
|
|
766
|
-
* Checks whether a property is a complex property. Works with any
|
|
922
|
+
* Checks whether a property is a complex property. Works with any <code>PropertyInfo</code>, even if unknown to the property helper.
|
|
767
923
|
*
|
|
768
|
-
* @param {object} oProperty A
|
|
924
|
+
* @param {object} oProperty A <code>PropertyInfo</code> object
|
|
769
925
|
* @returns {boolean} Whether the property is complex
|
|
770
926
|
* @protected
|
|
771
927
|
* @static
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
'sap/ui/mdc/enum/BaseType',
|
|
9
|
-
'sap/base/util/ObjectPath'
|
|
10
|
-
|
|
9
|
+
'sap/base/util/ObjectPath',
|
|
10
|
+
'sap/ui/model/SimpleType'
|
|
11
|
+
], function(BaseType, ObjectPath, SimpleType) {
|
|
11
12
|
"use strict";
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -59,7 +60,7 @@ sap.ui.define([
|
|
|
59
60
|
*
|
|
60
61
|
* As default <code>string</code> is returned.
|
|
61
62
|
*
|
|
62
|
-
* @param {string}
|
|
63
|
+
* @param {string} sType Given type string or sap.ui.model.SimpleType
|
|
63
64
|
* @param {object} oFormatOptions Used <code>FormatOptions</code>
|
|
64
65
|
* @param {object} oConstraints Used <code>Constraints</code>
|
|
65
66
|
* @returns {sap.ui.mdc.enum.BaseType} output <code>Date</code>, <code>DateTime</code> or <code>Time</code>...
|
|
@@ -154,7 +155,7 @@ sap.ui.define([
|
|
|
154
155
|
|
|
155
156
|
var oType, sDataType;
|
|
156
157
|
|
|
157
|
-
if (vType instanceof
|
|
158
|
+
if (vType instanceof SimpleType) {
|
|
158
159
|
oType = vType;
|
|
159
160
|
} else {
|
|
160
161
|
var sDataTypeClass = this.getDataTypeClassName(vType);
|
|
@@ -172,4 +173,4 @@ sap.ui.define([
|
|
|
172
173
|
|
|
173
174
|
return TypeUtil;
|
|
174
175
|
|
|
175
|
-
}
|
|
176
|
+
});
|
|
@@ -37,12 +37,13 @@ sap.ui.define([
|
|
|
37
37
|
* @param {object} [mSettings] Initial settings for the new control
|
|
38
38
|
* @class Container for the <code>sap.ui.mdc.ValueHelp</code> element showing a dialog.
|
|
39
39
|
* @extends sap.ui.mdc.valuehelp.base.Container
|
|
40
|
-
* @version 1.
|
|
40
|
+
* @version 1.100.0
|
|
41
41
|
* @constructor
|
|
42
42
|
* @abstract
|
|
43
43
|
* @private
|
|
44
44
|
* @ui5-restricted sap.ui.mdc
|
|
45
45
|
* @since 1.95.0
|
|
46
|
+
* @experimental As of version 1.95
|
|
46
47
|
* @alias sap.ui.mdc.valuehelp.Dialog
|
|
47
48
|
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
48
49
|
*/
|
|
@@ -210,7 +211,7 @@ sap.ui.define([
|
|
|
210
211
|
oDialog.addStyleClass("sapMdcValueHelpTitle");
|
|
211
212
|
oDialog.addStyleClass("sapMdcValueHelpTitleShadow");
|
|
212
213
|
|
|
213
|
-
var oVBox = new VBox({ fitContainer: true});
|
|
214
|
+
var oVBox = new VBox(this.getId() + "-Content", { fitContainer: true});
|
|
214
215
|
oVBox.addStyleClass("sapMdcValueHelpPanel");
|
|
215
216
|
oDialog.addContent(oVBox);
|
|
216
217
|
|
|
@@ -350,7 +351,7 @@ sap.ui.define([
|
|
|
350
351
|
var BackgroundDesign = MLibrary.BackgroundDesign;
|
|
351
352
|
var ButtonType = MLibrary.ButtonType;
|
|
352
353
|
|
|
353
|
-
this.oTokenizerPanel = new Panel( {
|
|
354
|
+
this.oTokenizerPanel = new Panel(this.getId() + "-TokenPanel", {
|
|
354
355
|
backgroundDesign: BackgroundDesign.Transparent,
|
|
355
356
|
expanded: true,
|
|
356
357
|
visible: { parts: ['$valueHelp>/_config/maxConditions', '$help>/content'], formatter:
|
|
@@ -385,20 +386,22 @@ sap.ui.define([
|
|
|
385
386
|
});
|
|
386
387
|
this.oTokenizerPanel.addStyleClass("sapMdcTokenizerPanel");
|
|
387
388
|
|
|
388
|
-
var oHBox = new HBox({fitContainer: true, width: "100%"});
|
|
389
|
+
var oHBox = new HBox(this.getId() + "-TokenBox", {fitContainer: true, width: "100%"});
|
|
389
390
|
|
|
390
391
|
var oFilter = new Filter({path:'isEmpty', operator:'NE', value1:true});
|
|
391
392
|
|
|
392
393
|
var oValueHelpModel = this.getModel("$valueHelp");
|
|
393
394
|
var oConfig = oValueHelpModel ? oValueHelpModel.getProperty("/_config") : {};
|
|
395
|
+
var oParent = this.getParent();
|
|
394
396
|
var oFormatOptions = { // TODO: is more needed?
|
|
395
397
|
maxConditions: -1, // as for tokens there should not be a limit on type side
|
|
396
398
|
valueType: oConfig.dataType,
|
|
397
399
|
operators: oConfig.operators,
|
|
398
|
-
display: oConfig.display
|
|
400
|
+
display: oConfig.display,
|
|
401
|
+
fieldHelpID: oParent && oParent.getId() // needed to get description for Token (if not provided)
|
|
399
402
|
};
|
|
400
|
-
var oTokenTemplate = new Token({text: {path: '$valueHelp>', type: new ConditionType(oFormatOptions)}});
|
|
401
|
-
this.oTokenizer = new Tokenizer({
|
|
403
|
+
var oTokenTemplate = new Token(this.getId() + "-Token", {text: {path: '$valueHelp>', type: new ConditionType(oFormatOptions)}});
|
|
404
|
+
this.oTokenizer = new Tokenizer(this.getId() + "-Tokenizer", {
|
|
402
405
|
width: "100%",
|
|
403
406
|
tokenDelete: function(oEvent) {
|
|
404
407
|
if (oEvent.getParameter("tokens")) {
|
|
@@ -422,7 +425,7 @@ sap.ui.define([
|
|
|
422
425
|
this.oTokenizer.addAriaDescribedBy( this.oTokenizer.getTokensInfoId());
|
|
423
426
|
this.oTokenizer.addStyleClass("sapMdcTokenizer");
|
|
424
427
|
|
|
425
|
-
this.oRemoveAllBtn = new Button({
|
|
428
|
+
this.oRemoveAllBtn = new Button(this.getId() + "-TokenRemoveAll", {
|
|
426
429
|
press: function(oEvent) {
|
|
427
430
|
this.fireSelect({type: SelectType.Set, conditions: []});
|
|
428
431
|
|