Iniit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Providers;
|
||||
(function (Providers) {
|
||||
class BaseDashboard extends Unibase.Platform.Core.BaseComponent {
|
||||
}
|
||||
Providers.BaseDashboard = BaseDashboard;
|
||||
})(Providers = Themes.Providers || (Themes.Providers = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"basedashboard.js","sourceRoot":"","sources":["basedashboard.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAShB;AATD,WAAU,OAAO;IACb,IAAiB,MAAM,CAOtB;IAPD,WAAiB,MAAM;QACnB,IAAiB,SAAS,CAKzB;QALD,WAAiB,SAAS;YACtB,MAAa,aAAc,SAAQ,QAAA,QAAQ,CAAC,IAAI,CAAC,aAAa;aAG7D;YAHY,uBAAa,gBAGzB,CAAA;QACL,CAAC,EALgB,SAAS,GAAT,gBAAS,KAAT,gBAAS,QAKzB;IACL,CAAC,EAPgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAOtB;AACL,CAAC,EATS,OAAO,KAAP,OAAO,QAShB"}
|
||||
+1
@@ -0,0 +1 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{}t.BaseDashboard=i})(i=t.Providers||(t.Providers={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
@@ -0,0 +1,12 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Providers;
|
||||
(function (Providers) {
|
||||
class BaseDashboardSettings extends Unibase.Platform.Core.BaseComponent {
|
||||
}
|
||||
Providers.BaseDashboardSettings = BaseDashboardSettings;
|
||||
})(Providers = Themes.Providers || (Themes.Providers = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"basedashboardsettings.js","sourceRoot":"","sources":["basedashboardsettings.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAShB;AATD,WAAU,OAAO;IACb,IAAiB,MAAM,CAOtB;IAPD,WAAiB,MAAM;QACnB,IAAiB,SAAS,CAKzB;QALD,WAAiB,SAAS;YACtB,MAAa,qBAAsB,SAAQ,QAAA,QAAQ,CAAC,IAAI,CAAC,aAAa;aAGrE;YAHY,+BAAqB,wBAGjC,CAAA;QACL,CAAC,EALgB,SAAS,GAAT,gBAAS,KAAT,gBAAS,QAKzB;IACL,CAAC,EAPgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAOtB;AACL,CAAC,EATS,OAAO,KAAP,OAAO,QAShB"}
|
||||
+1
@@ -0,0 +1 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{}t.BaseDashboardSettings=i})(i=t.Providers||(t.Providers={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
@@ -0,0 +1,68 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Layouts;
|
||||
(function (Layouts) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class DashboardLayout extends Unibase.Platform.Core.BaseComponent {
|
||||
init(containerid, dashboardid) {
|
||||
var jsfiles = ["libs/jquery/ui/jquery-ui.min.js",
|
||||
"libs/gridstack/gridstack.jQueryUI.min.js"];
|
||||
this.fileCacheHelper.loadJsFiles(jsfiles, function () {
|
||||
DashboardLayout.Instance().render(containerid);
|
||||
});
|
||||
}
|
||||
render(containerid) {
|
||||
let html = `<div id="dashboard-grid-container" class="grid-stack1 w-100"></div>`;
|
||||
$("#" + containerid).html(html);
|
||||
$("#dashboard-grid-container").css("min-height", $(window).height() - 140);
|
||||
}
|
||||
static Instance() {
|
||||
if (this.instance === undefined || this.instance === null)
|
||||
this.instance = new DashboardLayout();
|
||||
return this.instance;
|
||||
}
|
||||
loadSampleData() {
|
||||
var html = `<div class="grid-stack-item" data-gs-x="0" data-gs-y="0" data-gs-width="4" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget1</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="4" data-gs-y="0" data-gs-width="4" data-gs-height="4">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 2</div>
|
||||
</div>
|
||||
<div class="grid-stack-item"data-gs-x="8" data-gs-y="0" data-gs-width="2" data-gs-height="2" data-gs-min-width="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 3</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="10" data-gs-y="0" data-gs-width="2" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 4</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="0" data-gs-y="2" data-gs-width="2" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="2" data-gs-y="2" data-gs-width="2" data-gs-height="4">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 5</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="0" data-gs-y="4" data-gs-width="2" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 6</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="4" data-gs-y="4" data-gs-width="4" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 7</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="8" data-gs-y="2" data-gs-width="4" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 8</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="8" data-gs-y="4" data-gs-width="2" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 9</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="10" data-gs-y="4" data-gs-width="2" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 10</div>
|
||||
</div>`;
|
||||
$("#dashboard-grid-container").html(html);
|
||||
}
|
||||
}
|
||||
Components.DashboardLayout = DashboardLayout;
|
||||
})(Components = Layouts.Components || (Layouts.Components = {}));
|
||||
})(Layouts = Themes.Layouts || (Themes.Layouts = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dashboard.component.js","sourceRoot":"","sources":["dashboard.component.ts"],"names":[],"mappings":"AACA,IAAU,OAAO,CA0EhB;AA1ED,WAAU,OAAO;IACb,IAAiB,MAAM,CAwEtB;IAxED,WAAiB,MAAM;QACnB,IAAiB,OAAO,CAsEvB;QAtED,WAAiB,OAAO;YACpB,IAAiB,UAAU,CAoE1B;YApED,WAAiB,UAAU;gBACvB,MAAa,eAAgB,SAAQ,QAAA,QAAQ,CAAC,IAAI,CAAC,aAAa;oBAC5D,IAAI,CAAC,WAAW,EAAE,WAAW;wBAGzB,IAAI,OAAO,GAAG,CAAC,iCAAiC;4BAE5C,0CAA0C,CAAC,CAAC;wBAChD,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,OAAO,EAAE;4BACtC,eAAe,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;wBACnD,CAAC,CAAC,CAAC;oBACP,CAAC;oBAGD,MAAM,CAAC,WAAW;wBACd,IAAI,IAAI,GAAG,qEAAqE,CAAC;wBACjF,CAAC,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;wBAEhC,CAAC,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAC,GAAG,CAAC,CAAC;oBAG7E,CAAC;oBAGD,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI;4BACrD,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAe,EAAE,CAAC;wBAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC;oBACzB,CAAC;oBAED,cAAc;wBACV,IAAI,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAgCJ,CAAC;wBACR,CAAC,CAAC,2BAA2B,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBAE9C,CAAC;iBACJ;gBAlEY,0BAAe,kBAkE3B,CAAA;YACL,CAAC,EApEgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAoE1B;QACL,CAAC,EAtEgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAsEvB;IACL,CAAC,EAxEgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAwEtB;AACL,CAAC,EA1ES,OAAO,KAAP,OAAO,QA0EhB"}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{init(n){this.fileCacheHelper.loadJsFiles(["libs/jquery/ui/jquery-ui.min.js","libs/gridstack/gridstack.jQueryUI.min.js"],function(){i.Instance().render(n)})}render(n){let t=`<div id="dashboard-grid-container" class="grid-stack1 w-100"></div>`;$("#"+n).html(t);$("#dashboard-grid-container").css("min-height",$(window).height()-140)}static Instance(){return(this.instance===undefined||this.instance===null)&&(this.instance=new i),this.instance}loadSampleData(){var n=`<div class="grid-stack-item" data-gs-x="0" data-gs-y="0" data-gs-width="4" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget1</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="4" data-gs-y="0" data-gs-width="4" data-gs-height="4">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 2</div>
|
||||
</div>
|
||||
<div class="grid-stack-item"data-gs-x="8" data-gs-y="0" data-gs-width="2" data-gs-height="2" data-gs-min-width="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 3</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="10" data-gs-y="0" data-gs-width="2" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 4</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="0" data-gs-y="2" data-gs-width="2" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="2" data-gs-y="2" data-gs-width="2" data-gs-height="4">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 5</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="0" data-gs-y="4" data-gs-width="2" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 6</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="4" data-gs-y="4" data-gs-width="4" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 7</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="8" data-gs-y="2" data-gs-width="4" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 8</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="8" data-gs-y="4" data-gs-width="2" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 9</div>
|
||||
</div>
|
||||
<div class="grid-stack-item" data-gs-x="10" data-gs-y="4" data-gs-width="2" data-gs-height="2">
|
||||
<div class="grid-stack-item-content card-body bg-white">my first widget 10</div>
|
||||
</div>`;$("#dashboard-grid-container").html(n)}}t.DashboardLayout=i})(i=t.Components||(t.Components={}))})(i=t.Layouts||(t.Layouts={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
@@ -0,0 +1,145 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Providers;
|
||||
(function (Providers) {
|
||||
class DashboardHelper {
|
||||
replaceWidgetParameterValues(Parameter, Installedappid) {
|
||||
let installedappid = Installedappid;
|
||||
let ReplaceText = [];
|
||||
if (Parameter != "" && Parameter != null) {
|
||||
let identityparameter = [];
|
||||
let CommonFilter = [];
|
||||
let appparameter = [];
|
||||
let Parameters = Parameter.split('|');
|
||||
if (Parameters.length > 0) {
|
||||
let len = Parameters.length;
|
||||
for (let i = 0; i < Parameters.length; i++) {
|
||||
if (Parameters[i].includes('identity_'))
|
||||
identityparameter.push(Parameters[i]);
|
||||
else if (Parameters[i].includes('filter_')) {
|
||||
CommonFilter.push(Parameters[i]);
|
||||
}
|
||||
else
|
||||
appparameter.push(Parameters[i]);
|
||||
}
|
||||
}
|
||||
if (identityparameter.length > 0) {
|
||||
for (let x = 0; x < identityparameter.length; x++) {
|
||||
let split = identityparameter[x].split(':');
|
||||
var Value = "";
|
||||
if (installedappid == 0) {
|
||||
Value = (Unibase.Platform.Membership.Infos.Identity.getCurrentUser()[split[2].split('_')[1]]).toString();
|
||||
}
|
||||
else {
|
||||
try {
|
||||
Value = (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters[split[2].split('_')[1]]).toString();
|
||||
}
|
||||
catch (_a) {
|
||||
Value = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key.endsWith(split[2].split('_')[1].toLowerCase())).Value;
|
||||
}
|
||||
}
|
||||
ReplaceText.push({
|
||||
Key: split[0],
|
||||
Value: Value,
|
||||
ExpOp: DashboardHelper.Instance().getOperator(split[1])
|
||||
});
|
||||
}
|
||||
}
|
||||
if (CommonFilter.length > 0) {
|
||||
let fromDate = $(".CommonFilter_FromDate").val();
|
||||
let toDate = $(".CommonFilter_ToDate").val();
|
||||
var today = new Date();
|
||||
var month = today.getMonth() + 1;
|
||||
var day = today.getDate();
|
||||
today = today.getFullYear() + '-' + (month < 10 ? '0' : '') + month + '-' + (day < 10 ? '0' : '') + day;
|
||||
if (fromDate == undefined) {
|
||||
fromDate = today;
|
||||
}
|
||||
if (toDate == undefined) {
|
||||
toDate = today;
|
||||
}
|
||||
for (let x = 0; x < CommonFilter.length; x++) {
|
||||
let split = CommonFilter[x].split(':');
|
||||
if (CommonFilter[x].includes('_fromdate')) {
|
||||
ReplaceText.push({
|
||||
Key: split[0],
|
||||
Value: fromDate,
|
||||
ExpOp: DashboardHelper.Instance().getOperator(split[1])
|
||||
});
|
||||
}
|
||||
else {
|
||||
ReplaceText.push({
|
||||
Key: split[0],
|
||||
Value: toDate,
|
||||
ExpOp: DashboardHelper.Instance().getOperator(split[1])
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (appparameter.length > 0) {
|
||||
for (let x = 0; x < appparameter.length; x++) {
|
||||
let split = appparameter[x].split(':');
|
||||
if (split[3] == 2) {
|
||||
ReplaceText.push({
|
||||
Key: split[0],
|
||||
Value: split[2],
|
||||
ExpOp: DashboardHelper.Instance().getOperator(split[1])
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (installedappid != 0) {
|
||||
for (let ip of Providers.Detail_Settings.Instance().InputParameters) {
|
||||
if (ip.Key === "hf_" + installedappid + "_" + split[2].toLowerCase())
|
||||
ReplaceText.push({
|
||||
Key: split[0],
|
||||
Value: ip.Value.toString(),
|
||||
ExpOp: DashboardHelper.Instance().getOperator(split[1])
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ReplaceText;
|
||||
}
|
||||
getOperator(operatorname) {
|
||||
let operator = 1;
|
||||
if (operatorname == "=")
|
||||
operator = Unibase.Platform.Core.Enums.ExpressionOperator.Equals;
|
||||
else if (operatorname == "<")
|
||||
operator = Unibase.Platform.Core.Enums.ExpressionOperator.LessThan;
|
||||
else if (operatorname == "<=")
|
||||
operator = Unibase.Platform.Core.Enums.ExpressionOperator.LessThanOrEquals;
|
||||
else if (operatorname == ">")
|
||||
operator = Unibase.Platform.Core.Enums.ExpressionOperator.GreaterThan;
|
||||
else if (operatorname == ">=")
|
||||
operator = Unibase.Platform.Core.Enums.ExpressionOperator.GreaterThanOrEquals;
|
||||
else if (operatorname == "!=")
|
||||
operator = Unibase.Platform.Core.Enums.ExpressionOperator.NotEquals;
|
||||
else if (operatorname == "ilike")
|
||||
operator = Unibase.Platform.Core.Enums.ExpressionOperator.ILike;
|
||||
return operator;
|
||||
}
|
||||
loadIdentityToInputParameters() {
|
||||
var identityinfo = Unibase.Platform.Membership.Infos.Identity.getCurrentUser();
|
||||
var instance = this;
|
||||
var keys = Object.keys(identityinfo);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let val = identityinfo[keys[i]];
|
||||
DashboardHelper.inputparameters[keys[i]] = val;
|
||||
}
|
||||
}
|
||||
static Instance() {
|
||||
if (this.instance === undefined)
|
||||
this.instance = new DashboardHelper();
|
||||
return this.instance;
|
||||
}
|
||||
}
|
||||
DashboardHelper.inputparameters = [];
|
||||
Providers.DashboardHelper = DashboardHelper;
|
||||
})(Providers = Themes.Providers || (Themes.Providers = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"idashboard.js","sourceRoot":"","sources":["idashboard.ts"],"names":[],"mappings":""}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"settings.component.js","sourceRoot":"","sources":["settings.component.ts"],"names":[],"mappings":""}
|
||||
Reference in New Issue
Block a user