@openui5/sap.ui.mdc 1.92.0 → 1.95.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 +1 -6
- package/THIRDPARTY.txt +4 -10
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +1 -1
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -1
- package/src/sap/ui/mdc/Chart.js +14 -6
- package/src/sap/ui/mdc/ChartDelegate.js +1 -1
- package/src/sap/ui/mdc/ChartNew.js +104 -32
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +2 -2
- package/src/sap/ui/mdc/Field.js +15 -2
- package/src/sap/ui/mdc/FilterBar.js +11 -1
- package/src/sap/ui/mdc/FilterField.js +28 -4
- package/src/sap/ui/mdc/Link.js +2 -2
- package/src/sap/ui/mdc/MultiValueField.js +406 -0
- package/src/sap/ui/mdc/Table.js +166 -102
- package/src/sap/ui/mdc/TableDelegate.js +30 -21
- package/src/sap/ui/mdc/ValueHelp.js +1459 -0
- package/src/sap/ui/mdc/ValueHelpDelegate.js +41 -0
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +233 -223
- package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +9 -18
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ItemNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/PropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +2 -2
- 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 +27 -15
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +15 -9
- package/src/sap/ui/mdc/condition/Operator.js +13 -8
- package/src/sap/ui/mdc/condition/RangeOperator.js +3 -6
- package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +1 -0
- package/src/sap/ui/mdc/enum/SelectType.js +43 -0
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +5 -4
- package/src/sap/ui/mdc/field/ConditionType.js +69 -33
- package/src/sap/ui/mdc/field/ConditionsType.js +4 -3
- 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 +38 -24
- package/src/sap/ui/mdc/field/FieldBase.js +106 -42
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +25 -2
- package/src/sap/ui/mdc/field/FieldHelpBase.js +64 -4
- package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
- 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 +55 -33
- 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 +52 -32
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +8 -10
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +2 -1
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +3 -3
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldDelegate.js +49 -0
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +70 -0
- package/src/sap/ui/mdc/field/OutParameter.js +1 -1
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +2 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +146 -76
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +52 -0
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +4 -20
- package/src/sap/ui/mdc/filterbar/p13n/FilterGroupLayout.js +9 -3
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +55 -39
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +31 -22
- package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +33 -29
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +10 -5
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +18 -6
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +15 -4
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +92 -79
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/GroupFlex.js +70 -52
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +184 -115
- package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +59 -41
- package/src/sap/ui/mdc/flexibility/SortFlex.js +72 -54
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +2 -1
- package/src/sap/ui/mdc/library.js +618 -7
- 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 +1 -1
- 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/Panel.js +1 -1
- 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/SelectionDialog.js +1 -1
- package/src/sap/ui/mdc/link/SelectionDialogItem.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 +20 -8
- package/src/sap/ui/mdc/messagebundle_ar.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_bg.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_ca.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_cs.properties +17 -7
- package/src/sap/ui/mdc/messagebundle_cy.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_da.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_de.properties +23 -13
- package/src/sap/ui/mdc/messagebundle_el.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_en.properties +14 -4
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +12 -4
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +3 -1
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +12 -4
- package/src/sap/ui/mdc/messagebundle_es.properties +40 -30
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_et.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_fi.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_fr.properties +27 -17
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_hi.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_hu.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_id.properties +14 -4
- package/src/sap/ui/mdc/messagebundle_it.properties +38 -28
- package/src/sap/ui/mdc/messagebundle_iw.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_ja.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_kk.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_ko.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_lt.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_lv.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_ms.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_nl.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_no.properties +22 -12
- package/src/sap/ui/mdc/messagebundle_pl.properties +19 -9
- package/src/sap/ui/mdc/messagebundle_pt.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +14 -4
- package/src/sap/ui/mdc/messagebundle_ro.properties +18 -8
- package/src/sap/ui/mdc/messagebundle_ru.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_sh.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_sk.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_sl.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_sv.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_th.properties +19 -9
- package/src/sap/ui/mdc/messagebundle_tr.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_uk.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_vi.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +13 -3
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +28 -16
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +94 -0
- package/src/sap/ui/mdc/odata/json/FilterBarDelegate.js +9 -8
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +5 -5
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +9 -0
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +88 -80
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +37 -10
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +17 -0
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
- package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +45 -53
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegateNew.js +302 -179
- package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +21 -16
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +5 -59
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +130 -53
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +16 -7
- package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ListView.js +58 -2
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +17 -10
- package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +6 -1
- package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +10 -11
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +13 -1
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +11 -2
- package/src/sap/ui/mdc/table/Column.js +21 -4
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +176 -4
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +11 -1
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableSettings.js +4 -49
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/themes/base/FieldBase.less +4 -0
- package/src/sap/ui/mdc/themes/base/FilterBar.less +2 -2
- package/src/sap/ui/mdc/themes/base/GroupView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ListView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +56 -21
- package/src/sap/ui/mdc/ui/Container.js +3 -3
- package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
- package/src/sap/ui/mdc/util/Common.js +26 -0
- package/src/sap/ui/mdc/util/FilterUtil.js +68 -16
- package/src/sap/ui/mdc/util/IdentifierUtil.js +4 -0
- package/src/sap/ui/mdc/util/PromiseCache.js +266 -0
- package/src/sap/ui/mdc/util/PropertyHelper.js +27 -2
- package/src/sap/ui/mdc/valuehelp/Dialog.js +475 -0
- package/src/sap/ui/mdc/valuehelp/Popover.js +346 -0
- package/src/sap/ui/mdc/valuehelp/base/Container.js +440 -0
- package/src/sap/ui/mdc/valuehelp/base/Content.js +442 -0
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +96 -0
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +537 -0
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +105 -0
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +232 -0
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +250 -0
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +504 -0
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +619 -0
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +881 -0
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +2 -2
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +250 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +91 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +137 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +25 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +256 -94
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +2 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/{waitForP13nButtonWithParentAndIcon.js → waitForP13nButtonWithMatchers.js} +5 -18
- package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +0 -1
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 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/mixin/PromiseMixin',
|
|
10
|
+
'sap/ui/base/ManagedObjectObserver',
|
|
11
|
+
'sap/ui/mdc/condition/Condition',
|
|
12
|
+
'sap/ui/mdc/condition/FilterOperatorUtil',
|
|
13
|
+
'sap/ui/mdc/condition/Operator',
|
|
14
|
+
'sap/ui/mdc/enum/ConditionValidated',
|
|
15
|
+
'sap/base/strings/formatMessage'
|
|
16
|
+
], function(
|
|
17
|
+
Element,
|
|
18
|
+
PromiseMixin,
|
|
19
|
+
ManagedObjectObserver,
|
|
20
|
+
Condition,
|
|
21
|
+
FilterOperatorUtil,
|
|
22
|
+
Operator,
|
|
23
|
+
ConditionValidated,
|
|
24
|
+
formatMessage
|
|
25
|
+
) {
|
|
26
|
+
"use strict";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Constructor for a new <code>Content</code>.
|
|
30
|
+
*
|
|
31
|
+
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
32
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
33
|
+
* @class Content for the <code>sap.ui.mdc.valuehelp.base.Container</code> element.
|
|
34
|
+
* @extends sap.ui.core.Element
|
|
35
|
+
* @version 1.95.0
|
|
36
|
+
* @constructor
|
|
37
|
+
* @abstract
|
|
38
|
+
* @private
|
|
39
|
+
* @ui5-restricted sap.ui.mdc
|
|
40
|
+
* @since 1.91.0
|
|
41
|
+
* @alias sap.ui.mdc.valuehelp.base.Content
|
|
42
|
+
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
43
|
+
*/
|
|
44
|
+
var Content = Element.extend("sap.ui.mdc.valuehelp.base.Content", /** @lends sap.ui.mdc.valuehelp.base.Content.prototype */
|
|
45
|
+
{
|
|
46
|
+
metadata: {
|
|
47
|
+
library: "sap.ui.mdc",
|
|
48
|
+
properties: {
|
|
49
|
+
/**
|
|
50
|
+
* Title text that appears in the dialog or tab header.
|
|
51
|
+
*
|
|
52
|
+
* @since 1.60.0
|
|
53
|
+
*/
|
|
54
|
+
title: {
|
|
55
|
+
type: "string",
|
|
56
|
+
group: "Appearance",
|
|
57
|
+
defaultValue: ""
|
|
58
|
+
},
|
|
59
|
+
subTitle: {
|
|
60
|
+
type: "string",
|
|
61
|
+
group: "Appearance",
|
|
62
|
+
defaultValue: ""
|
|
63
|
+
},
|
|
64
|
+
_conditions: { // TODO: only internal? make restricted?
|
|
65
|
+
type: "object[]",
|
|
66
|
+
defaultValue: [],
|
|
67
|
+
byValue: true
|
|
68
|
+
},
|
|
69
|
+
_filterValue: { // TODO: how to hide? Or how to access from ValueHelp?
|
|
70
|
+
type: "string",
|
|
71
|
+
defaultValue: ""//,
|
|
72
|
+
//visibility: "hidden"
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* internal configuration
|
|
76
|
+
*/
|
|
77
|
+
_config: {
|
|
78
|
+
type: "object",
|
|
79
|
+
defaultValue: {}//,
|
|
80
|
+
// visibility: "hidden"
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
},
|
|
84
|
+
aggregations: {
|
|
85
|
+
_displayContent: {
|
|
86
|
+
type: "sap.ui.core.Control",
|
|
87
|
+
multiple: false//,
|
|
88
|
+
//visibility: "hidden" // as ManagedObjectModel can only observe hidden aggregations on root-control
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
events: {
|
|
92
|
+
select: {
|
|
93
|
+
parameters: {
|
|
94
|
+
type: { type: "sap.ui.mdc.enum.SelectType" },
|
|
95
|
+
conditions: { type: "object[]" }
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
requestDelegateContent: {},
|
|
99
|
+
requestSwitchToDialog: {},
|
|
100
|
+
confirm: {
|
|
101
|
+
parameters: {
|
|
102
|
+
close: { type: "boolean" }
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
cancel: {},
|
|
106
|
+
navigated: {
|
|
107
|
+
parameters: {
|
|
108
|
+
leaveFocus: { type: "boolean" },
|
|
109
|
+
condition: { type: "object" },
|
|
110
|
+
// value: { type: "string" },
|
|
111
|
+
// key: { type: "string" },
|
|
112
|
+
itemId: { type: "string" }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
Content.prototype.init = function() {
|
|
120
|
+
|
|
121
|
+
this._oObserver = new ManagedObjectObserver(this._observeChanges.bind(this));
|
|
122
|
+
|
|
123
|
+
this._oObserver.observe(this, {
|
|
124
|
+
properties: ["_filterValue", "_conditions", "_config"]
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
Content.prototype.exit = function() {
|
|
130
|
+
|
|
131
|
+
this._oObserver.disconnect();
|
|
132
|
+
this._oObserver = undefined;
|
|
133
|
+
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
Content.prototype.setProperty = function(sPropertyName, oValue, bSuppressInvalidate) {
|
|
137
|
+
|
|
138
|
+
// don't rerender content or parent-container on conditions change. This needs only be updated on
|
|
139
|
+
// content control inside (Table, List, DefineConditionPanel...).
|
|
140
|
+
if (sPropertyName === "_conditions") {
|
|
141
|
+
bSuppressInvalidate = true;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return Element.prototype.setProperty.apply(this, [sPropertyName, oValue, bSuppressInvalidate]);
|
|
145
|
+
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
Content.prototype.getContent = function () {
|
|
150
|
+
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
Content.prototype.getFooterContent = function () {
|
|
154
|
+
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
Content.prototype.onShow = function () {
|
|
158
|
+
this._bVisible = true;
|
|
159
|
+
this._handleConditionsUpdate();
|
|
160
|
+
//this._handleFilterValueUpdate();
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
Content.prototype.onHide = function () {
|
|
164
|
+
this._bVisible = false;
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
Content.prototype.getItemForValue = function (oConfig) {
|
|
168
|
+
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
Content.prototype.isValidationSupported = function(oConfig) { // TODO only for TypeAhead content
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
Content.prototype.getScrollDelegate = function() {
|
|
175
|
+
var oContainer = this.getParent();
|
|
176
|
+
return oContainer && oContainer.getScrollDelegate();
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
Content.prototype._observeChanges = function(oChanges) {
|
|
180
|
+
if (oChanges.name === "_conditions") {
|
|
181
|
+
this._handleConditionsUpdate(oChanges);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (oChanges.name === "_filterValue") {
|
|
185
|
+
this._handleFilterValueUpdate(oChanges);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (oChanges.name === "_config") {
|
|
189
|
+
_configChanged.call(this, oChanges.current);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
Content.prototype._handleFilterValueUpdate = function(oChanges) {
|
|
194
|
+
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
Content.prototype._handleConditionsUpdate = function(oChanges) {
|
|
198
|
+
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Creates a condition based on the used operator.
|
|
203
|
+
*
|
|
204
|
+
* @param {string} sKey Operator for the condition
|
|
205
|
+
* @param {string} sDescription Description of the operator
|
|
206
|
+
* @param {object} oInParameters In parameters of the condition
|
|
207
|
+
* @param {object} oOutParameters Out parameters of the condition
|
|
208
|
+
* @returns {sap.ui.mdc.condition.ConditionObject} The new condition object with the maintained operator along with <code>sKey</code> and <code>sDescription</code> as <code>aValues</code>
|
|
209
|
+
* @private
|
|
210
|
+
* @ui5-restricted FieldHelp subclasses
|
|
211
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
212
|
+
*/
|
|
213
|
+
Content.prototype._createCondition = function(sKey, sDescription, oInParameters, oOutParameters) {
|
|
214
|
+
|
|
215
|
+
var oOperator = _getOperator.call(this);
|
|
216
|
+
|
|
217
|
+
var aValues = [sKey];
|
|
218
|
+
if (oOperator.valueTypes.length > 1 && oOperator.valueTypes[1] !== Operator.ValueType.Static && sDescription !== null && sDescription !== undefined) {
|
|
219
|
+
// description is supported
|
|
220
|
+
aValues.push(sDescription);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return Condition.createCondition(oOperator.name, aValues, oInParameters, oOutParameters, ConditionValidated.Validated); // Conditions from help are always validated
|
|
224
|
+
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The focus visualization of the field help needs to be removed as the user starts typing into the field.
|
|
229
|
+
*
|
|
230
|
+
* Only needed for typeahead.
|
|
231
|
+
*
|
|
232
|
+
* @private
|
|
233
|
+
* @ui5-restricted sap.ui.mdc.valueHelp.base.Container
|
|
234
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
235
|
+
*/
|
|
236
|
+
Content.prototype.removeFocus = function() {
|
|
237
|
+
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
Content.prototype.navigate = function(iStep) {
|
|
241
|
+
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
Content.prototype.getUIArea = function() {
|
|
245
|
+
// Table, List or other content might be rerendered. In this case the corresponding UIArea is the one of the Popover or Dialog, not the one of the parents.
|
|
246
|
+
var oContainer = this.getParent();
|
|
247
|
+
if (oContainer && oContainer._getUIAreaForContent) {
|
|
248
|
+
return oContainer._getUIAreaForContent();
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return Element.prototype.getUIArea.apply(this, arguments);
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
Content.prototype.isTypeahead = function () {
|
|
255
|
+
var oContainer = this.getParent();
|
|
256
|
+
return oContainer && oContainer.isTypeahead();
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
Content.prototype.isContainerOpen = function () {
|
|
260
|
+
var oContainer = this.getParent();
|
|
261
|
+
return oContainer && oContainer.isOpen();
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
Content.prototype.isContainerOpening = function () {
|
|
265
|
+
var oContainer = this.getParent();
|
|
266
|
+
return oContainer && oContainer.isOpening();
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
Content.prototype._getValueHelpDelegate = function () {
|
|
270
|
+
var oContainer = this.getParent();
|
|
271
|
+
return oContainer && oContainer.getValueHelpDelegate();
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
Content.prototype._awaitValueHelpDelegate = function () {
|
|
275
|
+
var oContainer = this.getParent();
|
|
276
|
+
return oContainer && oContainer.awaitValueHelpDelegate();
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
Content.prototype._isValueHelpDelegateInitialized = function () {
|
|
280
|
+
var oContainer = this.getParent();
|
|
281
|
+
return oContainer && oContainer.isValueHelpDelegateInitialized();
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
Content.prototype.getCount = function (aConditions) {
|
|
285
|
+
return 0;
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Return the value help icon that should be used for the field.
|
|
290
|
+
*
|
|
291
|
+
* <b>Note</b> This function needs only to be implemented for <code>Content</code>
|
|
292
|
+
* implementing the <code>sap.ui.mdc.valuehelp.Popover</code> container.
|
|
293
|
+
* On dialogs the <code>Dialog</code> container defines the icon, as it could have multiple contents.
|
|
294
|
+
*
|
|
295
|
+
* @returns {string} Name of the icon
|
|
296
|
+
* @private
|
|
297
|
+
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
298
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
299
|
+
*/
|
|
300
|
+
Content.prototype.getValueHelpIcon = function() {
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
//TODO: define aria attribute object
|
|
304
|
+
/**
|
|
305
|
+
* Returns the aria attributes the field needs from the value help
|
|
306
|
+
*
|
|
307
|
+
* <b>Note</b> This function needs only to be implemented for <code>Content</code>
|
|
308
|
+
* implementing the <code>sap.ui.mdc.valuehelp.Popover</code> container.
|
|
309
|
+
* On dialogs the <code>Dialog</code> container defines the attributes, as it could have multiple contents.
|
|
310
|
+
*
|
|
311
|
+
* @param {int} iMaxConditions maximal conditions allowed (as FieldHelp might not be connected to a field)
|
|
312
|
+
* @returns {object} object with the aria-attibutes
|
|
313
|
+
* @private
|
|
314
|
+
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
315
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
316
|
+
*/
|
|
317
|
+
Content.prototype.getAriaAttributes = function(iMaxConditions) {
|
|
318
|
+
|
|
319
|
+
return { // return default values, but needs to be implemented by specific content
|
|
320
|
+
contentId: null,
|
|
321
|
+
ariaHasPopup: "listbox",
|
|
322
|
+
roleDescription: null
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
Content.prototype._isSingleSelect = function (oEvent) {
|
|
328
|
+
var oConfig = this.getProperty("_config");
|
|
329
|
+
return oConfig && oConfig.maxConditions === 1;
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Determines if the value help should be opened when the user clicks into the connected control.
|
|
334
|
+
*
|
|
335
|
+
* @returns {boolean} If <code>true</code>, the value help should open when user clicks into the connected field control
|
|
336
|
+
* @private
|
|
337
|
+
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
338
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
339
|
+
*/
|
|
340
|
+
Content.prototype.shouldOpenOnClick = function() {
|
|
341
|
+
return false;
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Determines if the value help should be opened when the user used the arrow keys.
|
|
346
|
+
* By default closed navigation is only enabled for single select scenarios
|
|
347
|
+
*
|
|
348
|
+
* @returns {boolean} If <code>true</code>, the value help should open when user used the arrow keys in the connected field control
|
|
349
|
+
* @private
|
|
350
|
+
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
351
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
352
|
+
*/
|
|
353
|
+
Content.prototype.shouldOpenOnNavigate = function() {
|
|
354
|
+
return !this._isSingleSelect();
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Determines if the focus is set in the value help or stays in the calling control.
|
|
360
|
+
*
|
|
361
|
+
* @returns {boolean} if true, focus goes to the value help, if false it stays in the calling control.
|
|
362
|
+
*
|
|
363
|
+
* @private
|
|
364
|
+
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
365
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
366
|
+
*/
|
|
367
|
+
Content.prototype.isFocusInHelp = function() {
|
|
368
|
+
|
|
369
|
+
return !this.isTypeahead();
|
|
370
|
+
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Determines if multiselection is active.
|
|
375
|
+
*
|
|
376
|
+
* @returns {boolean} if true, multi-selection is active.
|
|
377
|
+
*
|
|
378
|
+
* @private
|
|
379
|
+
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
380
|
+
* @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
|
|
381
|
+
*/
|
|
382
|
+
Content.prototype.isMultiSelect = function() {
|
|
383
|
+
|
|
384
|
+
return !this._isSingleSelect();
|
|
385
|
+
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Determines if value help dialog should show the tokenizer for the content.
|
|
391
|
+
*
|
|
392
|
+
* @returns {boolean} if for one content the value is true, the dialog shows the tokenizer.
|
|
393
|
+
*
|
|
394
|
+
* @private
|
|
395
|
+
* @ui5-restricted sap.ui.mdc.valuehelp.base.Container
|
|
396
|
+
*/
|
|
397
|
+
Content.prototype.getRequiresTokenizer = function() {
|
|
398
|
+
return true;
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
function _configChanged(oConfig) {
|
|
402
|
+
|
|
403
|
+
_determineOperator.call(this, oConfig.operators);
|
|
404
|
+
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
function _determineOperator(aOperators) {
|
|
408
|
+
this._oOperator = undefined;
|
|
409
|
+
if (aOperators) {
|
|
410
|
+
this._oOperator = FilterOperatorUtil.getEQOperator(aOperators);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
function _getOperator() {
|
|
415
|
+
return this._oOperator;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
Content.prototype.getFormattedTitle = function(iCount) {
|
|
419
|
+
var sTitle = this.getTitle();
|
|
420
|
+
if (sTitle) {
|
|
421
|
+
sTitle = formatMessage(sTitle, iCount ? iCount : "");
|
|
422
|
+
}
|
|
423
|
+
return sTitle;
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
Content.prototype.getFormattedSubTitle = function() {
|
|
427
|
+
return this.getSubTitle();
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
Content.prototype._getMaxConditions = function() {
|
|
431
|
+
|
|
432
|
+
var oConfig = this.getProperty("_config");
|
|
433
|
+
return oConfig && oConfig.maxConditions;
|
|
434
|
+
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
PromiseMixin.call(Content.prototype);
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
return Content;
|
|
441
|
+
|
|
442
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 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/Control',
|
|
9
|
+
'sap/ui/base/ManagedObjectObserver'
|
|
10
|
+
], function(
|
|
11
|
+
Control,
|
|
12
|
+
ManagedObjectObserver
|
|
13
|
+
) {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
var DialogTab = Control.extend("sap.ui.mdc.valuehelp.base.DialogTab", /** @lends sap.ui.mdc.valuehelp.base.DialogTab.prototype */
|
|
17
|
+
{
|
|
18
|
+
metadata: {
|
|
19
|
+
library: "sap.ui.mdc",
|
|
20
|
+
properties: {
|
|
21
|
+
content: {
|
|
22
|
+
type: "object"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
// aggregations: {
|
|
26
|
+
// },
|
|
27
|
+
events: {
|
|
28
|
+
select: {
|
|
29
|
+
parameters: {
|
|
30
|
+
type: { type: "sap.ui.mdc.enum.SelectType" },
|
|
31
|
+
conditions: { type: "object[]" }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
confirm: {},
|
|
35
|
+
cancel: {}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
renderer: {
|
|
39
|
+
apiVersion: 2,
|
|
40
|
+
render: function(oRm, oControl) {
|
|
41
|
+
//oRm.openStart("div", oControl);
|
|
42
|
+
//oRm.openEnd();
|
|
43
|
+
// var oContent = oControl._displayContent;
|
|
44
|
+
var oContent = oControl.getContent();
|
|
45
|
+
if (oContent) {
|
|
46
|
+
oRm.renderControl(oContent);
|
|
47
|
+
}
|
|
48
|
+
//oRm.close("div");
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
DialogTab.prototype.init = function() {
|
|
54
|
+
|
|
55
|
+
Control.prototype.init.apply(this, arguments);
|
|
56
|
+
|
|
57
|
+
// this._oObserver = new ManagedObjectObserver(_observeChanges.bind(this));
|
|
58
|
+
//
|
|
59
|
+
// this._oObserver.observe(this, {
|
|
60
|
+
// properties: ["content"]
|
|
61
|
+
// });
|
|
62
|
+
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
DialogTab.prototype.exit = function () {
|
|
66
|
+
if (this._displayContent) {
|
|
67
|
+
this._displayContent = null;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// this._oObserver.disconnect();
|
|
71
|
+
// this._oObserver = undefined;
|
|
72
|
+
|
|
73
|
+
return Control.prototype.exit.apply(this, arguments);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// function _observeChanges(oChanges) {
|
|
77
|
+
//
|
|
78
|
+
// if (oChanges.name === "content") {
|
|
79
|
+
// if (oChanges.current) {
|
|
80
|
+
// Promise.resolve(oChanges.current.getContent()).then(function (oResolvedContent) {
|
|
81
|
+
// if (this._displayContent !== oResolvedContent) {
|
|
82
|
+
// this._displayContent = oResolvedContent;
|
|
83
|
+
// //this.invalidate(this);
|
|
84
|
+
// }
|
|
85
|
+
// }.bind(this));
|
|
86
|
+
// } else {
|
|
87
|
+
// this._displayContent = undefined;
|
|
88
|
+
// this.invalidate(this);
|
|
89
|
+
// }
|
|
90
|
+
// }
|
|
91
|
+
//
|
|
92
|
+
// }
|
|
93
|
+
|
|
94
|
+
return DialogTab;
|
|
95
|
+
|
|
96
|
+
});
|