Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sapui5/sap.ui.comp

Package Overview
Dependencies
Maintainers
5
Versions
322
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sapui5/sap.ui.comp - npm Package Compare versions

Comparing version 1.78.1 to 1.79.0

2

package.json
{
"name": "@sapui5/sap.ui.comp",
"version": "1.78.1",
"version": "1.79.0",
"description": "SAPUI5 Library sap.ui.comp",

@@ -5,0 +5,0 @@ "homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",

@@ -697,2 +697,33 @@ /*

/**
* Defines the default CSS width applied to the column.
* A <code>width</code> value with a <code>px, em</code> or <code>rem</code> unit is supported.
*
* <b>Note:</b> The <code>width</code> value must be specified as a constant <code>String</code> and must not contain a property path for the value.
*
* <i>XML Example for OData V4 with Width as CssDefaults Annotation</i>
* <pre>
* &lt;Record Type="com.sap.vocabularies.UI.v1.DataField"&gt;
* &lt;PropertyValue Property="Value" Path="CompanyCode" /&gt;
* &lt;Annotation Term="com.sap.vocabularies.HTML5.v1.CssDefaults"&gt;
* &lt;Record&gt;
* &lt;PropertyValue Property="width" String="8rem" /&gt;
* &lt;/Record&gt;
* &lt;/Annotation&gt;
* &lt;/Record&gt;
* </pre>
*/
columnWidth: {
namespace: "com.sap.vocabularies.HTML5.v1",
annotation: "CssDefaults",
target: ["DataFieldAbstract"],
whiteList: {
values: ["width"]
},
defaultValue: null,
appliesTo: ["columns/width"],
group: ["Appearance"],
since: "1.79"
},
/**
* Defines whether a property is a semantic key which is used for key columns (rendering <code>sap.m.ObjectIdentifier</code>).<br>

@@ -1113,5 +1144,8 @@ * In addition, the <code>Common.EditableFieldFor</code> annotation, which points to a semantic key, can be used for editable properties

ignore: false
},
showDetailsButton: {
ignore: true
}
}
};
});
});

@@ -388,8 +388,30 @@ /*

if (this._oLabel && !this._oLabel.bDestroyed) {
Element.prototype.destroy.apply(this, arguments);
if (this._oLabel && !this._oLabel.bIsDestroyed) {
this._oLabel.destroy();
}
Element.prototype.destroy.apply(this, arguments);
// Explicitly destroy the control, because with the remove methods implemented, the control is no longer destroyed
if (this.getControl() && !this.getControl().bIsDestroyed) {
this.getControl().destroy();
}
// Adding filterItem to the filterBar is also creating a filterGroupItem so we need to destroy it as well
var sFilterGroupItemId = this.getId() + "__filterGroupItem",
oFilterGroupItem = sap.ui.getCore().byId(sFilterGroupItemId);
if (oFilterGroupItem) {
Element.prototype.destroy.apply(oFilterGroupItem, arguments);
// Explicitly destroy only the label as the filterItem and the filterGroupItem created by the
// addFilterItem method share the same control, which is already destroyed
if (oFilterGroupItem._oLabel && !oFilterGroupItem._oLabel.bIsDestroyed) {
oFilterGroupItem._oLabel.destroy();
}
oFilterGroupItem._oLabel = null;
}
this._oLabel = null;

@@ -396,0 +418,0 @@ this._sQuickinfo = null;

@@ -28,3 +28,3 @@ /*

name: "sap.ui.comp",
version: "1.78.1",
version: "1.79.0",
dependencies: [

@@ -31,0 +31,0 @@ "sap.ui.core",

@@ -10,3 +10,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -13,0 +13,0 @@ * @since 1.36.0

@@ -15,3 +15,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -18,0 +18,0 @@ * @since 1.58.0

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.44.0

@@ -15,6 +15,16 @@ /*

/**
* @class The SmartLink control uses a semantic object to display {@link sap.ui.comp.navpopover.NavigationPopover NavigationPopover}
* @class
* The <code>SmartLink</code> control uses a semantic object to display {@link sap.ui.comp.navpopover.NavigationPopover NavigationPopover}
* for further navigation steps.<br>
* <b>Note:</b> Navigation targets are determined using {@link sap.ushell.services.CrossApplicationNavigation CrossApplicationNavigation} of the unified shell service.
*
* <b>Important:</b> Keep in mind that <code>SmartLink</code>, like all SAPUI5 smart controls, retrieves and analyzes
* the metadata and annotations of OData services. <b>The OData metadata is its primary API. These OData services
* are not part of the SAPUI5 framework and are usually maintained by the backend developers of your application.</b>
*
* With time, <code>SmartLink</code> can evolve and acquire new features. This means that its behavior or functionalities
* may change if the annotations that define this change are maintained in your backend metadata. To benefit from the new
* functionalities, your application should be able to adapt the backend metadata. <b>Therefore, we recommend
* using <code>SmartLink</code> only if you have control over the metadata of your application.</b>
*
* @param {string} [sId] ID for the new control, generated automatically if no ID is given

@@ -21,0 +31,0 @@ * @param {object} [mSettings] Initial settings for the new control

@@ -10,3 +10,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -174,6 +174,6 @@ * @since 1.25.0

// multiple contexts (~XXXX in hash) they will all be skipped
oNavigationTargets.ownNavigation = new LinkData({
// Moved the text property out of the LinkData creation
var oOwnNavigation = new LinkData({
key: sKey,
href: oLink.intent,
text: oLink.text,
visible: true,

@@ -184,2 +184,4 @@ isSuperiorAction: isSuperiorAction

});
oOwnNavigation.setText(oLink.text);
oNavigationTargets.ownNavigation = oOwnNavigation;
return;

@@ -201,2 +203,3 @@ }

});
if (oLog) {

@@ -211,6 +214,6 @@ oLog.addSemanticObjectIntent(oShellHash.semanticObject, {

if (!fnIsUnavailableAction(oShellHash.semanticObject, oShellHash.action)) {
oNavigationTargets.availableActions.push(new LinkData({
// Moved the text property out of the LinkData creation
var oAvailableAction = new LinkData({
key: sKey,
href: oLink.intent,
text: oLink.text,
visible: true,

@@ -220,3 +223,6 @@ isSuperiorAction: isSuperiorAction

// description: sDescription
}));
});
oAvailableAction.setText(oLink.text);
oNavigationTargets.availableActions.push(oAvailableAction);
if (oLog) {

@@ -232,7 +238,9 @@ oLog.addSemanticObjectIntent(oShellHash.semanticObject, {

// Main navigation could not be resolved, so only set link text as MainNavigation
// Moved the text property out of the LinkData creation
if (!oNavigationTargets.mainNavigation && typeof sMainNavigationId === "string") {
oNavigationTargets.mainNavigation = new LinkData({
text: sMainNavigationId,
var oMainNavigation = new LinkData({
visible: true
});
oMainNavigation.setText(sMainNavigationId);
oNavigationTargets.mainNavigation = oMainNavigation;
}

@@ -257,6 +265,7 @@

// }
oNavigationTargets.availableActions.push(new LinkData({
// Moved the text property out of the LinkData creation
var oAvailableAction = new LinkData({
key: (oShellHash.semanticObject && oShellHash.action) ? oShellHash.semanticObject + "-" + oShellHash.action : undefined,
href: oLink.intent,
text: oLink.text,
visible: true,

@@ -266,3 +275,6 @@ isSuperiorAction: isSuperiorAction

// description: sDescription
}));
});
oAvailableAction.setText(oLink.text);
oNavigationTargets.availableActions.push(oAvailableAction);
if (oLog) {

@@ -269,0 +281,0 @@ oLog.addSemanticObjectIntent(oShellHash.semanticObject, {

@@ -29,3 +29,3 @@ /*

* @param {string} oFormatOptions.calendarType format options.
* @version 1.78.1
* @version 1.79.0
* @experimental This module is only for internal/experimental use!

@@ -102,3 +102,3 @@ * @private

/**
* Get a the date pattern.
* Get the date pattern.
*

@@ -113,2 +113,27 @@ * @return {string} The date pattern string in in LDML format;

/**
* Returns a regular expression that represents this FiscalFormat pattern.
*
* @return {RegExp} Regular expression representing the pattern
* @private
* @sap-restricted sap.ui.comp.SmartTable
*/
FiscalFormat.prototype.getRegExPattern = function() {
return this.sFromatRegExPattern;
};
/**
* Returns a template with placeholders that match the regular expression
* groups of the pattern. Each placeholder consists of a $ (dollar sign)
* followed by a non-zero based index (integer).
*
* The template is locale dependent.
*
* @return {string} Template with placeholders
* @private
*/
FiscalFormat.prototype.getTemplate = function() {
return this.sFormatRegExGroups;
};
/**
* Creates the formatting regular expression based on the locale-dependent format.

@@ -293,3 +318,3 @@ *

"week": /0[1-9]|[1-4][0-9]|5[0-3]/,
"day": /[1-9]|[1-9][0-9]|[1-2][0-9][0-9]|3[0-6][0-9]|370|371/
"day": /371|370|3[0-6][0-9]|[1-2][0-9][0-9]|[1-9][0-9]|[1-9]/
};

@@ -359,2 +384,2 @@

return FiscalFormat;
});
});

@@ -16,3 +16,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -19,0 +19,0 @@ * @experimental This module is only for internal/experimental use!

@@ -17,3 +17,3 @@ /*

* @experimental to be productized soon
* @version 1.78.1
* @version 1.79.0
* @since 1.31.0

@@ -20,0 +20,0 @@ * @alias sap.ui.comp.odata.SideEffects

@@ -21,3 +21,3 @@ /*

* @param {object} oConstraints constraints.
* @version 1.78.1
* @version 1.79.0
* @experimental

@@ -170,3 +170,14 @@ * @private

/**
* Returns the formatter that is assigned to this particular FiscalDate type.
*
* @return {null|Object} The assigned instance of FiscalFormat
* @private
* @sap-restricted sap.ui.comp.SmartTable
*/
FiscalDate.prototype.getFormatter = function () {
return this.formatter;
};
return FiscalDate;
});
});

@@ -26,3 +26,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental

@@ -29,0 +29,0 @@ * @since 1.54.0

@@ -19,3 +19,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @constructor

@@ -22,0 +22,0 @@ * @experimental This module is only for internal/experimental use!

@@ -29,3 +29,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -32,0 +32,0 @@ * @since 1.26.0

@@ -30,3 +30,3 @@ /* eslint-disable strict */

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @constructor

@@ -33,0 +33,0 @@ * @experimental This module is only for internal/experimental use!

@@ -20,3 +20,3 @@ /* eslint-disable strict */

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -23,0 +23,0 @@ * @since 1.34.0

@@ -16,3 +16,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -19,0 +19,0 @@ * @since 1.34.0

@@ -10,3 +10,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -13,0 +13,0 @@ * @since 1.25.0

@@ -10,3 +10,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -13,0 +13,0 @@ * @since 1.48.0

@@ -348,2 +348,3 @@ /*

return {
description: oField.description,
label: oField.fieldLabel,

@@ -508,3 +509,3 @@ tooltip: oField.quickInfo || oField.fieldLabel,

BaseValueListProvider.prototype._calculateAndSetFilterOutputData = function(aData) {
var sLocalFieldName, sValueListFieldName, mFilterOutputData = null, oData, oExistingData, oNewData, i, fFilterItemDuplicates, fFilterRangeDuplicates, fFilterItemInRangesDuplicates;
var sLocalFieldName, sFieldDescription, sValueListFieldName, mFilterOutputData = null, oData, oExistingData, oNewData, i, fFilterItemDuplicates, fFilterRangeDuplicates, fFilterItemInRangesDuplicates;
if (this.mOutParams && aData && (this.oFilterProvider || this.oFilterModel)) {

@@ -535,2 +536,11 @@ mFilterOutputData = {};

sValueListFieldName = this.mOutParams[sLocalFieldName];
if (aData.length > 0) {
for (var i = 0; i < this._aCols.length; i++) {
if (this._aCols[i].template === sValueListFieldName){
var sDescriptionKey = this._aCols[i].description;
sFieldDescription = aData[0][sDescriptionKey];
}
}
}
if (sValueListFieldName !== this.sKey) {

@@ -567,3 +577,4 @@ oExistingData = null;

oNewData = {
key: oValue
key: oValue,
text: FormatUtil.getFormattedExpressionFromDisplayBehaviour(this.sTokenDisplayBehaviour, oValue, sFieldDescription)
};

@@ -592,3 +603,2 @@ }

}
var oFieldData = mFilterOutputData[sLocalFieldName];

@@ -595,0 +605,0 @@ if (bAddAsRange) {

@@ -41,2 +41,3 @@ /*

this._oSemanticKeyAdditionalControl = mPropertyBag._semanticKeyAdditionalControl;
this._bShowDetailsButton = mPropertyBag.showDetailsButton;
try {

@@ -306,3 +307,3 @@ var getCustomData = function(vSettings) {

TableProvider.prototype._enrichWithTableViewMetadata = function(oFieldViewMetadata, iCurrentIndex) {
var aAdditionalProperty = [], aNavigationProperty = [], sPath, iLength;
var aAdditionalProperty = [], aNavigationProperty = [], sPath, iLength, sWidth;
var fExtractNavigationProperty = function(sProperty) {

@@ -321,5 +322,9 @@ var sNavigationPath, aTemp;

this._updateLabel(oFieldViewMetadata);
oFieldViewMetadata.importance = this._getFieldImportance(oFieldViewMetadata);
oFieldViewMetadata.isInitiallyVisible = this._isInitiallyVisible(oFieldViewMetadata);
oFieldViewMetadata.index = this._getIndex(oFieldViewMetadata, iCurrentIndex);
oFieldViewMetadata.width = FormatUtil.getWidth(oFieldViewMetadata);
if (!oFieldViewMetadata.width) {
sWidth = this._getLineItemFieldWidth(oFieldViewMetadata);
oFieldViewMetadata.width = sWidth ? sWidth : FormatUtil.getWidth(oFieldViewMetadata);
}

@@ -392,2 +397,3 @@ // additional property handling for table

var bInitiallyVisible = false;
// Check if field exists in LineItem annotation (based on prio)

@@ -397,4 +403,4 @@ if (this._oLineItemAnnotation && this._oLineItemAnnotation.fields) {

if (bInitiallyVisible && !Device.system.desktop) {
var sImportance = this._getFieldImportance(oField);
if (bInitiallyVisible && !Device.system.desktop && !this._bShowDetailsButton) {
var sImportance = oField.importance;
if (sImportance) {

@@ -490,2 +496,19 @@ if (Device.system.tablet) {

/**
* Returns the width annotation for the given field or null
*
* @param {object} oField - OData metadata for the table field
* @returns {string} the width annotation
* @private
*/
TableProvider.prototype._getLineItemFieldWidth = function(oField) {
var sReturnValue = null;
if (this._oLineItemAnnotation && this._oLineItemAnnotation.width) {
sReturnValue = this._oLineItemAnnotation.width[oField.name];
}
return sReturnValue;
};
/**
* Updates the internal map of dimension property for a given text property

@@ -492,0 +515,0 @@ *

@@ -149,3 +149,3 @@ /*!

TokenParser.prototype.destroy = function() {
if (this._oInput) {
if (this._oInput && !this._oInput.bIsDestroyed) {
this._oInput.removeValidator(this._validator);

@@ -440,3 +440,3 @@ if (this._aOrgValidators && this._aOrgValidators.length > 0) {

//get the existing validators. We call this in our new added validator
this._aOrgValidators = this._oInput._tokenizer ? this._oInput._tokenizer._aTokenValidators.slice() : [];
this._aOrgValidators = this._oInput.getAggregation("tokenizer") ? this._oInput.getAggregation("tokenizer")._aTokenValidators.slice() : [];

@@ -443,0 +443,0 @@ this._oInput.removeAllValidators();

@@ -188,2 +188,6 @@ /*

if (!this._isControlSupportedForHistory(this.oControl)) {
return;
}
if (this._shouldHaveRecommendations() || this._shouldHaveHistory()) {

@@ -606,3 +610,3 @@ this._bindInnerControlSuggestions();

if (this.oControl.addValidator) {
this._aValidators = this.oControl._tokenizer ? this.oControl._tokenizer._aTokenValidators.slice() : [];
this._aValidators = this.oControl.getAggregation("tokenizer") ? this.oControl.getAggregation("tokenizer")._aTokenValidators.slice() : [];
this.oControl.removeAllValidators();

@@ -884,3 +888,3 @@

if (!(this._shouldHaveRecommendations() || this._shouldHaveHistory())) {
if (!(this._shouldHaveRecommendations() || this._shouldHaveHistory()) || !this._isControlSupportedForHistory(this.oControl)) {
if (this.bTypeAheadEnabled && this.bEnableShowTableSuggestionValueHelp) {

@@ -951,4 +955,3 @@ // Hide the Show All Items button if the number if items is less than the length (restriction)

sModelName = that._getSuggestionsModelName(),
oControl = that.oControl,
oModel = oControl.getModel(sModelName);
oControl = that.oControl;

@@ -959,2 +962,4 @@ if (!oControl) {

var oModel = oControl.getModel(sModelName);
if (Array.isArray(aResults[0] && aResults[0].results)) {

@@ -1103,3 +1108,3 @@ aSuggestions = that._addSuggestionsToGroup(aResults[0].results, HEADER_GROUPS.Others);

ValueListProvider.prototype._setupRecommendations = function () {
if (!this._shouldHaveRecommendations()) {
if (!this._shouldHaveRecommendations() || !this._isControlSupportedForHistory(this.oControl)) {
return;

@@ -1164,3 +1169,3 @@ }

ValueListProvider.prototype._setupHistoryValues = function () {
if (!this._shouldHaveHistory()) {
if (!this._shouldHaveHistory() || !this._isControlSupportedForHistory(this.oControl)) {
return;

@@ -1173,3 +1178,3 @@ }

this._oHistoryValuesProvider.getHistoryEnabled().then(function (bEnabled) {
if (!bEnabled) {
if (!bEnabled || !this._oHistoryValuesProvider) {
return;

@@ -1334,11 +1339,15 @@ }

oInput.addEventDelegate({
onfocusin: function () {
var aAlowedGroups = [HEADER_GROUPS.RecentlyUsed, HEADER_GROUPS.Recommendations],
aAllowedHistory = [HEADER_GROUPS.RecentlyUsed];
onmousedown: function (oEvent) {
if (oEvent.target.tagName !== "INPUT") {
return;
}
if (this._isNotRecommendationItemSelected("suggestionRows", oInput.getValue())) {
this._showInitialSuggestions(aAlowedGroups);
} else if (this._shouldHaveHistory()) {
this._showInitialSuggestions(aAllowedHistory);
this._showInitialSuggestions("suggestionRows", oInput.getValue());
},
onkeyup: function (oEvent) {
if (oEvent.keyCode !== 9) {
return;
}
this._showInitialSuggestions("suggestionRows", oInput.getValue());
}

@@ -1378,33 +1387,14 @@ }, this);

onmousedown: function (oEvent) {
var oTargetControl = oEvent.srcControl;
if (oEvent.target.tagName !== "INPUT") {
return;
}
// In input controls the "main" HTML element is the input. In reality it's the one that
// holds the focus. Getting its UI5 control class and checking if it's the same class name
// ensures that the click happened over the input field.
oComboBox._isTargetControlInputField = !(this._isControlDropdown(oTargetControl));
oComboBox._isTargetControlIcon = oTargetControl.isA("sap.ui.core.Icon");
oComboBox._isMouseDown = true;
this._showInitialSuggestions("items", oComboBox.getValue());
},
onmouseup: function () {
// The focusin event is executed in async manner
// So, just wait a tick before setting mousedown to FALSE
setTimeout(function () {
oComboBox._isMouseDown = false;
});
},
onfocusin: function () {
// These checks are needed in order to ensure keyboard navigation,
// mouse clicks or a mix of them.
if (oComboBox._isTargetControlInputField && (oComboBox._isMouseDown || oComboBox._isTargetControlIcon)) {
onkeyup: function (oEvent) {
if (oEvent.keyCode !== 9) {
return;
}
var aAlowedGroups = [HEADER_GROUPS.RecentlyUsed, HEADER_GROUPS.Recommendations],
aAllowedHistory = [HEADER_GROUPS.RecentlyUsed];
if (this._isNotRecommendationItemSelected("items", oComboBox.getValue())) {
this._showInitialSuggestions(aAlowedGroups);
} else if (this._shouldHaveHistory()) {
this._showInitialSuggestions(aAllowedHistory);
}
this._showInitialSuggestions("items", oComboBox.getValue());
}

@@ -1432,3 +1422,4 @@ }, this);

ValueListProvider.prototype._findSuggestionItemGroup = function (sAggregationName, sValue) {
var aItemContexts = this.oControl.getBinding(sAggregationName).getCurrentContexts(),
var oBinding = this.oControl.getBinding(sAggregationName),
aItemContexts = oBinding ? oBinding.getCurrentContexts() : [],
oSelectedItem;

@@ -1455,5 +1446,14 @@

ValueListProvider.prototype._showInitialSuggestions = function (aAllowedGroups) {
var that = this;
ValueListProvider.prototype._showInitialSuggestions = function (sAggregationName, sValue) {
var that = this,
aGroupNames = [HEADER_GROUPS.RecentlyUsed, HEADER_GROUPS.Recommendations],
aHistoryGroup = [HEADER_GROUPS.RecentlyUsed],
aGroupsToShow = [];
if (this._isNotRecommendationItemSelected(sAggregationName, sValue)) {
aGroupsToShow = aGroupNames;
} else if (this._shouldHaveHistory()) {
aGroupsToShow = aHistoryGroup;
}
this.oControl.showItems(function (sValue, oItem) {

@@ -1463,3 +1463,3 @@ var sModelName = that._getSuggestionsModelName(),

return aAllowedGroups.indexOf(iOrder) !== -1;
return aGroupsToShow.indexOf(iOrder) !== -1;
});

@@ -1471,2 +1471,6 @@ };

if (!this._isControlSupportedForHistory(this.oControl)) {
return sPath;
}
if (this._shouldHaveRecommendations() || this._shouldHaveHistory()) {

@@ -1489,2 +1493,14 @@ sPath = SUGGESTIONS_MODEL_NAME;

ValueListProvider.prototype._isControlSupportedForHistory = function (oControl) {
if (oControl.isA("sap.ui.comp.smartfield.DisplayComboBox")) {
return false;
}
if (oControl.isA("sap.m.ComboBox") || oControl.isA("sap.m.MultiComboBox") || oControl.isA("sap.m.Input") || oControl.isA("sap.m.MultiInput")) {
return true;
}
return false;
};
ValueListProvider.prototype._getBindingLength = function () {

@@ -1491,0 +1507,0 @@ var iLength = 300;

@@ -12,3 +12,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -58,3 +58,8 @@ * @since 1.29.0

// Derive TextArrangement from the property (not nested in com.sap.vocabularies.Common.v1.Text)
if (!oEnumTextArrangement) {
oEnumTextArrangement = this._getObject("com.sap.vocabularies.UI.v1.TextArrangement", oProperty);
}
if (!oEnumTextArrangement) {
oEnumTextArrangement = this._getObject("com.sap.vocabularies.UI.v1.TextArrangement", oEntityType);

@@ -61,0 +66,0 @@ }

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.28.0

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -95,2 +95,25 @@ * @since 1.28.0

/**
* Update a control instance on display/edit modes switch.
*
* @returns {void}
* @private
*/
ControlFactoryBase.prototype.updateControl = function() {
var oInnerControl,
sMode,
oSmartField = this._oParent,
oConfig = oSmartField.data("configdata");
if (oConfig && oConfig.configdata) {
sMode = oSmartField.getMode();
oInnerControl = oSmartField.getFirstInnerControl();
if (oConfig.configdata.onText && (sMode === "display" || sMode === "display_uom")) {
oConfig.configdata.onText(oInnerControl);
} else if (oConfig.configdata.onInput && sMode === "edit"){
oConfig.configdata.onInput(oInnerControl);
}
}
};
ControlFactoryBase.prototype._addAriaLabelledBy = function(oControl) {

@@ -200,3 +223,3 @@ var oTargetControl;

if (!sDisplay) {
sDisplay = this._oParent.data(sDefaultDisplayMode);
sDisplay = this._oParent.data(sDefaultDisplayMode ? sDefaultDisplayMode : "defaultInputFieldDisplayBehaviour");
}

@@ -203,0 +226,0 @@

@@ -27,3 +27,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
*

@@ -30,0 +30,0 @@ * @constructor

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.28.0

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.28.0

@@ -12,3 +12,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @since 1.28.0

@@ -15,0 +15,0 @@ * @returns {sap.ui.comp.smartfield.ODataControlSelector} new control selector instance.

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.28.0

@@ -65,3 +65,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
*

@@ -68,0 +68,0 @@ * @constructor

@@ -14,3 +14,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -17,0 +17,0 @@ * @since 1.31.0

@@ -110,3 +110,6 @@ /*!

oType = (oBindingInfo && oBindingInfo.type) || {};
var mTextArrangementBindingPaths = TextArrangementDelegate.getPaths(oSmartField.getTextInEditModeSource(), oMetadata);
var mTextArrangementBindingPaths = TextArrangementDelegate.getPaths(
oFactory._bTextInDisplayModeValueList ? TextInEditModeSource.ValueList : oSmartField.getTextInEditModeSource(),
oMetadata
);

@@ -148,2 +151,7 @@ oType = oFactory._oTypes.getType(oMetadata.property, oType.oFormatOptions, oType.oConstraints, {

if (oFactory._bTextInDisplayModeValueList) {
// In this scenario we always revert to ValueList
sTextInEditModeSource = TextInEditModeSource.ValueList;
}
switch (sTextInEditModeSource) {

@@ -248,3 +256,6 @@ case TextInEditModeSource.NavigationProperty:

if (oSmartField.getTextInEditModeSource() === TextInEditModeSource.ValueList) {
if (
oSmartField.getTextInEditModeSource() === TextInEditModeSource.ValueList ||
this.oFactory._bTextInDisplayModeValueList
) {
var INNER_CONTROL_VALUE_PROP_MAP = "value",

@@ -313,3 +324,6 @@ vValue = oSmartField.getBinding(INNER_CONTROL_VALUE_PROP_MAP).getValue(),

oMetadata = oSmartField.getControlFactory().getMetaData(),
mTextArrangementPaths = TextArrangementDelegate.getPaths(sTextInEditModeSource, oMetadata),
mTextArrangementPaths = TextArrangementDelegate.getPaths(
this.oFactory._bTextInDisplayModeValueList ? TextInEditModeSource.ValueList : sTextInEditModeSource,
oMetadata
),
sKeyField = mTextArrangementPaths.keyField,

@@ -347,7 +361,13 @@ sDescriptionField = mTextArrangementPaths.descriptionField;

// If the SmartField control is destroyed before this async callback is invoked.
if (!this.oSmartField) {
return;
}
var oSmartField = this.oSmartField,
oInputField = oSmartField._oControl.edit,
oBinding = oInputField && oInputField.getBinding("value");
oInputFieldBinding = oInputField && oInputField.getBinding("value"),
oDisplayControl = oSmartField._oControl.display;
if (oBinding && oSettings.updateBusyIndicator) {
if (oInputFieldBinding && oSettings.updateBusyIndicator) {

@@ -363,4 +383,29 @@ // restore the busy and busy indicator delay states to the initial value

if (oBinding) {
if (oSmartField.getMode() === "display") {
var updateDisplayDescriptionBindingPath = function() {
var oODataModel = oSmartField.getModel();
assert(Array.isArray(oData.results), " - " + this.getMetadata().getName());
if (oODataModel) {
var vBindingContextPath = oODataModel.getKey(oData.results[0]);
if (typeof vBindingContextPath === "string") {
this.sBindingContextPath = "/" + vBindingContextPath;
this.bindPropertyForValueList("text", oDisplayControl);
}
}
};
if (oSettings.initialRendering) {
updateDisplayDescriptionBindingPath.call(this);
}
}
if (
oInputFieldBinding &&
oSmartField.getMode() === "edit" &&
oSmartField.isTextInEditModeSourceNotNone() // From display to edit mode with textInEditModeSource:None -> we should skip
) {
var updateDescriptionBindingPath = function() {

@@ -380,3 +425,5 @@ var oODataModel = oSmartField.getModel();

if (oSettings.initialRendering) {
if (
oSettings.initialRendering
) {
updateDescriptionBindingPath.call(this);

@@ -405,10 +452,29 @@ }

TextArrangementDelegate.prototype.bindPropertyForValueList = function(sProperty, oInputField) {
var oSmartField = this.oSmartField;
var oSmartField = this.oSmartField,
oTextArrangementType,
oBinding,
oType;
if (oSmartField.getTextInEditModeSource() === TextInEditModeSource.ValueList) {
var oBinding = oInputField && oInputField.getBinding(sProperty);
if (
oSmartField.getTextInEditModeSource() === TextInEditModeSource.ValueList ||
this.oFactory._bTextInDisplayModeValueList
) {
oBinding = oInputField && oInputField.getBinding(sProperty);
if (this.oFactory && oBinding) {
oType = oBinding.getType();
// In case improper type is set earlier - try to get the correct one
if (
!oBinding.getType().isA("sap.ui.comp.smartfield.type.TextArrangement") &&
this.oFactory._getTextArrangementType
) {
oTextArrangementType = this.oFactory._getTextArrangementType();
if (oTextArrangementType) {
oType = oTextArrangementType;
}
}
oInputField.bindProperty(sProperty, this.getBindingInfo({
type: oBinding.getType()
type: oType
}));

@@ -415,0 +481,0 @@ }

@@ -18,3 +18,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -21,0 +21,0 @@ * @since 1.28.0

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.28.0

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.28.0

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.28.0

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.28.0

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.28.0

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.31.0

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.28.0

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.28.0

@@ -262,4 +262,11 @@ /*

TextArrangement.prototype.formatValue = function(aValues, sTargetType) {
var sKey = this.getPrimaryType().prototype.formatValue.call(this, aValues[0], sTargetType);
var sKey;
// In case we receive a string or if context is removed we can receive a value of null
if (!Array.isArray(aValues)) {
return aValues;
}
sKey = this.getPrimaryType().prototype.formatValue.call(this, aValues[0], sTargetType);
if (sKey === "") {

@@ -266,0 +273,0 @@ return sKey;

@@ -11,3 +11,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @private

@@ -14,0 +14,0 @@ * @since 1.34.0

@@ -29,3 +29,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
*

@@ -32,0 +32,0 @@ * @constructor

@@ -23,3 +23,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental Since 1.27.0

@@ -26,0 +26,0 @@ */

@@ -18,3 +18,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental Since 1.33.0

@@ -21,0 +21,0 @@ */

@@ -17,3 +17,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental Since 1.27.0

@@ -20,0 +20,0 @@ */

@@ -20,3 +20,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental Since 1.46

@@ -23,0 +23,0 @@ */

@@ -17,3 +17,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental Since 1.27.0

@@ -20,0 +20,0 @@ */

@@ -17,3 +17,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental Since 1.27.0

@@ -20,0 +20,0 @@ */

@@ -13,3 +13,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental Since 1.27.0

@@ -16,0 +16,0 @@ */

@@ -14,3 +14,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental Since 1.27.0

@@ -17,0 +17,0 @@ */

@@ -24,3 +24,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental Since 1.27.0

@@ -27,0 +27,0 @@ */

@@ -18,3 +18,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental Since 1.27.0

@@ -21,0 +21,0 @@ */

@@ -14,3 +14,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental Since 1.46

@@ -17,0 +17,0 @@ */

@@ -15,3 +15,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental Since 1.46

@@ -18,0 +18,0 @@ */

@@ -13,3 +13,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @experimental Since 1.44.0

@@ -16,0 +16,0 @@ */

@@ -530,5 +530,5 @@ /*

*
* @param {boolean|object} vSettings Settings object or a boolean which determines if only visible fields in visible groups should be considered. default: <code>true</code>
* @param {boolean} vSettings.considerOnlyVisible Determines if only visible fields in visible groups should be considered. default: <code>true</code>
* @param {boolean} [vSettings.handleSuccess = false] Indicates whether client error checks are performed for the current value regardless of the current error state of the text input fields of the <code>SmartForm</code> control. default: <code>false</code>. If the <code>handleSuccess</code> setting is set to <code>true</code>, the {@link sap.ui.base.EventProvider#event:validationSuccess} will be fired by every of the text input fields if their validation passes
* @param {boolean|object} [vSettings=true] Settings object or a boolean which determines if only visible fields in visible groups should be considered
* @param {boolean} [vSettings.considerOnlyVisible=true] Determines if only visible fields in visible groups should be considered
* @param {boolean} [vSettings.handleSuccess=false] Indicates whether client error checks are performed for the current value regardless of the current error state of the text input fields of the <code>SmartForm</code> control. If the <code>handleSuccess</code> setting is set to <code>true</code>, the {@link sap.ui.base.EventProvider#event:validationSuccess} will be fired by every of the text input fields if their validation passes
* @returns {string[]} An array of fields with errors

@@ -1080,4 +1080,4 @@ * @public

*
* @param {boolean} bConsiderOnlyVisibleGroups Determines if only visible <code>groups</code> are taken into account; default is true
* @param {boolean} bConsiderOnlyVisibleGroupElements Determines if only visible <code>groupElement</code> elements are taken into account; default is false (to be compatible)
* @param {boolean} [bConsiderOnlyVisibleGroups=true] Determines if only visible <code>groups</code> are taken into account
* @param {boolean} [bConsiderOnlyVisibleGroupElements=false] Determines if only visible <code>groupElement</code> elements are taken into account
* @return {sap.ui.comp.smartfield.SmartField[]} An array of smart fields (might be empty).

@@ -1084,0 +1084,0 @@ * @public

@@ -48,3 +48,3 @@ /*

* @extends sap.ui.comp.smartmicrochart.SmartMicroChartBase
* @version 1.78.1
* @version 1.79.0
* @since 1.38

@@ -51,0 +51,0 @@ * @constructor

@@ -36,3 +36,3 @@ /*

* @extends sap.ui.comp.smartmicrochart.SmartMicroChartBase
* @version 1.78.1
* @version 1.79.0
* @since 1.38

@@ -39,0 +39,0 @@ * @constructor

@@ -37,3 +37,3 @@ /*

* @extends sap.ui.comp.smartmicrochart.SmartMicroChartBase
* @version 1.78.1
* @version 1.79.0
* @since 1.60

@@ -40,0 +40,0 @@ * @constructor

@@ -38,3 +38,3 @@ /*

* @extends sap.ui.comp.smartmicrochart.SmartMicroChartBase
* @version 1.78.1
* @version 1.79.0
* @since 1.58

@@ -41,0 +41,0 @@ * @constructor

@@ -34,3 +34,3 @@ /*

* @extends sap.ui.comp.smartmicrochart.SmartMicroChartBase
* @version 1.78.1
* @version 1.79.0
* @since 1.61

@@ -37,0 +37,0 @@ * @constructor

@@ -34,3 +34,3 @@ /*

* @extends sap.ui.comp.smartmicrochart.SmartMicroChartBase
* @version 1.78.1
* @version 1.79.0
* @constructor

@@ -37,0 +37,0 @@ * @public

@@ -37,3 +37,3 @@ /*

* @extends sap.ui.comp.smartmicrochart.SmartMicroChartBase
* @version 1.78.1
* @version 1.79.0
* @since 1.60

@@ -40,0 +40,0 @@ * @constructor

@@ -35,3 +35,3 @@ /*

* @extends sap.ui.core.Control
* @version 1.78.1
* @version 1.79.0
* @since 1.38

@@ -38,0 +38,0 @@ * @constructor

@@ -10,3 +10,3 @@ /*!

* @static
* @version 1.78.1
* @version 1.79.0
* @since 1.38.0

@@ -13,0 +13,0 @@ */

@@ -32,3 +32,3 @@ /*

* @extends sap.ui.comp.smartmicrochart.SmartMicroChartBase
* @version 1.78.1
* @version 1.79.0
* @constructor

@@ -35,0 +35,0 @@ * @public

@@ -35,3 +35,3 @@ /*

* @extends sap.ui.comp.smartmicrochart.SmartMicroChartBase
* @version 1.78.1
* @version 1.79.0
* @since 1.58

@@ -38,0 +38,0 @@ * @constructor

@@ -26,3 +26,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
*

@@ -29,0 +29,0 @@ * @public

@@ -111,3 +111,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
*

@@ -114,0 +114,0 @@ * @public

@@ -18,3 +18,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
*/

@@ -21,0 +21,0 @@ var AddMultiEditFields = {};

@@ -87,3 +87,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
*

@@ -113,2 +113,16 @@ * @public

defaultValue: true
},
/**
* Enables specific properties to be provided in the select query.
*/
enableODataSelect: {
type: "boolean",
defaultValue: false
},
/**
* Enables requestAtLeast properties to be added additionally when enableODataSelect is set to True. These are comma-separated value of fields that must be requested from the backend.
*/
requestAtLeastFields: {
type: "string",
defaultValue: ""
}

@@ -247,5 +261,2 @@ },

}, this);
this._oMultiInput.attachSuggestionItemSelected(function (oEvent) {
this._validateValueOnChange(oEvent.getSource().getValue());
}, this);

@@ -259,2 +270,6 @@ // create CRUD requests when used with binding context

this._oMultiInput.attachTokenUpdate(function (oEvent) {
// Doing the validation here rather than after suggestionitemselected event is fired has added advantage that this will be performed always
// And also, that all validation from SmartMultiInput is done before the consumer does their handling on tokenUpdate event of SmartMultiInput
this._validateValueOnChange(this._oMultiInput.getValue());
var mParameters = oEvent.getParameters();

@@ -537,12 +552,35 @@ delete mParameters.id;

};
SmartMultiInput.prototype._bindMultiInputTokens = function () {
var sNavigationPath = this._getNavigationPath();
var sNavigationPath = this._getNavigationPath(),
oSelectParameters;
if (this.getEnableODataSelect()) {
oSelectParameters = {
"select": this._addODataSelectParameters()
};
this._oMultiInput.bindAggregation("tokens", {
path: sNavigationPath,
parameters: oSelectParameters,
// create token for each entity from the navigation property
factory: this._tokensFactory.bind(this)
});
} else {
this._oMultiInput.bindAggregation("tokens", {
path: sNavigationPath,
// create token for each entity from the navigation property
factory: this._tokensFactory.bind(this)
});
}
this._oMultiInput.bindAggregation("tokens", {
path: sNavigationPath,
// create token for each entity from the navigation property
factory: this._tokensFactory.bind(this)
});
};
SmartMultiInput.prototype._addODataSelectParameters = function (oBinding) {
//get the property and description
var sSelect = this._getPropertyName();
if (this._getDescriptionFieldName()) {
sSelect = sSelect + "," + this._getDescriptionFieldName();
}
if (this.getRequestAtLeastFields()) {
sSelect = sSelect + "," + this.getRequestAtLeastFields();
}
return sSelect;
};

@@ -643,4 +681,2 @@

SmartMultiInput.prototype._createAndAttachHelperMultiInput = function () {
var sNavigationPath = this._getNavigationPath();
// "stub" multiinput to get list binding

@@ -650,15 +686,14 @@ this._oMultiInput = new MultiInput();

this._oMultiInput.setModel(this._getModel());
this._oMultiInput.bindAggregation("tokens", {
path: sNavigationPath,
factory: this._tokensFactory.bind(this)
});
//binding is done in one common place
this._bindMultiInputTokens();
var oBinding = this._oMultiInput.getBinding("tokens");
oBinding.attachChange(function () {
function updateSelectedKeys() {
var aKeys = this._oMultiInput.getTokens().map(function (oToken) {
return oToken.getKey();
});
this._oMultiComboBox.setSelectedKeys(aKeys);
}, this);
}
updateSelectedKeys.call(this); // call it directly because change event has been fired synchronously already
oBinding.attachChange(updateSelectedKeys, this);
};

@@ -665,0 +700,0 @@

@@ -17,3 +17,3 @@ /*

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @constructor

@@ -20,0 +20,0 @@ * @public

@@ -33,3 +33,3 @@ /*!

* @author SAP SE
* @version 1.78.1
* @version 1.79.0
* @since 1.63.0

@@ -36,0 +36,0 @@ *

@@ -112,3 +112,3 @@ /*

// Add a dummy div as content of the HTML control
oControl._oHTML.setContent("<div/>");
oControl._oHTML.setContent("<div></div>");
}

@@ -115,0 +115,0 @@ // Hack to update scroll of sap.m.List/ResponsiveTable - 1/2

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc