var Unibase; (function (Unibase) { let Themes; (function (Themes) { let Compact; (function (Compact) { let KpiWidgets; (function (KpiWidgets) { class Singlevaluepiechart extends KpiWidgets.Manager.KpiManager { jsFiles() { return []; } cssFiles() { return []; } html(id, containerid) { let title = id[0].WidgetName, html = ''; if (id[0].PortletWidgetId == 22501 || id[0].PortletWidgetId == 2250) { html = ''; } else { html = ''; } return html; } load(id, containerid, callback) { let instance = this; instance._load(id, containerid, null); } _loadData(portletwidgetid, Container, parameters, IsPreview, response, portletresponse) { let instance = this; instance.loadData(portletwidgetid, Container, parameters, IsPreview, response, portletresponse); } _styling(portletwidgetid, Container, response) { let cssproperty = JSON.parse(response.result.CssProperty); let height = response.result.KpiHeight + 'px'; var iconhtml = ''; if (response.result.Icon != '') { $(Container).find("#div_kpi_icon_" + portletwidgetid).siblings('span').remove(); $("#div_kpi_icon_" + portletwidgetid).html(iconhtml); } else { $(Container).find("#div_kpi_icon_" + portletwidgetid).siblings('span').remove(); $(Container).find("#div_kpi_icon_" + portletwidgetid).parent().remove(); } $(Container).find(".bgcolorset_" + portletwidgetid + "").css({ "background-color": cssproperty[0].BackgroundColor, "border-width": cssproperty[0].BorderWidth, "border-style": cssproperty[0].BorderType, "border-color": cssproperty[0].BorderColor, "border-radius": cssproperty[0].BorderColor, "height": height }); $(Container).find(".kpivalue_" + portletwidgetid + '[data-valuebind="Value-1"]').css({ "font-size": cssproperty[0].FontSize + "px", "font-family": cssproperty[0].FontStyle }); let kpihidden; if (cssproperty[0].KPI_ValueHidden != '' && cssproperty[0].KPI_ValueHidden != null) { kpihidden = cssproperty[0].KPI_ValueHidden.split(','); for (let i = 0; i < kpihidden.length; i++) { $('.kpivalue_2_' + portletwidgetid).addClass("mt-3"); if (kpihidden[i] == 'true' && kpihidden[i] != '' && kpihidden[i] != null && kpihidden[i].length != 0) { $('.kpivalue_' + (i + 1) + '_' + portletwidgetid).removeClass('d-flex').addClass('d-none'); if (kpihidden[1] == 'true') { $('.kpivalue_2_' + portletwidgetid).css('margin-top', '0px'); $('.kpivalue_1_' + portletwidgetid).css('margin-top', '0px'); } } } } } static Instance() { if (this.instance === null || this.instance === undefined) this.instance = new Singlevaluepiechart(); return this.instance; } } KpiWidgets.Singlevaluepiechart = Singlevaluepiechart; })(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {})); })(Compact = Themes.Compact || (Themes.Compact = {})); })(Themes = Unibase.Themes || (Unibase.Themes = {})); })(Unibase || (Unibase = {}));