UNPKG

@railzai/railz-visualizations

Version:
7 lines 4.57 kB
/*! * Accounting Data as a Service™ is the solution that makes sense of your business customers' financial data. * Built with Stencil * Copyright (c) FIS. */ import{r,h as s}from"./p-a257e2b5.js";import{N as o,i as t,u as e}from"./p-fb585e73.js";import{T as a}from"./p-dadb736f.js";import{e as i}from"./p-81bde732.js";import"./p-ce5b13e7.js";import"./p-6c64b0b5.js";import"./p-3d5262c3.js";import"./p-b93548b9.js";import"./p-7497d5a3.js";const l='@font-face{font-family:Inter;src:url("../assets/fonts/Inter-italic-var.woff2");font-family:Inter;src:url("../assets/fonts/Inter-upright-var.woff2")}body,div[class^=railz-],div[class*=" railz-"]{font-family:Inter, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}@keyframes progress{0%{transform:rotate(0deg)}12.5%{transform:rotate(180deg);animation-timing-function:linear}25%{transform:rotate(630deg)}37.5%{transform:rotate(810deg);animation-timing-function:linear}50%{transform:rotate(1260deg)}62.5%{transform:rotate(1440deg);animation-timing-function:linear}75%{transform:rotate(1890deg)}87.5%{transform:rotate(2070deg);animation-timing-function:linear}100%{transform:rotate(2520deg)}}@keyframes progress-pseudo{0%{transform:rotate(-30deg)}29.4%{border-left-color:transparent}29.41%{border-left-color:currentcolor}64.7%{border-bottom-color:transparent}64.71%{border-bottom-color:currentcolor}100%{border-left-color:currentcolor;border-bottom-color:currentcolor;transform:rotate(225deg)}}:host{text-align:left;flex:1;display:flex}p{margin:0}.rv-progress-bar-div{flex:1;justify-content:space-around;display:flex;flex-direction:column}.rv-progress-bar-div .rv-progress-bar-total-unpaid{color:#4f4f4f;font-size:14px;font-weight:500}.rv-progress-bar-div .rv-progress-bar-total-unpaid span{font-weight:600}.rv-progress-bar-div .rv-progress-bar-total-unpaid-value{font-weight:600}.rv-progress-bar-div .rv-progress-bar-values-div{display:flex;justify-content:space-between;margin-bottom:16px}.rv-progress-bar-div .rv-progress-bar-values-div .rv-progress-bar-overdue{text-align:right}.rv-progress-bar-div .rv-progress-bar-label{color:#4f4f4f;font-size:12px;font-weight:500}.rv-progress-bar-div .rv-progress-bar-value{font-weight:600;font-size:14px;color:#000}.rv-progress-bar{height:16px;background:#f5f5f5;border-radius:3px}.rv-progress-bar>span{display:block;height:100%;background:#ffed8c;border-radius:3px 0 0 3px}';const n=class{constructor(s){r(this,s);this.normalize=(r,s)=>r*100/s;this.titleMapping={[i.INVOICES]:a.RV_INVOICES,[i.BILLS]:a.RV_BILLS}}componentWillLoad(){this._options=o(this.options)}render(){var r,o,i,l,n,d,p,v,f,b,g;if(t(this.paidAmount)||t(this.unpaidAmount)){return s("span",null)}return s("div",{class:"rv-progress-bar-div",style:(r=this.options)===null||r===void 0?void 0:r.divStyle},((o=this._options)===null||o===void 0?void 0:o.hideLabels)?null:s("p",{class:"rv-progress-bar-total-unpaid",style:(i=this._options)===null||i===void 0?void 0:i.titleStyle,"aria-label":`${a.RV_TOTAL_UNPAID} ${e(this.unpaidAmount)}`},a.RV_TOTAL_UNPAID," ",this.titleMapping[this.reportType]||""," ",s("span",{class:"rv-progress-bar-total-unpaid-value",style:(l=this._options)===null||l===void 0?void 0:l.titleValueStyle,"aria-hidden":true},"$",e(this.unpaidAmount))),s("div",{class:"rv-progress-bar-values"},((n=this._options)===null||n===void 0?void 0:n.hideLabels)?null:s("div",{class:"rv-progress-bar-values-div"},s("div",null,s("p",{class:"rv-progress-bar-label",style:(d=this._options)===null||d===void 0?void 0:d.subTitle1Style,"aria-label":`${a.RV_PAID} ${e(this.paidAmount)}`},a.RV_PAID),s("p",{class:"rv-progress-bar-value",style:(p=this._options)===null||p===void 0?void 0:p.subTitleValue1Style,"aria-hidden":true},"$",e(this.paidAmount))),s("div",null,s("p",{class:"rv-progress-bar-label rv-progress-bar-overdue",style:(v=this._options)===null||v===void 0?void 0:v.subTitle2Style,"aria-label":`${a.RV_OVERDUE} ${e(this.overdueAmount)||0}`},a.RV_OVERDUE),s("p",{class:"rv-progress-bar-value rv-progress-bar-overdue",style:(f=this._options)===null||f===void 0?void 0:f.subTitleValue2Style,"aria-hidden":true},"$",e(this.overdueAmount)||0))),s("div",{class:"rv-progress-bar",style:(b=this._options)===null||b===void 0?void 0:b.barStyle},s("span",{style:Object.assign({width:`${this.normalize(this.paidAmount,this.unpaidAmount+this.paidAmount)}%`},(g=this._options)===null||g===void 0?void 0:g.progressStyle)}))))}};n.style=l;export{n as railz_progress_bar}; //# sourceMappingURL=p-ddfedbd9.entry.js.map