Skip to content

Commit

Permalink
Merge "[INTERNAL] p13n JSDoc improvements"
Browse files Browse the repository at this point in the history
  • Loading branch information
koeppel authored and Gerrit Code Review committed Mar 12, 2024
2 parents 08f6422 + 21b46ad commit 26c3482
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions src/sap.m/src/sap/m/p13n/FilterController.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sap.ui.define([
*
* @public
* @typedef {object} sap.m.p13n.FilterStateItem
* @property {string} operator The operator of the condition
* @property {sap.ui.model.FilterOperator} operator The operator of the condition
* @property {string[]} values The values of the condition
* @property {boolean} [filtered] Defines whether the item is filtered (if a filter state is provided, it's filtered automatically)
*
Expand Down Expand Up @@ -53,14 +53,14 @@ sap.ui.define([
* @alias sap.m.p13n.FilterController
*/
const FilterController = BaseController.extend("sap.m.p13n.FilterController", {
constructor: function (mSettings) {
constructor: function(mSettings) {
BaseController.apply(this, arguments);
this._itemFactory = mSettings?.itemFactory;
this._bResetEnabled = true;
}
});

FilterController.prototype.getCurrentState = function () {
FilterController.prototype.getCurrentState = function() {
const oXConfig = xConfigAPI.readConfig(this.getAdaptationControl()) || {};
const aConditions = oXConfig.hasOwnProperty("properties") ? oXConfig.properties.filterConditions : [];

Expand All @@ -83,7 +83,7 @@ sap.ui.define([
return "active";
};

FilterController.prototype.initAdaptationUI = function (oPropertyHelper, oWrapper) {
FilterController.prototype.initAdaptationUI = function(oPropertyHelper, oWrapper) {

return new Promise((resolve, reject) => {
sap.ui.require(["sap/m/p13n/FilterPanel", "sap/m/Input"], (FilterPanel, Input) => {
Expand Down Expand Up @@ -131,7 +131,7 @@ sap.ui.define([
return aConditions.indexOf(oExistingCondition);
};

FilterController.prototype._createConditionChange = function (sChangeType, oControl, sFieldPath, oCondition) {
FilterController.prototype._createConditionChange = function(sChangeType, oControl, sFieldPath, oCondition) {
delete oCondition.filtered; //Consider moving this to the delta calculation instead

const oConditionChange = {
Expand Down Expand Up @@ -163,7 +163,7 @@ sap.ui.define([
*
* @returns {array} Array containing the delta based created changes
*/
FilterController.prototype._diffConditionPath = function(sFieldPath, aConditions, aOrigShadowConditions, oControl, bAbsoluteAppliance){
FilterController.prototype._diffConditionPath = function(sFieldPath, aConditions, aOrigShadowConditions, oControl, bAbsoluteAppliance) {
let oChange;
const aChanges = [];
const aOrigConditions = merge([], aConditions);
Expand Down Expand Up @@ -264,9 +264,9 @@ sap.ui.define([
return aConditionChanges;
};

FilterController.prototype.getDelta = function (mPropertyBag) {
const {existingState} = mPropertyBag;
let {changedState} = mPropertyBag;
FilterController.prototype.getDelta = function(mPropertyBag) {
const { existingState } = mPropertyBag;
let { changedState } = mPropertyBag;

if (deepEqual(existingState, changedState)) {
return [];
Expand Down Expand Up @@ -304,7 +304,7 @@ sap.ui.define([
return oChangeContent;
};

FilterController.prototype.mixInfoAndState = function (oPropertyHelper) {
FilterController.prototype.mixInfoAndState = function(oPropertyHelper) {

const mExistingFilters = this.getCurrentState() || {};

Expand Down
4 changes: 2 additions & 2 deletions src/sap.m/src/sap/m/p13n/MetadataHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ sap.ui.define([
*
* @public
* @param {string} sKey The property key identifying a property entry
* @returns {object} A single property
* @returns {sap.m.p13n.MetadataObject | undefined} A single property
*/
MetadataHelper.prototype.getProperty = function(sKey) {
return this._aProperties.find(function(oProp){
return this._aProperties.find((oProp) => {
return oProp.key === sKey;
});
};
Expand Down
2 changes: 1 addition & 1 deletion src/sap.m/src/sap/m/p13n/SelectionController.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ sap.ui.define([
*
* @param {object} mSettings Initial settings for the new controller
* @param {sap.ui.core.Control} mSettings.control The control instance that is personalized by this controller
* @param {function} [mSettings.getKeyForItem] By default the SelectionController tries to identify the existing item through the
* @param {function(sap.ui.core.Element):string} [mSettings.getKeyForItem] By default the SelectionController tries to identify the existing item through the
* key by checking if there is an existing item with this id. This behaviour can be overruled by implementing this method which will
* provide the according item of the <code>targetAggregation</code> to return the according key associated to this item.
* @param {string} mSettings.targetAggregation The name of the aggregation that is now managed by this controller
Expand Down

0 comments on commit 26c3482

Please sign in to comment.