@openui5/sap.ui.mdc 1.99.0 → 1.100.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/THIRDPARTY.txt +2 -2
- 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/Chart.js +50 -32
- package/src/sap/ui/mdc/ChartDelegate.js +66 -21
- package/src/sap/ui/mdc/ChartRenderer.js +1 -1
- 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 +1 -1
- package/src/sap/ui/mdc/FilterBarDelegate.js +26 -0
- package/src/sap/ui/mdc/FilterField.js +41 -3
- package/src/sap/ui/mdc/Link.js +3 -3
- package/src/sap/ui/mdc/MultiValueField.js +11 -1
- package/src/sap/ui/mdc/Table.js +73 -39
- package/src/sap/ui/mdc/TableDelegate.js +28 -1
- package/src/sap/ui/mdc/ValueHelp.js +8 -3
- package/src/sap/ui/mdc/ValueHelpDelegate.js +2 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -1
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/ChartToolbar.js +13 -6
- package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +7 -7
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +6 -6
- package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
- 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 +133 -25
- 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 +3 -0
- package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +3 -1
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +39 -52
- 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 +15 -4
- 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 +16 -5
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +76 -19
- package/src/sap/ui/mdc/field/FieldBase.js +62 -11
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +1 -1
- package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldInfoBase.js +2 -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 +4 -1
- 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 +5 -3
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +5 -1
- 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/filterbar/FilterBarBase.js +76 -208
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +27 -2
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +127 -57
- 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/FilterBar.js +37 -19
- package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +1 -1
- package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +48 -31
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +36 -0
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +47 -10
- 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/ItemBaseFlex.js +0 -1
- package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +2 -85
- package/src/sap/ui/mdc/library.js +11 -4
- 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/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 +2 -1
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +20 -19
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -141
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -9
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +348 -0
- package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +70 -3
- 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 +11 -33
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +2 -4
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +281 -263
- package/src/sap/ui/mdc/p13n/AdaptationProvider.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +21 -18
- package/src/sap/ui/mdc/p13n/FlexUtil.js +0 -5
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
- package/src/sap/ui/mdc/p13n/StateUtil.js +4 -0
- package/src/sap/ui/mdc/p13n/UIManager.js +16 -13
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +18 -14
- 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 +4 -3
- 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 +54 -18
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +4 -7
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +1 -2
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +8 -4
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +1 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +2 -2
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +75 -27
- package/src/sap/ui/mdc/table/PropertyHelper.js +20 -13
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +86 -13
- package/src/sap/ui/mdc/table/RowActionItem.js +119 -0
- package/src/sap/ui/mdc/table/RowSettings.js +42 -1
- 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/ValueHelpDialog.less +1 -0
- package/src/sap/ui/mdc/util/DateUtil.js +32 -7
- package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +201 -76
- package/src/sap/ui/mdc/util/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Popover.js +5 -3
- package/src/sap/ui/mdc/valuehelp/base/Container.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +4 -4
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +13 -10
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +4 -10
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +6 -4
- package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +2 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +0 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +8 -6
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +0 -150
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +0 -721
- package/src/sap/ui/mdc/p13n/panels/ListView.js +0 -408
- 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
|
@@ -54,7 +54,7 @@ sap.ui.define([
|
|
|
54
54
|
* @class The <code>FilterBarBase</code> control is used as a faceless base class for common functionality of any MDC FilterBar derivation.
|
|
55
55
|
* @extends sap.ui.mdc.Control
|
|
56
56
|
* @author SAP SE
|
|
57
|
-
* @version 1.
|
|
57
|
+
* @version 1.100.1
|
|
58
58
|
* @constructor
|
|
59
59
|
* @private
|
|
60
60
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -146,7 +146,7 @@ sap.ui.define([
|
|
|
146
146
|
/**
|
|
147
147
|
* Specifies the filter metadata.<br>
|
|
148
148
|
* <b>Note</b>: This property must not be bound.<br>
|
|
149
|
-
* <b>Note</b>: This property is used exclusively for SAPUI5 flexibility. Do not use it otherwise.
|
|
149
|
+
* <b>Note</b>: This property is used exclusively for SAPUI5 flexibility/ Fiori Elements. Do not use it otherwise.
|
|
150
150
|
*
|
|
151
151
|
* @since 1.97
|
|
152
152
|
*/
|
|
@@ -369,8 +369,15 @@ sap.ui.define([
|
|
|
369
369
|
};
|
|
370
370
|
|
|
371
371
|
FilterBarBase.prototype.applySettings = function(mSettings, oScope) {
|
|
372
|
+
this._setPropertyHelperClass(PropertyHelper);
|
|
373
|
+
this._setupPropertyInfoStore("propertyInfo");
|
|
372
374
|
this._applySettings(mSettings, oScope);
|
|
373
|
-
this._initControlDelegate();
|
|
375
|
+
//this._initControlDelegate();
|
|
376
|
+
Promise.all([this.awaitPropertyHelper()]).then(function() {
|
|
377
|
+
if (!this._bIsBeingDestroyed) {
|
|
378
|
+
this._applyInitialFilterConditions();
|
|
379
|
+
}
|
|
380
|
+
}.bind(this));
|
|
374
381
|
};
|
|
375
382
|
|
|
376
383
|
FilterBarBase.prototype._applySettings = function(mSettings, oScope) {
|
|
@@ -381,13 +388,13 @@ sap.ui.define([
|
|
|
381
388
|
this._oConditionModel.attachPropertyChange(this._handleConditionModelPropertyChange, this);
|
|
382
389
|
};
|
|
383
390
|
|
|
384
|
-
FilterBarBase.prototype._initControlDelegate = function() {
|
|
385
|
-
this.
|
|
386
|
-
if (!this._bIsBeingDestroyed) {
|
|
387
|
-
this._applyInitialFilterConditions();
|
|
388
|
-
}
|
|
389
|
-
}.bind(this));
|
|
390
|
-
};
|
|
391
|
+
// FilterBarBase.prototype._initControlDelegate = function() {
|
|
392
|
+
// Promise.all([this.awaitPropertyHelper()]).then(function() {
|
|
393
|
+
// if (!this._bIsBeingDestroyed) {
|
|
394
|
+
// this._applyInitialFilterConditions();
|
|
395
|
+
// }
|
|
396
|
+
// }.bind(this));
|
|
397
|
+
// };
|
|
391
398
|
|
|
392
399
|
FilterBarBase.prototype._waitForMetadata = function() {
|
|
393
400
|
return this._retrieveMetadata().then(function() {
|
|
@@ -618,108 +625,18 @@ sap.ui.define([
|
|
|
618
625
|
return this.getEngine().isModificationSupported(this);
|
|
619
626
|
};
|
|
620
627
|
|
|
621
|
-
FilterBarBase.prototype._hasPropertyInfo = function(sFieldName) {
|
|
622
|
-
var aPropertyInfo = this.getPropertyInfo();
|
|
623
|
-
var nIdx = aPropertyInfo.findIndex(function(oEntry) {
|
|
624
|
-
return oEntry.name === sFieldName;
|
|
625
|
-
});
|
|
626
|
-
|
|
627
|
-
return (nIdx >= 0);
|
|
628
|
-
};
|
|
629
|
-
|
|
630
|
-
FilterBarBase.prototype._getPropertyByName = function(sName) {
|
|
631
|
-
return FilterUtil.getPropertyByKey(this.getPropertyInfoSet(), sName);
|
|
632
|
-
};
|
|
633
|
-
|
|
634
628
|
FilterBarBase.prototype.getPropertyInfoSet = function() {
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
if (this._hasPropertyHelper()) {
|
|
638
|
-
return this.getPropertyHelper().getProperties();
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
var aPropertyInfo = this.getPropertyInfo();
|
|
642
|
-
if (aPropertyInfo && (aPropertyInfo.length > 0)) {
|
|
643
|
-
oTypeUtil = this.getTypeUtil();
|
|
644
|
-
|
|
645
|
-
for (var i = 0; i < aPropertyInfo.length; i++) {
|
|
646
|
-
var oPropertyInfo = aPropertyInfo[i];
|
|
647
|
-
if (oPropertyInfo) {
|
|
648
|
-
var oTypeConfig = oTypeUtil.getTypeConfig(oPropertyInfo.dataType, oPropertyInfo.formatOptions, oPropertyInfo.constraints);
|
|
649
|
-
aProperties.push({
|
|
650
|
-
name: oPropertyInfo.name,
|
|
651
|
-
typeConfig: oTypeConfig,
|
|
652
|
-
maxConditions: oPropertyInfo.maxConditions,
|
|
653
|
-
constraints: oPropertyInfo.constraints,
|
|
654
|
-
formatOptions: oPropertyInfo.formatOptions,
|
|
655
|
-
required: oPropertyInfo.required,
|
|
656
|
-
caseSensitive: oPropertyInfo.caseSensitive,
|
|
657
|
-
display: oPropertyInfo.display
|
|
658
|
-
});
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
return aProperties;
|
|
664
|
-
};
|
|
665
|
-
|
|
666
|
-
FilterBarBase.prototype._hasPropertyHelper = function() {
|
|
667
|
-
try {
|
|
668
|
-
this.getPropertyHelper();
|
|
669
|
-
return true;
|
|
670
|
-
} catch (ex) {
|
|
671
|
-
return false;
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
FilterBarBase.prototype._createPropertyInfoChange = function(oProperty) {
|
|
677
|
-
return {
|
|
678
|
-
changeSpecificData: {
|
|
679
|
-
changeType: "addPropertyInfo",
|
|
680
|
-
content: {
|
|
681
|
-
name: oProperty.name,
|
|
682
|
-
dataType: oProperty.typeConfig.className,
|
|
683
|
-
maxConditions: oProperty.maxConditions,
|
|
684
|
-
constraints: oProperty.constraints,
|
|
685
|
-
formatOption: oProperty.formatOptions,
|
|
686
|
-
required: oProperty.required,
|
|
687
|
-
caseSensitive: oProperty.caseSensitive,
|
|
688
|
-
display: oProperty.display
|
|
689
|
-
}
|
|
690
|
-
},
|
|
691
|
-
selectorElement: this
|
|
692
|
-
};
|
|
693
|
-
};
|
|
694
|
-
|
|
695
|
-
FilterBarBase.prototype.createPropertyInfoChanges = function(sFieldPath) {
|
|
696
|
-
var oProperty, oChange, aChanges = [];
|
|
697
|
-
|
|
698
|
-
if (!this._hasPropertyInfo(sFieldPath)) {
|
|
699
|
-
oProperty = this._getPropertyByName(sFieldPath);
|
|
700
|
-
if (oProperty) {
|
|
701
|
-
oChange = this._createPropertyInfoChange(oProperty);
|
|
702
|
-
aChanges.push(oChange);
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
return aChanges;
|
|
629
|
+
return this.getPropertyHelper() ? this.getPropertyHelper().getProperties() : [];
|
|
707
630
|
};
|
|
708
631
|
|
|
709
632
|
|
|
710
633
|
FilterBarBase.prototype._addConditionChange = function(mOrigConditions, sFieldPath) {
|
|
711
634
|
|
|
712
|
-
|
|
635
|
+
this.getEngine().createChanges({
|
|
713
636
|
control: this,
|
|
714
637
|
key: "Filter",
|
|
715
|
-
//prependChanges: fCreateTypeInfoCallback,
|
|
716
638
|
state: mOrigConditions
|
|
717
639
|
});
|
|
718
|
-
|
|
719
|
-
if (!this._aCollectedChangePromises) {
|
|
720
|
-
this._aCollectedChangePromises = [];
|
|
721
|
-
}
|
|
722
|
-
this._aCollectedChangePromises.push(oChangePromise);
|
|
723
640
|
};
|
|
724
641
|
|
|
725
642
|
FilterBarBase.prototype._registerOnEngineOnModificationEnd = function() {
|
|
@@ -753,12 +670,13 @@ sap.ui.define([
|
|
|
753
670
|
|
|
754
671
|
if (this._bPersistValues && this._isPersistenceSupported()) {
|
|
755
672
|
|
|
673
|
+
this._registerOnEngineOnModificationEnd();
|
|
674
|
+
|
|
756
675
|
var aConditions = oEvent.getParameter("value");
|
|
757
676
|
|
|
758
|
-
if (this.
|
|
677
|
+
if (this._getPropertyByName(sFieldPath)) {
|
|
759
678
|
fAddConditionChange(sFieldPath, aConditions);
|
|
760
679
|
} else {
|
|
761
|
-
this._registerOnEngineOnModificationEnd();
|
|
762
680
|
this._retrieveMetadata().then(function() {
|
|
763
681
|
fAddConditionChange(sFieldPath, aConditions);
|
|
764
682
|
});
|
|
@@ -947,7 +865,7 @@ sap.ui.define([
|
|
|
947
865
|
}.bind(this);
|
|
948
866
|
|
|
949
867
|
return this.initialized().then(function() {
|
|
950
|
-
if (!this.
|
|
868
|
+
if (!this.isPropertyHelperFinal()) {
|
|
951
869
|
return this._retrieveMetadata().then(function() {
|
|
952
870
|
return fValidateFc();
|
|
953
871
|
});
|
|
@@ -964,10 +882,6 @@ sap.ui.define([
|
|
|
964
882
|
}
|
|
965
883
|
};
|
|
966
884
|
|
|
967
|
-
FilterBarBase.prototype._hasMetadata = function() {
|
|
968
|
-
return (this._hasPropertyHelper() || (this.getPropertyInfo().length > 0));
|
|
969
|
-
};
|
|
970
|
-
|
|
971
885
|
FilterBarBase.prototype._getRequiredFieldsWithoutValues = function() {
|
|
972
886
|
var aReqFiltersWithoutValue = [];
|
|
973
887
|
this._getRequiredPropertyNames().forEach(function(sName) {
|
|
@@ -1032,19 +946,7 @@ sap.ui.define([
|
|
|
1032
946
|
var oPromise = oEvent.getParameter("promise");
|
|
1033
947
|
if (oPromise) {
|
|
1034
948
|
oPromise.then(function() {
|
|
1035
|
-
|
|
1036
|
-
if (this._oConditionChangeStartedPromise) {
|
|
1037
|
-
this._oConditionChangeStartedPromise.then(function() {
|
|
1038
|
-
this.triggerSearch();
|
|
1039
|
-
}.bind(this));
|
|
1040
|
-
} else if (this._aCollectedChangePromises && this._aCollectedChangePromises.length > 0) {
|
|
1041
|
-
var aChangePromises = this._aCollectedChangePromises.slice();
|
|
1042
|
-
Promise.all(aChangePromises).then(function() {
|
|
1043
|
-
this.triggerSearch();
|
|
1044
|
-
}.bind(this));
|
|
1045
|
-
} else {
|
|
1046
|
-
this.triggerSearch();
|
|
1047
|
-
}
|
|
949
|
+
this.triggerSearch();
|
|
1048
950
|
}.bind(this)).catch(function(oEx) {
|
|
1049
951
|
Log.error(oEx);
|
|
1050
952
|
});
|
|
@@ -1128,18 +1030,6 @@ sap.ui.define([
|
|
|
1128
1030
|
}
|
|
1129
1031
|
};
|
|
1130
1032
|
|
|
1131
|
-
FilterBarBase.prototype._waitForChangeAppliance = function(bFireSearch) {
|
|
1132
|
-
|
|
1133
|
-
var aChangePromises = this._aCollectedChangePromises.slice();
|
|
1134
|
-
this._aCollectedChangePromises = null;
|
|
1135
|
-
|
|
1136
|
-
Promise.all(aChangePromises).then(function(aConditionsArray) {
|
|
1137
|
-
this._validate(bFireSearch);
|
|
1138
|
-
}.bind(this), function(aConditionsArray) {
|
|
1139
|
-
this._validate(bFireSearch);
|
|
1140
|
-
}.bind(this));
|
|
1141
|
-
};
|
|
1142
|
-
|
|
1143
1033
|
/**
|
|
1144
1034
|
* Executes the search.
|
|
1145
1035
|
* @private
|
|
@@ -1158,6 +1048,12 @@ sap.ui.define([
|
|
|
1158
1048
|
this._fResolvedSearchPromise = null;
|
|
1159
1049
|
}.bind(this);
|
|
1160
1050
|
|
|
1051
|
+
var fnValidationSucceeds = function() {
|
|
1052
|
+
fnCheckAndFireSearch();
|
|
1053
|
+
this._fResolvedSearchPromise();
|
|
1054
|
+
fnCleanup();
|
|
1055
|
+
}.bind(this);
|
|
1056
|
+
|
|
1161
1057
|
if (this.bIsDestroyed) {
|
|
1162
1058
|
fnCleanup();
|
|
1163
1059
|
return;
|
|
@@ -1171,22 +1067,13 @@ sap.ui.define([
|
|
|
1171
1067
|
return;
|
|
1172
1068
|
}
|
|
1173
1069
|
|
|
1174
|
-
if (this._aCollectedChangePromises && (this._aCollectedChangePromises.length > 0)) {
|
|
1175
|
-
this._waitForChangeAppliance(bFireSearch);
|
|
1176
|
-
return;
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
1070
|
if (vRetErrorState === ErrorState.NoError) {
|
|
1180
|
-
if (this.
|
|
1181
|
-
this.
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
fnCleanup();
|
|
1185
|
-
}.bind(this));
|
|
1071
|
+
if (this._oConditionChangeStartedPromise) {
|
|
1072
|
+
this._oConditionChangeStartedPromise.then(function() {
|
|
1073
|
+
fnValidationSucceeds();
|
|
1074
|
+
});
|
|
1186
1075
|
} else {
|
|
1187
|
-
|
|
1188
|
-
this._fResolvedSearchPromise();
|
|
1189
|
-
fnCleanup();
|
|
1076
|
+
fnValidationSucceeds();
|
|
1190
1077
|
}
|
|
1191
1078
|
} else {
|
|
1192
1079
|
if (vRetErrorState === ErrorState.RequiredHasNoValue) {
|
|
@@ -1244,7 +1131,15 @@ sap.ui.define([
|
|
|
1244
1131
|
return Promise.all([this._oInitialFiltersAppliedPromise, this._oMetadataAppliedPromise]);
|
|
1245
1132
|
};
|
|
1246
1133
|
|
|
1134
|
+
FilterBarBase.prototype._initialized = function() {
|
|
1135
|
+
return this.waitForInitialization();
|
|
1136
|
+
};
|
|
1137
|
+
|
|
1247
1138
|
FilterBarBase.prototype.initialized = function() {
|
|
1139
|
+
|
|
1140
|
+
if (!this._oMetadataAppliedPromise) {
|
|
1141
|
+
this._retrieveMetadata();
|
|
1142
|
+
}
|
|
1248
1143
|
return this.waitForInitialization();
|
|
1249
1144
|
};
|
|
1250
1145
|
|
|
@@ -1284,6 +1179,22 @@ sap.ui.define([
|
|
|
1284
1179
|
}.bind(this) : undefined;
|
|
1285
1180
|
};
|
|
1286
1181
|
|
|
1182
|
+
FilterBarBase.prototype._isPathKnownAsync = function(sFieldPath, oXCondition) {
|
|
1183
|
+
var sName, sKey, aPromises = [];
|
|
1184
|
+
|
|
1185
|
+
aPromises.push(this._getPropertyByNameAsync(sFieldPath));
|
|
1186
|
+
for (sKey in oXCondition["inParameters"]) {
|
|
1187
|
+
sName = sKey.startsWith("conditions/") ? sKey.slice(11) : sKey; // just use field name
|
|
1188
|
+
aPromises.push(this._getPropertyByNameAsync(sName));
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
for (sKey in oXCondition["outParameters"]) {
|
|
1192
|
+
sName = sKey.startsWith("conditions/") ? sKey.slice(11) : sKey; // just use field name
|
|
1193
|
+
aPromises.push(this._getPropertyByNameAsync(sName));
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
return Promise.all(aPromises);
|
|
1197
|
+
};
|
|
1287
1198
|
|
|
1288
1199
|
FilterBarBase.prototype._isPathKnown = function(sFieldPath, oXCondition) {
|
|
1289
1200
|
var sKey, sName;
|
|
@@ -1319,16 +1230,12 @@ sap.ui.define([
|
|
|
1319
1230
|
};
|
|
1320
1231
|
|
|
1321
1232
|
FilterBarBase.prototype.removeCondition = function(sFieldPath, oXCondition) {
|
|
1322
|
-
return this.
|
|
1233
|
+
return this._initialized().then(function() {
|
|
1323
1234
|
var oCM = this._getConditionModel();
|
|
1324
1235
|
if (oCM) {
|
|
1325
|
-
|
|
1326
|
-
return this._retrieveMetadata().then(function() {
|
|
1327
|
-
this._removeCondition(sFieldPath, oXCondition, oCM);
|
|
1328
|
-
}.bind(this));
|
|
1329
|
-
} else {
|
|
1236
|
+
this._isPathKnownAsync(sFieldPath, oXCondition).then(function() {
|
|
1330
1237
|
this._removeCondition(sFieldPath, oXCondition, oCM);
|
|
1331
|
-
}
|
|
1238
|
+
}.bind(this));
|
|
1332
1239
|
}
|
|
1333
1240
|
}.bind(this));
|
|
1334
1241
|
};
|
|
@@ -1351,17 +1258,12 @@ sap.ui.define([
|
|
|
1351
1258
|
};
|
|
1352
1259
|
|
|
1353
1260
|
FilterBarBase.prototype.addCondition = function(sFieldPath, oXCondition) {
|
|
1354
|
-
return this.
|
|
1261
|
+
return this._initialized().then(function() {
|
|
1355
1262
|
var oCM = this._getConditionModel();
|
|
1356
1263
|
if (oCM) {
|
|
1357
|
-
|
|
1358
|
-
if (!this._hasPropertyHelper() && !this._isPathKnown(sFieldPath, oXCondition)) {
|
|
1359
|
-
return this._retrieveMetadata().then(function() {
|
|
1360
|
-
this._addCondition(sFieldPath, oXCondition, oCM);
|
|
1361
|
-
}.bind(this));
|
|
1362
|
-
} else {
|
|
1264
|
+
this._isPathKnownAsync(sFieldPath, oXCondition).then(function() {
|
|
1363
1265
|
this._addCondition(sFieldPath, oXCondition, oCM);
|
|
1364
|
-
}
|
|
1266
|
+
}.bind(this));
|
|
1365
1267
|
}
|
|
1366
1268
|
}.bind(this));
|
|
1367
1269
|
|
|
@@ -1416,7 +1318,7 @@ sap.ui.define([
|
|
|
1416
1318
|
}
|
|
1417
1319
|
}
|
|
1418
1320
|
|
|
1419
|
-
if (!bAllPropertiesKnown
|
|
1321
|
+
if (!bAllPropertiesKnown) {
|
|
1420
1322
|
this._retrieveMetadata().then(function() {
|
|
1421
1323
|
fApplyConditions(mConditionsData);
|
|
1422
1324
|
});
|
|
@@ -1622,27 +1524,28 @@ sap.ui.define([
|
|
|
1622
1524
|
}
|
|
1623
1525
|
|
|
1624
1526
|
this._fResolveMetadataApplied = undefined;
|
|
1625
|
-
this._oMetadataAppliedPromise = new Promise(function(resolve) {
|
|
1527
|
+
this._oMetadataAppliedPromise = new Promise(function(resolve, reject) {
|
|
1626
1528
|
this._fResolveMetadataApplied = resolve;
|
|
1529
|
+
this._fRejectMetadataApplied = reject;
|
|
1627
1530
|
}.bind(this));
|
|
1628
1531
|
|
|
1629
1532
|
|
|
1630
1533
|
this.initControlDelegate().then(function() {
|
|
1631
1534
|
if (!this._bIsBeingDestroyed) {
|
|
1632
1535
|
|
|
1633
|
-
var fnResolveMetadata = function() {
|
|
1634
|
-
this._fResolveMetadataApplied();
|
|
1536
|
+
var fnResolveMetadata = function(bFlag) {
|
|
1537
|
+
bFlag ? this._fResolveMetadataApplied() : this._fRejectMetadataApplied();
|
|
1635
1538
|
this._fResolveMetadataApplied = null;
|
|
1539
|
+
this._fRejectMetadataApplied = null;
|
|
1636
1540
|
}.bind(this);
|
|
1637
1541
|
|
|
1638
|
-
if (this.bDelegateInitialized
|
|
1639
|
-
this.
|
|
1640
|
-
|
|
1641
|
-
fnResolveMetadata();
|
|
1542
|
+
if (this.bDelegateInitialized) {
|
|
1543
|
+
this.finalizePropertyHelper().then(function() {
|
|
1544
|
+
fnResolveMetadata(true);
|
|
1642
1545
|
});
|
|
1643
1546
|
} else {
|
|
1644
|
-
Log.error("
|
|
1645
|
-
fnResolveMetadata();
|
|
1547
|
+
Log.error("Delegate not initialized.");
|
|
1548
|
+
fnResolveMetadata(false);
|
|
1646
1549
|
}
|
|
1647
1550
|
}
|
|
1648
1551
|
}.bind(this));
|
|
@@ -1752,40 +1655,6 @@ sap.ui.define([
|
|
|
1752
1655
|
}.bind(this));
|
|
1753
1656
|
};
|
|
1754
1657
|
|
|
1755
|
-
FilterBarBase.prototype._getWaitForChangesPromise = function() {
|
|
1756
|
-
return this.getEngine().waitForChanges(this);
|
|
1757
|
-
};
|
|
1758
|
-
|
|
1759
|
-
FilterBarBase.prototype._suspendBinding = function(oFilterField) {
|
|
1760
|
-
|
|
1761
|
-
if (oFilterField) {
|
|
1762
|
-
var oBinding = oFilterField.getBinding("conditions");
|
|
1763
|
-
if (oBinding) {
|
|
1764
|
-
if (!this._aBindings) {
|
|
1765
|
-
this._aBindings = [];
|
|
1766
|
-
}
|
|
1767
|
-
oBinding.suspend();
|
|
1768
|
-
this._aBindings.push(oFilterField);
|
|
1769
|
-
}
|
|
1770
|
-
}
|
|
1771
|
-
};
|
|
1772
|
-
|
|
1773
|
-
FilterBarBase.prototype._resumeBindings = function() {
|
|
1774
|
-
if (this._aBindings) {
|
|
1775
|
-
this._aBindings.forEach(function(oFilterField) {
|
|
1776
|
-
if (!oFilterField.bIsDestroyed) {
|
|
1777
|
-
var oBinding = oFilterField.getBinding("conditions");
|
|
1778
|
-
if (oBinding) {
|
|
1779
|
-
oBinding.resume();
|
|
1780
|
-
}
|
|
1781
|
-
}
|
|
1782
|
-
});
|
|
1783
|
-
|
|
1784
|
-
this._aBindings = null;
|
|
1785
|
-
}
|
|
1786
|
-
};
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
1658
|
FilterBarBase.prototype._isChangeApplying = function() {
|
|
1790
1659
|
return !!this._oFlexPromise;
|
|
1791
1660
|
};
|
|
@@ -1976,7 +1845,6 @@ sap.ui.define([
|
|
|
1976
1845
|
this._aBindings = null;
|
|
1977
1846
|
|
|
1978
1847
|
this._aFIChanges = null;
|
|
1979
|
-
this._aCollectedChangePromises = null;
|
|
1980
1848
|
|
|
1981
1849
|
this._oConditionChangeStartedPromise = null;
|
|
1982
1850
|
this._fConditionChangeStartedPromiseResolve = undefined;
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
*
|
|
17
17
|
* @param {object[]} aProperties
|
|
18
18
|
* The properties to process in this helper
|
|
19
|
-
* @param {
|
|
19
|
+
* @param {Object<string, object>} [mExtensions]
|
|
20
20
|
* Key-value map, where the key is the name of the property and the value is the extension containing mode-specific information.
|
|
21
21
|
* The extension of a property is stored in a reserved <code>extension</code> attribute and its attributes must be specified with
|
|
22
22
|
* <code>mExtensionAttributeMetadata</code>.
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @extends sap.ui.mdc.util.PropertyHelper
|
|
34
34
|
*
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.100.1
|
|
37
37
|
*
|
|
38
38
|
* @private
|
|
39
39
|
* @experimental
|
|
@@ -48,5 +48,30 @@ sap.ui.define([
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Applies defaults and resolves property references.
|
|
54
|
+
*
|
|
55
|
+
* @param {object} oProperty The property to prepare
|
|
56
|
+
* @protected
|
|
57
|
+
*/
|
|
58
|
+
PropertyHelper.prototype.prepareProperty = function(oProperty) {
|
|
59
|
+
|
|
60
|
+
if (!oProperty.typeConfig) {
|
|
61
|
+
|
|
62
|
+
var oParent = this.getParent();
|
|
63
|
+
if (oParent && oParent._oDelegate) {
|
|
64
|
+
var oTypeUtil = oParent._oDelegate.getTypeUtil();
|
|
65
|
+
try {
|
|
66
|
+
oProperty.typeConfig = oTypeUtil.getTypeConfig(oProperty.dataType, oProperty.formatOptions, oProperty.constraints);
|
|
67
|
+
} catch (ex) {
|
|
68
|
+
//
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
PropertyHelperBase.prototype.prepareProperty.apply(this, arguments);
|
|
74
|
+
};
|
|
75
|
+
|
|
51
76
|
return PropertyHelper;
|
|
52
77
|
});
|