@openui5/sap.ui.mdc 1.97.1 → 1.99.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +25 -30
- package/THIRDPARTY.txt +14 -21
- 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 +1100 -1796
- package/src/sap/ui/mdc/ChartDelegate.js +429 -270
- package/src/sap/ui/mdc/ChartRenderer.js +73 -77
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +2 -2
- package/src/sap/ui/mdc/FilterBar.js +3 -2
- package/src/sap/ui/mdc/FilterField.js +11 -8
- package/src/sap/ui/mdc/Link.js +23 -4
- package/src/sap/ui/mdc/LinkDelegate.js +3 -3
- package/src/sap/ui/mdc/MultiValueField.js +20 -6
- package/src/sap/ui/mdc/Table.js +79 -64
- package/src/sap/ui/mdc/TableDelegate.js +40 -12
- package/src/sap/ui/mdc/ValueHelp.js +19 -9
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
- package/src/sap/ui/mdc/{chartNew/ChartSelectionDetailsNew.js → chart/ChartSelectionDetails.js} +8 -8
- package/src/sap/ui/mdc/{chartNew/ChartToolbarNew.js → chart/ChartToolbar.js} +49 -13
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +55 -54
- package/src/sap/ui/mdc/{chartNew/DrillBreadcrumbsNew.js → chart/DrillBreadcrumbs.js} +3 -3
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +38 -249
- package/src/sap/ui/mdc/chart/Item.js +62 -92
- package/src/sap/ui/mdc/{chartNew/PropertyHelperNew.js → chart/PropertyHelper.js} +3 -3
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +17 -21
- package/src/sap/ui/mdc/condition/Condition.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +256 -43
- package/src/sap/ui/mdc/condition/Operator.js +1 -1
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +1 -1
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +80 -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/table/Table.designtime.js +60 -20
- 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 +3 -3
- package/src/sap/ui/mdc/field/ConditionsType.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +75 -27
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +4 -4
- package/src/sap/ui/mdc/field/FieldBase.js +32 -6
- 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 +23 -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 +2 -2
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +2 -2
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +6 -3
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +10 -2
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/OutParameter.js +1 -1
- package/src/sap/ui/mdc/field/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 +5 -5
- package/src/sap/ui/mdc/field/content/DateContent.js +2 -2
- 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 +335 -126
- package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +8 -2
- package/src/sap/ui/mdc/filterbar/vh/CollectiveSearchSelect.js +3 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +7 -1
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +6 -6
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +6 -4
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +4 -3
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/GroupFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +9 -3
- package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +110 -0
- package/src/sap/ui/mdc/flexibility/SortFlex.js +2 -2
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +6 -6
- package/src/sap/ui/mdc/library.js +45 -42
- 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 +55 -1
- 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 +19 -5
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +14 -9
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +2 -3
- package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +29 -483
- package/src/sap/ui/mdc/odata/v4/{ChartPropertyHelperNew.js → ChartPropertyHelper.js} +5 -5
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +112 -96
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/{ChartDelegateNew.js → ChartDelegate.js} +206 -116
- package/src/sap/ui/mdc/p13n/Engine.js +31 -13
- package/src/sap/ui/mdc/p13n/FlexUtil.js +11 -118
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +7 -7
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/StateUtil.js +20 -6
- package/src/sap/ui/mdc/p13n/UIManager.js +5 -7
- package/src/sap/ui/mdc/p13n/modification/FlexModificationHandler.js +4 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +9 -6
- package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1092 -48
- package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +72 -0
- package/src/sap/ui/mdc/p13n/panels/ListView.js +6 -2
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +6 -5
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +156 -11
- package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +15 -26
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +6 -5
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +14 -7
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +173 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +10 -17
- package/src/sap/ui/mdc/table/Column.js +12 -12
- package/src/sap/ui/mdc/table/CreationRow.js +11 -11
- package/src/sap/ui/mdc/table/GridTableType.js +5 -6
- package/src/sap/ui/mdc/table/PropertyHelper.js +44 -7
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +8 -10
- package/src/sap/ui/mdc/table/RowSettings.js +4 -4
- package/src/sap/ui/mdc/table/TableTypeBase.js +2 -2
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/themes/base/FieldBase.less +0 -5
- package/src/sap/ui/mdc/themes/base/TokenDisplay.less +89 -0
- package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +15 -4
- package/src/sap/ui/mdc/themes/base/library.source.less +2 -0
- package/src/sap/ui/mdc/ui/Container.js +2 -2
- package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
- package/src/sap/ui/mdc/util/Common.js +1 -1
- package/src/sap/ui/mdc/util/DateUtil.js +1 -1
- package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
- package/src/sap/ui/mdc/util/FormatUtil.js +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 +43 -12
- package/src/sap/ui/mdc/util/TypeUtil.js +5 -4
- package/src/sap/ui/mdc/valuehelp/Dialog.js +11 -8
- package/src/sap/ui/mdc/valuehelp/Popover.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/Container.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +2 -1
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +2 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +4 -2
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +11 -5
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +43 -8
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +43 -24
- 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 +289 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +7 -7
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +9 -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 +261 -138
- 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/link/SelectionDialog.control.xml +0 -66
- package/src/sap/ui/mdc/link/SelectionDialog.js +0 -213
- package/src/sap/ui/mdc/link/SelectionDialogItem.js +0 -86
- package/src/sap/ui/mdc/odata/v4/ChartDelegateNew.js +0 -35
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +0 -1179
|
@@ -1,31 +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(["sap/ui/mdc/Delegate"], function(BaseDelegate) {
|
|
7
|
-
"use strict";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @experimental
|
|
11
|
-
* @private
|
|
12
|
-
* @since 1.61
|
|
13
|
-
* @alias sap.ui.mdc.chart.Delegate
|
|
14
|
-
*/
|
|
15
|
-
var Delegate = BaseDelegate.extend("sap.ui.mdc.chart.Delegate", {
|
|
16
|
-
retrieveAllMetadata: function() {
|
|
17
|
-
return {};
|
|
18
|
-
},
|
|
19
|
-
retrieveAggregationItem: function (sAggregationName, sPropertyKey) {
|
|
20
|
-
return null;
|
|
21
|
-
},
|
|
22
|
-
preConfiguration: function(oNode, oVisitor) {
|
|
23
|
-
return oNode;
|
|
24
|
-
},
|
|
25
|
-
getNavigationTargets: function(oField) {
|
|
26
|
-
return [];
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
return Delegate;
|
|
31
|
-
});
|
|
@@ -1,127 +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(["sap/m/SelectionDetails", "sap/m/SelectionDetailsItem", "sap/m/SelectionDetailsItemLine", "./SelectionDetailsActions"], function(SelectionDetails, SelectionDetailsItem, SelectionDetailsItemLine, SelectionDetailsActions) {
|
|
7
|
-
"use strict";
|
|
8
|
-
|
|
9
|
-
var SelectionHandler = function() {
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
SelectionHandler.prepareChart = function(oChart) {
|
|
14
|
-
//guarantee that there are selection details
|
|
15
|
-
if (!oChart.getSelectionDetailsActions()) {
|
|
16
|
-
oChart.setSelectionDetailsActions(new SelectionDetailsActions());
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
var oSelectionDetails = new SelectionDetails(oChart.getId() + "-selectionDetails", {
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
oSelectionDetails.registerSelectionDetailsItemFactory([
|
|
23
|
-
|
|
24
|
-
], function(aDisplayData, aData, oContext, oData) {
|
|
25
|
-
var aLines = [];
|
|
26
|
-
|
|
27
|
-
for (var i = 0; i < aDisplayData.length; i++) {
|
|
28
|
-
aLines.push(new SelectionDetailsItemLine({
|
|
29
|
-
label: aDisplayData[i].label,
|
|
30
|
-
value: SelectionHandler.formatValue(aDisplayData[i].value),
|
|
31
|
-
unit: aDisplayData[i].unit
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
return new SelectionDetailsItem({
|
|
35
|
-
enableNav: SelectionHandler.hasNavigationTargets(oChart, aData),
|
|
36
|
-
lines: aLines
|
|
37
|
-
}).setBindingContext(oContext);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
// Attach to navigation event of selectionDetails
|
|
41
|
-
// for semantic object navigation
|
|
42
|
-
oSelectionDetails.attachNavigate(function(oEvent) {
|
|
43
|
-
// Destroy content on navBack of selectionDetails
|
|
44
|
-
// This either is the semanticNavContainer or the semanticNavItemList
|
|
45
|
-
if (oEvent.getParameter("direction") === "back") {
|
|
46
|
-
oEvent.getParameter("content").destroy();
|
|
47
|
-
} else {
|
|
48
|
-
// Forward navigation to semantic objects
|
|
49
|
-
oChart._navigateToSemanticObjectDetails(oEvent);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
oSelectionDetails.attachActionPress(function(oEvent) {
|
|
55
|
-
// extract binding information of each item
|
|
56
|
-
var aItemContexts = [];
|
|
57
|
-
oEvent.getParameter("items").forEach(function(oItem) {
|
|
58
|
-
aItemContexts.push(oItem.getBindingContext());
|
|
59
|
-
});
|
|
60
|
-
// Re-arrange event object and navigate to outer press handler
|
|
61
|
-
oChart.fireSelectionDetailsActionPressed({
|
|
62
|
-
id: oEvent.getParameter("id"),
|
|
63
|
-
action: oEvent.getParameter("action"),
|
|
64
|
-
itemContexts: aItemContexts,
|
|
65
|
-
level: oEvent.getParameter("level")
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// Update of selectionDetails action aggregations
|
|
70
|
-
oSelectionDetails.attachBeforeOpen(function(oEvent) {
|
|
71
|
-
var oSelectionDetailsActions = oChart.getSelectionDetailsActions(), oClone;
|
|
72
|
-
// Update item actions
|
|
73
|
-
var aSelectionItems = oSelectionDetails.getItems();
|
|
74
|
-
|
|
75
|
-
aSelectionItems.forEach(function(oItem) {
|
|
76
|
-
var aItemActions = oSelectionDetailsActions.getDetailsItemActions();
|
|
77
|
-
aItemActions.forEach(function(oAction) {
|
|
78
|
-
oClone = oAction.clone();
|
|
79
|
-
oItem.addAction(oClone);
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
// Update list actions
|
|
84
|
-
var aDetailsActions = oSelectionDetailsActions.getDetailsActions();
|
|
85
|
-
oSelectionDetails.removeAllActions();
|
|
86
|
-
aDetailsActions.forEach(function(oAction) {
|
|
87
|
-
oClone = oAction.clone();
|
|
88
|
-
oSelectionDetails.addAction(oClone);
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
// Update group actions
|
|
92
|
-
var aActionGroups = oSelectionDetailsActions.getActionGroups();
|
|
93
|
-
oSelectionDetails.removeAllActionGroups();
|
|
94
|
-
aActionGroups.forEach(function(oActionGroup) {
|
|
95
|
-
oClone = oActionGroup.clone();
|
|
96
|
-
oSelectionDetails.addActionGroup(oClone);
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
oSelectionDetails.attachSelectionHandler("_selectionDetails", oChart.getAggregation("_chart"));
|
|
102
|
-
|
|
103
|
-
oSelectionDetails.attachBeforeClose(function(oEvent) {
|
|
104
|
-
// Needs to be destroyed to re-navigate later.
|
|
105
|
-
//TBI
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
// Add to MDC charts toolbar
|
|
109
|
-
var oToolbar = oChart.getAggregation("_toolbar");
|
|
110
|
-
oToolbar.insertEnd(oSelectionDetails,0);
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
SelectionHandler.formatValue = function(oValue) {
|
|
114
|
-
if (oValue) {
|
|
115
|
-
return oValue instanceof Object ? oValue : oValue.toString();
|
|
116
|
-
} else {
|
|
117
|
-
return oValue;
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
SelectionHandler.hasNavigationTargets = function(oChart, aData) {
|
|
122
|
-
return false;
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
return SelectionHandler;
|
|
126
|
-
|
|
127
|
-
}, /* bExport= */true);
|
|
@@ -1,328 +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([
|
|
8
|
-
"sap/ui/core/Element",
|
|
9
|
-
"sap/ui/mdc/library",
|
|
10
|
-
"../ActionToolbar",
|
|
11
|
-
"sap/m/Title",
|
|
12
|
-
"sap/m/OverflowToolbarButton",
|
|
13
|
-
"sap/m/OverflowToolbarToggleButton",
|
|
14
|
-
"sap/ui/mdc/chart/ChartTypeButton",
|
|
15
|
-
"sap/ui/mdc/chart/ChartSettings",
|
|
16
|
-
"sap/ui/core/library",
|
|
17
|
-
"sap/ui/Device",
|
|
18
|
-
"sap/ui/core/ShortcutHintsMixin",
|
|
19
|
-
"sap/ui/mdc/actiontoolbar/ActionToolbarAction"
|
|
20
|
-
], function(
|
|
21
|
-
Element,
|
|
22
|
-
MDCLib,
|
|
23
|
-
ActionToolbar,
|
|
24
|
-
Title,
|
|
25
|
-
OverflowButton,
|
|
26
|
-
OverflowToggleButton,
|
|
27
|
-
ChartTypeButton,
|
|
28
|
-
ChartSettings,
|
|
29
|
-
CoreLibrary,
|
|
30
|
-
Device,
|
|
31
|
-
ShortcutHintsMixin,
|
|
32
|
-
ActionToolbarAction
|
|
33
|
-
) {
|
|
34
|
-
"use strict";
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
/**
|
|
38
|
-
* Constructor for a new ToolbarHandler.
|
|
39
|
-
*
|
|
40
|
-
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
41
|
-
* @param {object} [mSettings] initial settings for the new control
|
|
42
|
-
* @class The ToolbarHandler control creates a sap.m.OverflowToolbar based on metadata and the configuration specified.
|
|
43
|
-
* @extends sap.m.OverflowToolbar
|
|
44
|
-
* @author SAP SE
|
|
45
|
-
* @version 1.97.1
|
|
46
|
-
* @constructor
|
|
47
|
-
* @experimental As of version ...
|
|
48
|
-
* @private
|
|
49
|
-
* @since 1.88
|
|
50
|
-
* @alias sap.ui.mdc.chart.ToolbarHandler
|
|
51
|
-
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
52
|
-
*/
|
|
53
|
-
var ToolbarHandler = Element.extend("sap.ui.mdc.ToolbarHandler", {});
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var MDCRb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
|
|
57
|
-
var HasPopup = CoreLibrary.aria.HasPopup;
|
|
58
|
-
/**
|
|
59
|
-
*
|
|
60
|
-
* Creates a new toolbar for the mdc.Chart based on actions
|
|
61
|
-
*/
|
|
62
|
-
ToolbarHandler.prototype.createToolbar = function(oChart, aUserActions, bInitNotBound) {
|
|
63
|
-
aUserActions = aUserActions || [];
|
|
64
|
-
|
|
65
|
-
if (!oChart.getAggregation("_toolbar")) {
|
|
66
|
-
var oToolbar = new ActionToolbar(oChart.getId() + "--toolbar", {
|
|
67
|
-
design: "Transparent",
|
|
68
|
-
begin: [
|
|
69
|
-
new Title(oChart.getId() + "-title", {
|
|
70
|
-
text: oChart.getHeader()
|
|
71
|
-
})
|
|
72
|
-
]
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
oChart.setAggregation("_toolbar", oToolbar);
|
|
76
|
-
|
|
77
|
-
this.initializeToolbarNotBound(oChart);
|
|
78
|
-
this.addActions(oToolbar, aUserActions); //Add actions after chart content for correct sorting
|
|
79
|
-
if (!bInitNotBound){
|
|
80
|
-
this.updateToolbar(oChart);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
ToolbarHandler.prototype.addActions = function(oToolbar, aActions) {
|
|
86
|
-
aActions.forEach(function(action) {
|
|
87
|
-
oToolbar.addAction(action);
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
ToolbarHandler.prototype.initializeToolbarNotBound = function(oChart) {
|
|
92
|
-
var oToolbar = oChart.getAggregation("_toolbar");
|
|
93
|
-
|
|
94
|
-
if (!oToolbar) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.ZoomInOut)) {
|
|
99
|
-
|
|
100
|
-
this._oZoomInButton = new OverflowButton({
|
|
101
|
-
tooltip: MDCRb.getText("chart.TOOLBAR_ZOOM_IN"),
|
|
102
|
-
icon: "sap-icon://zoom-in",
|
|
103
|
-
enabled: "{= ${$mdcChart>/_chart/getZoomInfo/enabled} && ${$mdcChart>/_chart/getZoomInfo/currentZoomLevel} < 1}"
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
this._oZoomOutButton = new OverflowButton({
|
|
107
|
-
tooltip: MDCRb.getText("chart.TOOLBAR_ZOOM_OUT"),
|
|
108
|
-
icon: "sap-icon://zoom-out",
|
|
109
|
-
enabled: "{= ${$mdcChart>/_chart/getZoomInfo/enabled} && ${$mdcChart>/_chart/getZoomInfo/currentZoomLevel} > 0}"
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
oToolbar.addEnd(this._oZoomInButton);
|
|
113
|
-
oToolbar.addEnd(this._oZoomOutButton);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.DrillDownUp) < 0) {
|
|
118
|
-
oChart._oDrillDownBtn = new OverflowButton(oChart.getId() + "-drillDown", {
|
|
119
|
-
icon: "sap-icon://drill-down",
|
|
120
|
-
enabled: false,
|
|
121
|
-
tooltip: MDCRb.getText("chart.CHART_DRILLDOWN_TITLE"),
|
|
122
|
-
text: MDCRb.getText("chart.CHART_DRILLDOWN_TITLE"),
|
|
123
|
-
press: [
|
|
124
|
-
oChart._showDrillDown, oChart
|
|
125
|
-
]
|
|
126
|
-
});
|
|
127
|
-
oToolbar.addEnd(oChart._oDrillDownBtn);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.Legend) < 0) {
|
|
131
|
-
this._legendBtn = new OverflowToggleButton(oChart.getId() + "-chart_legend", {
|
|
132
|
-
type: "Transparent",
|
|
133
|
-
text: MDCRb.getText("chart.LEGENDBTN_TEXT"),
|
|
134
|
-
tooltip: MDCRb.getText('chart.LEGENDBTN_TOOLTIP'),
|
|
135
|
-
icon: "sap-icon://legend",
|
|
136
|
-
enabled: false,
|
|
137
|
-
pressed: false
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
oToolbar.addEnd(this._legendBtn);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
//Check p13n mode property on the chart and enable only desired buttons
|
|
144
|
-
var aP13nMode = oChart.getP13nMode() || [];
|
|
145
|
-
|
|
146
|
-
if (aP13nMode.indexOf("Item") > -1) {
|
|
147
|
-
this._chartSettingsBtn = new OverflowButton(oChart.getId() + "-chart_settings", {
|
|
148
|
-
tooltip: MDCRb.getText('chart.PERSONALIZATION_DIALOG_TITLE'),
|
|
149
|
-
text: MDCRb.getText('chart.PERSONALIZATION_DIALOG_TITLE'),
|
|
150
|
-
icon: "sap-icon://action-settings",//TODO the right icon for P13n chart dialog
|
|
151
|
-
ariaHasPopup: HasPopup.ListBox,
|
|
152
|
-
enabled: false
|
|
153
|
-
});
|
|
154
|
-
oToolbar.addEnd(this._chartSettingsBtn);
|
|
155
|
-
|
|
156
|
-
ShortcutHintsMixin.addConfig(this._chartSettingsBtn, {
|
|
157
|
-
addAccessibilityLabel: true,
|
|
158
|
-
messageBundleKey: Device.os.macintosh ? "mdc.PERSONALIZATION_SHORTCUT_MAC" : "mdc.PERSONALIZATION_SHORTCUT" // Cmd+, or Ctrl+,
|
|
159
|
-
},
|
|
160
|
-
oChart // we need the chart instance, otherwise the messageBundleKey does not find the resource bundle
|
|
161
|
-
);
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (aP13nMode.indexOf("Sort") > -1) {
|
|
166
|
-
this._sortBtn = new OverflowButton(oChart.getId() + "-sort_settings", {
|
|
167
|
-
ariaHasPopup: HasPopup.ListBox,
|
|
168
|
-
icon: "sap-icon://sort",
|
|
169
|
-
tooltip: MDCRb.getText('sort.PERSONALIZATION_DIALOG_TITLE'),
|
|
170
|
-
text: MDCRb.getText('sort.PERSONALIZATION_DIALOG_TITLE'),
|
|
171
|
-
enabled: false
|
|
172
|
-
});
|
|
173
|
-
oToolbar.addEnd(this._sortBtn);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
if (aP13nMode.indexOf("Type") > -1) {
|
|
177
|
-
this._chartTypeBtn = new ChartTypeButton(oChart);
|
|
178
|
-
oToolbar.addEnd(this._chartTypeBtn);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
oToolbar.setEnabled(false);
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
*
|
|
186
|
-
* Updates the mdc.Chart toolbar content
|
|
187
|
-
*/
|
|
188
|
-
ToolbarHandler.prototype.updateToolbar = function(oChart) {
|
|
189
|
-
var oToolbar = oChart.getAggregation("_toolbar");
|
|
190
|
-
|
|
191
|
-
if (!oToolbar) {
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
//oToolbar.destroyEnd(true);
|
|
196
|
-
|
|
197
|
-
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.ZoomInOut)) {
|
|
198
|
-
var oInnerChart = oChart.getAggregation("_chart");
|
|
199
|
-
|
|
200
|
-
this._oZoomInButton.setTooltip(MDCRb.getText("chart.TOOLBAR_ZOOM_IN"));
|
|
201
|
-
this._oZoomInButton.setText(MDCRb.getText("chart.TOOLBAR_ZOOM_IN"));
|
|
202
|
-
this._oZoomInButton.attachPress(function onZoomInButtonPressed(oControlEvent) {
|
|
203
|
-
this.handleZoomIn(oInnerChart, this._oZoomInButton, this._oZoomOutButton);
|
|
204
|
-
}.bind(this));
|
|
205
|
-
|
|
206
|
-
this._oZoomOutButton.setTooltip(MDCRb.getText("chart.TOOLBAR_ZOOM_OUT"));
|
|
207
|
-
this._oZoomOutButton.setText(MDCRb.getText("chart.TOOLBAR_ZOOM_OUT"));
|
|
208
|
-
this._oZoomOutButton.attachPress(function onZoomInButtonPressed(oControlEvent) {
|
|
209
|
-
this.handleZoomOut(oInnerChart, this._oZoomInButton, this._oZoomOutButton);
|
|
210
|
-
}.bind(this));
|
|
211
|
-
|
|
212
|
-
if (oInnerChart) {
|
|
213
|
-
oInnerChart.attachRenderComplete(function onInnerChartRenderCompleted(oControlEvent) {
|
|
214
|
-
var oZoomInfo = oInnerChart.getZoomInfo();
|
|
215
|
-
this.handleInnerChartRenderCompleted(oZoomInfo, this._oZoomInButton, this._oZoomOutButton);
|
|
216
|
-
}, this);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.DrillDownUp) < 0) {
|
|
222
|
-
|
|
223
|
-
oChart._oDrillDownBtn.setEnabled(true);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
if (!oChart.getIgnoreToolbarActions().length || oChart.getIgnoreToolbarActions().indexOf(MDCLib.ChartToolbarActionType.Legend) < 0) {
|
|
227
|
-
this._legendBtn.setEnabled(true);
|
|
228
|
-
this._legendBtn.setPressed(oChart.getLegendVisible());
|
|
229
|
-
this._legendBtn.attachPress(function(){
|
|
230
|
-
oChart.setLegendVisible(!oChart.getLegendVisible());
|
|
231
|
-
this._legendBtn.setPressed(oChart.getLegendVisible());
|
|
232
|
-
}.bind(this));
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
//Check p13n mode property on the chart and enable only desired buttons
|
|
236
|
-
var aP13nMode = oChart.getP13nMode() || [];
|
|
237
|
-
|
|
238
|
-
if (aP13nMode.indexOf("Item") > -1) {
|
|
239
|
-
|
|
240
|
-
this._chartSettingsBtn.setEnabled(true);
|
|
241
|
-
this._chartSettingsBtn.attachPress(function(oEvent) {
|
|
242
|
-
var oSource = oEvent.getSource();
|
|
243
|
-
oChart._getPropertyData().then(function(aProperties) {
|
|
244
|
-
ChartSettings.showPanel(oChart, "Chart", oSource, aProperties);
|
|
245
|
-
});
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (aP13nMode.indexOf("Sort") > -1) {
|
|
250
|
-
this._sortBtn.setEnabled(true);
|
|
251
|
-
this._sortBtn.attachPress(function(oEvent) {
|
|
252
|
-
var oSource = oEvent.getSource();
|
|
253
|
-
oChart._getPropertyData().then(function(aProperties) {
|
|
254
|
-
ChartSettings.showPanel(oChart, "Sort", oSource, aProperties);
|
|
255
|
-
});
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
if (aP13nMode.indexOf("Type") > -1) {
|
|
260
|
-
this._chartTypeBtn.bindToInnerChart(oChart);
|
|
261
|
-
//oToolbar.addEnd(new ChartTypeButton(oChart));
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
oToolbar.setEnabled(true);
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
ToolbarHandler.prototype.handleInnerChartRenderCompleted = function(oZoomInfo, oZoomInButton, oZoomOutButton) {
|
|
269
|
-
this.toggleZoomButtonsEnabledState(oZoomInfo, oZoomInButton, oZoomOutButton);
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
ToolbarHandler.prototype.handleZoomIn = function(oInnerChart, oZoomInButton, oZoomOutButton) {
|
|
273
|
-
oInnerChart.zoom({ direction: "in" });
|
|
274
|
-
var oZoomInfo = oInnerChart.getZoomInfo();
|
|
275
|
-
this.toggleZoomButtonsEnabledState(oZoomInfo, oZoomInButton, oZoomOutButton);
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
ToolbarHandler.prototype.handleZoomOut = function(oInnerChart, oZoomInButton, oZoomOutButton) {
|
|
279
|
-
oInnerChart.zoom({ direction: "out" });
|
|
280
|
-
var oZoomInfo = oInnerChart.getZoomInfo();
|
|
281
|
-
this.toggleZoomButtonsEnabledState(oZoomInfo, oZoomInButton, oZoomOutButton);
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
ToolbarHandler.prototype.toggleZoomButtonsEnabledState = function(oZoomInfo, oZoomInButton, oZoomOutButton) {
|
|
285
|
-
var vZoomLevel = oZoomInfo.currentZoomLevel;
|
|
286
|
-
|
|
287
|
-
// zooming isn't applicable, perhaps all data points are plotted
|
|
288
|
-
if (vZoomLevel == null) { // zoom level is null or undefined
|
|
289
|
-
oZoomInButton.setEnabled(false);
|
|
290
|
-
oZoomOutButton.setEnabled(false);
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
// zoomed out all the way
|
|
295
|
-
if (vZoomLevel === 0) {
|
|
296
|
-
oZoomInButton.setEnabled(true);
|
|
297
|
-
oZoomOutButton.setEnabled(false);
|
|
298
|
-
|
|
299
|
-
// if the zoom out button is disabled and it currently has focus,
|
|
300
|
-
// set the focus to the zoom in button
|
|
301
|
-
if (oZoomOutButton.getFocusDomRef() === document.activeElement) {
|
|
302
|
-
oZoomInButton.focus();
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// zoomed in all the way
|
|
309
|
-
if (vZoomLevel === 1) {
|
|
310
|
-
oZoomOutButton.setEnabled(true);
|
|
311
|
-
oZoomInButton.setEnabled(false);
|
|
312
|
-
|
|
313
|
-
// if the zoom in button is disabled and it currently has focus,
|
|
314
|
-
// set the focus to the zoom out button
|
|
315
|
-
if (oZoomInButton.getFocusDomRef() === document.activeElement) {
|
|
316
|
-
oZoomOutButton.focus();
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
// the zoom level is between 0 and 1
|
|
323
|
-
oZoomInButton.setEnabled(true);
|
|
324
|
-
oZoomOutButton.setEnabled(true);
|
|
325
|
-
};
|
|
326
|
-
|
|
327
|
-
return ToolbarHandler;
|
|
328
|
-
});
|