This commit is contained in:
2023-03-11 17:30:20 +00:00
commit b6c4e025bc
5124 changed files with 1153349 additions and 0 deletions
@@ -0,0 +1,144 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class CarouselSlider extends Unibase.Platform.Core.BaseComponent {
html(id, containerid) {
let title = id[0].WidgetName;
var html = '<div class="card mb-0 card-sm" id="widget_kpis_2" style="height:120px;">' +
'<div class="card-body">' +
'<div id="sales_slider_' + id[0].PortletWidgetId + '" class="carousel slide" data-ride="carousel">' +
'<div class="d-flex justify-content-between align-items-center">' +
'<span class="d-block font-14 font-weight-400 text-dark mt-5" id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '">' + title + '</span> ' +
'<div class="btn-group border-0 ml-20">' +
'<div class="sw-carousel-slider-control">' +
'<a class="text-dark carousel-control-prev" href="#sales_slider_' + id[0].PortletWidgetId + '" data-slide="prev">' +
'<i class="fa fa-angle-left"></i>' +
'</a>' +
'<p class="carousel-status" id="CarouselStatus"></p>' +
'<a class="text-dark carousel-control-next" href="#sales_slider_' + id[0].PortletWidgetId + '" data-slide="next">' +
'<i class="fa fa-angle-right"></i>' +
'</a>' +
'<span id="config_widget_' + id[0].PortletWidgetId + '"></span>' +
'</div>' +
'</div>' +
'</div>' +
'<div class="carousel-inner"><div class="carousel-item carouselItem_0"><div class="d-block align-items-end justify-content-between"><div class="mt-10"><span class="d-block font-weight-500 text-dark"><span class="text-uppercase font-11 font-weight-500 text-dark">236</span><span class="d-block text-dark font-weight-500 pull-right font-14">Lead</span></span><span class="text-light" style="font-size:10px;margin-top:-10px;"></span></div><div class="pull-right ml-20" style="margin-top:5px"><a href="#" class="pull-right"> <small id="showreport_100020390001754" class="showreport_100020390001754 font-sm-11">Show Report</small></a></div></div></div><div class="carousel-item carouselItem_1"><div class="d-block align-items-end justify-content-between"><div class="mt-10"><span class="d-block font-weight-500 text-dark"><span class="text-uppercase font-11 font-weight-500 text-dark">16</span><span class="d-block text-dark font-weight-500 pull-right font-14">Qualify</span></span><span class="text-light" style="font-size:10px;margin-top:-10px;"></span></div><div class="pull-right ml-20" style="margin-top:5px"><a href="#" class="pull-right"> <small id="showreport_100020390001754" class="showreport_100020390001754 font-sm-11">Show Report</small></a></div></div></div><div class="carousel-item carouselItem_2"><div class="d-block align-items-end justify-content-between"><div class="mt-10"><span class="d-block font-weight-500 text-dark"><span class="text-uppercase font-11 font-weight-500 text-dark">331</span><span class="d-block text-dark font-weight-500 pull-right font-14">Total Customers</span></span><span class="text-light" style="font-size:10px;margin-top:-10px;"></span></div><div class="pull-right ml-20" style="margin-top:5px"><a href="#" class="pull-right"> <small id="showreport_100020390001754" class="showreport_100020390001754 font-sm-11">Show Report</small></a></div></div></div><div class="carousel-item carouselItem_3"><div class="d-block align-items-end justify-content-between"><div class="mt-10"><span class="d-block font-weight-500 text-dark"><span class="text-uppercase font-11 font-weight-500 text-dark">75</span><span class="d-block text-dark font-weight-500 pull-right font-14">Confirmed</span></span><span class="text-light" style="font-size:10px;margin-top:-10px;"></span></div><div class="pull-right ml-20" style="margin-top:5px"><a href="#" class="pull-right"> <small id="showreport_100020390001754" class="showreport_100020390001754 font-sm-11">Show Report</small></a></div></div></div><div class="carousel-item carouselItem_4 active"><div class="d-block align-items-end justify-content-between"><div class="mt-10"><span class="d-block font-weight-500 text-dark"><span class="text-uppercase font-11 font-weight-500 text-dark">3</span><span class="d-block text-dark font-weight-500 pull-right font-14">Rejected</span></span><span class="text-light" style="font-size:10px;margin-top:-10px;"></span></div><div class="pull-right ml-20" style="margin-top:5px"><a href="#" class="pull-right"> <small id="showreport_100020390001754" class="showreport_100020390001754 font-sm-11">Show Report</small></a></div></div></div></div>' +
'</div>' +
'</div>' +
'</div>' +
'</div>';
return html;
}
jsFiles() {
return ["platform/widgets/managers/interfaces/iwidgetmanager.js",
"platform/widgets/managers/widgetmanager.js",
"platform/core/helpers/propertyhelper/propertyhelper.js",
"platform/core/helpers/token/tokenhelper.js",
"platform/core/helpers/numberhelper/numberhelper.js",
"platform/analytics/components/reportviewer/reportviewer.js",
];
}
cssFiles() {
return [];
}
load(id, containerid, callback) {
let instance = this;
let inputparameters = Unibase.Themes.Providers.DashboardHelper.Instance().replaceWidgetParameterValues(id[0].WidgetParameters, id[0].InstalledAppId);
let fromDate = "", toDate = "";
var cf_fromDate = Unibase.Platform.Membership.Infos.Identity.currentUser.fromDate;
var cf_toDate = Unibase.Platform.Membership.Infos.Identity.currentUser.toDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
var parameters = {
WidgetId: id[0].WidgetId,
PortletWidgetId: id[0].PortletWidgetId,
InstalledAppId: id[0].InstalledAppId,
InputParameters: inputparameters,
FromDate: fromDate,
ToDate: toDate
};
instance.loadResponseData(id[0].PortletWidgetId, containerid, parameters);
}
loadResponseData(portletwidgetid, detailContainer, parameters) {
let instance = this;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKpiWidgetData(parameters).then(function (response) {
instance.loadData(portletwidgetid, detailContainer, parameters, false, response);
});
}
loadData(portletwidgetid, containerid, parameters, IsPreview, response) {
containerid = "." + containerid;
var instance = this;
debugger;
if (response.result != null) {
var post = response.result;
var data = JSON.parse(post.Data);
var obj = new Object();
var parentobj = [];
for (var i = 0; i < data.length; i++) {
var data_1 = data[i];
var j = 1;
for (var key in data_1) {
obj['Value_' + j] = data_1[key];
j++;
}
parentobj.push({
value_1: obj["Value_1"],
value_2: obj["Value_2"],
value_3: obj["Value_3"]
});
var margin = "margin-top:-5px";
if (parentobj[i].value_3 == undefined || parentobj[i].value_3 == null) {
parentobj[i].value_3 = "";
margin = "margin-top:5px";
}
}
var html = "";
for (var i = 0; i < parentobj.length; i++) {
html += '<div class="carousel-item carouselItem_' + i + '">' +
'<div class="d-block align-items-end justify-content-between">' +
'<div class="mt-10">' +
'<span class="d-block font-weight-500 text-dark">' +
'<span class="text-uppercase font-11 font-weight-500 text-dark">' + parentobj[i].value_2 + '</span>' +
'<span class="d-block text-dark font-weight-500 pull-right font-14">' + parentobj[i].value_1 + '</span>' +
'</span>' +
'<span class="text-light" style="font-size:10px;margin-top:-10px;">' + parentobj[i].value_3 + '</span>' +
'</div>' +
'<div class="pull-right ml-20" style="' + margin + '">' +
'<a href="#" class="pull-right" > <small id="showreport_' + portletwidgetid + '" class="showreport_' + portletwidgetid + ' font-sm-11">Show Report</small></a>' +
'</div>' +
'</div>' +
'</div>';
}
$(containerid).find(".carousel-inner").html(html);
$(containerid).find(".carouselItem_0").addClass('active');
$(containerid).find('#sales_slider_' + portletwidgetid).carousel({
interval: 3000
});
$(containerid).find('#sales_slider_' + portletwidgetid).carousel("cycle");
var colors = ["primary", "success", "warning", "danger", "info", "light", "secondary", "dark"];
}
$(containerid).siblings('.line-loader').remove();
$(containerid).removeClass('hidden');
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new CarouselSlider();
return this.instance;
}
}
KpiWidgets.CarouselSlider = CarouselSlider;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,119 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Carouselsliderbgcolor extends Unibase.Platform.Core.BaseComponent {
html(id, containerid) {
let title = id[0].WidgetName;
var html = '<div class="mb-0 card-sm bgcolorset_' + id[0].PortletWidgetId + ' kpi_card_class_' + id[0].PortletWidgetId + '" style="background-color:#feec76; height:120px;border-radius:5px"><div class="card-body border-0 p-0"><div id="sales_slider_' + id[0].PortletWidgetId + '" class="carousel slide" data-ride="carousel"><div class="d-flex font-weight-500 text-dark px-3 py-2" style="border-bottom: 1px dashed black;"><div class="w-95 "> <span class="w-100 font-14 mt-5" id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '">' + title + '</span></div> <span class="w-15 text-right"><a href="javascript:;" class="pull-right reportappend"></a></span></div><div class="bottom-carousel px-3" style="margin-top:-11px"><div class="d-flex flex-row"><div class="carousel-inner w-85"><div class="carousel-item carouselItem_0 active"><div class="mt-10"> <span class="d-flex flex-column font-weight-500 text-dark"> <span class="textPropertyOwl_" style="font-size: 28px;">236</span> <span class="font-14 text-dark">Lead</span> </span></div></div><div class="carousel-item carouselItem_1"><div class="mt-10"> <span class="d-flex flex-column font-weight-500 text-dark"> <span class="textPropertyOwl_" style="font-size: 28px;">3</span> <span class="font-14 text-dark">Rejected</span> </span></div></div></div><div class="btn-group border-0 w-15"><div class="sw-carousel-slider-control mt-50 ml-auto"> <a class="text-dark p-2" href="#sales_slider_' + id[0].PortletWidgetId + '" data-slide="prev"> <i class="font-18 fa fa-angle-double-left"></i> </a><p class="carousel-status" id="CarouselStatus"></p> <a class="text-dark pl-2" href="#sales_slider_' + id[0].PortletWidgetId + '" data-slide="next"> <i class="font-18 fa fa-angle-double-right"></i> </a> <span id="config_widget_' + id[0].PortletWidgetId + '"></span></div></div></div></div></div></div></div>';
return html;
}
jsFiles() {
return ["platform/widgets/managers/interfaces/iwidgetmanager.js", "platform/widgets/managers/widgetmanager.js", "platform/core/helpers/propertyhelper/propertyhelper.js", "platform/core/helpers/token/tokenhelper.js", "platform/core/helpers/numberhelper/numberhelper.js", "platform/analytics/components/reportviewer/reportviewer.js"];
}
cssFiles() {
return [];
}
load(id, containerid, callback) {
let instance = this;
let inputparameters = Unibase.Themes.Providers.DashboardHelper.Instance().replaceWidgetParameterValues(id[0].WidgetParameters, id[0].InstalledAppId);
let fromDate = "", toDate = "";
var cf_fromDate = Unibase.Platform.Membership.Infos.Identity.currentUser.fromDate;
var cf_toDate = Unibase.Platform.Membership.Infos.Identity.currentUser.toDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
var parameters = {
WidgetId: id[0].WidgetId,
PortletWidgetId: id[0].PortletWidgetId,
InstalledAppId: id[0].InstalledAppId,
InputParameters: inputparameters,
FromDate: fromDate,
ToDate: toDate
};
instance.loadResponseData(id[0].PortletWidgetId, containerid, parameters);
}
loadResponseData(portletwidgetid, detailContainer, parameters) {
let instance = this;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKpiWidgetData(parameters).then(function (response) {
instance.loadData(portletwidgetid, detailContainer, parameters, false, response);
});
}
loadData(portletwidgetid, containerid, parameters, IsPreview, response) {
containerid = "." + containerid;
var cssproperty = JSON.parse(response.result.CssProperty);
var instance = this;
if (response.result != null) {
var post = response.result;
var data = JSON.parse(post.Data);
var obj = new Object();
var parentobj = [];
for (var i = 0; i < data.length; i++) {
var data_1 = data[i];
var j = 1;
for (var key in data_1) {
obj['Value_' + j] = data_1[key];
j++;
}
parentobj.push({
value_1: obj["Value_1"],
value_2: obj["Value_2"],
value_3: obj["Value_3"]
});
var margin = "margin-top:-5px";
if (parentobj[i].value_3 == undefined || parentobj[i].value_3 == null) {
parentobj[i].value_3 = "";
margin = "margin-top:5px";
}
}
var html = "", html2 = "";
for (var i = 0; i < parentobj.length; i++) {
html += '<div class="carousel-item carouselItem_' + i + '"><div class="mt-20 d-flex flex-row align-items-center"><div class="mr-2 w-55p h-55p div_kpi_icon_' + portletwidgetid + '"><img src="tenants/themes/compact/imgs/img55.png" onerror="ReloadImage(event)" data-dynamic="1" class="img-fluid imageUpload" style="filter: invert(1);"></div><span class="d-flex flex-column h-100 font-weight-500 text-dark" style="margin-top:-10px"> <span class="textPropertyOwl_">' + parentobj[i].value_2 + '</span> <span class="font-14 text-dark">' + parentobj[i].value_1 + '</span> </span></div></div>';
html2 = '<small id="showreport_' + portletwidgetid + '" class="showreport_' + portletwidgetid + ' font-sm-11 hidden"><span class="nav-icon-wrap"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small>';
}
$(containerid).find(".carousel-inner").html(html);
$(containerid).find(".reportappend").html(html2);
$(containerid).find(".carouselItem_0").addClass('active');
$(containerid).find(".bgcolorset_" + portletwidgetid + "").css({ "background-color": cssproperty[0].BackgroundColor, "height": response.result.KpiHeight, "border": cssproperty[0].BorderWidth + ' ' + cssproperty[0].BorderType + ' ' + cssproperty[0].BorderColor });
$(containerid).find('.textPropertyOwl_').css({ "font-size": cssproperty[0].FontSize + 'px' });
let y = 1;
if (cssproperty[0].BackgroundColor.charAt(1) == 'f') {
y = 0;
}
var iconhtml = '<img src="' + response.result.Icon + '" onerror="ReloadImage(event)" data-dynamic="1" class="img-fluid imageUpload" style="filter: invert(' + y + ');">';
if (response.result.Icon == "" || response.result.Icon == undefined) { }
else {
$(containerid).find(".div_kpi_icon_" + portletwidgetid).html(iconhtml);
}
if (response.result.LinkReportId != 0) {
$(containerid).find("#showreport_" + portletwidgetid).removeClass('hidden');
}
$(containerid).find('#sales_slider_' + portletwidgetid).carousel({
interval: 3000
});
$(containerid).find('#sales_slider_' + portletwidgetid).carousel("cycle");
var colors = ["primary", "success", "warning", "danger", "info", "light", "secondary", "dark"];
}
$(containerid).siblings('.line-loader').remove();
$(containerid).removeClass('hidden');
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Carouselsliderbgcolor();
return this.instance;
}
}
KpiWidgets.Carouselsliderbgcolor = Carouselsliderbgcolor;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,178 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Comparision extends Unibase.Platform.Core.BaseComponent {
jsFiles() {
return [];
}
cssFiles() {
return [];
}
html(id, containerid) {
let title = id[0].WidgetName;
var html = '<div class="card card-sm" id="widget_kpis_Comparision kpi-card">' +
'<a href="Javascript:;" class="kpi-link-report" onclick="Unibase.Themes.Compact.KpiWidgets.Comparision.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + "'" + containerid + "'" + ')";><small id="showreport_' + id[0].PortletWidgetId + '" class="font-sm-11"><span class="nav-icon-wrap"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a>' +
'<div class="card-body p-2">' +
'<span class="d-block font-14 font-weight-400 text-dark mb-10" ><span id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '">' + title + '</span>' +
'</span>' +
'<span class="d-block align-items-center card-action-wrap pull-right font-11" >' +
'<a href="#" class="inline-block full-screen mr-15 hidden" id="kpi_FullScreen_' + id[0].PortletWidgetId + '">' +
'<i class="ion ion-md-expand"></i>' +
'</a>' +
'</span>' +
'<span class="d-block text-primary mb-10 pull-right font-11" id="kpi_Percentage_' + id[0].PortletWidgetId + '">0%</span></span>' +
'<span id="config_widget_' + id[0].PortletWidgetId + '"></span>' +
'<span class="d-block display-5 font-weight-400 text-dark" id="kpi_value_1_' + id[0].PortletWidgetId + '">0000</span>' +
'<span class="text-secondary font-12 ml-1" ><span id="kpi_value_2_' + id[0].PortletWidgetId + '"></span>000000</span>' +
'</div>' +
'</div>';
return html;
}
load(id, containerid, callback) {
let instance = this;
let inputparameters = Unibase.Themes.Providers.DashboardHelper.Instance().replaceWidgetParameterValues(id[0].WidgetParameters, id[0].InstalledAppId);
let fromDate = "", toDate = "";
var cf_fromDate = Unibase.Platform.Membership.Infos.Identity.currentUser.fromDate;
var cf_toDate = Unibase.Platform.Membership.Infos.Identity.currentUser.toDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
var parameters = {
WidgetId: id[0].WidgetId,
PortletWidgetId: id[0].PortletWidgetId,
InstalledAppId: id[0].InstalledAppId,
InputParameters: inputparameters,
FromDate: fromDate,
ToDate: toDate
};
instance.loadResponseData(id[0].PortletWidgetId, containerid, parameters);
}
loadResponseData(portletwidgetid, detailContainer, parameters) {
let instance = this;
instance.inputParameters = parameters.InputParameters;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKpiWidgetData(parameters).then(function (response) {
instance.loadData(portletwidgetid, detailContainer, parameters, false, response);
});
}
loadData(portletwidgetid, detailContainer, parameters, IsPreview, response) {
detailContainer = '.' + detailContainer;
var post = response.result;
if (post != null) {
if (post.IsMaximize == true) {
$("#kpi_FullScreen_" + portletwidgetid).removeClass("hidden");
}
if (response != null) {
var data = JSON.parse(post.Data)[0];
var selected_values = post.Selected_Columns;
var sp = selected_values.split(',');
var column1 = sp[0];
var column2 = sp[1];
var column3 = sp[2];
var Value_1 = data[column1];
var Value_2 = data[column2];
var Value_3 = data[column3];
if (data == null || data == "" || data == undefined) {
Value_1 = 0;
Value_2 = 0;
}
if (Value_2 != 0)
var difference = Value_2 - Value_1;
if (Value_3 == null || Value_3 == undefined) {
var kpi_percentage = Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(((Value_2 - Value_1) / Value_2) * 100, 2);
if (difference > 0) {
$(detailContainer).find("#kpi_Percentage_" + portletwidgetid).addClass('text-success');
kpi_percentage = '+' + kpi_percentage;
}
else if (difference < 0) {
$(detailContainer).find("#kpi_Percentage_" + portletwidgetid).addClass('text-danger');
kpi_percentage = '-' + kpi_percentage;
}
else {
$(detailContainer).find("#kpi_Percentage_" + portletwidgetid).removeClass('d-block');
$(detailContainer).find("#kpi_Percentage_" + portletwidgetid).addClass('hidden');
}
}
else {
var kpi_percentage = Value_3;
if (Value_3 > 0) {
$(detailContainer).find("#kpi_Percentage_" + portletwidgetid).addClass('text-success');
kpi_percentage = '+' + kpi_percentage;
}
else if (Value_3 < 0) {
$(detailContainer).find("#kpi_Percentage_" + portletwidgetid).addClass('text-danger');
kpi_percentage = '-' + kpi_percentage;
}
else {
$(detailContainer).find("#kpi_Percentage_" + portletwidgetid).removeClass('d-block');
$(detailContainer).find("#kpi_Percentage_" + portletwidgetid).addClass('hidden');
}
}
$(detailContainer).find("#kpi_value_1_" + portletwidgetid).text(Value_1);
$(detailContainer).find("#kpi_value_2_" + portletwidgetid).text(Value_2);
$(detailContainer).find("#kpi_Percentage_" + portletwidgetid).text(kpi_percentage + '% ');
var colors = ["primary", "success", "warning", "danger", "info", "light", "secondary", "dark"];
if (response.result.AppConfigurations.length != 0) {
var designhtml = "";
var appconfig = response.result.AppConfigurations;
for (var i = 0; i < appconfig.length; i++) {
var onlickurl = "";
var sname = appconfig[i].SettingName.replace(/ /g, '');
designhtml += ' <span class="mr-10"><a href="javascript:;" id="widgetconfig_' + sname + '" onclick="' + onlickurl + '">' +
'<button class="btn btn-sm btn-' + colors[i] + ' pull-right btn-rounded text-white">' + appconfig[i].SettingName + '</button>' +
'</a> </span>';
}
designhtml += "</div>";
$(detailContainer).find("#config_widget_" + portletwidgetid).html(designhtml);
}
if (post.LinkReportId != 0 && post.LinkReportId != null) {
}
else {
$(detailContainer).find("#showreport_" + portletwidgetid).addClass('hidden');
}
}
}
$(detailContainer).siblings('.line-loader').remove();
$(detailContainer).removeClass('hidden');
}
linkReport(widgetid, portletwidgetid, containerid) {
return __awaiter(this, void 0, void 0, function* () {
var instance = this;
yield Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKPIWidget(widgetid).then(function (response) {
var res = response.result;
if (res != null) {
let containerid = "div_kpireport_" + portletwidgetid;
instance.navigationHelper.popup(res.LinkReportId, containerid, Unibase.Platform.Analytics.Components.ReportViewer.Instance(), null, Unibase.Platform.Helpers.Size.ExtraLarge);
}
});
});
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Comparision();
return this.instance;
}
}
KpiWidgets.Comparision = Comparision;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,55 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Comparisionbottombarcolor extends KpiWidgets.Manager.KpiManager {
jsFiles() {
return ["platform/widgets/managers/interfaces/iwidgetmanager.js", "platform/widgets/managers/widgetmanager.js", "platform/core/helpers/propertyhelper/propertyhelper.js", "platform/core/helpers/token/tokenhelper.js", "platform/core/helpers/numberhelper/numberhelper.js", "platform/analytics/components/reportviewer/reportviewer.js"];
}
cssFiles() {
return [];
}
html(id, containerid) {
let title = id[0].WidgetName;
var html = '<div class="position-relative kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" style="background-color:#fff; height:120px; border-radius:5px"><a href="javascript:;" onclick="Unibase.Themes.Compact.KpiWidgets.Manager.KpiManager.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ', ' + containerid + ')" id="showreport_' + id[0].PortletWidgetId + '" class="kpi-link-report"><small id="showreport_' + id[0].PortletWidgetId + '"><span class="nav-icon-wrap"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a><div class="card-body card-body-kpi-CBBC-' + id[0].PortletWidgetId + ' p-2 font-weight-500 text-dark" data-height="height1"><ul class="d-flex justify-content-between h-100 flex-column"><li class="d-flex flex-row justify-content-between my-auto"> <span class="font-weight-400 line-height-10 textProperty_' + id[0].PortletWidgetId + ' kpivalue_1_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-1" style="font-size:32px">3600</span><span class=""><span class="ml-auto pr-3" id="config_widget_' + id[0].PortletWidgetId + '"></span></span></li><li class="d-flex flex-row font-weight-400 font-16 text-right justify-content-between align-items-center"><p class="" id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '" data-kpi="kpi_font">' + title + ' </p><span class="pull-right font-14 font-weight-500 kpivalue_' + id[0].PortletWidgetId + ' kpivalue_2_' + id[0].PortletWidgetId + '" data-valuebind="Value-2">88%</span> </li></ul> </div><div class="border-0 kpivalue_3_' + id[0].PortletWidgetId + ' p-2 d-flex justify-content-between font-weight-400 bgcolorset_' + id[0].PortletWidgetId + ' text-white" data-height="height2" style="background-color:#009b84;"> <p class="my-auto kpivalueLabel_' + id[0].PortletWidgetId + '" data-valueLabelBind="Value-1" data-kpi="kpi_font">Total Credit Customers</p><p class="my-auto kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-3" data-kpi="kpi_font">20,000</p></div></div>';
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';
let border = cssproperty[0].BorderWidth + ' ' + cssproperty[0].BorderType + ' ' + cssproperty[0].BorderColor;
let bottomborder = '0px 0px ' + cssproperty[0].BorderRadius + ' ' + cssproperty[0].BorderRadius;
var calheight, calheight1, calheight2;
calheight = parseInt(height.replace(/px/g, ''));
calheight1 = calheight * 0.66;
calheight1 = parseInt(Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(calheight1, 0));
calheight2 = calheight - calheight1;
$(Container).find('[data-height="height1"]').css('height', calheight1 + 'px');
$(Container).find('[data-height="height2"]').css('height', calheight2 + 'px');
$(Container).find(".bgcolorset_" + portletwidgetid + "").css({ "background-color": cssproperty[0].BackgroundColor, "border-radius": bottomborder });
$(Container).find(".kpi_card_class_" + portletwidgetid + "").css({ "border": border, height: height, "border-radius": cssproperty[0].BorderRadius });
$(Container).find(".kpivalue_" + portletwidgetid + '[data-valuebind="Value-1"]').css({ 'font-size': cssproperty[0].FontSize + 'px' });
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Comparisionbottombarcolor();
return this.instance;
}
}
KpiWidgets.Comparisionbottombarcolor = Comparisionbottombarcolor;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
@@ -0,0 +1 @@
{"version":3,"file":"comparisionbottombarcolor.js","sourceRoot":"","sources":["comparisionbottombarcolor.ts"],"names":[],"mappings":"AAGA,IAAU,OAAO,CAkEhB;AAlED,WAAU,OAAO;IACb,IAAiB,MAAM,CAgEtB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W,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,EAAE,CAAC,CAAC;oBAE1I,CAAC;oBAED,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;4BACrD,IAAI,CAAC,QAAQ,GAAG,IAAI,yBAAyB,EAAE,CAAC;wBACpD,OAAO,IAAI,CAAC,QAAQ,CAAC;oBACzB,CAAC;iBACJ;gBA1DY,oCAAyB,4BA0DrC,CAAA;YACL,CAAC,EA5DgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QA4D1B;QACL,CAAC,EA9DgB,OAAO,GAAP,cAAO,KAAP,cAAO,QA8DvB;IACL,CAAC,EAhEgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAgEtB;AACL,CAAC,EAlES,OAAO,KAAP,OAAO,QAkEhB"}
@@ -0,0 +1,49 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Comparisionrightbarcolor extends KpiWidgets.Manager.KpiManager {
jsFiles() {
return [];
}
cssFiles() {
return [];
}
html(id, containerid) {
let title = id[0].WidgetName;
var html = '<ul class="position-relative bg-white text-dark font-weight-500 d-flex kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" id="widget_kpis_Comparision" style="height:120px;border-radius:5px"><li class="kpi-link-report"><a href="javascript:;" id="showreport_' + id[0].PortletWidgetId + '" onclick="Unibase.Themes.Compact.KpiWidgets.Comparision.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + "'" + containerid + "'" + ')"> <small id="showreport_' + id[0].PortletWidgetId + '" class="font-sm-11"> <span class="nav-icon-wrap"> <i class="font-14 dripicons dripicons-graph-pie text-dark"></i> </span> </small> </a> </li><li class="d-flex flex-column w-65 font-14 font-weight-normal p-2"> <ul class="d-flex justify-content-between my-2 h-100 c-gap-5"> <li class="my-auto kpivalueLabel_' + id[0].PortletWidgetId + ' flex-shrink-0" data-kpi="kpi_font">' + title + '</li><li class="text-dark my-auto text-truncate"> <span class="font-weight-500 textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + '" data-valueBind="Value-1" style="font-size:22px">389</span> </li></ul> <ul class="d-flex justify-content-between my-2 h-100 c-gap-5"> <li class="my-auto kpivalueLabel_' + id[0].PortletWidgetId + ' flex-shrink-0" data-valuelabelbind="Value-1" data-kpi="kpi_font">Label</li><li class="text-dark my-auto text-truncate"> <span class="font-weight-500 textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + ' text-truncate" data-valueBind="Value-2" style="font-size:22px">289</span> </li></ul> </li><li class="w-35 bgcolorset_' + id[0].PortletWidgetId + '" style="background-color:#88c241; border-radius: 0px 5px 5px 0px;"> <ul class="d-flex h-100 justify-content-end "> <li class="d-flex h-100 font-weight-700 text-center"> <p class="my-auto textProperty_' + id[0].PortletWidgetId + '" style="font-size:22px"><span class="font-weight-500 text-white kpivalue_' + id[0].PortletWidgetId + '" data-valueBind="Value-3">85%</span><i class="text-white la la-arrow-up"></i></i></p></li></ul></li></ul>';
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';
let borderCompRightBar = cssproperty[0].BorderWidth + ' ' + cssproperty[0].BorderType + ' ' + cssproperty[0].BorderColor;
$(Container).find(".kpi_card_class_" + portletwidgetid).css({ "border": borderCompRightBar, "border-radius": cssproperty[0].BorderRadius, "height": height });
$(Container).find(".bgcolorset_" + portletwidgetid).css({ "background-color": cssproperty[0].BackgroundColor, "border-radius": '0px ' + cssproperty[0].BorderRadius + ' ' + cssproperty[0].BorderRadius + ' 0px' });
$(Container).find(".kpivalue_" + portletwidgetid + '[data-valuebind="Value-1"]').css({ "font-size": cssproperty[0].FontSize + 'px', "font-family": cssproperty[0].FontStyle });
$(Container).find(".kpivalue_" + portletwidgetid + '[data-valuebind="Value-2"]').css({ "font-size": cssproperty[0].FontSize + 'px', "font-family": cssproperty[0].FontStyle });
$(Container).find(".textProperty_" + portletwidgetid).css({ "font-size": cssproperty[0].FontSize + 'px', "font-family": cssproperty[0].FontStyle });
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Comparisionrightbarcolor();
return this.instance;
}
}
KpiWidgets.Comparisionrightbarcolor = Comparisionrightbarcolor;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
@@ -0,0 +1 @@
{"version":3,"file":"comparisionrightbarcolor.js","sourceRoot":"","sources":["comparisionrightbarcolor.ts"],"names":[],"mappings":"AAGA,IAAU,OAAO,CA0DhB;AA1DD,WAAU,OAAO;IACb,IAAiB,MAAM,CAwDtB;IAxDD,WAAiB,MAAM;QACnB,IAAiB,OAAO,CAsDvB;QAtDD,WAAiB,OAAO;YACpB,IAAiB,UAAU,CAoD1B;YApDD,WAAiB,UAAU;gBACvB,MAAa,wBAAyB,SAAQ,WAAA,OAAO,CAAC,UAAU;oBAU5D,OAAO;wBAEH,OAAO,CAAC,wDAAwD,EAAE,4CAA4C,EAAE,wDAAwD,EAAE,4CAA4C,EAAE,oDAAoD,EAAC,4DAA4D,CAAC,CAAC;oBAC/U,CAAC;oBACD,QAAQ;wBAEJ,OAAO,EAAE,CAAC;oBACd,CAAC;oBAED,IAAI,CAAC,EAAE,EAAE,WAAW;wBAChB,IAAI,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;wBAC7B,IAAI,IAAI,GAAG,yFAAyF,GAAG,EAA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AAC,SAAS,EAAE,CAAC,CAAC;wBAC9K,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,eAAe,GAAE,4BAA4B,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;wBAC9K,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;oBAExJ,CAAC;oBAED,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;4BACrD,IAAI,CAAC,QAAQ,GAAG,IAAI,wBAAwB,EAAE,CAAC;wBACnD,OAAO,IAAI,CAAC,QAAQ,CAAC;oBACzB,CAAC;iBACJ;gBAlDY,mCAAwB,2BAkDpC,CAAA;YACL,CAAC,EApDgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAoD1B;QACL,CAAC,EAtDgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAsDvB;IACL,CAAC,EAxDgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAwDtB;AACL,CAAC,EA1DS,OAAO,KAAP,OAAO,QA0DhB"}
@@ -0,0 +1,241 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Default extends Unibase.Platform.Core.BaseComponent {
jsFiles() {
return [];
}
cssFiles() {
return [];
}
html(obj, containerid) {
let title = obj[0].WidgetName;
var html = '<div class="card mb-0 card-sm shadow-hover h-90p kpi-card" id="kpi_card_' + obj[0].PortletWidgetId + '">' +
'<a href="javascript:;" class="kpi-link-report" onclick="Unibase.Themes.Compact.KpiWidgets.Default.Instance().linkReport(' + obj[0].WidgetId + ',' + obj[0].PortletWidgetId + ',' + "'" + containerid + "'" + ')">' +
'<small id = "showreport_' + obj[0].PortletWidgetId + '" class="font-sm-11 mb-5"><span class="nav-icon-wrap"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a>' +
'<div class="p-3">' +
'<span class="spn_widgetname" data-kpi="kpi_font">' + title + '</span>' +
'<span class="d-block align-items-center card-action-wrap pull-right font-11" >' +
'<a href="javascript:;" class="inline-block full-screen hidden" id="kpi_FullScreen_' + obj[0].PortletWidgetId + '">' +
'<i class="ion ion-md-expand"></i>' +
'</a>' +
'</span>' +
'<div>';
html += '<span id="spanlnk_widget_' + obj[0].PortletWidgetId + '" class="mb-10 block text-underline hidden">' +
'<input type="hidden" id="hdn_widget_link_' + obj[0].PortletWidgetId + '" />' +
'<a href="javascript:;" id="lnk_widget_' + obj[0].PortletWidgetId + '"><span id="value_widget_' + obj[0].PortletWidgetId + '" class="display-5 font-weight-500">0</span></a></span > ' +
'<span id="span_widget_' + obj[0].PortletWidgetId + '" class="h4 block mt-20 mb-10"><span class="display-5 font-weight-500 font-25 font-xl-23" id="value_widget_' + obj[0].PortletWidgetId + '">0</span></span>' +
'<span id="config_widget_' + obj[0].PortletWidgetId + '"></span>' +
'<div class="pull-right"><div id="span_kpi_icon_' + obj[0].PortletWidgetId + '" ></div>' +
'</div></div></div></div>';
return html;
}
linkReport(widgetid, PortletWidgetId, containerid) {
var instance = this;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKPIWidget(widgetid).then(function (response) {
var res = response.result;
if (res != null) {
let containerid = "div_kpireport_" + PortletWidgetId;
instance.navigationHelper.popup(res.LinkReportId, containerid, Unibase.Platform.Analytics.Components.ReportViewer.Instance(), null, Unibase.Platform.Helpers.Size.ExtraLarge);
}
});
}
load(id, containerid, callback) {
let instance = this;
let inputparameters = Unibase.Themes.Providers.DashboardHelper.Instance().replaceWidgetParameterValues(id[0].WidgetParameters, id[0].InstalledAppId);
let fromDate = "", toDate = "";
var cf_fromDate = Unibase.Platform.Membership.Infos.Identity.currentUser.fromDate;
var cf_toDate = Unibase.Platform.Membership.Infos.Identity.currentUser.toDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
var parameters = {
WidgetId: id[0].WidgetId,
PortletWidgetId: id[0].PortletWidgetId,
InstalledAppId: id[0].InstalledAppId,
InputParameters: inputparameters,
FromDate: fromDate,
ToDate: toDate
};
instance.loadResponseData(id[0].PortletWidgetId, containerid, parameters);
}
loadResponseData(portletwidgetid, detailContainer, parameters) {
let instance = this;
instance.inputParameters = parameters.InputParameters;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKpiWidgetData(parameters).then(function (response) {
instance.loadData(portletwidgetid, detailContainer, parameters, false, response);
});
}
loadData(portletwidgetid, detailContainer, parameters, IsPreview, response) {
detailContainer = "." + detailContainer;
let instance = this;
var post = response.result;
if (post != null) {
let result = JSON.parse(response.result.Data);
if (post.IsMaximize == true) {
$("#kpi_FullScreen_" + portletwidgetid).removeClass("hidden");
}
var iconhtml = "";
if (post.Icon != "" && post.Icon != null) {
iconhtml = '<img id="kpi_icon_' + portletwidgetid + '"src="' + post.Icon + '" style="width:50px;"/>';
$("#span_kpi_icon_" + portletwidgetid).html(iconhtml);
}
var selected_values = post.Selected_Columns;
if (selected_values != null) {
var sp = selected_values.split(',');
var column1 = sp[0];
}
let kpiresult = JSON.parse(response.result.Data);
let data = "";
if (kpiresult != null) {
if (kpiresult.length != 0) {
data = JSON.parse(response.result.Data)[0];
post.Data = data[column1];
}
}
else
post.Data = "";
var color = post.Color;
if (color != null) {
$(detailContainer).find("#kpi_card_" + portletwidgetid).addClass(color);
}
if (post.IsFiltarable == true) {
$(detailContainer).find(".KpiFilter_" + portletwidgetid + "").removeClass('hidden');
}
if (post.Data == "0.000" || post.Data == "" || post.Data == null || post.Data == "[]") {
post.Data = "0";
}
if (post.LinkUrl == 'NULL' || post.LinkUrl == null || post.LinkUrl == "") {
$(detailContainer).find("#spanlnk_widget_" + portletwidgetid).remove();
}
else {
$(detailContainer).find("#span_widget_" + portletwidgetid).remove();
$(detailContainer).find("#spanlnk_widget_" + portletwidgetid).removeClass("hidden");
$(detailContainer).find("#hdn_widget_link_" + portletwidgetid).val(post.LinkUrl);
$(detailContainer).find("#lnk_widget_" + portletwidgetid).click(function () {
if (post.Data == "0" || Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(post.Data, 2) == 0.00) {
alert('No data');
}
else {
}
});
}
var l;
var m;
var n;
if (l == true || m == true || n == true)
$(detailContainer).find("#value_widget_" + portletwidgetid).text(Unibase.Core.Helpers.NumberHelper.Instance().format(post.Data, 2, ''));
else
$(detailContainer).find("#value_widget_" + portletwidgetid).text(Unibase.Core.Helpers.NumberHelper.Instance().format(post.Data, 2, ''));
if (post.Color != "" && post.Color != null) {
$(detailContainer).find("#value_widget_" + portletwidgetid).addClass("text-" + color);
}
if (post.LinkReportId != 0 && post.LinkReportId != null) {
}
else {
$(detailContainer).find("#showreport_" + portletwidgetid).addClass('hidden');
}
var colors = ["primary", "success", "warning", "danger", "info", "light", "secondary", "dark"];
if (response.result.AppConfigurations != null) {
if (response.result.AppConfigurations.length != 0) {
var designhtml = "";
var statusconditions = "";
var widgetconditions = "";
var appconfig = response.result.AppConfigurations;
for (var i = 0; i < appconfig.length; i++) {
var onlickurl = "";
var sname = appconfig[i].SettingName.replace(/ /g, '');
onlickurl = Default.Instance().load_appconfigurations(appconfig[i], response.result.Data, portletwidgetid);
designhtml += ' <span class="mr-10"><a href="javascript:;" id="widgetconfig_' + sname + '" onclick="' + onlickurl + '">' +
'<button class="btn btn-sm btn-' + colors[i] + ' pull-right btn-rounded text-white">' + appconfig[i].SettingName + '</button>' +
'</a> </span>';
if (appconfig[i].JsFunction != null && appconfig[i].JsFunction != "") {
if (appconfig[i].JsFunction.indexOf("{{") > -1 || appconfig[i].JsFunction.indexOf("}}") > -1) {
statusconditions += appconfig[i].JsFunction + " ";
}
else {
widgetconditions += appconfig[i].JsFunction + " ";
}
}
}
designhtml += "</div>";
$(detailContainer).find("#config_widget_" + portletwidgetid).html(designhtml);
if (widgetconditions != "")
widgetconditions = HtmlHelper.getHelper().decode(widgetconditions);
let evaljs;
for (var h = 0; h < result.length; h++) {
var model = result[h];
evaljs = Unibase.Core.Helpers.TokenHelper.Instance().replace(widgetconditions, model);
}
eval(evaljs);
if (statusconditions != "") {
if (result != null) {
for (var i = 0; i < result.length; i++) {
var model = result[i];
var condition = Unibase.Core.Helpers.TokenHelper.Instance().replace(statusconditions, model);
eval(condition);
}
}
}
}
}
}
$(detailContainer).siblings('.line-loader').remove();
$(detailContainer).removeClass('hidden');
}
load_appconfigurations(config, data, portletwidgetid) {
var instance = this;
let settingurltype = config.SettingUrlType;
var appconfigurationid = config.AppConfigurationId;
var settingUrl = config.SettingUrl;
var jsfunction = config.JsFunction;
var formid = config.FormId;
let editformid;
var formpkname = config.FormPrimaryColumn;
if (data.length <= 0) {
editformid = 0;
}
else
editformid = 0;
var onclick = "";
if (settingurltype == 2) {
onclick = "this.fileCacheHelper.loadJsFile('" + config.SettingUrl + "', function () {var html = Unibase.Apps.Components.Stages.Instance().init();NavigationHelper.Instance().loadPopupHtml(html, Helpers.Size.DockLeft, function(containerid) {" + config.JsFunction + " ;});});";
}
else if (settingurltype == 1) {
onclick = 'Unibase.Platform.Helpers.NavigationHelper.Instance().loadForm(' + formid + ', ' + editformid + ',' + appconfigurationid + ',' + portletwidgetid + ' )';
}
else if (settingurltype == 3) {
let variablename = "Widget_" + config.SettingUrl.split(",")[0].split(".")[0].trim();
let methodname = config.SettingUrl.split(",")[1];
var onclickurl = "Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('widgets/" + config.SettingUrl.split(",")[0] + "', function () { " + variablename + "." + methodname + " });";
onclick = onclickurl;
}
else if (settingurltype == 10) {
onclick = "Unibase.Themes.Compact.Components.Nav.Instance().loadDashboard(" + config.LinkDashboardId + ",'" + config.DashboardName + "')";
}
else if (settingurltype == 11) {
onclick = "Unibase.Themes.Compact.Components.Nav.Instance().loadDashboardsInDashboard(" + config.LinkDashboardGroupId + ",0,true)";
}
return onclick;
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Default();
return this.instance;
}
}
KpiWidgets.Default = Default;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,175 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Icon extends Unibase.Platform.Core.BaseComponent {
jsFiles() {
return [];
}
cssFiles() {
return [];
}
html(id, containerid) {
let title = id[0].WidgetName;
let html = '<div class="card p-2 shadow-hover w-100" id="kpi_card_' + id[0].PortletWidgetId + ' kpi-card">' +
'<a href="javascript:;" class="kpi-link-report" onclick="Unibase.Themes.Compact.KpiWidgets.Comparision.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + "'" + containerid + "'" + ')";><small id="showreport_' + id[0].PortletWidgetId + '" class="font-sm-11"><span class="nav-icon-wrap"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a>' +
'<div class="row">' +
'<div class="col-3 py-0 d-flex justify-content-center px-0" id="div_kpi_icon_' + id[0].PortletWidgetId + '"><img class="avatar-img rounded-circle imageUpload" id="kpi_icon_2250" src="tenants/themes/compact/imgs/avatar.jpg" style="width:75px;">' +
'</div>' +
'<div class="col-9 pull-right">' +
'<span class="font-14 font-weight-400 text-dark">' + title + '</span>' +
'<span class="d-block align-items-center card-action-wrap pull-right font-11" >' +
'<a href="#" class="inline-block full-screen hidden" id="kpi_FullScreen_' + id[0].PortletWidgetId + '">' +
'<i class="ion ion-md-expand"></i>' +
'</a>' +
'</span>' +
'<div>';
html += '<span id="spanlnk_widget_' + id[0].PortletWidgetId + '" class="mb-10 block text-underline hidden">' +
'<input type="hidden" id="hdn_widget_link_' + id[0].PortletWidgetId + '" />' +
'<a href="javascript:;" id="lnk_widget_' + id[0].PortletWidgetId + '"><span id="value_widget_' + id[0].PortletWidgetId + '" class="display-5 font-weight-400 text-dark">0</span></a></span > ' +
'<span id="span_widget_' + id[0].PortletWidgetId + '" class="h4 block mt-10 mb-10"><span class="display-5 font-weight-400 text-dark" id="value_widget_' + id[0].PortletWidgetId + '">8854</span></span>' +
'<span id="config_widget_' + id[0].PortletWidgetId + '"></span>' +
'</div></div></div></div>';
return html;
}
load(id, containerid, callback) {
let instance = this;
let inputparameters = Unibase.Themes.Providers.DashboardHelper.Instance().replaceWidgetParameterValues(id[0].WidgetParameters, id[0].InstalledAppId);
let fromDate = "", toDate = "";
var cf_fromDate = Unibase.Platform.Membership.Infos.Identity.currentUser.fromDate;
var cf_toDate = Unibase.Platform.Membership.Infos.Identity.currentUser.toDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
var parameters = {
WidgetId: id[0].WidgetId,
PortletWidgetId: id[0].PortletWidgetId,
InstalledAppId: id[0].InstalledAppId,
InputParameters: inputparameters,
FromDate: fromDate,
ToDate: toDate
};
instance.loadResponseData(id[0].PortletWidgetId, containerid, parameters);
}
loadResponseData(portletwidgetid, detailContainer, parameters) {
let instance = this;
instance.inputParameters = parameters.InputParameters;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKpiWidgetData(parameters).then(function (response) {
instance.loadData(portletwidgetid, detailContainer, parameters, false, response);
});
}
loadData(portletwidgetid, detailContainer, parameters, IsPreview, response) {
detailContainer = '.' + detailContainer;
var post = response.result;
if (post != null) {
if (post.IsMaximize == true) {
$("#kpi_FullScreen_" + portletwidgetid).removeClass("hidden");
}
if (response.result.Icon == "" || response.result.Icon == null) {
response.result.Icon = "tenants/themes/compact/imgs/avatar.jpg";
}
var iconhtml = '<img class ="avatar-img rounded-circle imageUpload" id="kpi_icon_' + portletwidgetid + '"src="' + response.result.Icon + '" style="width:75px;"/>';
$("#div_kpi_icon_" + portletwidgetid).html(iconhtml);
if (response.result.Data != null) {
var data = JSON.parse(response.result.Data)[0];
}
var selected_values = post.Selected_Columns;
if (selected_values != null) {
var sp = selected_values.split(',');
var column1 = sp[0];
post.Data = data[column1];
}
var color = post.Color;
var icon = post.Icon;
if (color != null) {
$(detailContainer).find("#kpi_card_" + portletwidgetid).addClass(color);
}
if (post.IsFiltarable == true) {
$(detailContainer).find(".KpiFilter_" + portletwidgetid + "").removeClass('hidden');
}
if (post.Data == "0.000" || post.Data == "" || post.Data == null) {
post.Data = "0";
}
if (post.LinkUrl == 'NULL' || post.LinkUrl == null) {
$(detailContainer).find("#spanlnk_widget_" + portletwidgetid).remove();
}
else {
$(detailContainer).find("#span_widget_" + portletwidgetid).remove();
$(detailContainer).find("#spanlnk_widget_" + portletwidgetid).removeClass("hidden");
$(detailContainer).find("#hdn_widget_link_" + portletwidgetid).val(post.LinkUrl);
$(detailContainer).find("#lnk_widget_" + portletwidgetid).click(function () {
if (post.Data == "0" || Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(post.Data, 2) == 0.00) {
alert('No data');
}
else {
}
});
}
var iconhtml = "";
if (icon != null && icon != "") {
iconhtml = "<span class='mr-10'>" + icon + "</span>";
$(detailContainer).find("#kpi_icon_" + portletwidgetid).html(iconhtml);
}
var l;
var m;
var n;
if (l == true || m == true || n == true)
$(detailContainer).find("#value_widget_" + portletwidgetid).text(Unibase.Core.Helpers.NumberHelper.Instance().format(post.Data, 2, ''));
else
$(detailContainer).find("#value_widget_" + portletwidgetid).text(Unibase.Core.Helpers.NumberHelper.Instance().format(post.Data, 2, ''));
if (post.LinkReportId != 0 && post.LinkReportId != null) {
}
else {
$(detailContainer).find("#showreport_" + portletwidgetid).addClass('hidden');
}
var colors = ["primary", "success", "warning", "danger", "info", "light", "secondary", "dark"];
if (response.result.AppConfigurations != null) {
if (response.result.AppConfigurations.length != 0) {
var designhtml = "";
var appconfig = response.result.AppConfigurations;
for (var i = 0; i < appconfig.length; i++) {
var onlickurl = "";
var sname = appconfig[i].SettingName.replace(/ /g, '');
designhtml += ' <span class="mr-10"><a href="javascript:;" id="widgetconfig_' + sname + '" onclick="' + onlickurl + '">' +
'<button class="btn btn-sm btn-' + colors[i] + ' pull-right btn-rounded text-white">' + appconfig[i].SettingName + '</button>' +
'</a> </span>';
}
designhtml += "</div>";
$(detailContainer).find("#config_widget_" + portletwidgetid).html(designhtml);
}
}
}
$(detailContainer).siblings('.line-loader').remove();
$(detailContainer).removeClass('hidden');
}
linkReport(widgetid, portletwidgetid, containerid) {
var instance = this;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKPIWidget(widgetid).then(function (response) {
var res = response.result;
if (res != null) {
let containerid = "div_kpireport_" + portletwidgetid;
var rv_obj = Unibase.Platform.Analytics.Components.ReportViewer.Instance();
instance.navigationHelper.popup(res.LinkReportId, containerid, rv_obj, null, Unibase.Platform.Helpers.Size.Large);
}
});
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Icon();
return this.instance;
}
}
KpiWidgets.Icon = Icon;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,57 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Iconbgcolor extends KpiWidgets.Manager.KpiManager {
jsFiles() {
return [];
}
cssFiles() {
return [];
}
html(id, containerid) {
let title = id[0].WidgetName;
let html = '<ul class="position-relative bg-white d-flex p-2 overflow-hide kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" id="kpi_card_' + id[0].PortletWidgetId + '" style="border-style:none;border-width:1px;border-color:#baf0b0; height":"90px"><li class="px-15 my-auto w-90p w-lg-95p"><div class="d-flex rounded-5"><div class="w-55p h-55p align-content-center color_' + id[0].PortletWidgetId + ' rounded-6 bgcolorset_' + id[0].PortletWidgetId + '" id="div_kpi_icon_' + id[0].PortletWidgetId + '" style="background-color:#baf0b0"><img src="tenants/themes/compact/imgs/img55.png" onerror="ReloadImage(event)" class="img-fluid p-2 imageUpload" data-loaded="1" data-dynamic="1"></div></div></li><li class="color_icon_' + id[0].PortletWidgetId + ' ml-1 d-flex flex-column text-truncate"><p class="" data-kpi="kpi_font"> ' + title + ' </p><span class="textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + ' line-height-10 my-auto text-dark text-truncate" data-valueBind="Value-1" data-value-kpi="kpi_value_font" style="font-size:32px; margin-top:-5px">0</span></li><li class="kpi-link-report"><a href="javascript:void(0);" onclick="Unibase.Themes.Compact.KpiWidgets.Manager.KpiManager.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + "'" + containerid + "'" + ')" ><small class="showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport" ><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></li></ul>';
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 border = cssproperty[0].BorderWidth + ' ' + cssproperty[0].BorderType + ' ' + cssproperty[0].BorderColor;
let height = response.result.KpiHeight + 'px';
if (response.result.Icon == "" || response.result.Icon == null) {
response.result.Icon = "tenants/themes/compact/imgs/img55.png";
}
var iconhtml = '<img class="img-fluid p-1 w-55p h-55p imageUpload" data-dynamic="1" id="kpi_icon_' + portletwidgetid + '"src="' + response.result.Icon + '" onerror="ReloadImage(event)">';
$("#div_kpi_icon_" + portletwidgetid).html(iconhtml);
$("#kpi_card_" + portletwidgetid).css({ "border": border, "border-radius": cssproperty[0].BorderRadius, "height": height });
$(".color_" + portletwidgetid + "").css({ "background-color": cssproperty[0].BackgroundColor });
if (screen.width < 1198 && cssproperty[0].FontSize == 32) {
$(Container).find(".textProperty_" + portletwidgetid).css({ "font-size": "24px", "font-family": cssproperty[0].FontStyle });
}
else {
$(Container).find(".textProperty_" + portletwidgetid).css({ "font-size": cssproperty[0].FontSize + "px", "font-family": cssproperty[0].FontStyle });
}
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Iconbgcolor();
return this.instance;
}
}
KpiWidgets.Iconbgcolor = Iconbgcolor;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
@@ -0,0 +1 @@
{"version":3,"file":"iconbg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O,IAAI,CAAC,QAAQ,CAAC;oBACzB,CAAC;iBACJ;gBAvDY,sBAAW,cAuDvB,CAAA;YACL,CAAC,EAzDgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAyD1B;QACL,CAAC,EA3DgB,OAAO,GAAP,cAAO,KAAP,cAAO,QA2DvB;IACL,CAAC,EA7DgB,MAAM,GAAN,cAAM,KAAN,cAAM,QA6DtB;AACL,CAAC,EA/DS,OAAO,KAAP,OAAO,QA+DhB"}
@@ -0,0 +1,172 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Iconcolor extends Unibase.Platform.Core.BaseComponent {
jsFiles() {
return [];
}
cssFiles() {
return [];
}
html(id, containerid) {
let title = id[0].WidgetName;
let html = '<ul class="bg-white text-dark shadow-green rounded-7 font-weight-normal d-flex px-2 h-120p" id="kpi_card_' + id[0].PortletWidgetId + ' kpi-card">' +
'<li class="w-60 my-auto">' +
'<div class="d-flex justify-content-center mb-1 rounded-5" id="div_kpi_icon_' + id[0].PortletWidgetId + '"><img class="my-2 w-45p imageUpload" src="tenants/themes/compact/imgs/img55.png" onerror="ReloadImage(event)" data-loaded="1">' +
'</div>' +
'<p class="text-center font-14" style="margin-top:-10px">' + title + '</p>' +
'</li>' +
'<li class="my-auto w-25 font-30 font-weight-600 text-center border-left border-light-50" style="color:#99bf4d;">' +
'<span id="span_widget_' + id[0].PortletWidgetId + '">' +
'<span class="ml-1" id="value_widget_' + id[0].PortletWidgetId + '">88</span></span>' +
'</li>' +
'<li class="w-15 text-right mr-2 pt-2 kpi-link-report">' +
'<a href="javascript:;" onclick="Unibase.Themes.Compact.KpiWidgets.Comparision.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + "'" + containerid + "'" + ')";>' +
'<small id = "showreport_' + id[0].PortletWidgetId + '" class="font-sm-11"><span class="nav-icon-wrap"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small>' +
'</a>' +
'</li>' +
'</ul>';
return html;
}
load(id, containerid, callback) {
let instance = this;
let inputparameters = Unibase.Themes.Providers.DashboardHelper.Instance().replaceWidgetParameterValues(id[0].WidgetParameters, id[0].InstalledAppId);
let fromDate = "", toDate = "";
var cf_fromDate = Unibase.Platform.Membership.Infos.Identity.currentUser.fromDate;
var cf_toDate = Unibase.Platform.Membership.Infos.Identity.currentUser.toDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
var parameters = {
WidgetId: id[0].WidgetId,
PortletWidgetId: id[0].PortletWidgetId,
InstalledAppId: id[0].InstalledAppId,
InputParameters: inputparameters,
FromDate: fromDate,
ToDate: toDate
};
instance.loadResponseData(id[0].PortletWidgetId, containerid, parameters);
}
loadResponseData(portletwidgetid, detailContainer, parameters) {
let instance = this;
instance.inputParameters = parameters.InputParameters;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKpiWidgetData(parameters).then(function (response) {
instance.loadData(portletwidgetid, detailContainer, parameters, false, response);
});
}
loadData(portletwidgetid, detailContainer, parameters, IsPreview, response) {
detailContainer = '.' + detailContainer;
var post = response.result;
if (post != null) {
if (post.IsMaximize == true) {
$("#kpi_FullScreen_" + portletwidgetid).removeClass("hidden");
}
if (response.result.Icon == "" || response.result.Icon == null) {
response.result.Icon = "tenants/themes/compact/imgs/img55.png";
}
var iconhtml = '<img class="img-fluid p-2 rounded-5 w-65p imageUpload" id="kpi_icon_' + portletwidgetid + '"src="' + response.result.Icon + '" /*style = " filter: invert(1);"*/ >';
$("#div_kpi_icon_" + portletwidgetid).html(iconhtml);
if (response.result.Data != null) {
var data = JSON.parse(response.result.Data)[0];
}
var selected_values = post.Selected_Columns;
if (selected_values != null) {
var sp = selected_values.split(',');
var column1 = sp[0];
post.Data = data[column1];
}
var color = post.Color;
var icon = post.Icon;
if (color != null) {
$(detailContainer).find("#kpi_card_" + portletwidgetid).addClass(color);
}
if (post.IsFiltarable == true) {
$(detailContainer).find(".KpiFilter_" + portletwidgetid + "").removeClass('hidden');
}
if (post.Data == "0.000" || post.Data == "" || post.Data == null) {
post.Data = "0";
}
if (post.LinkUrl == 'NULL' || post.LinkUrl == null) {
$(detailContainer).find("#spanlnk_widget_" + portletwidgetid).remove();
}
else {
$(detailContainer).find("#span_widget_" + portletwidgetid).remove();
$(detailContainer).find("#spanlnk_widget_" + portletwidgetid).removeClass("hidden");
$(detailContainer).find("#hdn_widget_link_" + portletwidgetid).val(post.LinkUrl);
$(detailContainer).find("#lnk_widget_" + portletwidgetid).click(function () {
if (post.Data == "0" || Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(post.Data, 2) == 0.00) {
alert('No data');
}
else {
}
});
}
var iconhtml = "";
if (icon != null && icon != "") {
iconhtml = "<span class='mr-10'>" + icon + "</span>";
$(detailContainer).find("#kpi_icon_" + portletwidgetid).html(iconhtml);
}
var l;
var m;
var n;
if (l == true || m == true || n == true)
$(detailContainer).find("#value_widget_" + portletwidgetid).text(Unibase.Core.Helpers.NumberHelper.Instance().format(post.Data, 2, ''));
else
$(detailContainer).find("#value_widget_" + portletwidgetid).text(Unibase.Core.Helpers.NumberHelper.Instance().format(post.Data, 2, ''));
if (post.LinkReportId != 0 && post.LinkReportId != null) {
}
else {
$(detailContainer).find("#showreport_" + portletwidgetid).addClass('hidden');
}
var colors = ["primary", "success", "warning", "danger", "info", "light", "secondary", "dark"];
if (response.result.AppConfigurations != null) {
if (response.result.AppConfigurations.length != 0) {
var designhtml = "";
var appconfig = response.result.AppConfigurations;
for (var i = 0; i < appconfig.length; i++) {
var onlickurl = "";
var sname = appconfig[i].SettingName.replace(/ /g, '');
designhtml += ' <span class="mr-10"><a href="javascript:;" id="widgetconfig_' + sname + '" onclick="' + onlickurl + '">' +
'<button class="btn btn-sm btn-' + colors[i] + ' pull-right btn-rounded text-white">' + appconfig[i].SettingName + '</button>' +
'</a> </span>';
}
designhtml += "</div>";
$(detailContainer).find("#config_widget_" + portletwidgetid).html(designhtml);
}
}
}
$(detailContainer).siblings('.line-loader').remove();
$(detailContainer).removeClass('hidden');
}
linkReport(widgetid, portletwidgetid, containerid) {
var instance = this;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKPIWidget(widgetid).then(function (response) {
var res = response.result;
if (res != null) {
let containerid = "div_kpireport_" + portletwidgetid;
var rv_obj = Unibase.Platform.Analytics.Components.ReportViewer.Instance();
instance.navigationHelper.popup(res.LinkReportId, containerid, rv_obj, null, Unibase.Platform.Helpers.Size.ExtraLarge);
}
});
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Iconcolor();
return this.instance;
}
}
KpiWidgets.Iconcolor = Iconcolor;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,60 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Iconleftbarcolor extends KpiWidgets.Manager.KpiManager {
jsFiles() {
return [];
}
cssFiles() {
return [];
}
html(id, containerid) {
let title = id[0].WidgetName;
let html = '<ul class="position-relative d-flex overflow-hide kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" id="kpi_card_' + id[0].PortletWidgetId + '" style="height:90px"><li class="w-130p h-100 d-flex justify-content-center"><div class="w-100 bgcolorset_' + id[0].PortletWidgetId + ' bgcolorset d-flex align-item-center justify-content-center border-right-0 kpi-card-left_' + id[0].PortletWidgetId + '" style="background-color: rgb(253, 227, 53); border-radius: 4px 0px 0px 4px; border: 2px solid rgb(253, 227, 53);"><div class="my-auto d-flex align-item-center" id="div_kpi_icon_' + id[0].PortletWidgetId + '"><img class="img-fluid p-1 rounded-5 w-55p h-55p imageUpload" data-dynamic="1" id="kpi_icon_100020390001696" src="tenants/themes/compact/imgs/img55.png" onerror="ReloadImage(event)" data-loaded="1"></div></div></li><li class="border-left-0 h-100 w-100 text-truncate bg-white kpi-card-right_' + id[0].PortletWidgetId + '" style="border: 1px solid rgb(253 227 53); border-radius: 0px 4px 4px 0px;"><ul class="d-flex flex-row h-100"><li class="d-flex flex-column h-100 p-2 my-auto text-truncate"><p class="text-truncate" data-kpi="kpi_font" id="value_Namewidget_' + id[0].PortletWidgetId + '">' + title + '</p><div class="d-flex justify-content-between my-auto"><span class="text-left text-dark text-truncate mr-2 line-height-10 font-weight-400 textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + '" data-value-kpi="kpi_value_font" data-valueBind="Value-1" style="font-size: 38px;">0</span><span class="my-auto" id="config_widget_' + id[0].PortletWidgetId + '"></span></div></li><li class="kpi-link-report"><a href="javascript:void(0)" onclick="Unibase.Themes.Compact.KpiWidgets.Manager.KpiManager.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + "'" + containerid + "'" + ')";><small class="showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></li></ul></li></ul>';
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 border = cssproperty[0].BorderWidth + ' ' + cssproperty[0].BorderType + ' ' + cssproperty[0].BorderColor;
let borderLeft = cssproperty[0].BorderRadius + ' 0px 0px ' + cssproperty[0].BorderRadius;
let height = response.result.KpiHeight + 'px';
if (response.result.Icon == "" || response.result.Icon == null) {
response.result.Icon = "tenants/themes/compact/imgs/img55.png";
}
var iconhtml = '<img class="img-fluid p-1 w-55p h-55p imageUpload" data-dynamic="1" id="kpi_icon_' + portletwidgetid + '"src="' + response.result.Icon + '" onerror="ReloadImage(event)">';
$("#div_kpi_icon_" + portletwidgetid).html(iconhtml);
$(Container).find(".bgcolorset_" + portletwidgetid).css({ "background-color": cssproperty[0].BackgroundColor, "border-radius": borderLeft });
$(Container).find("#kpi_card_" + portletwidgetid).css({ "height": height });
$(Container).find(".kpi-card-left_" + portletwidgetid).css({ "border": border, "border-radius": cssproperty[0].BorderRadius + ' 0px 0px ' + cssproperty[0].BorderRadius });
$(Container).find(".kpi-card-right_" + portletwidgetid).css({ "border": border, "border-radius": '0px ' + cssproperty[0].BorderRadius + ' ' + cssproperty[0].BorderRadius + ' 0px' });
if (screen.width < 1198 && cssproperty[0].FontSize == 32) {
$(Container).find(".textProperty_" + portletwidgetid).css({ "font-size": "24px", "font-family": cssproperty[0].FontStyle });
}
else {
$(Container).find(".textProperty_" + portletwidgetid).css({ "font-size": cssproperty[0].FontSize + "px", "font-family": cssproperty[0].FontStyle });
}
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Iconleftbarcolor();
return this.instance;
}
}
KpiWidgets.Iconleftbarcolor = Iconleftbarcolor;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
@@ -0,0 +1 @@
{"version":3,"file":"iconleftbarcolor.js","sourceRoot":"","sources":["iconleftbarcolor.ts"],"names":[],"mappings":"AAGA,IAAU,OAAO,CAqEhB;AArED,WAAU,OAAO;I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EAAE,EAAE;4BACtD,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;yBAC/H;6BACI;4BACD,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;yBACvJ;oBAEL,CAAC;oBAID,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;4BACrD,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,EAAE,CAAC;wBAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC;oBACzB,CAAC;iBACJ;gBA7DY,2BAAgB,mBA6D5B,CAAA;YACL,CAAC,EA/DgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QA+D1B;QACL,CAAC,EAjEgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAiEvB;IACL,CAAC,EAnEgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAmEtB;AACL,CAAC,EArES,OAAO,KAAP,OAAO,QAqEhB"}
@@ -0,0 +1,67 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Kpi_fulfillment extends KpiWidgets.Manager.KpiManager {
jsFiles() {
return [];
}
cssFiles() {
return [];
}
html(id, containerid) {
let title = id[0].WidgetName;
var html = '';
if (id[0].PortletWidgetId == 22501) {
html = '<div class="card h-160p"><ul class="h-100 d-flex justify-content-center align-items-center"><li class="d-flex justify-content-center font-34 font-weight-500"><span class="mx-2"><i class="la la-plus-circle"></i></span><span>Custom Design</span></li></ul></div>';
}
if (id[0].PortletWidgetId == 2250) {
html = '<textarea class="border-dark h-80 w-100 " data-kpidesigns="CustomDesign" rows="9" cols="90" style="box-shadow: none;"></textarea>';
$('#designsPreviewAppend').parents('#tab_preview').removeClass('px-150 py-50').addClass('px-10');
}
if (id[0].PortletWidgetId != 22501 && id[0].PortletWidgetId != 2250) {
html = '<div class="w-100 DynamicHtml_' + containerid + '">' + id[0].CustomHtml + '</div>';
}
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 border = cssproperty[0].BorderWidth + ' ' + cssproperty[0].BorderType + ' ' + cssproperty[0].BorderColor;
let borderLeft = cssproperty[0].BorderRadius + ' 0px 0px ' + cssproperty[0].BorderRadius;
let height = response.result.KpiHeight + 'px';
if (response.result.Icon == "" || response.result.Icon == null) {
response.result.Icon = "tenants/themes/compact/imgs/img55.png";
}
if (response.result != null) {
if (response.result.CustomHtml != '' && response.result.CustomHtml != null && response.result.CustomHtml != undefined) {
if ($('#designsPreviewAppend:visible')) {
0;
$('#designsPreviewAppend:visible [data-kpidesigns="CustomDesign"]').val(response.result.CustomHtml);
}
}
}
$(Container).find(".kpivalue_" + portletwidgetid).css({ "font-size": cssproperty[0].FontSize + "px", "font-family": cssproperty[0].FontStyle });
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Kpi_fulfillment();
return this.instance;
}
}
KpiWidgets.Kpi_fulfillment = Kpi_fulfillment;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}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{
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
let Manager;
(function (Manager) {
class KpiManager extends Unibase.Platform.Core.BaseComponent {
_load(id, containerid, callback) {
let instance = this;
let inputparameters = Unibase.Themes.Providers.DashboardHelper.Instance().replaceWidgetParameterValues(id[0].WidgetParameters, id[0].InstalledAppId);
let fromDate = "", toDate = "";
var cf_fromDate = Unibase.Platform.Membership.Infos.Identity.currentUser.fromDate;
var cf_toDate = Unibase.Platform.Membership.Infos.Identity.currentUser.toDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
var parameters = {
WidgetId: id[0].WidgetId,
PortletWidgetId: id[0].PortletWidgetId,
InstalledAppId: id[0].InstalledAppId,
InputParameters: inputparameters,
FromDate: fromDate,
ToDate: toDate
};
instance.loadResponseData(id[0].PortletWidgetId, containerid, parameters);
}
loadResponseData(portletwidgetid, detailContainer, parameters, _portletwidgetid) {
let instance = this;
instance.inputParameters = parameters.InputParameters;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKpiWidgetData(parameters).then(function (response) {
if (_portletwidgetid == undefined) {
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getPortletWidget(portletwidgetid).then(function (portletresponse) {
instance.loadData(portletwidgetid, detailContainer, parameters, false, response, portletresponse);
});
}
else {
if (_portletwidgetid != 0) {
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getPortletWidget(_portletwidgetid).then(function (portletresponse) {
instance.loadData(portletwidgetid, detailContainer, parameters, false, response, portletresponse);
});
}
else {
instance.loadData(portletwidgetid, detailContainer, parameters, false, response);
}
}
});
}
loadData(portletwidgetid, Container, parameters, IsPreview, response, portletresponse) {
let instance = this, result, selected_values, split_columns = [];
let KpiContainer = '.' + Container;
let post = response.result, value = [];
let cssproperty;
var viewerComponent = eval(response.result.Js);
let dataType = [], isRoundOff = [], labelsArray = [];
labelsArray = response.result.Selected_Columns_Labels.split(',');
if (portletresponse != undefined) {
if (portletresponse.result.PortletWidgetCss != null && portletresponse.result.PortletWidgetCss != '') {
response.result.CssProperty = portletresponse.result.PortletWidgetCss;
cssproperty = JSON.parse(portletresponse.result.PortletWidgetCss);
response.result.KpiHeight = portletresponse.result.PortletWidgetHeight;
}
else {
response.result.CssProperty = response.result.CssProperty;
cssproperty = JSON.parse(response.result.CssProperty);
response.result.KpiHeight = response.result.KpiHeight;
}
}
else {
response.result.CssProperty = response.result.CssProperty;
cssproperty = JSON.parse(response.result.CssProperty);
response.result.KpiHeight = response.result.KpiHeight;
}
viewerComponent._styling(portletwidgetid, KpiContainer, response);
if (post != null) {
result = JSON.parse(response.result.Data);
selected_values = post.Selected_Columns;
if (selected_values != null) {
split_columns = selected_values.split(',');
for (let i = 0; i < split_columns.length; i++) {
if (split_columns[i] != null && split_columns[i] != undefined && split_columns[i] != '' && split_columns[i] != "Select Column") {
let column = split_columns[i];
if (result.length != 0) {
value.push(result[0][column]);
}
else {
value.push(0);
}
}
}
}
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++) {
if (kpihidden[i] == 'true' && kpihidden[i] != '' && kpihidden[i] != null && kpihidden[i].length != 0) {
$('.kpivalue_' + (i + 1) + '_' + portletwidgetid).attr('data-hidden-check', 'true').addClass('align-items-end').find('div').last().remove();
if (i + 1 == 3) {
$('.card-body-kpi-CBBC-' + portletwidgetid).removeAttr("style").addClass("h-100");
}
if (i + 1 == 2) {
$('.card-body-kpi-TVBBC-' + portletwidgetid).removeAttr("style").addClass("h-100");
}
}
}
}
let kpisettingJSON;
if (response.result.KpiSetting != undefined)
kpisettingJSON = JSON.parse(response.result.KpiSetting);
dataType = kpisettingJSON[0].DataType.split(',');
isRoundOff = kpisettingJSON[0].IsRoundOff.split(',');
let _value, stringBind = [];
for (let b = 0; b < value.length; b++) {
let e = b + 1;
_value = value[b];
if (dataType[b] != '' && dataType[b] != null && dataType[b] != undefined) {
if (dataType[b] == 'int') {
_value = Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(value[b], 0);
}
if (dataType[b] == 'float') {
_value = Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(value[b], 2);
}
if (dataType[b] == 'char' || dataType[b] == 'varchar') {
_value = value[b];
}
if (dataType[b] == 'INR') {
_value = Unibase.Core.Helpers.NumberHelper.Instance().format(value[b], 2, '') + '<span class="pl-2 font-weight-400" style="font-size:20px">INR</span>';
}
if (dataType[b] == 'percent') {
_value = Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(value[b], 0) + '<span>%</span>';
$(KpiContainer).find('.kpivalue_' + portletwidgetid + '[role="progressbar"][data-valueBind="Value-' + e + '"]').css("width", Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(value[b], 0) + '%').html('');
}
}
if (isRoundOff[b] != '' && isRoundOff[b] != null && isRoundOff[b] != undefined && isRoundOff[b] == 'true') {
_value = Unibase.Core.Helpers.NumberHelper.Instance().format(value[b], 2, '');
}
$(KpiContainer).find('[data-valueBind="Value-' + e + '"]').html(_value).attr('title', _value).addClass('text-truncate');
$(KpiContainer).find('[data-valueLabelBind="Value-' + e + '"]').text(labelsArray[b]);
$(KpiContainer).find('.kpivalue_' + portletwidgetid + '[role="progressbar"][data-valueBind="Value-' + e + '"]').html('');
}
if (post.LinkReportId != 0 && post.LinkReportId != null) {
if (cssproperty[0].KPI_LinkReportLabelName != undefined && cssproperty[0].KPI_LinkReportLabelName != null && cssproperty[0].KPI_LinkReportLabelName != '') {
$(KpiContainer).find('.LinkReport_' + portletwidgetid + '').html('<span class="btn btn-xs btn-outline-primary rounded-4">' + cssproperty[0].KPI_LinkReportLabelName + '</span>');
}
}
else {
$(KpiContainer).find('[data-LinkReport="LinkReport"]').addClass('hidden');
}
if (response.result.AppConfigurations != null && response.result.AppConfigurations != '[]' && response.result.AppConfigurations != '' && response.result.AppConfigurations != undefined) {
instance.appConfiguration(portletwidgetid, KpiContainer, response);
}
$(KpiContainer).ready(function () {
eval(response.result.StaticJsPath.replace(/`/g, ''));
});
$(KpiContainer).siblings('.line-loader').remove();
$(KpiContainer).removeClass('hidden');
}
}
linkReport(widgetid, portletwidgetid, containerid) {
var instance = this;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKPIWidget(widgetid).then(function (response) {
var res = response.result;
if (res != null) {
let containerid = "div_kpireport_" + portletwidgetid;
var rv_obj = Unibase.Platform.Analytics.Components.ReportViewer.Instance();
Unibase.Platform.Helpers.NavigationHelper.Instance().popup(res.LinkReportId, containerid, rv_obj, null, Unibase.Platform.Helpers.Size.ExtraLarge);
}
});
}
appConfiguration(portletwidgetid, containerid, response) {
let instance = this;
if (response.result.AppConfigurations.length != 0) {
var designhtml = "";
var colors = ["primary", "success", "warning", "danger", "info", "light", "secondary", "dark"];
var appconfig = response.result.AppConfigurations;
for (var i = 0; i < appconfig.length; i++) {
var onlickurl = "";
var sname = appconfig[i].SettingName.replace(/ /g, '');
onlickurl = instance.loadAppconfigurations(appconfig[i], response.result.Data, portletwidgetid);
designhtml += ' <span class="mr-10"><a href="javascript:;" id="widgetconfig_' + sname + '" onclick="' + onlickurl + '">' +
'<button class="btn btn-sm btn-' + colors[i] + ' pull-right text-white">' + appconfig[i].SettingName + '</button>' +
'</a> </span>';
}
designhtml += "</div>";
$(containerid).find("#config_widget_" + portletwidgetid).html(designhtml);
}
}
loadAppconfigurations(config, data, portletwidgetid) {
var instance = this;
let settingurltype = config.SettingUrlType;
var appconfigurationid = config.AppConfigurationId;
var settingUrl = config.SettingUrl;
var jsfunction = config.JsFunction;
var formid = config.FormId;
let editformid;
var formpkname = config.FormPrimaryColumn;
if (data.length <= 0) {
editformid = 0;
}
else {
editformid = 0;
}
var onclick = "";
if (settingurltype == 2) {
onclick = "this.fileCacheHelper.loadJsFile('" + config.SettingUrl + "', function () {var html = Unibase.Apps.Components.Stages.Instance().init();NavigationHelper.Instance().loadPopupHtml(html, Helpers.Size.DockLeft, function(containerid) {" + config.JsFunction + " ;});});";
}
else if (settingurltype == 1) {
onclick = 'Unibase.Platform.Helpers.NavigationHelper.Instance().loadForm(' + formid + ', ' + editformid + ',' + appconfigurationid + ',' + portletwidgetid + ' )';
}
else if (settingurltype == 3) {
let variablename = "Widget_" + config.SettingUrl.split(",")[0].split(".")[0].trim();
let methodname = config.SettingUrl.split(",")[1];
var onclickurl = "Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('Widgets/" + config.SettingUrl.split(",")[0] + "', function () { " + variablename + "." + methodname + " });";
onclick = onclickurl;
}
else if (settingurltype == 10) {
onclick = "Unibase.Themes.Compact.Components.Nav.Instance().loadDashboard(" + config.LinkDashboardId + ",'Overview')";
}
else if (settingurltype == 11) {
onclick = "Unibase.Themes.Compact.Components.Nav.Instance().loadDashboardsInDashboard(" + config.LinkDashboardGroupId + ",0,true)";
}
return onclick;
}
static Instance() {
if (this._instance === undefined)
this._instance = new KpiManager();
return this._instance;
}
}
Manager.KpiManager = KpiManager;
})(Manager = KpiWidgets.Manager || (KpiWidgets.Manager = {}));
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,127 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Owlcarouselslider extends Unibase.Platform.Core.BaseComponent {
html(id, containerid) {
let title = id[0].WidgetName;
var html = '<div class="card mb-0 card-sm bgcolorset_' + id[0].PortletWidgetId + ' kpi_card_class_' + id[0].PortletWidgetId + '"><div class="card-body border-0 p-0"><div id="sales_slider_' + id[0].PortletWidgetId + '" class="carousel slide"><div class="d-flex font-weight-500 text-dark px-3 py-2" ><div class="w-95 "> <span class="w-100 font-16 mt-5" id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '">' + title + '</span></div> <span class="w-15 text-right"><a href="#" class="pull-right reportappend"></a></span></div><div class="bottom-carousel px-0"><div class="d-flex flex-row"><div class="owl-carousel carousel-inner w-100 d-flex"> <div class="item w-25 teal-light-4 carouselItem_0 active"><div class="bg-teal-light-4"> <span class="d-flex flex-column font-weight-500 pb-2 text-dark"> <span class="textProperty_100020390001757" style="font-size: 32px;">236</span> <span class="font-13 font-weight-normal text-dark">Lead</span> </span></div></div><div class="item w-25 neon-light-2 carouselItem_1"><div class="bg-neon-light-2"> <span class="d-flex flex-column font-weight-500 pb-2 text-dark"> <span class="textProperty_100020390001757" style="font-size: 32px;">16</span> <span class="font-13 font-weight-normal text-dark">Qualify</span> </span></div></div><div class="item w-25 yellow-light-2 carouselItem_2"><div class="bg-yellow-light-2"> <span class="d-flex flex-column font-weight-500 pb-2 text-dark"> <span class="textProperty_100020390001757" style="font-size: 32px;">331</span> <span class="font-13 font-weight-normal text-dark">Total Customers</span> </span></div></div><div class="item w-25 pink-light-4 carouselItem_3"><div class="bg-pink-light-4"> <span class="d-flex flex-column font-weight-500 pb-2 text-dark"> <span class="textProperty_100020390001757" style="font-size: 32px;">75</span> <span class="font-13 font-weight-normal text-dark">Confirmed</span> </span></div></div><div class="item w-25 d-none carouselItem_4"><div class="bg-d-none"> <span class="d-flex flex-column font-weight-500 pb-2 text-dark"> <span class="textProperty_100020390001757" style="font-size: 32px;">3</span> <span class="font-13 font-weight-normal text-dark">Rejected</span> </span></div></div> </div></div></div></div></div></div></div>';
return html;
}
jsFiles() {
return ["platform/widgets/managers/interfaces/iwidgetmanager.js", "platform/widgets/managers/widgetmanager.js", "platform/core/helpers/propertyhelper/propertyhelper.js", "platform/core/helpers/token/tokenhelper.js", "platform/core/helpers/numberhelper/numberhelper.js", "platform/analytics/components/reportviewer/reportviewer.js", "https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"];
}
cssFiles() {
return [];
}
load(id, containerid, callback) {
let instance = this;
let inputparameters = Unibase.Themes.Providers.DashboardHelper.Instance().replaceWidgetParameterValues(id[0].WidgetParameters, id[0].InstalledAppId);
let fromDate = "", toDate = "";
var cf_fromDate = Unibase.Platform.Membership.Infos.Identity.currentUser.fromDate;
var cf_toDate = Unibase.Platform.Membership.Infos.Identity.currentUser.toDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
var parameters = {
WidgetId: id[0].WidgetId,
PortletWidgetId: id[0].PortletWidgetId,
InstalledAppId: id[0].InstalledAppId,
InputParameters: inputparameters,
FromDate: fromDate,
ToDate: toDate
};
instance.loadResponseData(id[0].PortletWidgetId, containerid, parameters);
}
loadResponseData(portletwidgetid, detailContainer, parameters) {
let instance = this;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKpiWidgetData(parameters).then(function (response) {
instance.loadData(portletwidgetid, detailContainer, parameters, false, response);
});
}
loadData(portletwidgetid, containerid, parameters, IsPreview, response) {
containerid = "." + containerid;
var instance = this;
var cssproperty = JSON.parse(response.result.CssProperty);
if (response.result != null) {
var post = response.result;
var data = JSON.parse(post.Data);
var obj = new Object();
var parentobj = [];
for (var i = 0; i < data.length; i++) {
var data_1 = data[i];
var j = 1;
for (var key in data_1) {
obj['Value_' + j] = data_1[key];
j++;
}
parentobj.push({
value_1: obj["Value_1"],
value_2: obj["Value_2"],
value_3: obj["Value_3"]
});
var margin = "margin-top:-5px";
if (parentobj[i].value_3 == undefined || parentobj[i].value_3 == null) {
parentobj[i].value_3 = "";
margin = "margin-top:5px";
}
}
var html = "", html2 = "", bg_color = '';
for (var i = 0; i < parentobj.length; i++) {
if (i == 0) {
bg_color = 'teal-light-4';
}
if (i == 1) {
bg_color = 'neon-light-2';
}
if (i == 2) {
bg_color = 'yellow-light-2';
}
if (i == 3) {
bg_color = 'pink-light-4';
}
if (i == 4) {
bg_color = 'd-none';
}
html += '<div class="item w-25 ' + bg_color + ' carouselItem_' + i + '"><div class="bg-' + bg_color + '"> <span class="d-flex flex-column font-weight-500 pb-2 text-dark"> <span class="textProperty_' + portletwidgetid + '">' + parentobj[i].value_2 + '</span> <span class="font-13 font-weight-normal text-dark">' + parentobj[i].value_1 + '</span> </span></div></div>';
html2 = '<small id="showreport_' + portletwidgetid + '" class="showreport_' + portletwidgetid + ' font-sm-11"><span class="nav-icon-wrap"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small>';
}
$(".owl-carousel").owlCarousel({
items: 3,
nav: true,
loop: true,
autoplay: false
});
$(containerid).find(".carousel-inner").html(html);
$(containerid).find('.textProperty_' + portletwidgetid).css({ "font-size": cssproperty[0].FontSize + 'px' });
$(containerid).find(".reportappend").html(html2);
$(containerid).find(".carouselItem_0").addClass('active');
$(containerid).find('#sales_slider_' + portletwidgetid).carousel({
interval: 3000
});
$(containerid).find('#sales_slider_' + portletwidgetid).carousel("cycle");
var colors = ["primary", "success", "warning", "danger", "info", "light", "secondary", "dark"];
}
$(containerid).siblings('.line-loader').remove();
$(containerid).removeClass('hidden');
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Owlcarouselslider();
return this.instance;
}
}
KpiWidgets.Owlcarouselslider = Owlcarouselslider;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,55 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Singlevalueborder 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 = '<ul class="text-dark font-weight-500 d-flex flex-column overflow-hide bgcolorset_' + id[0].PortletWidgetId + ' kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" style="border-width: 1px 1px 12px; border-style: solid; border-color: #8fc06b; border-radius: 4px; height: 90px; background-color:#e4ffd0;"><li class="kpi-link-report"><a href="javascript:;" onclick="Unibase.Themes.Compact.KpiWidgets.Comparision.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + "'" + containerid + "'" + ')";> <small class= "showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></li><div class="d-flex p-2 h-100"><div class="d-flex flex-column w-100 font-30 font-weight-400"><div class="d-flex justify-content-between"><span class="textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + ' line-height-10" data-valuebind="Value-1" style="font-size: 32px;">0</span><span class="my-auto" id="config_widget_' + id[0].PortletWidgetId + '"></span></div><span class="text-truncate my-auto labels_' + id[0].PortletWidgetId + '" data-kpi="kpi_font">' + title + '</span></div></div></ul>';
}
else {
html = '<ul class="position-relative text-dark font-weight-500 d-flex flex-column overflow-hide bgcolorset_' + id[0].PortletWidgetId + ' kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" style="border-width: 1px 1px 12px; border-style: solid; border-color: #fff; border-radius: 4px; height: 90px; background-color:#fff;"><li class="kpi-link-report"><a href="javascript:;" onclick="Unibase.Themes.Compact.KpiWidgets.Comparision.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + "'" + containerid + "'" + ')";> <small class= "showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small> </a></li><div class="d-flex p-2 h-100"><div class="d-flex flex-column w-100 font-30 font-weight-400"><div class="d-flex justify-content-between"><span class="textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + ' line-height-10" data-valuebind="Value-1" style="font-size: 32px;" data-value-kpi="kpi_value_font">0</span><span class="my-auto" id="config_widget_' + id[0].PortletWidgetId + '"></span></div><span class="text-truncate my-auto labels_' + id[0].PortletWidgetId + '" data-kpi="kpi_font">' + title + '</span></div></div></ul>';
}
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';
$(Container).find(".kpi_card_class_" + portletwidgetid).css({ "border-width": cssproperty[0].BorderWidth, "border-style": cssproperty[0].BorderType, "border-color": cssproperty[0].BorderColor, "border-radius": cssproperty[0].BorderRadius, "border-bottom": "12px solid" + cssproperty[0].BorderColor, "height": height, "background-color": cssproperty[0].BackgroundColor });
if (screen.width < 1198 && cssproperty[0].FontSize == 32) {
$(Container).find(".textProperty_" + portletwidgetid).css({ "font-size": "24px", "font-family": cssproperty[0].FontStyle });
}
else {
$(Container).find(".textProperty_" + portletwidgetid).css({ "font-size": cssproperty[0].FontSize + "px", "font-family": cssproperty[0].FontStyle });
}
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Singlevalueborder();
return this.instance;
}
}
KpiWidgets.Singlevalueborder = Singlevalueborder;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
@@ -0,0 +1 @@
{"version":3,"file":"singlevalueborder.js","sourceRoot":"","sources":["singlevalueborder.ts"],"names":[],"mappings":"AAGA,IAAU,OAAO,CA6DhB;AA7DD,WAAU,OAAO;IACb,IAAiB,MAAM,CA2DtB;IA3DD,WAAiB,MAAM;QACnB,IAAiB,OAAO,CAyDvB;QAzDD,WAAiB,OAAO;YACpB,IAAiB,UAAU,CAuD1B;YAvDD,WAAiB,UAAU;gBACvB,MAAa,iBAAkB,SAAQ,WAAA,OAAO,CAAC,UAAU;oBASrD,OAAO;wBAEH,OAAO,CAAC,wDAAwD,EAAE,4CAA4C,EAAE,wDAAwD,EAAE,4CAA4C,EAAE,oDAAoD,EAAE,4DAA4D,CAAC,CAAC;oBAChV,CAAC;oBACD,QAAQ;wBAEJ,OAAO,EAAE,CAAC;oBACd,CAAC;oBAED,IAAI,CAAC,EAAE,EAAE,WAAW;wBAChB,IAAI,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,IAAI,GAAE,EAAE,CAAC;wBACvC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,IAAI,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,IAAI,IAAI,EAAE;4BACjE,IAAI,GAAG,mFAAmF,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,GAAG,kBAAkB,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,GAAG,kTAAkT,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,GAAG,YAAY,GAAG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AC,CAAC,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;yBAC/H;6BACI;4BACD,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;yBACvJ;oBACL,CAAC;oBAGD,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;4BACrD,IAAI,CAAC,QAAQ,GAAG,IAAI,iBAAiB,EAAE,CAAC;wBAC5C,OAAO,IAAI,CAAC,QAAQ,CAAC;oBACzB,CAAC;iBACJ;gBArDY,4BAAiB,oBAqD7B,CAAA;YACL,CAAC,EAvDgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAuD1B;QACL,CAAC,EAzDgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAyDvB;IACL,CAAC,EA3DgB,MAAM,GAAN,cAAM,KAAN,cAAM,QA2DtB;AACL,CAAC,EA7DS,OAAO,KAAP,OAAO,QA6DhB"}
@@ -0,0 +1,75 @@
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 = '<ul class="p-2 card mb-0 d-flex flex-column overflow-hide bgcolorset_' + id[0].PortletWidgetId + ' kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" style="background-color:#ffeadd;border-width:1px;border-style:solid;border-color:#fcc09b;border-radius:4px; height:180px;"><li class="kpi-link-report"><a href="javascript:void(0);" onclick="Unibase.Themes.Compact.KpiWidgets.Manager.KpiManager.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + containerid + ')"><small class="showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></li><div><li class="w-100 d-flex justify-content-center align-items-center"><span class="text-dark"><i class="fa fa-user-plus fa-2x"></i></span><div id="div_kpi_icon_' + id[0].PortletWidgetId + '"><img class="img-fluid p-1 d-none rounded-5 w-55p h-55p imageUpload" data-imageUpload="true" data-dynamic="1" id="kpi_icon_' + id[0].PortletWidgetId + '" src="tenants/themes/compact/imgs/img55.png" onerror="ReloadImage(event)" data-loaded="1"></div></li><li class="w-100 d-flex justify-content-center align-items-center kpivalue_1_' + id[0].PortletWidgetId + '"><span class="w-90 mx-20 text-truncate text-center" id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '" data-kpi="kpi_font">' + title + '</span></li><li class="w-100 d-flex justify-content-center align-items-center kpivalue_1_' + id[0].PortletWidgetId + '"><span class="text-dark textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-1" style="font-size:34px">00000</span></li><li class="w-100 d-flex justify-content-center align-items-center kpivalue_2_' + id[0].PortletWidgetId + '" ><span><span class="pr-1 kpivalueLabel_' + id[0].PortletWidgetId + '" data-valueLabelBind="Value-1" data-kpi="kpi_font">Increases By</span><span class="kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-2">0%</span></span></li></div></ul>';
}
else {
html = '<ul class="position-relative p-2 card mb-0 d-flex flex-column overflow-hide bgcolorset_' + id[0].PortletWidgetId + ' kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" style="background-color:#fff;border-width:1px;border-style:solid;border-color:#fff;border-radius:4px; height:180px;"><li class="kpi-link-report"><a href="javascript:void(0);" onclick="Unibase.Themes.Compact.KpiWidgets.Manager.KpiManager.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + containerid + ')"><small class="showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></li><div class="d-flex flex-column h-100 justify-content-center"><li class="w-100 my-auto d-flex justify-content-center align-items-center" ><span class="text-dark"><i class="fa fa-user-plus fa-2x"></i></span><div id="div_kpi_icon_' + id[0].PortletWidgetId + '"><img class="img-fluid p-1 d-none rounded-5 w-55p h-55p imageUpload" data-imageUpload="true" data-dynamic="1" id="kpi_icon_' + id[0].PortletWidgetId + '" src="tenants/themes/compact/imgs/img55.png" onerror="ReloadImage(event)" data-loaded="1"></div></li><li><ul class="d-flex flex-column"><li class="w-100 d-flex justify-content-center align-items-center kpivalue_1_' + id[0].PortletWidgetId + '"><span class="w-90 mx-20 text-truncate text-center" id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '" data-kpi="kpi_font">' + title + '</span></li><li class="w-100 d-flex justify-content-center align-items-center kpivalue_1_' + id[0].PortletWidgetId + '"><span class="text-dark textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-1" style="font-size:34px">00000</span></li></ul></li><li class="w-100 d-flex justify-content-center align-items-center kpivalue_2_' + id[0].PortletWidgetId + '"><span><span class="pr-1 kpivalueLabel_' + id[0].PortletWidgetId + '" data-valueLabelBind="Value-1" data-kpi="kpi_font">Increases By</span><span class="kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-2">0%</span></span></li></div></ul>';
}
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 = '<img class="img-fluid p-1 w-55p h-55p imageUpload"id="kpi_icon_' + portletwidgetid + '"src="' + response.result.Icon + '" data-dynamic="1" data-loaded="0" onerror="ReloadImage(event)">';
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 = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,154 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class TwoValue extends Unibase.Platform.Core.BaseComponent {
jsFiles() {
return [];
}
cssFiles() {
return [];
}
html(id, containerid) {
let title = id[0].WidgetName;
let html = '<div class="card mb-0 card-sm kpi-card" id="widget_kpis_TwoValue">' +
'<a href="javascript:;" class="kpi-link-report" onclick = "Unibase.Themes.Compact.KpiWidgets.TwoValue.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + "'" + containerid + "'" + ')" style = "margin-top:-20px;" > <small id="showreport_' + id[0].PortletWidgetId + '" class="font-sm-11"><span class="nav-icon-wrap"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a>' +
'<div class="card-body p-2">' +
'<span class="d-block mb-10" ><span id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '" data-kpi="kpi_font">' + title + '</span>' +
'<span class="d-block align-items-center card-action-wrap pull-right font-11" >' +
'<a href="#" class="inline-block full-screen mr-15 hidden" id="kpi_FullScreen_' + id[0].PortletWidgetId + '">' +
'<i class="ion ion-md-expand"></i>' +
'</a>' +
'</span>' +
'<span id="config_widget_' + id[0].PortletWidgetId + '"></span>' +
'</span>' +
'<div class="pull-right" style="margin-top:-10px;"><div id="span_kpi_icon_' + id[0].PortletWidgetId + '" ></div></div>' +
'<span class="d-block display-7" style="font-weight:400;font-size:20px;" id="kpi_Twovalue_1_' + id[0].PortletWidgetId + '">000000</span>' +
'<small id="kpi_Twovalue_2_' + id[0].PortletWidgetId + '">000</small><br>' +
'</div>' +
'</div>';
return html;
}
load(id, containerid, callback) {
let instance = this;
let inputparameters = Unibase.Themes.Providers.DashboardHelper.Instance().replaceWidgetParameterValues(id[0].WidgetParameters, id[0].InstalledAppId);
let fromDate = "", toDate = "";
var cf_fromDate = Unibase.Platform.Membership.Infos.Identity.currentUser.fromDate;
var cf_toDate = Unibase.Platform.Membership.Infos.Identity.currentUser.toDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
var parameters = {
WidgetId: id[0].WidgetId,
PortletWidgetId: id[0].PortletWidgetId,
InstalledAppId: id[0].InstalledAppId,
InputParameters: inputparameters,
FromDate: fromDate,
ToDate: toDate
};
instance.loadResponseData(id[0].PortletWidgetId, containerid, parameters);
}
loadResponseData(portletwidgetid, detailContainer, parameters) {
let instance = this;
instance.inputParameters = parameters.InputParameters;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKpiWidgetData(parameters).then(function (response) {
instance.loadData(portletwidgetid, detailContainer, parameters, false, response);
});
}
loadData(portletwidgetid, detailcontainer, parameters, IsPreview, response) {
detailcontainer = '.' + detailcontainer;
var post = response.result;
if (post != null) {
if (post.IsMaximize == true) {
$("#kpi_FullScreen_" + portletwidgetid).removeClass("hidden");
}
if (post.Data == null || post.Data == "" || post.Data == '[]') {
$(detailcontainer).find("#kpi_Twovalue_1_" + portletwidgetid).removeClass('display-6');
$(detailcontainer).find("#kpi_Twovalue_1_" + portletwidgetid).addClass('display-8');
$(detailcontainer).find("#kpi_Twovalue_1_" + portletwidgetid).text("No Data");
}
else {
var data = JSON.parse(post.Data)[0];
var selected_values = post.Selected_Columns;
if (selected_values != null) {
var sp = selected_values.split(',');
var column1 = sp[0];
var column2 = sp[1];
}
var Value_1 = data[column1];
var Value_2 = data[column2];
if (isNaN(Value_1)) {
}
else {
Value_1 = Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(Value_1, 2);
}
$(detailcontainer).find("#kpi_Twovalue_1_" + portletwidgetid).text(Value_1);
$(detailcontainer).find("#kpi_Twovalue_2_" + portletwidgetid).text(Value_2);
if (post.Icon != "" || post.Icon != null) {
let iconhtml = '<img id="kpi_icon_' + portletwidgetid + '"src="' + post.Icon + '" style="width:50px;"/>';
$("#span_kpi_icon_" + portletwidgetid).html(iconhtml);
}
}
var color = post.Color;
if (post.Color != "" && post.Color != null) {
$(detailcontainer).find("#kpi_Twovalue_1_" + portletwidgetid).addClass("text-" + color);
}
var colors = ["primary", "success", "warning", "danger", "info", "light", "secondary", "dark"];
if (response.result.AppConfigurations != null) {
if (response.result.AppConfigurations.length != 0) {
var designhtml = "";
var appconfig = response.result.AppConfigurations;
for (var i = 0; i < appconfig.length; i++) {
var onlickurl = "";
var sname = appconfig[i].SettingName.replace(/ /g, '');
designhtml += ' <span class="mr-10"><a href="javascript:;" id="widgetconfig_' + sname + '" onclick="' + onlickurl + '">' +
'<button class="btn btn-sm btn-' + colors[i] + ' pull-right btn-rounded text-white">' + appconfig[i].SettingName + '</button>' +
'</a> </span>';
}
designhtml += "</div>";
$(detailcontainer).find("#config_widget_" + portletwidgetid).html(designhtml);
}
}
if (response.result.ReportId == 0 || response.result.ReportId == null) {
$(detailcontainer).find("#showreport_" + portletwidgetid).addClass("hidden");
}
if (post.LinkReportId != 0 && post.LinkReportId != null) {
}
else {
$(detailcontainer).find("#showreport_" + portletwidgetid).addClass('hidden');
}
}
$(detailcontainer).siblings('.line-loader').remove();
$(detailcontainer).removeClass('hidden');
}
linkReport(widgetid, portletwidgetid, containerid) {
var instance = this;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKPIWidget(widgetid).then(function (response) {
var res = response.result;
if (res != null) {
let containerid = "div_kpireport_" + portletwidgetid;
var rv_obj = Unibase.Platform.Analytics.Components.ReportViewer.Instance();
instance.navigationHelper.popup(res.LinkReportId, containerid, rv_obj, null, Unibase.Platform.Helpers.Size.ExtraLarge);
}
});
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new TwoValue();
return this.instance;
}
}
KpiWidgets.TwoValue = TwoValue;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,63 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Twovaluebgcolor extends KpiWidgets.Manager.KpiManager {
jsFiles() {
return ["platform/widgets/managers/interfaces/iwidgetmanager.js", "platform/widgets/managers/widgetmanager.js", "platform/core/helpers/propertyhelper/propertyhelper.js", "platform/core/helpers/token/tokenhelper.js", "platform/core/helpers/numberhelper/numberhelper.js", "platform/analytics/components/reportviewer/reportviewer.js", "platform/analytics/components/reportviewer/linkreport.js"];
}
cssFiles() {
return [];
}
html(id, containerid) {
let title = id[0].WidgetName, html = '';
if (id[0].PortletWidgetId == 22501 || id[0].PortletWidgetId == 2250) {
html = '<ul class="text-dark color_' + id[0].PortletWidgetId + ' font-weight-500 p-2 d-flex flex-column kpi_card_class_' + id[0].PortletWidgetId + ' bgcolorset_' + id[0].PortletWidgetId + ' kpi-card" id="widget_kpis_TwoValue" style="border-width:1px;border-style:solid;border-color:#d4a192;height:90px;border-radius:4px;background-color:#f0cdc3;"><li class="kpi-link-report"><a href="javascript:void(0);" onclick="Unibase.Themes.Compact.KpiWidgets.Manager.KpiManager.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ', ' + containerid + ')" id="showreport_' + id[0].PortletWidgetId + '" ><small class="showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></li><li class="d-flex justify-content-between " data-height="height1" style="height:59px"><div class="d-flex flex-row mr-2 text-truncate align-items-center"><div class="w-45p h-45p mr-2" id="div_kpi_icon_' + id[0].PortletWidgetId + '"><img src="tenants/themes/compact/imgs/img55.png" onerror="ReloadImage(event)" data-dynamic="1" class="img-fluid imageUpload" style="filter: invert(1);"></div><div class="d-flex flex-column text-truncate" style="margin-top:-5px"> <span class="textProperty_' + id[0].PortletWidgetId + ' font-weight-400 text-truncate text-dark kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-1" style="font-size:20px;">00</span> <span id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '" data-kpi="kpi_font">' + title + '</span></div></div><span class="ml-auto pr-3" id="config_widget_' + id[0].PortletWidgetId + '"></span></li><li style="height:3px; border-bottom: 1px dashed green;"></li><li class="d-flex justify-content-between align-items-center my-auto px-3" data-height="height2" data-kpi="kpi_font" style="height:28px"> <span class="kpivalueLabel_' + id[0].PortletWidgetId + '" data-valuelabelbind="Value-1">Total Meetings</span> <span class="text-dark" id="kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-2">0</span></li></ul>';
}
else {
html = '<ul class="position-relative text-dark color_' + id[0].PortletWidgetId + ' font-weight-500 p-2 d-flex flex-column kpi_card_class_' + id[0].PortletWidgetId + ' bgcolorset_' + id[0].PortletWidgetId + ' kpi-card" id="widget_kpis_TwoValue" style="background-color:#f1f4d0;"><li class="kpi-link-report"><a href="javascript:void(0);" onclick="Unibase.Themes.Compact.KpiWidgets.Manager.KpiManager.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ', ' + containerid + ')" class="showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport"><small id="showreport_' + id[0].PortletWidgetId + '"><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></li><li class="d-flex justify-content-between h-100" data-height="height1"><div class="d-flex flex-row mr-2 text-truncate"><div class="w-55p h-55p mr-2" id="div_kpi_icon_' + id[0].PortletWidgetId + '"><img src="tenants/themes/compact/imgs/img55.png" onerror="ReloadImage(event)" data-dynamic="1" class="img-fluid imageUpload" style="filter: invert(1);"></div><div class="d-flex flex-column text-truncate"> <span class="textProperty_' + id[0].PortletWidgetId + ' font-weight-500 my-auto text-truncate text-dark kpivalue_' + id[0].PortletWidgetId + ' kpivalue_1_' + id[0].PortletWidgetId + '" data-valuebind="Value-1" style="font-size:32px;">0</span> <span id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '" class="mt-auto" data-kpi="kpi_font">' + title + '</span></div></div><span class="ml-auto pr-3" id="config_widget_' + id[0].PortletWidgetId + '"></span></li><li style="height:3px; border-bottom: 1px dashed green;" class=" mb-1 kpivalue_2_' + id[0].PortletWidgetId + '"></li><li class="d-flex justify-content-between align-items-center my-auto kpivalue_2_' + id[0].PortletWidgetId + '" data-height="height2" data-kpi="kpi_font" style="height:28px"> <span class="kpivalueLabel_' + id[0].PortletWidgetId + '" data-kpi="kpi_font" data-valuelabelbind="Value-1">Total Meetings</span> <span class="text-dark kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-2">0</span></li></ul>';
}
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 calheight, calheight1, calheight2;
calheight = parseInt(height.replace(/px/g, ''));
calheight1 = calheight * 0.66;
calheight1 = parseInt(Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(calheight1, 0));
calheight2 = calheight - calheight1 - 3;
$(Container).find('[data-height="height1"]').css('height', calheight1 + 'px');
$(Container).find(".color_" + 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].BorderRadius, "height": height });
$(Container).find('.textProperty_' + portletwidgetid).css({ "font-size": cssproperty[0].FontSize + 'px' });
if (response.result.Icon == "" || response.result.Icon == null) {
$(Container).find("#div_kpi_icon_" + portletwidgetid).remove();
}
else {
var iconhtml = '<img class="img-fluid p-1 w-55p h-55p imageUpload" data-dynamic="1" id="kpi_icon_' + portletwidgetid + '"src="' + response.result.Icon + '" onerror="ReloadImage(event)">';
$(Container).find("#div_kpi_icon_" + portletwidgetid).html(iconhtml);
}
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Twovaluebgcolor();
return this.instance;
}
}
KpiWidgets.Twovaluebgcolor = Twovaluebgcolor;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
@@ -0,0 +1 @@
{"version":3,"file":"twovaluebgcolor.js","sourceRoot":"","sources":["twovaluebgcolor.ts"],"names":[],"mappings":"AAKA,IAAU,OAAO,CAoEhB;AApED,WAAU,OAAO;IACb,IAAiB,MAAM,CAkEtB;IAlED,WAAiB,MAAM;QACnB,IAAiB,OAAO,CAgEvB;QAhED,WAAiB,OAAO;YACpB,IAAiB,UAAU,CA8D1B;YA9DD,WAAiB,UAAU;gBACvB,MAAa,eAAgB,SAAQ,WAAA,OAAO,CAAC,UAAU;oBAUnD,OAAO;wBACH,OAAO,CAAC,wDAAwD,EAAE,4CAA4C,EAAE,wDAAwD,EAAE,4CAA4C,EAAE,oDAAoD,EAAE,4DAA4D,EAAC,0DAA0D,CAAC,CAAC;oBAC3Y,CAAC;oBACD,QAAQ;wBAEJ,OAAO,EAAE,CAAC;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,OAAO,GAAP,cAAO,KAAP,cAAO,QAgEvB;IACL,CAAC,EAlEgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAkEtB;AACL,CAAC,EApES,OAAO,KAAP,OAAO,QAoEhB"}
@@ -0,0 +1,63 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Twovaluebottombarcolor 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 = '<div class="bg-white overflow-hide border_color_' + id[0].PortletWidgetId + ' kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" id="widget_kpis_TwoValue" style="border:1px none #f83f37; border-radius:4px; height:120px"><span class="kpi-link-report"><a href="javascript:;" onclick="Unibase.Themes.Compact.KpiWidgets.Manager.KpiManager.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ', ' + containerid + ')"><small class="showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></span><div class="card-body p-2 pb-0 font-weight-Normal text-dark" data-height="height1" style="height:79px"><ul class="d-flex flex-row"><li class="font-weight-500"><p class="ml-2" id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '" data-kpi="kpi_font">' + title + '</p><span class="font-weight-400 ml-2 textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + '" data-valueBind="Value-1" style="font-size:32px;">0</span></li><li class="ml-auto pr-3"id="config_widget_' + id[0].PortletWidgetId + '"></li></ul></div><div class="px-20 py-2 color_' + id[0].PortletWidgetId + ' bgcolorset_' + id[0].PortletWidgetId + ' text-white font-weight-600 d-flex justify-content-between align-items-center" data-height="height2" style="background-color:#fcbf36; height:41px"><p class="kpivalueLabel_' + id[0].PortletWidgetId + '" data-valueLabelBind="Value-1" data-kpi="kpi_font">Label </p><p class="kpivalue_' + id[0].PortletWidgetId + '" data-valueBind="Value-2">0</p></div></div>';
}
else {
html = '<div class="position-relative bg-white overflow-hide border_color_' + id[0].PortletWidgetId + ' kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" id="widget_kpis_TwoValue" style="border:1px none #f83f37; border-radius:4px; height:120px"><span class="kpi-link-report"><a href="javascript:;" onclick="Unibase.Themes.Compact.KpiWidgets.Manager.KpiManager.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ', ' + containerid + ')"><small class="showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></span><div class="card-body p-2 font-weight-Normal text-dark card-body-kpi-TVBBC-' + id[0].PortletWidgetId + '" data-height="height1" style="height:79px"><ul class="d-flex flex-column h-100"><li><ul class="d-flex flex-row"><li class="font-weight-500"><p class="" id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '" data-kpi="kpi_font">' + title + '</p></li><li class="ml-auto pr-3"id="config_widget_' + id[0].PortletWidgetId + '"></li></ul></li><li class="my-auto text-truncate"><span class="font-weight-400 textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + '" data-valueBind="Value-1" style="font-size:32px;">0</span></li></ul></div><div class="p-2 kpivalue_3_' + id[0].PortletWidgetId + ' color_' + id[0].PortletWidgetId + ' bgcolorset_' + id[0].PortletWidgetId + ' text-white font-weight-600 d-flex justify-content-between align-items-center" data-height="height2" style="height:41px"><p class="text-dark kpivalueLabel_' + id[0].PortletWidgetId + '" data-valueLabelBind="Value-1" data-kpi="kpi_font">Label </p><p class = "text-dark kpivalue_' + id[0].PortletWidgetId + '" data-valueBind="Value-2">0</p></div></div>';
}
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';
let borderbottom = '0px 0px ' + cssproperty[0].BorderRadius + ' ' + cssproperty[0].BorderRadius;
var calheight, calheight1, calheight2;
calheight = parseInt(height.replace(/px/g, ''));
calheight1 = calheight * 0.66;
calheight1 = parseInt(Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(calheight1, 0));
calheight2 = calheight - calheight1;
$(Container).find(".color_" + portletwidgetid + "").css({ "background-color": cssproperty[0].BackgroundColor, "border": borderbottom });
$(Container).find(".border_color_" + portletwidgetid + "").css({
"border": cssproperty[0].BorderWidth + " " + cssproperty[0].BorderType + " " + cssproperty[0].BorderColor, "border-radius": cssproperty[0].BorderRadius, "height": calheight
});
$(".border_color_" + portletwidgetid + "").css({
"border": cssproperty[0].BorderWidth + " " + cssproperty[0].BorderType + " " + cssproperty[0].BorderColor, "border-radius": cssproperty[0].BorderRadius, "height": height
});
$(Container).find('[data-height="height1"]').css('height', calheight1 + 'px');
$(Container).find('[data-height="height2"]').css('height', calheight2 + 'px');
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Twovaluebottombarcolor();
return this.instance;
}
}
KpiWidgets.Twovaluebottombarcolor = Twovaluebottombarcolor;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
@@ -0,0 +1 @@
{"version":3,"file":"twovaluebottombarcolor.js","sourceRoot":"","sources":["twovaluebottombarcolor.ts"],"names":[],"mappings":"AAKA,IAAU,OAAO,CAqEhB;AArED,WAAU,OAAO;IACb,IAAiB,MAAM,CAmEtB;IAnED,WAAiB,M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,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;4BACrD,IAAI,CAAC,QAAQ,GAAG,IAAI,sBAAsB,EAAE,CAAC;wBACjD,OAAO,IAAI,CAAC,QAAQ,CAAC;oBACzB,CAAC;iBACJ;gBA7DY,iCAAsB,yBA6DlC,CAAA;YACL,CAAC,EA/DgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QA+D1B;QACL,CAAC,EAjEgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAiEvB;IACL,CAAC,EAnEgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAmEtB;AACL,CAAC,EArES,OAAO,KAAP,OAAO,QAqEhB"}
@@ -0,0 +1,53 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Twovaluecenterline 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 = '<ul class="position-relative p-2 overflow-hide bgcolorset_' + id[0].PortletWidgetId + ' kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" style="background-color:#d8fcd9;border-color:#b0ecb2;border-style:solid; border-width:1px; height:180px"><li class="kpi-link-report"><a href="javascript:void(0);" onclick="Unibase.Themes.Compact.KpiWidgets.Manager.KpiManager.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + containerid + ')"><small class="showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></li><li class="d-flex flex-column kpivalue_1_' + id[0].PortletWidgetId + '"><ul class="d-flex justify-content-between align-items-center"><li><span class="kpivalueLabel_' + id[0].PortletWidgetId + '" data-valuelabelbind="Value-1" data-kpi="kpi_font">Total Meetings</span></li></ul><ul class="d-flex justify-content-between"><li class="text-truncate"><span class="text-dark textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-1" style="font-size:32px">00</span></li><li><span class="my-auto ml-auto pr-3" id="config_widget_' + id[0].PortletWidgetId + '"></span></li></ul></li><li class="d-flex flex-column border border-bottom-0 border-left-0 border-right-0 border-light-40 kpivalue_2_' + id[0].PortletWidgetId + '"><ul class="d-flex justify-content-between"><li><span class="kpivalueLabel_' + id[0].PortletWidgetId + '" data-valuelabelbind="Value-2" data-kpi="kpi_font">Total Participants</span></li></ul><ul class="d-flex justify-content-between"><li class="text-truncate"><span class="text-dark textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + ' text-truncate" data-valuebind="Value-2" style="font-size:32px">00</span></li></ul></li></ul>';
}
else {
html = '<ul class="position-relative p-2 d-flex px-20 flex-column justify-content-between overflow-hide bgcolorset_' + id[0].PortletWidgetId + ' kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" style="background-color:#fff;"><li class="kpi-link-report"><a href="javascript:void(0);" onclick="Unibase.Themes.Compact.KpiWidgets.Manager.KpiManager.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + containerid + ')"><small class="showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></li><li class="d-flex flex-column h-100"><ul class="d-flex justify-content-between align-items-center"><li><span class="kpivalueLabel_' + id[0].PortletWidgetId + '" data-valuelabelbind="Value-1" data-kpi="kpi_font">Total Meetings</span></li></ul><ul class="d-flex justify-content-between my-auto"><li><span class=" line-height-10 text-dark textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-1" style="font-size:26px">00</span></li><li><span class="my-auto ml-auto pr-3" id="config_widget_' + id[0].PortletWidgetId + '"></span></li></ul></li><li style="height:3px;" class="kpivalue_2_' + id[0].PortletWidgetId + ' border border-bottom-0 border-left-0 border-right-0 border-light-40"></li><li class="d-flex flex-column h-100 kpivalue_2_' + id[0].PortletWidgetId + '"><span class="kpivalueLabel_' + id[0].PortletWidgetId + '" data-valuelabelbind="Value-2" data-kpi="kpi_font">Total Participants</span><span class="text-dark my-auto line-height-10 textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-2" style="font-size:26px">00</span></li></ul>';
}
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';
$(Container).find('.kpi_card_class_' + 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].BorderRadius, "height": height
});
$(Container).find(".kpivalue_" + portletwidgetid + '[data-valuebind="Value-1"]').css({ "font-size": cssproperty[0].FontSize + "px", "font-family": cssproperty[0].FontStyle });
$(Container).find(".kpivalue_" + portletwidgetid + '[data-valuebind="Value-2"]').css({ "font-size": cssproperty[0].FontSize + "px", "font-family": cssproperty[0].FontStyle });
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Twovaluecenterline();
return this.instance;
}
}
KpiWidgets.Twovaluecenterline = Twovaluecenterline;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
@@ -0,0 +1 @@
{"version":3,"file":"twovaluecenterline.js","sourceRoot":"","sources":["twovaluecen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YAAY,GAAG,eAAe,GAAG,4BAA4B,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;wBAC/K,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,eAAe,GAAG,4BAA4B,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;oBAGnL,CAAC;oBAED,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;4BACrD,IAAI,CAAC,QAAQ,GAAG,IAAI,kBAAkB,EAAE,CAAC;wBAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC;oBACzB,CAAC;iBACJ;gBAtDY,6BAAkB,qBAsD9B,CAAA;YACL,CAAC,EAxDgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAwD1B;QACL,CAAC,EA1DgB,OAAO,GAAP,cAAO,KAAP,cAAO,QA0DvB;IACL,CAAC,EA5DgB,MAAM,GAAN,cAAM,KAAN,cAAM,QA4DtB;AACL,CAAC,EA9DS,OAAO,KAAP,OAAO,QA8DhB"}
@@ -0,0 +1,155 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class ValueWithPercentage extends Unibase.Platform.Core.BaseComponent {
jsFiles() {
return [];
}
cssFiles() {
return [];
}
html(id, containerid) {
let title = id[0].WidgetName;
let html = '<div class="card mb-0 card-sm kpi-card" id="widget_kpis_2">' +
'<span class="kpi-link-report"><a href="#" onclick="Unibase.Themes.Compact.KpiWidgets.ValueWithPercentage.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ',' + "'" + containerid + "'" + ')" ;=""><small id="showreport_22501" class="font-sm-11"><span class="nav-icon-wrap"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></span>' +
'<div class="pa-10">' +
'<span class="d-block font-14 font-weight-400 text-dark"><span id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '">' + title + '</span>' +
'</span>' +
'<span class="d-block align-items-center card-action-wrap pull-right font-11" >' +
'<a href="#" class="inline-block full-screen mr-15 hidden" id="kpi_FullScreen_' + id[0].PortletWidgetId + '">' +
'<i class="ion ion-md-expand"></i>' +
'</a>' +
'</span>' +
'<span class="d-block display-5 font-weight-400 text-dark" id="kpi_Comparision_value_' + id[0].PortletWidgetId + '"></span>' +
'<span id="config_widget_' + id[0].PortletWidgetId + '"></span>' +
'<span class="d-flex justify-content-between align-items-center mt-10" ><span class="h4" id="kpi_Comparing_value_' + id[0].PortletWidgetId + '">000000</span><span id="kpi_Percentage_' + id[0].PortletWidgetId + '" class="ml-5">0%</span></span>' +
'</div>' +
'</div>';
return html;
}
load(id, containerid, callback) {
let instance = this;
let inputparameters = Unibase.Themes.Providers.DashboardHelper.Instance().replaceWidgetParameterValues(id[0].WidgetParameters, id[0].InstalledAppId);
let fromDate = "", toDate = "";
var cf_fromDate = Unibase.Platform.Membership.Infos.Identity.currentUser.fromDate;
var cf_toDate = Unibase.Platform.Membership.Infos.Identity.currentUser.toDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
var parameters = {
WidgetId: id[0].WidgetId,
PortletWidgetId: id[0].PortletWidgetId,
InstalledAppId: id[0].InstalledAppId,
InputParameters: inputparameters,
FromDate: fromDate,
ToDate: toDate
};
instance.loadResponseData(id[0].PortletWidgetId, containerid, parameters);
}
loadResponseData(portletwidgetid, detailContainer, parameters) {
let instance = this;
instance.inputParameters = parameters.InputParameters;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKpiWidgetData(parameters).then(function (response) {
instance.loadData(portletwidgetid, detailContainer, parameters, false, response);
});
}
loadData(portletwidgetid, detailContainer, parameters, IsPreview, response) {
detailContainer = '.' + detailContainer;
var post = response.result;
if (post != null) {
if (post.IsMaximize == true) {
$("#kpi_FullScreen_" + portletwidgetid).removeClass("hidden");
}
if (response != null) {
var data = JSON.parse(post.Data)[0];
var selected_values = post.Selected_Columns;
var sp = selected_values.split(',');
var column1 = sp[0];
var column2 = sp[1];
var Value_1 = data[column1];
var Value_2 = data[column2];
var kpi_percentage;
if (Value_2 < Value_1) {
var Per = 100 / Value_1;
var value = Value_1 - Value_2;
kpi_percentage = Unibase.Core.Helpers.NumberHelper.Instance().format(value * Per, 2, '');
$(detailContainer).find("#kpi_Percentage_" + portletwidgetid).addClass('text-danger');
kpi_percentage = '-' + kpi_percentage;
}
else {
if (Value_2 != 0)
var difference = Value_2 - Value_1;
if (Value_2 == 0) {
kpi_percentage = 0;
}
else {
kpi_percentage = Unibase.Core.Helpers.NumberHelper.Instance().roundNumber(((Value_2 - Value_1) / Value_2) * 100, 1);
}
if (difference > 0) {
$(detailContainer).find("#kpi_Percentage_" + portletwidgetid).addClass('text-success');
kpi_percentage = '+' + kpi_percentage;
}
else {
$(detailContainer).find("#kpi_Percentage_" + portletwidgetid).addClass('text-danger');
kpi_percentage = ' ' + kpi_percentage;
}
}
$(detailContainer).find("#kpi_Comparing_value_" + portletwidgetid).text(Value_2);
$(detailContainer).find("#kpi_comparing_string_" + portletwidgetid).text(Value_1);
$(detailContainer).find("#kpi_Percentage_" + portletwidgetid).text(kpi_percentage + '% ');
var colors = ["primary", "success", "warning", "danger", "info", "light", "secondary", "dark"];
if (response.result.AppConfigurations.length != 0) {
var designhtml = "";
var appconfig = response.result.AppConfigurations;
for (var i = 0; i < appconfig.length; i++) {
var onlickurl = "";
var sname = appconfig[i].SettingName.replace(/ /g, '');
designhtml += ' <span class="mr-10"><a href="javascript:;" id="widgetconfig_' + sname + '" onclick="' + onlickurl + '">' +
'<button class="btn btn-sm btn-' + colors[i] + ' pull-right btn-rounded text-white">' + appconfig[i].SettingName + '</button>' +
'</a> </span>';
}
designhtml += "</div>";
$(detailContainer).find("#config_widget_" + portletwidgetid).html(designhtml);
}
if (post.LinkReportId != 0 && post.LinkReportId != null) {
}
else {
$(detailContainer).find("#showreport_" + portletwidgetid).addClass('hidden');
}
}
}
$(detailContainer).siblings('.line-loader').remove();
$(detailContainer).removeClass('hidden');
}
linkReport(widgetid, portletwidgetid, containerid) {
var instance = this;
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getKPIWidget(widgetid).then(function (response) {
var res = response.result;
if (res != null) {
let containerid = "div_kpireport_" + portletwidgetid;
var rv_obj = Unibase.Platform.Analytics.Components.ReportViewer.Instance();
instance.navigationHelper.popup(res.LinkReportId, containerid, rv_obj, null, Unibase.Platform.Helpers.Size.ExtraLarge);
}
});
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new ValueWithPercentage();
return this.instance;
}
}
KpiWidgets.ValueWithPercentage = ValueWithPercentage;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,58 @@
var Unibase;
(function (Unibase) {
let Themes;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Valuewithpercentagebgcolor extends KpiWidgets.Manager.KpiManager {
jsFiles() {
return ["platform/widgets/managers/interfaces/iwidgetmanager.js", "platform/widgets/managers/widgetmanager.js", "platform/core/helpers/propertyhelper/propertyhelper.js", "platform/core/helpers/token/tokenhelper.js", "platform/core/helpers/numberhelper/numberhelper.js", "platform/analytics/components/reportviewer/reportviewer.js"];
}
cssFiles() {
return [];
}
html(id, containerid) {
let html = '';
const { PortletWidgetId, WidgetName: title, WidgetId } = id[0];
if (PortletWidgetId == 2250 || PortletWidgetId == 22501) {
html = '<ul class="position-relative p-2 w-100 d-flex flex-column w-25 overflow-hide bgcolorset_' + PortletWidgetId + ' kpi_card_class_' + PortletWidgetId + ' kpi-card" id="widget_kpis_2" style="background-color:#d6d4f6; border-width: 1px; border-style: solid; border-color:#b6b2fc; border-radius: 4px; height: 90px;"><li class="kpi-link-report"><a href="javascript:void(0);" onclick="Unibase.Themes.Compact.KpiWidgets.ValueWithPercentage.Instance().linkReport(' + id[0].WidgetId + ',' + PortletWidgetId + ', ' + containerid + ')"><small class="showreport_' + PortletWidgetId + '" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_' + PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i> </span> </small></a></li><li class="d-flex justify-content-between"><div><span class="font-weight-400 text-dark textProperty_' + PortletWidgetId + ' kpivalue_' + PortletWidgetId + '" data-valueBind="Value-1" style="font-size:32px;">3,60,000</span></div></li><li class="d-flex flex-row my-auto justify-content-between"><div><span id="hf_kpi_widgetName_' + PortletWidgetId + '" data-kpi="kpi_font">' + title + '</span></div><div> <span class="my-auto" id="config_widget_' + PortletWidgetId + '"></span></div><div class=""><span class="d-flex flex-row align-items-center font-14"><span class="pr-1 kpivalue_' + PortletWidgetId + '" data-kpi="kpi_font" data-valueBind="Value-2">85%</span><span class="text-success" style="transform: rotate(225deg);"><i class="la la-arrow-circle-up"></i></span></span> </div></li></ul>';
}
else {
html = `<ul class="position-relative p-2 w-100 d-flex flex-column w-25 px-20 overflow-hide bgcolorset_${PortletWidgetId} kpi_card_class_${PortletWidgetId} kpi-card" id="widget_kpis_2" style="background-color:#ffffff;"><li class="kpi-link-report"><a href="javascript:;" onclick="Unibase.Themes.Compact.KpiWidgets.ValueWithPercentage.Instance().linkReport(${WidgetId},${PortletWidgetId},'${containerid}')"><small class="showreport_${PortletWidgetId}" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_${PortletWidgetId}"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></li><li class="d-flex justify-content-between my-auto"><div class="text-truncate"><span class="font-weight-400 line-height-10 text-dark textProperty_${PortletWidgetId} kpivalue_${PortletWidgetId} kpivalue_1_${PortletWidgetId}" data-valueBind="Value-1" style="font-size:32px;" data-value-kpi="kpi_value_font">0</span> </div></li><li class="d-flex flex-row mt-auto justify-content-between kpivalue_2_${PortletWidgetId}"><div class="text-truncate"><span id="hf_kpi_widgetName_${PortletWidgetId}" data-kpi="kpi_font" title="${title}">${title}</span></div><div> <span class="my-auto" id="config_widget_${PortletWidgetId}"></span></div><div class=""><span class="d-flex flex-row align-items-center font-14"><span class="pr-1 kpivalue_${PortletWidgetId}" data-valueBind="Value-2" data-kpi="kpi_font"></span></span> </div></li></ul>`;
}
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';
$(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].BorderRadius, "height": height
});
if (screen.width < 1198 && cssproperty[0].FontSize == 32) {
$(Container).find(".kpivalue_" + portletwidgetid + '[data-valuebind="Value-1"]').css({ "font-size": "24px", "font-family": cssproperty[0].FontStyle });
}
else {
$(Container).find(".kpivalue_" + portletwidgetid + '[data-valuebind="Value-1"]').css({ "font-size": cssproperty[0].FontSize + "px", "font-family": cssproperty[0].FontStyle });
}
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Valuewithpercentagebgcolor();
return this.instance;
}
}
KpiWidgets.Valuewithpercentagebgcolor = Valuewithpercentagebgcolor;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
@@ -0,0 +1 @@
{"version":3,"file":"valuewithpercentagebgcolor.js","sourceRoot":"","sources":["valuewithpercentagebgcolor.ts"],"names":[],"mappings":"AAGA,IAAU,OAAO,CA+DhB;AA/DD,WAAU,OAAO;IACb,IAAiB,MAAM,CA6DtB;IA7DD,WAAiB,MAAM;QACnB,IAAiB,OAAO,CA2DvB;QA3DD,WAAiB,OAAO;YACpB,IAAiB,UAAU,CAyD1B;YAzDD,WAAiB,UAAU;gBACvB,MAAa,0BAA2B,SAAQ,WAAA,OAAO,CAAC,UAAU;oBAS9D,OAAO;wBAEH,OAAO,CAAC,wDAAwD,EAAE,4CAA4C,EAAE,wDAAwD,EAAE,4CAA4C,EAAE,oDAAoD,EAAC,4DAA4D,CAAC,CAAC;oBAC/U,CAAC;oBACD,QAAQ;wBAEJ,OAAO,EAAE,CAAC;oBACd,CAAC;oBAEF,IAAI,CAAC,EAAE,EAAE,WAAW;wBACf,IAAI,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,IAAI,GAAG,EAAE,CAAC;wBACzC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,IAAI,KAAK,EAAE;4BACjE,IAAI,GAAG,wEAAwE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,eA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;
(function (Themes) {
let Compact;
(function (Compact) {
let KpiWidgets;
(function (KpiWidgets) {
class Valuewithpercentageprogressbar extends KpiWidgets.Manager.KpiManager {
jsFiles() {
return [];
}
cssFiles() {
return [];
}
html(id, containerid) {
let title = id[0].WidgetName, html = '';
if (id[0].PortletWidgetId == 2250 || id[0].PortletWidgetId == 22501) {
html = '<ul class="p-2 font-weight-500 d-flex flex-column overflow-hide bgcolorset_' + id[0].PortletWidgetId + ' kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" style="background-color: #bed0f0; border-width: 1px; border-style: solid; border-color: #bed0f0; border-radius: 4px; height: 90px;"><li class="kpi-link-report"><a href="javascript;void(0)" onclick="Unibase.Themes.Compact.KpiWidgets.Manager.KpiManager.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ', ' + containerid + ')"><small class="showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></li><li class="d-flex flex-row"> <span class="font-weight-400 line-height-10 text-dark textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-1" style="font-size:24px">00</span><span class="ml-auto pr-3 my-auto" id="config_widget_' + id[0].PortletWidgetId + '"></span></li><li class="d-flex justify-content-between my-auto"> <span class="my-auto" id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '" data-kpi="kpi_font">' + title + '</span> <span class="textProperty_' + id[0].PortletWidgetId + ' font-14 kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-2" data-kpi="kpi_font">50%</span></li><li class="mt-auto"><div class="progress" style="height: 10px;"><div class="progress-bar kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-2" style="width:50%" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div></div></li></ul>';
}
else {
html = '<ul class="position-relative p-2 font-weight-500 d-flex flex-column overflow-hide bgcolorset_' + id[0].PortletWidgetId + ' kpi_card_class_' + id[0].PortletWidgetId + ' kpi-card" style="background-color: #ffff;"><li class="kpi-link-report"><a href="javascript:;" onclick="Unibase.Themes.Compact.KpiWidgets.Manager.KpiManager.Instance().linkReport(' + id[0].WidgetId + ',' + id[0].PortletWidgetId + ', ' + containerid + ')"><small class="showreport_' + id[0].PortletWidgetId + '" data-LinkReport="LinkReport"><span class="nav-icon-wrap LinkReport_' + id[0].PortletWidgetId + '"><i class="font-14 dripicons dripicons-graph-pie text-dark"></i></span></small></a></li><li class="d-flex flex-row my-auto"> <span class="font-weight-400 line-height-10 text-dark textProperty_' + id[0].PortletWidgetId + ' kpivalue_' + id[0].PortletWidgetId + ' kpivalue_1_' + id[0].PortletWidgetId + '" data-valuebind="Value-1" style="font-size:22px" data-value-kpi="kpi_value_font">00</span><span class="ml-auto pr-3 my-auto" id="config_widget_' + id[0].PortletWidgetId + '"></span></li><li class="d-flex justify-content-between mt-auto"> <span class="my-auto" id="hf_kpi_widgetName_' + id[0].PortletWidgetId + '" data-kpi="kpi_font">' + title + '</span> <span class="textProperty_' + id[0].PortletWidgetId + ' font-14 kpivalue_' + id[0].PortletWidgetId + ' kpivalue_2_' + id[0].PortletWidgetId + '" data-kpi="kpi_font" data-valuebind="Value-2">0%</span></li><li class="mt-auto progress_Bar kpivalue_2_' + id[0].PortletWidgetId + '"><div class="progress" style="height: 10px;"><div class="progress-bar kpivalue_' + id[0].PortletWidgetId + '" data-valuebind="Value-2" style="width:00%" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div></div></li></ul>';
}
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';
$(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].BorderRadius, "height": height
});
if (screen.width < 1198 && cssproperty[0].FontSize == 32) {
$(Container).find(".kpivalue_" + portletwidgetid + '[data-valuebind="Value-1"]').css({ "font-size": "24px", "font-family": cssproperty[0].FontStyle });
}
else {
$(Container).find(".kpivalue_" + portletwidgetid + '[data-valuebind="Value-1"]').css({ "font-size": cssproperty[0].FontSize + "px", "font-family": cssproperty[0].FontStyle });
}
}
static Instance() {
if (this.instance === null || this.instance === undefined)
this.instance = new Valuewithpercentageprogressbar();
return this.instance;
}
}
KpiWidgets.Valuewithpercentageprogressbar = Valuewithpercentageprogressbar;
})(KpiWidgets = Compact.KpiWidgets || (Compact.KpiWidgets = {}));
})(Compact = Themes.Compact || (Themes.Compact = {}));
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
})(Unibase || (Unibase = {}));
@@ -0,0 +1 @@
{"version":3,"file":"valuewithpercentageprogressbar.js","sourceRoot":"","sources":["valuewithpercentageprogressbar.ts"],"names":[],"mappings":"AAGA,IAAU,OAAO,CA+DhB;AA/DD,WAAU,OAAO;IACb,IAAiB,MAAM,CA6DtB;IA7DD,WAAiB,MAAM;QACnB,IAAiB,OAAO,CA2DvB;QA3DD,WAAiB,OAAO;YACpB,IAAiB,UAAU,CAyD1B;YAzDD,WAAiB,UAAU;gBACvB,MAAa,8BAA+B,SAAQ,WAAA,OAAO,CAAC,UAAU;oBASlE,OAAO;wBAEH,OAAO,CAAC,wDAAwD,EAAE,4CAA4C,EAAE,wDAAwD,EAAE,4CAA4C,EAAE,oDAAoD,EAAC,4DAA4D,CAAC,CAAC;oBAC/U,CAAC;oBACD,QAAQ;wBAEJ,OAAO,EAAE,CAAC;oBACd,CAAC;oBAED,IAAI,CAAC,EAAE,EAAE,WAAW;wBAChB,IAAI,KAAK,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