@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
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
sap.ui.define(['./library'],
|
|
8
|
-
function(library) {
|
|
9
|
-
"use strict";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Chart renderer.
|
|
13
|
-
* @namespace
|
|
14
|
-
*/
|
|
15
|
-
var ChartRenderer = {
|
|
16
|
-
apiVersion: 2
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* CSS class to be applied to the HTML root element of the control.
|
|
21
|
-
*
|
|
22
|
-
* @readonly
|
|
23
|
-
* @const {string}
|
|
24
|
-
*/
|
|
25
|
-
ChartRenderer.CSS_CLASS = "sapUiMDCChart";
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}.
|
|
29
|
-
*
|
|
30
|
-
* @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the render output buffer
|
|
31
|
-
* @param {sap.ui.core.Control} oInnerChart An object representation of the control that should be rendered
|
|
32
|
-
*/
|
|
33
|
-
ChartRenderer.render = function(oRm, oMDCChart) {
|
|
34
|
-
oRm.openStart("div", oMDCChart);
|
|
35
|
-
//TODO: Clarify why writeControlData doesn't work on rerender
|
|
36
|
-
oRm.attr("id", oMDCChart.getId());
|
|
37
|
-
oRm.class(ChartRenderer.CSS_CLASS);
|
|
38
|
-
//oRm.class("sapUiFixFlex");
|
|
39
|
-
//oRm.style("overflow", "hidden");
|
|
40
|
-
oRm.style("height", oMDCChart.getHeight());
|
|
41
|
-
oRm.style("width", oMDCChart.getWidth());
|
|
42
|
-
oRm.style("min-height", oMDCChart.getMinHeight());
|
|
43
|
-
oRm.style("min-width", oMDCChart.getMinWidth());
|
|
44
|
-
oRm.openEnd();
|
|
45
|
-
this.renderToolbar(oRm, oMDCChart.getAggregation("_toolbar"));
|
|
46
|
-
this.renderBreadcrumbs(oRm, oMDCChart.getAggregation("_breadcrumbs"));
|
|
47
|
-
//this.renderInnerChart(oRm, oMDCChart._getInnerChart());
|
|
48
|
-
this.renderInnerStructure(oRm, oMDCChart.getAggregation("_innerChart"));
|
|
49
|
-
oRm.close("div");
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
ChartRenderer.renderNoDataStruct = function(oRm, oNoDataStruct) {
|
|
53
|
-
if (oNoDataStruct) {
|
|
54
|
-
/*oRm.openStart("div");
|
|
55
|
-
oRm.class("sapUiFixFlexFlexibleContainer");
|
|
56
|
-
oRm.openEnd();
|
|
57
|
-
oRm.renderControl(oNoDataStruct);
|
|
58
|
-
oRm.close("div");*/
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
ChartRenderer.renderToolbar = function(oRm, oToolbar) {
|
|
63
|
-
|
|
64
|
-
if (oToolbar) {
|
|
65
|
-
oRm.openStart("div");
|
|
66
|
-
oRm.class("sapUiFixFlexFixed");
|
|
67
|
-
oRm.openEnd();
|
|
68
|
-
oRm.renderControl(oToolbar);
|
|
69
|
-
oRm.close("div");
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
ChartRenderer.renderBreadcrumbs = function(oRm, oDrillBreadcrumbs) {
|
|
74
|
-
|
|
75
|
-
if (oDrillBreadcrumbs) {
|
|
76
|
-
oRm.renderControl(oDrillBreadcrumbs);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
ChartRenderer.renderInnerChart = function(oRm, oInnerChart) {
|
|
81
|
-
|
|
82
|
-
if (oInnerChart) {
|
|
83
|
-
oRm.renderControl(oInnerChart);
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
ChartRenderer.renderInnerStructure = function (oRm, oInnerStructure){
|
|
87
|
-
oRm.renderControl(oInnerStructure);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
return ChartRenderer;
|
|
91
|
-
}, true);
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* !OpenUI5
|
|
3
|
-
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
-
*/
|
|
6
|
-
sap.ui.define([
|
|
7
|
-
"./Item", 'sap/ui/base/SyncPromise', "sap/ui/mdc/library"
|
|
8
|
-
], function(Item, SyncPromise, MDCLib) {
|
|
9
|
-
"use strict";
|
|
10
|
-
|
|
11
|
-
var DimensionClass, TimeDimensionClass, HierachyDimensionClass;
|
|
12
|
-
var _SUPPORTED_ROLE = {
|
|
13
|
-
category: true,
|
|
14
|
-
category2: true,
|
|
15
|
-
series: true
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// Provides the Item class.
|
|
19
|
-
/**
|
|
20
|
-
* Constructor for a new Item.
|
|
21
|
-
*
|
|
22
|
-
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
23
|
-
* @param {object} [mSettings] initial settings for the new control
|
|
24
|
-
* @class The Item for the field/property metadata used within MDC controls, an instance can be created to override the default/metadata
|
|
25
|
-
* behavior.
|
|
26
|
-
* <h3><b>Note:</b></h3>
|
|
27
|
-
* The control is experimental and the API/behaviour is not finalised and hence this should not be used for productive usage.
|
|
28
|
-
* @extends sap.ui.mdc.chart.Item
|
|
29
|
-
* @author SAP SE
|
|
30
|
-
* @private
|
|
31
|
-
* @experimental As of version 1.61
|
|
32
|
-
* @ui5-restricted sap.ui.mdc
|
|
33
|
-
* @since 1.61
|
|
34
|
-
* @alias sap.ui.mdc.chart.DimensionItem
|
|
35
|
-
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
36
|
-
*/
|
|
37
|
-
var DimensionItem = Item.extend("sap.ui.mdc.chart.DimensionItem", /** @lends sap.ui.mdc.chart.DimensionItem.prototype */
|
|
38
|
-
{
|
|
39
|
-
metadata: {
|
|
40
|
-
"abstract": true,
|
|
41
|
-
library: "sap.ui.mdc",
|
|
42
|
-
properties: {
|
|
43
|
-
/**
|
|
44
|
-
* Function returning a formatted text for a item key value that will be used for axis labelling. If specified, this property takes precedence over the "textProperty" property of the item.
|
|
45
|
-
* item key value and the corresponding text will be passed to the supplied function as parameters.
|
|
46
|
-
*/
|
|
47
|
-
textFormatter: {
|
|
48
|
-
type: "function"
|
|
49
|
-
},
|
|
50
|
-
/**
|
|
51
|
-
* Text for a item key value, typically by a pointer using the binding syntax to some property containing the text.
|
|
52
|
-
*
|
|
53
|
-
* <b>NOTE:</b> This property was bound internally if automatically created via metadata of oData service and please call "unbindProperty" before setting.
|
|
54
|
-
*/
|
|
55
|
-
textProperty: {
|
|
56
|
-
type: "string"
|
|
57
|
-
},
|
|
58
|
-
/**
|
|
59
|
-
* Whether a text is displayed. If the "textProperty" property has not been specified, it will be derived from the metadata.
|
|
60
|
-
*/
|
|
61
|
-
displayText: {
|
|
62
|
-
type: "boolean",
|
|
63
|
-
defaultValue: true
|
|
64
|
-
},
|
|
65
|
-
role: {
|
|
66
|
-
type: "string",
|
|
67
|
-
defaultValue: "category"
|
|
68
|
-
},
|
|
69
|
-
/**
|
|
70
|
-
* Specifies whether item as a dimension is part of the inResult of inner chart
|
|
71
|
-
*/
|
|
72
|
-
inResult: {
|
|
73
|
-
type: "boolean",
|
|
74
|
-
defaultValue: false
|
|
75
|
-
},
|
|
76
|
-
/**
|
|
77
|
-
* The level for hierachy dimension
|
|
78
|
-
*/
|
|
79
|
-
level: {
|
|
80
|
-
type: "int",
|
|
81
|
-
defaultValue: undefined
|
|
82
|
-
},
|
|
83
|
-
/**
|
|
84
|
-
* The time unit @link sap.chart.TimeUnitType
|
|
85
|
-
*/
|
|
86
|
-
timeUnit: {
|
|
87
|
-
type: "string",
|
|
88
|
-
defaultValue: undefined
|
|
89
|
-
},
|
|
90
|
-
/**
|
|
91
|
-
* The criticality for coloring
|
|
92
|
-
*
|
|
93
|
-
* @since 1.64
|
|
94
|
-
*/
|
|
95
|
-
criticality: {
|
|
96
|
-
type: "object",
|
|
97
|
-
multiple: "false"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Translate mdc dimension item settings to viz chart dimension settings
|
|
105
|
-
*
|
|
106
|
-
* @param mMetadata
|
|
107
|
-
* @return {{role: *, name: *, label: *}}
|
|
108
|
-
*
|
|
109
|
-
* @private
|
|
110
|
-
* @ui5-restricted sap.ui.mdc
|
|
111
|
-
*/
|
|
112
|
-
DimensionItem.prototype.getSettings = function(mMetadata) {
|
|
113
|
-
var mSettings = {
|
|
114
|
-
label: this.getLabel() || mMetadata.label,
|
|
115
|
-
role: this.getRole(),
|
|
116
|
-
name: this.getKey(),
|
|
117
|
-
textProperty: this.getTextProperty(),
|
|
118
|
-
displayText: this.getDisplayText()
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
if (this._isHierarchyDimension()) {
|
|
122
|
-
mSettings.level = this.getLevel();
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
return mSettings;
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Pushes updates on the item to the inner chart
|
|
130
|
-
*
|
|
131
|
-
* @param {object} oChart chart to push the update to
|
|
132
|
-
*
|
|
133
|
-
* @experimental
|
|
134
|
-
* @private
|
|
135
|
-
* @ui5-restricted sap.ui.mdc
|
|
136
|
-
*/
|
|
137
|
-
DimensionItem.prototype.toChart = function(oChart) {
|
|
138
|
-
return new SyncPromise(function(resolve) {
|
|
139
|
-
this._oVizItem = oChart.getDimensionByName(this.getKey());
|
|
140
|
-
if (this._oVizItem) {
|
|
141
|
-
var sOldRole = this._oVizItem.getRole();
|
|
142
|
-
this._oVizItem.setRole(this.getRole());
|
|
143
|
-
if (this._observer) {
|
|
144
|
-
this._observer.propertyChange(this, "role", sOldRole, this.getRole());
|
|
145
|
-
}
|
|
146
|
-
resolve(this);
|
|
147
|
-
} else {
|
|
148
|
-
this.toVizChartItem().then(function(oItem) {
|
|
149
|
-
this._oVizItem = oItem;
|
|
150
|
-
oChart.addDimension(this._oVizItem, true);
|
|
151
|
-
if (this._observer) {
|
|
152
|
-
this._observer.propertyChange(this, "role", null, this.getRole());
|
|
153
|
-
}
|
|
154
|
-
resolve(this);
|
|
155
|
-
}.bind(this));
|
|
156
|
-
}
|
|
157
|
-
}.bind(this));
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Returns a promise that resolves to a Vizchart Item with given metadata
|
|
162
|
-
*
|
|
163
|
-
* @param mMetadata given metadata for the item
|
|
164
|
-
* @returns {sap.ui.base.SyncPromise} resolves to Vizchart Item
|
|
165
|
-
*
|
|
166
|
-
* @experimental
|
|
167
|
-
* @private
|
|
168
|
-
* @ui5-restricted sap.ui.mdc
|
|
169
|
-
*/
|
|
170
|
-
DimensionItem.prototype.toVizChartItem = function(mMetadata) {
|
|
171
|
-
if (!this._pToVizItem) {
|
|
172
|
-
this._pToVizItem = new SyncPromise(function(resolve) {
|
|
173
|
-
mMetadata = mMetadata || {};
|
|
174
|
-
var DimInstanceClass, sDimInstanceClass, oVizItem;
|
|
175
|
-
if (this._isHierarchyDimension()) {
|
|
176
|
-
DimInstanceClass = HierachyDimensionClass;
|
|
177
|
-
sDimInstanceClass = "sap/chart/data/HierarchyDimension";
|
|
178
|
-
} else if (this._isTimeDimension()) {
|
|
179
|
-
DimInstanceClass = TimeDimensionClass;
|
|
180
|
-
sDimInstanceClass = "sap/chart/data/TimeDimension";
|
|
181
|
-
} else {
|
|
182
|
-
DimInstanceClass = DimensionClass;
|
|
183
|
-
sDimInstanceClass = "sap/chart/data/Dimension";
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
if (DimInstanceClass) {
|
|
187
|
-
oVizItem = new DimInstanceClass(this.getSettings(mMetadata));
|
|
188
|
-
resolve(oVizItem);
|
|
189
|
-
} else {
|
|
190
|
-
sap.ui.require([
|
|
191
|
-
sDimInstanceClass
|
|
192
|
-
], function(DimensionClassLoaded) {
|
|
193
|
-
DimInstanceClass = DimensionClassLoaded;
|
|
194
|
-
oVizItem = new DimInstanceClass(this.getSettings(mMetadata));
|
|
195
|
-
resolve(oVizItem);
|
|
196
|
-
}.bind(this));
|
|
197
|
-
}
|
|
198
|
-
}.bind(this));
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
return this._pToVizItem;
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Role of the inner chart item, see @sap.ui.mdc.ChartItemRoleType
|
|
206
|
-
* @param vRole The role of the inner chart item
|
|
207
|
-
* @returns {this} reference to <code>this</code> for method chaining
|
|
208
|
-
*
|
|
209
|
-
* @experimental
|
|
210
|
-
* @private
|
|
211
|
-
* @ui5-restricted sap.ui.mdc
|
|
212
|
-
*/
|
|
213
|
-
DimensionItem.prototype.setRole = function(vRole) {
|
|
214
|
-
if (!_SUPPORTED_ROLE[vRole]) {
|
|
215
|
-
throw new TypeError("Invalide Measure role: " + vRole);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
this.setProperty("role", vRole, true);
|
|
219
|
-
|
|
220
|
-
var oChart = this.getParent();
|
|
221
|
-
//now changing the role may affect a change of the type
|
|
222
|
-
|
|
223
|
-
if (oChart) {
|
|
224
|
-
oChart.oChartPromise.then(function(oVizChart) {
|
|
225
|
-
this.toChart(oVizChart);
|
|
226
|
-
}.bind(this));
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
return this;
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
*
|
|
234
|
-
* @return {string} The type of the inner charts item which can be 'Dimension' or 'Measure'
|
|
235
|
-
*
|
|
236
|
-
* @experimental
|
|
237
|
-
* @private
|
|
238
|
-
* @ui5-restricted sap.ui.mdc
|
|
239
|
-
*/
|
|
240
|
-
DimensionItem.prototype.getVizItemType = function() {
|
|
241
|
-
return MDCLib.ChartItemType.Dimension;
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
*
|
|
246
|
-
* @return {boolean} <code>true</code> if the item is a hierarchy dimension
|
|
247
|
-
*
|
|
248
|
-
* @experimental
|
|
249
|
-
* @private
|
|
250
|
-
* @ui5-restricted sap.ui.mdc
|
|
251
|
-
*/
|
|
252
|
-
DimensionItem.prototype._isHierarchyDimension = function() {
|
|
253
|
-
return false;
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
*
|
|
258
|
-
* @return {boolean} <code>true</code> if the item is a time dimension
|
|
259
|
-
*
|
|
260
|
-
* @experimental
|
|
261
|
-
* @private
|
|
262
|
-
* @ui5-restricted sap.ui.mdc
|
|
263
|
-
*/
|
|
264
|
-
DimensionItem.prototype._isTimeDimension = function() {
|
|
265
|
-
if (this.getVizItemType() == "Measure") {
|
|
266
|
-
return false;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
switch (this.getType()) {
|
|
270
|
-
case "date":
|
|
271
|
-
case "time":
|
|
272
|
-
case "datetime":
|
|
273
|
-
return true;
|
|
274
|
-
default:
|
|
275
|
-
return false;
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
return DimensionItem;
|
|
280
|
-
|
|
281
|
-
}, true);
|
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* !OpenUI5
|
|
3
|
-
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
-
*/
|
|
6
|
-
sap.ui.define([
|
|
7
|
-
"./Item", 'sap/ui/base/SyncPromise', "sap/ui/mdc/library"
|
|
8
|
-
], function(Item, SyncPromise, MDCLib) {
|
|
9
|
-
"use strict";
|
|
10
|
-
|
|
11
|
-
var MeasureClass;
|
|
12
|
-
var _SUPPORTED_ROLE = {axis1:true,axis2:true,axis3:true};
|
|
13
|
-
|
|
14
|
-
// Provides the Item class.
|
|
15
|
-
/**
|
|
16
|
-
* Constructor for a new measure Item.
|
|
17
|
-
*
|
|
18
|
-
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
19
|
-
* @param {object} [mSettings] initial settings for the new control
|
|
20
|
-
* @class The Item for the field/property metadata used within MDC controls, an instance can be created to override the default/metadata
|
|
21
|
-
* behavior.
|
|
22
|
-
* <h3><b>Note:</b></h3>
|
|
23
|
-
* The control is experimental and the API/behaviour is not finalised and hence this should not be used for productive usage.
|
|
24
|
-
* @extends sap.ui.mdc.chart.Item
|
|
25
|
-
* @author SAP SE
|
|
26
|
-
* @private
|
|
27
|
-
* @experimental As of version 1.61
|
|
28
|
-
* @ui5-restricted sap.ui.mdc
|
|
29
|
-
* @since 1.61
|
|
30
|
-
* @alias sap.ui.mdc.chart.MeasureItem
|
|
31
|
-
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
32
|
-
*/
|
|
33
|
-
var MeasureItem = Item.extend("sap.ui.mdc.chart.MeasureItem", /** @lends sap.ui.mdc.chart.MeasureItem.prototype */
|
|
34
|
-
{
|
|
35
|
-
metadata: {
|
|
36
|
-
"abstract": true,
|
|
37
|
-
library: "sap.ui.mdc",
|
|
38
|
-
properties: {
|
|
39
|
-
/**
|
|
40
|
-
* The property path of the chart item which may differ from the corresponsing property
|
|
41
|
-
*/
|
|
42
|
-
propertyPath: {
|
|
43
|
-
type: "string"
|
|
44
|
-
},
|
|
45
|
-
/**
|
|
46
|
-
* How values of Measure will be rendered in the chart. Possible role values are {@link sap.chart.data.MeasureRoleType axis1}, {@link sap.chart.data.MeasureRoleType axis2}, {@link sap.chart.data.MeasureRoleType axis3}, and {@link sap.chart.data.MeasureRoleType axis4}.
|
|
47
|
-
* The default is {@link sap.chart.data.MeasureRoleType axis1}.
|
|
48
|
-
* They correspond to the well-known concepts of axis identifiers in the Cartesian coordinate system, e.g. a Y-axis in a bar/column/line chart, an X- and a Y-axis in a scatter chart, or two Y-axes in bar charts, and an optional third axis for the weight/size/intensity/temperature of a data point.
|
|
49
|
-
*
|
|
50
|
-
* You can create a new measure as follow:
|
|
51
|
-
* <pre>
|
|
52
|
-
* ...
|
|
53
|
-
* new sap.chart.data.Measure({name: "MEASURE1", role: sap.chart.data.MeasureRoleType.axis1})
|
|
54
|
-
* ...
|
|
55
|
-
* </pre>
|
|
56
|
-
*
|
|
57
|
-
* Detailed usage of measure role. Please refer to {@link sap.chart.data.MeasureRoleType MeasureRoleType}
|
|
58
|
-
*
|
|
59
|
-
* <b>NOTE:</b> Role definition would not work for Bullet Chart and users need to set semantics instead.
|
|
60
|
-
*/
|
|
61
|
-
role: {
|
|
62
|
-
type: "string",
|
|
63
|
-
defaultValue: "axis1"
|
|
64
|
-
},
|
|
65
|
-
/**
|
|
66
|
-
* The measures data point for coloring
|
|
67
|
-
*
|
|
68
|
-
* A data point is an object that defines relation between measures and criticality
|
|
69
|
-
* it is inspired by a @com.sap.vocabularies.UI.v1.DataPoint used in the odata protocol
|
|
70
|
-
*
|
|
71
|
-
* Its structure is:
|
|
72
|
-
* <ul>
|
|
73
|
-
* <li> targetValue: the target value (path to reference measure)</li>
|
|
74
|
-
* <li> foreCastValue: the forcast value (path to a projected measure) </li>
|
|
75
|
-
* <li> criticality: the criticality object</li>
|
|
76
|
-
* </ul>
|
|
77
|
-
* @since 1.64
|
|
78
|
-
*/
|
|
79
|
-
dataPoint: {
|
|
80
|
-
type: "object"
|
|
81
|
-
},
|
|
82
|
-
/**
|
|
83
|
-
* The aggregation method which depends on the data service.
|
|
84
|
-
*
|
|
85
|
-
* For OData based services this can be <code>min,max,sum,average</code>
|
|
86
|
-
*/
|
|
87
|
-
aggregationMethod: {
|
|
88
|
-
type: "string",
|
|
89
|
-
defaultValue: undefined
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
MeasureItem.prototype.getCriticality = function() {
|
|
96
|
-
var oDataPoint = this.getDataPoint();
|
|
97
|
-
|
|
98
|
-
return oDataPoint ? oDataPoint.criticality : null;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Set the data point for coloring.
|
|
103
|
-
*
|
|
104
|
-
* Note the 'dataPoint' property is final
|
|
105
|
-
* @param oValue
|
|
106
|
-
*
|
|
107
|
-
* @experimental
|
|
108
|
-
* @private
|
|
109
|
-
* @ui5-restricted sap.ui.mdc
|
|
110
|
-
*/
|
|
111
|
-
MeasureItem.prototype.setDataPoint = function(oValue) {
|
|
112
|
-
if (!this.isPropertyInitial("dataPoint")) {
|
|
113
|
-
throw new Error("Data point is readonly");
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return this.setProperty("dataPoint", oValue);
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Creates a vizChart Item with given settings
|
|
121
|
-
*
|
|
122
|
-
* @param {*} mSettings settings for the item
|
|
123
|
-
*
|
|
124
|
-
* @experimental
|
|
125
|
-
* @private
|
|
126
|
-
* @ui5-restricted sap.ui.mdc
|
|
127
|
-
*/
|
|
128
|
-
MeasureItem.createVizChartItem = function(mSettings) {
|
|
129
|
-
return new SyncPromise(function(resolve) {
|
|
130
|
-
var oVizItem;
|
|
131
|
-
if (MeasureClass) {
|
|
132
|
-
oVizItem = new MeasureClass(mSettings);
|
|
133
|
-
resolve(oVizItem);
|
|
134
|
-
} else {
|
|
135
|
-
sap.ui.require(["sap/chart/data/Measure"],
|
|
136
|
-
function (MeasureClassLoaded) {
|
|
137
|
-
MeasureClass = MeasureClassLoaded;
|
|
138
|
-
oVizItem = new MeasureClass(mSettings);
|
|
139
|
-
resolve(oVizItem);
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Translate mdc measure item settings to viz chart measure settings
|
|
147
|
-
*
|
|
148
|
-
* @param mMetadataSettings
|
|
149
|
-
* @return {{role: *, name: *, label: *}}
|
|
150
|
-
*
|
|
151
|
-
* @experimental
|
|
152
|
-
* @private
|
|
153
|
-
* @ui5-restricted sap.ui.mdc
|
|
154
|
-
*/
|
|
155
|
-
MeasureItem.getVizItemSettings = function(mMetadataSettings) {
|
|
156
|
-
var mSettings = {
|
|
157
|
-
label: mMetadataSettings.label,
|
|
158
|
-
role: mMetadataSettings.role || "axis1",
|
|
159
|
-
name: mMetadataSettings.key
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
var sAggregationMethod = mMetadataSettings.aggregationMethod;
|
|
163
|
-
if (sAggregationMethod) {
|
|
164
|
-
mSettings.analyticalInfo = {
|
|
165
|
-
"with": sAggregationMethod,
|
|
166
|
-
propertyPath: mMetadataSettings.propertyPath
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return mSettings;
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Retrieve the setting for translating the measure item to a viz chart measure
|
|
175
|
-
*
|
|
176
|
-
* @param mMetadataSettings
|
|
177
|
-
* @return {*}
|
|
178
|
-
*
|
|
179
|
-
* @experimental
|
|
180
|
-
* @private
|
|
181
|
-
* @ui5-restricted sap.ui.mdc
|
|
182
|
-
*/
|
|
183
|
-
MeasureItem.prototype.getSettings = function(mMetadataSettings) {
|
|
184
|
-
if (mMetadataSettings && mMetadataSettings.key == this.getKey()) {
|
|
185
|
-
mMetadataSettings.label = this.getLabel() || mMetadataSettings.label;
|
|
186
|
-
mMetadataSettings.role = this.getRole();
|
|
187
|
-
} else {
|
|
188
|
-
mMetadataSettings = {
|
|
189
|
-
key: this.getKey(),
|
|
190
|
-
label: this.getLabel(),
|
|
191
|
-
role: this.getRole(),
|
|
192
|
-
propertyPath: this.getPropertyPath(),
|
|
193
|
-
aggregationMethod: this.getAggregationMethod(),
|
|
194
|
-
dataPoint: this.getDataPoint()
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
return MeasureItem.getVizItemSettings(mMetadataSettings);
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Pushes updates on the item to the inner chart
|
|
203
|
-
*
|
|
204
|
-
* @param {object} oChart chart to push the update to
|
|
205
|
-
*
|
|
206
|
-
* @experimental
|
|
207
|
-
* @private
|
|
208
|
-
* @ui5-restricted sap.ui.mdc
|
|
209
|
-
*/
|
|
210
|
-
MeasureItem.prototype.toChart = function(oChart) {
|
|
211
|
-
return new SyncPromise(function(resolve) {
|
|
212
|
-
var oVizItem = oChart.getMeasureByName(this.getKey());
|
|
213
|
-
if (oVizItem) {
|
|
214
|
-
var sOldRole = oVizItem.getRole();
|
|
215
|
-
oVizItem.setRole(this.getRole());
|
|
216
|
-
if (this._observer) {
|
|
217
|
-
this._observer.propertyChange(this, "role", sOldRole, this.getRole());
|
|
218
|
-
}
|
|
219
|
-
} else {
|
|
220
|
-
this.toVizChartItem().then(function (oItem) {
|
|
221
|
-
oChart.addMeasure(oItem, true);
|
|
222
|
-
if (this._observer) {
|
|
223
|
-
this._observer.propertyChange(this, "role", null, this.getRole());
|
|
224
|
-
}
|
|
225
|
-
}.bind(this));
|
|
226
|
-
}
|
|
227
|
-
}.bind(this));
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Returns a promise that resolves to a Vizchart Item with given metadata
|
|
232
|
-
*
|
|
233
|
-
* @param mMetadata given metadata for the item
|
|
234
|
-
* @returns {sap.ui.base.SyncPromise} resolves to Vizchart Item
|
|
235
|
-
*
|
|
236
|
-
* @experimental
|
|
237
|
-
* @private
|
|
238
|
-
* @ui5-restricted sap.ui.mdc
|
|
239
|
-
*/
|
|
240
|
-
MeasureItem.prototype.toVizChartItem = function(mMetadata) {
|
|
241
|
-
if (!this._pToVizItem) {
|
|
242
|
-
this._pToVizItem = new SyncPromise(function (resolve) {
|
|
243
|
-
mMetadata = mMetadata || {};
|
|
244
|
-
MeasureItem.createVizChartItem(this.getSettings(mMetadata)).then(function(oVizItem) {
|
|
245
|
-
resolve(oVizItem);
|
|
246
|
-
});
|
|
247
|
-
}.bind(this));
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
return this._pToVizItem;
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Role of the inner chart item, see @sap.ui.mdc.ChartItemRoleType
|
|
256
|
-
* @param vRole The role of the inner chart item
|
|
257
|
-
* @return {this} reference to the <code>MeasureItem</code> for method chaining
|
|
258
|
-
*
|
|
259
|
-
* @experimental
|
|
260
|
-
* @private
|
|
261
|
-
* @ui5-restricted sap.ui.mdc
|
|
262
|
-
*/
|
|
263
|
-
MeasureItem.prototype.setRole = function(vRole) {
|
|
264
|
-
if (!_SUPPORTED_ROLE[vRole]) {
|
|
265
|
-
throw new TypeError("Invalide Measure role: " + vRole);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
this.setProperty("role", vRole, true);
|
|
269
|
-
|
|
270
|
-
var oChart = this.getParent();
|
|
271
|
-
//now changing the role may affect a change of the type
|
|
272
|
-
|
|
273
|
-
if (oChart) {
|
|
274
|
-
oChart.oChartPromise.then(function(oVizChart) {
|
|
275
|
-
this.toChart(oVizChart);
|
|
276
|
-
}.bind(this));
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return this;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Gets the type of the item (dimension or measure)
|
|
284
|
-
*
|
|
285
|
-
* @return {string} The type of the inner charts item which can be 'Dimension' or 'Measure'
|
|
286
|
-
*
|
|
287
|
-
* @experimental
|
|
288
|
-
* @private
|
|
289
|
-
* @ui5-restricted sap.ui.mdc
|
|
290
|
-
*/
|
|
291
|
-
MeasureItem.prototype.getVizItemType = function() {
|
|
292
|
-
return MDCLib.ChartItemType.Measure;
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Retrieve the additional measures from coloring for initially equiping the chart
|
|
297
|
-
* @param mItems
|
|
298
|
-
* @return {Array}
|
|
299
|
-
*
|
|
300
|
-
* @experimental
|
|
301
|
-
* @private
|
|
302
|
-
* @ui5-restricted sap.ui.mdc
|
|
303
|
-
*/
|
|
304
|
-
MeasureItem.prototype.getAdditionalColoringMeasures = function() {
|
|
305
|
-
var aAdditional = [];
|
|
306
|
-
|
|
307
|
-
var oCriticality = this.getCriticality();
|
|
308
|
-
|
|
309
|
-
if (oCriticality && oCriticality.DynamicThresholds) {
|
|
310
|
-
aAdditional = oCriticality.DynamicThresholds.usedMeasures;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
return aAdditional;
|
|
314
|
-
};
|
|
315
|
-
|
|
316
|
-
return MeasureItem;
|
|
317
|
-
|
|
318
|
-
}, true);
|