Sha256: f5cd23d52066bb1e938315b4985b90988f2b30d240117a0a5eb26630cafeac1b
Contents?: true
Size: 1.94 KB
Versions: 3
Compression:
Stored size: 1.94 KB
Contents
/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2018 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ sap.ui.define(["sap/ui/core/library"],function(c){"use strict";var V=c.ValueState;var P={};P.render=function(r,C){var p=C.getPercentValue(),w=C.getWidth(),h=C.getHeight(),s=C._getCSSClassByPercentValue(p),t=C.getDisplayValue(),S=C.getShowValue(),a=C.getState(),T=C.getTextDirection().toLowerCase(),b=C.getId();r.write("<div");r.writeControlData(C);r.addClass("sapMPI");r.addClass(s);r.addStyle("width",w);if(h){r.addStyle("height",h);}if(C.getEnabled()){r.writeAttribute('tabIndex','-1');}else{r.addClass("sapMPIBarDisabled");}if(C.getDisplayOnly()){r.addClass("sapMPIDisplayOnly");}r.writeClasses();r.writeStyles();r.writeAccessibilityState(C,{role:"progressbar",valuemin:0,valuenow:p,valuemax:100,valuetext:C._getAriaValueText({sText:t,fPercent:p})});if(C.getTooltip_AsString()){r.writeAttributeEscaped("title",C.getTooltip_AsString());}r.write(">");r.write("<div");r.addClass("sapMPIBar");switch(a){case V.Warning:r.addClass("sapMPIBarCritical");break;case V.Error:r.addClass("sapMPIBarNegative");break;case V.Success:r.addClass("sapMPIBarPositive");break;case V.Information:r.addClass("sapMPIBarInformation");break;default:r.addClass("sapMPIBarNeutral");break;}r.writeClasses();r.writeAttribute("id",b+"-bar");r.writeAttribute("style","flex-basis:"+p+"%");r.write(">");P._renderDisplayText(r,T,"Left",b);if(S){r.writeEscaped(t);}r.write("</span>");r.write("</div>");r.write("<div");r.addClass("sapMPIBarRemaining");r.writeAttribute("id",b+"-remainingBar");r.writeClasses();r.write(">");P._renderDisplayText(r,T,"Right",b);if(S){r.writeEscaped(t);}r.write("</span>");r.write("</div>");r.write("</div>");};P._renderDisplayText=function(r,t,T,C){r.write("<span class='sapMPIText sapMPIText"+T+"' id='"+C+"-text"+T+"'");if(t!=="inherit"){r.writeAttribute("dir",t);}r.write('>');};return P;},true);
Version data entries
3 entries across 3 versions & 1 rubygems