11/5/2022

This commit is contained in:
Nguyễn Tiến Dũng
2022-05-11 21:09:39 +07:00
parent 96e0513959
commit 3d31201a05
117 changed files with 38921 additions and 595 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,391 @@
"use strict";
function _createForOfIteratorHelper(e, t) {
var o, a = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
if (!a) {
if (Array.isArray(e) || (a = _unsupportedIterableToArray(e)) || t && e && "number" == typeof e.length) return a && (e = a), o = 0, {
s: t = function() {},
n: function() {
return o >= e.length ? {
done: !0
} : {
done: !1,
value: e[o++]
}
},
e: function(e) {
throw e
},
f: t
};
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
}
var n, r = !0,
i = !1;
return {
s: function() {
a = a.call(e)
},
n: function() {
var e = a.next();
return r = e.done, e
},
e: function(e) {
i = !0, n = e
},
f: function() {
try {
r || null == a.return || a.return()
} finally {
if (i) throw n
}
}
}
}
function _unsupportedIterableToArray(e, t) {
if (e) {
if ("string" == typeof e) return _arrayLikeToArray(e, t);
var o = Object.prototype.toString.call(e).slice(8, -1);
return "Map" === (o = "Object" === o && e.constructor ? e.constructor.name : o) || "Set" === o ? Array.from(e) : "Arguments" === o || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o) ? _arrayLikeToArray(e, t) : void 0
}
}
function _arrayLikeToArray(e, t) {
(null == t || t > e.length) && (t = e.length);
for (var o = 0, a = new Array(t); o < t; o++) a[o] = e[o];
return a
}
function _typeof(e) {
return (_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
})(e)
}! function(e) {
var t, o, a;
"function" == typeof define && define.amd && (define(e), t = !0), "object" === ("undefined" == typeof exports ? "undefined" : _typeof(exports)) && (module.exports = e(), t = !0), t || (o = window.Cookies, (a = window.Cookies = e()).noConflict = function() {
return window.Cookies = o, a
})
}(function() {
function s() {
for (var e = 0, t = {}; e < arguments.length; e++) {
var o, a = arguments[e];
for (o in a) t[o] = a[o]
}
return t
}
function l(e) {
return e.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent)
}
return function e(d) {
function i() {}
function o(e, t, o) {
if ("undefined" != typeof document) {
"number" == typeof(o = s({
path: "/"
}, i.defaults, o)).expires && (o.expires = new Date(+new Date + 864e5 * o.expires)), o.expires = o.expires ? o.expires.toUTCString() : "";
try {
var a = JSON.stringify(t);
/^[\{\[]/.test(a) && (t = a)
} catch (e) {}
t = d.write ? d.write(t, e) : encodeURIComponent(String(t)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), e = encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent).replace(/[\(\)]/g, escape);
var n, r = "";
for (n in o) o[n] && (r += "; " + n, !0 !== o[n] && (r += "=" + o[n].split(";")[0]));
return document.cookie = e + "=" + t + r
}
}
function t(e, t) {
if ("undefined" != typeof document) {
for (var o = {}, a = document.cookie ? document.cookie.split("; ") : [], n = 0; n < a.length; n++) {
var r = a[n].split("="),
i = r.slice(1).join("=");
t || '"' !== i.charAt(0) || (i = i.slice(1, -1));
try {
var s = l(r[0]),
i = (d.read || d)(i, s) || l(i);
if (t) try {
i = JSON.parse(i)
} catch (e) {}
if (o[s] = i, e === s) break
} catch (e) {}
}
return e ? o[e] : o
}
}
return i.set = o, i.get = function(e) {
return t(e, !1)
}, i.getJSON = function(e) {
return t(e, !0)
}, i.remove = function(e, t) {
o(e, "", s(t, {
expires: -1
}))
}, i.defaults = {}, i.withConverter = e, i
}(function() {})
}),
function(i, s) {
var d = s("body"),
l = s("head"),
u = "#skin-theme",
c = ".nk-sidebar-bar",
f = ".nk-sidebar-main",
m = ["demo7", "covid"],
r = ["style", "aside", "navside", "skin", "mode"],
n = "light-mode",
p = "dark-mode",
y = ".nk-opt-item",
v = ".nk-opt-list",
h = {
demo7: {
aside: "is-default",
navside: "is-light",
style: "ui-default"
},
covid: {
aside: "is-default",
navside: "is-light",
style: "ui-default"
}
};
i.Demo = {
save: function(e, t) {
Cookies.set(i.Demo.apps(e), t)
},
remove: function(e) {
Cookies.remove(i.Demo.apps(e))
},
current: function(e) {
return Cookies.get(i.Demo.apps(e))
},
apps: function(e) {
var t, o, a = window.location.pathname.split("/").map(function(e, t, o) {
return e.replace("-", "")
}),
n = _createForOfIteratorHelper(m);
try {
for (n.s(); !(o = n.n()).done;) {
var r = o.value;
0 <= a.indexOf(r) && (t = r)
}
} catch (e) {
n.e(e)
} finally {
n.f()
}
return e ? e + "_" + t : t
},
style: function(e, t) {
var o = {
mode: n + " " + p,
style: "ui-default ui-softy",
aside: "is-light is-default is-theme is-dark",
navside: "is-light is-default is-theme is-dark"
};
return "all" === e ? o[t] || "" : "any" === e ? o.mode + " " + o.style + " " + o.aside + " " + o.navside : "body" === e ? o.mode + " " + o.style : "is-default" === e || "ui-default" === e ? "" : e
},
skins: function(e) {
return !e || "default" === e ? "theme" : "theme-" + e
},
defs: function(e) {
var t = i.Demo.apps(),
t = h[t][e] || "";
return i.Demo.current(e) ? i.Demo.current(e) : t
},
locked: function(e) {
!0 === e ? (s(y + "[data-key=aside]").add(y + "[data-key=header]").add(y + "[data-key=skin]").addClass("disabled"), i.Demo.update("skin", "default", !0), s(y + "[data-key=skin]").removeClass("active"), s(y + "[data-key=skin][data-update=default]").addClass("active")) : s(y + "[data-key=aside]").add(y + "[data-key=header]").add(y + "[data-key=skin]").removeClass("disabled")
},
apply: function() {
i.Demo.apps();
var e, t = _createForOfIteratorHelper(r);
try {
for (t.s(); !(e = t.n()).done;) {
var o, a, n = e.value;
"aside" !== n && "navside" !== n && "style" !== n || (o = i.Demo.defs(n), s(a = "aside" === n ? c : "navside" === n ? f : d).removeClass(i.Demo.style("all", n)), "ui-default" !== o && "is-default" !== o && s(a).addClass(o)), "mode" === n && i.Demo.update(n, i.Demo.current("mode")), "skin" === n && i.Demo.update(n, i.Demo.current("skin"))
}
} catch (e) {
t.e(e)
} finally {
t.f()
}
i.Demo.update("dir", i.Demo.current("dir"))
},
update: function(e, t, o) {
var a, n = i.Demo.style(t, e),
r = i.Demo.style("all", e);
i.Demo.apps();
"aside" !== e && "navside" !== e || (s(a = "navside" == e ? f : c).removeClass(r), s(a).addClass(n)), "mode" === e && (d.removeClass(r).removeAttr("theme"), n === p ? (d.addClass(n).attr("theme", "dark"), i.Demo.locked(!0)) : (d.addClass(n).removeAttr("theme"), i.Demo.locked(!1))), "style" === e && (d.removeClass(r), d.addClass(n)), "skin" === e && (a = i.Demo.skins(n), r = s("#skin-default").attr("href").replace("theme", "skins/" + a), "theme" === a ? s(u).remove() : 0 < s(u).length ? s(u).attr("href", r) : l.append('<link id="skin-theme" rel="stylesheet" href="' + r + '">')), !0 === o && i.Demo.save(e, t)
},
reset: function() {
var e, t = i.Demo.apps(),
o = (d.removeClass(i.Demo.style("body")).removeAttr("theme"), s(y).removeClass("active"), s(u).remove(), s(c).removeClass(i.Demo.style("all", "aside")), s(f).removeClass(i.Demo.style("all", "navside")), _createForOfIteratorHelper(r));
try {
for (o.s(); !(e = o.n()).done;) {
var a = e.value;
s("[data-key='" + a + "']").each(function() {
var e = s(this).data("update");
"aside" !== a && "navside" !== a && "style" !== a || e === h[t][a] && s(this).addClass("active"), "mode" !== a && "skin" !== a || e !== n && "default" !== e || s(this).addClass("active")
}), i.Demo.remove(a)
}
} catch (e) {
o.e(e)
} finally {
o.f()
}
s("[data-key='dir']").each(function() {
s(this).data("update") === i.Demo.current("dir") && s(this).addClass("active")
}), i.Demo.apply()
},
load: function() {
i.Demo.apply(), 0 < s(y).length && s(y).each(function() {
var e = s(this).data("update"),
t = s(this).data("key");
"aside" !== t && "navside" !== t && "style" !== t || e === i.Demo.defs(t) && (s(this).parent(v).find(y).removeClass("active"), s(this).addClass("active")), "mode" !== t && "skin" !== t && "dir" !== t || e != i.Demo.current("skin") && e != i.Demo.current("mode") && e != i.Demo.current("dir") || (s(this).parent(v).find(y).removeClass("active"), s(this).addClass("active"))
})
},
trigger: function() {
s(y).on("click", function(e) {
e.preventDefault();
var e = s(this),
t = e.parent(v),
o = e.data("update"),
a = e.data("key");
i.Demo.update(a, o, !0), t.find(y).removeClass("active"), e.addClass("active"), "dir" == a && setTimeout(function() {
window.location.reload()
}, 100)
}), s(".nk-opt-reset > a").on("click", function(e) {
e.preventDefault(), i.Demo.reset()
})
},
init: function(e) {
i.Demo.load(), i.Demo.trigger()
}
}, i.coms.docReady.push(i.Demo.init), i.Promo = function() {
var t = s(".pmo-st"),
o = s(".pmo-lv"),
e = s(".pmo-close");
0 < e.length && e.on("click", function() {
var e = Cookies.get("intm-offer");
return o.removeClass("active"), t.addClass("active"), null == e && Cookies.set("intm-offer", "true", {
expires: 1,
path: ""
}), !1
}), s(window).on("load", function() {
(null == Cookies.get("intm-offer") ? o : t).addClass("active")
})
}, i.coms.docReady.push(i.Promo)
}(NioApp, jQuery);
ndexOf(r) && (t = r)
}
}
catch (e) {
n.e(e)
} finally {
n.f()
}
return e ? e + "_" + t : t
},
style: function(e, t) {
var o = {
mode: n + " " + p,
style: "ui-default ui-softy",
aside: "is-light is-default is-theme is-dark",
navside: "is-light is-default is-theme is-dark"
};
return "all" === e ? o[t] || "" : "any" === e ? o.mode + " " + o.style + " " + o.aside + " " + o.navside : "body" === e ? o.mode + " " + o.style : "is-default" === e || "ui-default" === e ? "" : e
},
skins: function(e) {
return !e || "default" === e ? "theme" : "theme-" + e
},
defs: function(e) {
var t = i.Demo.apps(),
t = h[t][e] || "";
return i.Demo.current(e) ? i.Demo.current(e) : t
},
locked: function(e) {
!0 === e ? (s(y + "[data-key=aside]").add(y + "[data-key=header]").add(y + "[data-key=skin]").addClass("disabled"), i.Demo.update("skin", "default", !0), s(y + "[data-key=skin]").removeClass("active"), s(y + "[data-key=skin][data-update=default]").addClass("active")) : s(y + "[data-key=aside]").add(y + "[data-key=header]").add(y + "[data-key=skin]").removeClass("disabled")
},
apply: function() {
i.Demo.apps();
var e, t = _createForOfIteratorHelper(r);
try {
for (t.s(); !(e = t.n()).done;) {
var o, a, n = e.value;
"aside" !== n && "navside" !== n && "style" !== n || (o = i.Demo.defs(n), s(a = "aside" === n ? c : "navside" === n ? f : d).removeClass(i.Demo.style("all", n)), "ui-default" !== o && "is-default" !== o && s(a).addClass(o)), "mode" === n && i.Demo.update(n, i.Demo.current("mode")), "skin" === n && i.Demo.update(n, i.Demo.current("skin"))
}
} catch (e) {
t.e(e)
} finally {
t.f()
}
i.Demo.update("dir", i.Demo.current("dir"))
},
update: function(e, t, o) {
var a, n = i.Demo.style(t, e),
r = i.Demo.style("all", e);
i.Demo.apps();
"aside" !== e && "navside" !== e || (s(a = "navside" == e ? f : c).removeClass(r), s(a).addClass(n)), "mode" === e && (d.removeClass(r).removeAttr("theme"), n === p ? (d.addClass(n).attr("theme", "dark"), i.Demo.locked(!0)) : (d.addClass(n).removeAttr("theme"), i.Demo.locked(!1))), "style" === e && (d.removeClass(r), d.addClass(n)), "skin" === e && (a = i.Demo.skins(n), r = s("#skin-default").attr("href").replace("theme", "skins/" + a), "theme" === a ? s(u).remove() : 0 < s(u).length ? s(u).attr("href", r) : l.append('<link id="skin-theme" rel="stylesheet" href="' + r + '">')), !0 === o && i.Demo.save(e, t)
},
reset: function() {
var e, t = i.Demo.apps(),
o = (d.removeClass(i.Demo.style("body")).removeAttr("theme"), s(y).removeClass("active"), s(u).remove(), s(c).removeClass(i.Demo.style("all", "aside")), s(f).removeClass(i.Demo.style("all", "navside")), _createForOfIteratorHelper(r));
try {
for (o.s(); !(e = o.n()).done;) {
var a = e.value;
s("[data-key='" + a + "']").each(function() {
var e = s(this).data("update");
"aside" !== a && "navside" !== a && "style" !== a || e === h[t][a] && s(this).addClass("active"), "mode" !== a && "skin" !== a || e !== n && "default" !== e || s(this).addClass("active")
}), i.Demo.remove(a)
}
} catch (e) {
o.e(e)
} finally {
o.f()
}
s("[data-key='dir']").each(function() {
s(this).data("update") === i.Demo.current("dir") && s(this).addClass("active")
}), i.Demo.apply()
},
load: function() {
i.Demo.apply(), 0 < s(y).length && s(y).each(function() {
var e = s(this).data("update"),
t = s(this).data("key");
"aside" !== t && "navside" !== t && "style" !== t || e === i.Demo.defs(t) && (s(this).parent(v).find(y).removeClass("active"), s(this).addClass("active")), "mode" !== t && "skin" !== t && "dir" !== t || e != i.Demo.current("skin") && e != i.Demo.current("mode") && e != i.Demo.current("dir") || (s(this).parent(v).find(y).removeClass("active"), s(this).addClass("active"))
})
},
trigger: function() {
s(y).on("click", function(e) {
e.preventDefault();
var e = s(this),
t = e.parent(v),
o = e.data("update"),
a = e.data("key");
i.Demo.update(a, o, !0), t.find(y).removeClass("active"), e.addClass("active"), "dir" == a && setTimeout(function() {
window.location.reload()
}, 100)
}), s(".nk-opt-reset > a").on("click", function(e) {
e.preventDefault(), i.Demo.reset()
})
},
init: function(e) {
i.Demo.load(), i.Demo.trigger()
}
}, i.coms.docReady.push(i.Demo.init), i.Promo = function() {
var t = s(".pmo-st"),
o = s(".pmo-lv"),
e = s(".pmo-close");
0 < e.length && e.on("click", function() {
var e = Cookies.get("intm-offer");
return o.removeClass("active"), t.addClass("active"), null == e && Cookies.set("intm-offer", "true", {
expires: 1,
path: ""
}), !1
}), s(window).on("load", function() {
(null == Cookies.get("intm-offer") ? o : t).addClass("active")
})
}, i.coms.docReady.push(i.Promo)
}(NioApp, jQuery);

View File

@@ -0,0 +1,179 @@
function wait(t, e, n) {
return e ?
$(t).prop("disabled", !1).html(n) :
$(t)
.prop("disabled", !0)
.html(
'<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> Loading...'
);
}
function coppy(element) {
window.getSelection().removeAllRanges();
let range = document.createRange();
range.selectNode(typeof element === "string" ? document.getElementById(element) : element);
window.getSelection().addRange(range);
document.execCommand("copy");
window.getSelection().removeAllRanges();
swal("Sao chép thành công", "success");
}
function formatNumber(nStr, decSeperate = ".", groupSeperate = ",") {
nStr += "";
x = nStr.split(decSeperate);
x1 = x[0];
x2 = x.length > 1 ? "." + x[1] : "";
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, "$1" + groupSeperate + "$2");
}
return x1 + x2;
}
function swal(msg, icon) {
Swal.fire({
icon: icon,
title: "Thông báo",
text: msg,
confirmButtonText: "Tôi đã hiểu!",
});
}
function isURL(str) {
var regex =
/(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/;
var pattern = new RegExp(regex);
return pattern.test(str);
}
function copyElementToClipboard(element) {
window.getSelection().removeAllRanges();
let range = document.createRange();
range.selectNode(
typeof element === "string" ? document.getElementById(element) : element
);
window.getSelection().addRange(range);
document.execCommand("copy");
window.getSelection().removeAllRanges();
swal("Sao chép thành công", "success");
}
$(document).ready(function() {
$.ajaxSetup({
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
},
});
let pathMenu = window.location.href;
$("ul#sidebar a").each(function() {
if (this.href === getPathFromUrl(pathMenu)) {
$(this).addClass("active");
$(this).parent().closest("li").addClass("active");
let subMenu = $(this).parent().closest("ul");
if (subMenu) {
subMenu.show();
$(this).parent().parent().closest("li").addClass("active");
}
}
});
let channel = pusher.subscribe("notification");
if (typeof profile !== "undefined") {
channel.bind(`user-${profile.id}`, function(payload) {
// toastr[`${payload.status}`](`${payload.message}`,'Thông báo');
swal(`${payload.message}`, `${payload.status}`);
});
}
$('[data-toggle="tooltip"]').tooltip();
$("form[submit-ajax=dga]").submit(function(e) {
e.preventDefault();
let _this = this;
let url = $(_this).attr("action");
let method = $(_this).attr("method");
let href = $(_this).attr("href");
let data = $(_this).serialize();
let button = $(_this).find("button[type=submit]");
submitForm(url, method, href, data, button);
swal('DUNGA');
});
});
function getPathFromUrl(url) {
return url.split("?")[0];
}
function submitForm(url, method, href, data, button) {
let textButton = button.html().trim();
let setting = {
type: method,
url,
data,
dataType: "JSON",
beforeSend: function() {
button
.prop("disabled", !0)
.html(
'<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> Đang xử lý...'
);
},
complete: function() {
button.prop("disabled", !1).html(textButton);
},
success: function(response) {
if (response.status === true && !button.attr("href")) {
setTimeout(() => {
if (!href) {
window.location.reload();
return;
}
window.location.href = href;
}, 2000);
}
if (response.status === true) {
toastr.success(response.message, "Thông báo");
} else {
toastr.error(response.message, "Thông báo");
}
},
error: function(error) {
console.log(error);
},
};
$.ajax(setting);
}
// $("#min").on("keyup", function(event) {
// var selection = window.getSelection().toString();
// if (selection !== '') {
// return;
// }
// if ($.inArray(event.keyCode, [38, 40, 37, 39]) !== -1) {
// return;
// }
// var $this = $(this);
// var input = $this.val();
// var input = input.replace(/[\D\s\._\-]+/g, "");
// input = input ? parseInt(input, 10) : 0;
// $this.val(function() {
// return (input === 0) ? "" : input.toLocaleString("en-US");
// });
// });
// $("#max").on("keyup", function(event) {
// var selection = window.getSelection().toString();
// if (selection !== '') {
// return;
// }
// if ($.inArray(event.keyCode, [38, 40, 37, 39]) !== -1) {
// return;
// }
// var $this = $(this);
// var input = $this.val();
// var input = input.replace(/[\D\s\._\-]+/g, "");
// input = input ? parseInt(input, 10) : 0;
// $this.val(function() {
// return (input === 0) ? "" : input.toLocaleString("en-US");
// });
// });

View File

@@ -0,0 +1,79 @@
"use strict";
! function(e, t) {
e.SummerNote = function() {
var e = ".summernote-basic",
e = (t(e).exists() && t(e).each(function() {
t(this).summernote({
placeholder: "Hello stand alone ui",
tabsize: 2,
height: 120,
toolbar: [
["style", ["style"]],
["font", ["bold", "underline", "strikethrough", "clear"]],
["font", ["superscript", "subscript"]],
["color", ["color"]],
["fontsize", ["fontsize", "height"]],
["para", ["ul", "ol", "paragraph"]],
["table", ["table"]],
["insert", ["link", "picture", "video"]],
["view", ["fullscreen", "codeview", "help"]]
]
})
}), ".summernote-minimal");
t(e).exists() && t(e).each(function() {
t(this).summernote({
placeholder: "Hello stand alone ui",
tabsize: 2,
height: 120,
toolbar: [
["style", ["style"]],
["font", ["bold", "underline", "clear"]],
["para", ["ul", "ol", "paragraph"]],
["table", ["table"]],
["view", ["fullscreen"]]
]
})
})
}, e.Tinymce = function() {
var e = ".tinymce-basic",
e = (t(e).exists() && tinymce.init({ selector: e, content_css: !0, skin: !1, branding: !1 }), ".tinymce-menubar"),
e = (t(e).exists() && tinymce.init({ selector: e, content_css: !0, skin: !1, branding: !1, toolbar: !1 }), ".tinymce-toolbar"),
e = (t(e).exists() && tinymce.init({ selector: e, content_css: !0, skin: !1, branding: !1, menubar: !1 }), ".tinymce-inline");
t(e).exists() && tinymce.init({ selector: e, content_css: !1, skin: !1, branding: !1, menubar: !1, inline: !0, toolbar: ["undo redo | bold italic underline | fontselect fontsizeselect", "forecolor backcolor | alignleft aligncenter alignright alignfull | numlist bullist outdent indent"] })
}, e.Quill = function() {
var e = ".quill-basic",
e = (t(e).exists() && t(e).each(function() {
new Quill(this, {
modules: {
toolbar: [
["bold", "italic", "underline", "strike"],
["blockquote", "code-block"],
[{ list: "ordered" }, { list: "bullet" }],
[{ script: "sub" }, { script: "super" }],
[{ indent: "-1" }, { indent: "+1" }],
[{ header: [1, 2, 3, 4, 5, 6] }],
[{ color: [] }, { background: [] }],
[{ font: [] }],
[{ align: [] }],
["clean"]
]
},
theme: "snow"
})
}), ".quill-minimal");
t(e).exists() && t(e).each(function() {
new Quill(this, {
modules: {
toolbar: [
["bold", "italic", "underline"],
["blockquote", { list: "bullet" }],
[{ header: 1 }, { header: 2 }, { header: [3, 4, 5, 6, !1] }],
[{ align: [] }],
["clean"]
]
},
theme: "snow"
})
})
}, e.EditorInit = function() { e.SummerNote(), e.Tinymce(), e.Quill() }, e.coms.docReady.push(e.EditorInit)
}(NioApp, jQuery);

View File

@@ -0,0 +1,42 @@
"use strict";
! function(NioApp, $) {
var barChartData = { labels: ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30"], dataUnit: "People", datasets: [{ label: "join", color: "#b695ff", data: [110, 80, 125, 55, 95, 75, 90, 110, 80, 125, 55, 95, 75, 90, 110, 80, 125, 55, 95, 75, 90, 110, 80, 125, 55, 95, 75, 90, 75, 90] }, { label: "join", color: "#b695ff", data: [110, 80, 125, 55, 95, 75, 90, 110, 80, 125, 55, 95, 75, 90, 110, 80, 125, 55, 95, 75, 90, 110, 80, 125, 55, 95, 75, 90, 75, 90] }] },
barChartMultiple = { labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dataUnit: "USD", datasets: [{ label: "Income", color: "#b695ff", data: [110, 80, 125, 55, 95, 75, 90, 110, 80, 125, 55, 95] }, { label: "Expense", color: "#f4aaa4", data: [75, 90, 110, 80, 125, 55, 95, 75, 90, 110, 80, 125] }] },
barChartStacked = { labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], stacked: !0, dataUnit: "USD", datasets: [{ label: "Income", color: "#b695ff", data: [110, 80, 125, 55, 95, 75, 90, 110, 80, 125, 55, 95] }, { label: "Expense", color: "#f4aaa4", data: [75, 90, 110, 80, 125, 55, 95, 75, 90, 110, 80, 125] }] };
function barChart(selector, set_data) {
var $selector = $(selector || ".bar-chart");
$selector.each(function() { for (var $self = $(this), _self_id = $self.attr("id"), _get_data = void 0 === set_data ? eval(_self_id) : set_data, _d_legend = void 0 !== _get_data.legend && _get_data.legend, selectCanvas = document.getElementById(_self_id).getContext("2d"), chart_data = [], i = 0; i < _get_data.datasets.length; i++) chart_data.push({ label: _get_data.datasets[i].label, data: _get_data.datasets[i].data, backgroundColor: _get_data.datasets[i].color, borderWidth: 2, borderColor: "transparent", hoverBorderColor: "transparent", borderSkipped: "bottom", barPercentage: .6, categoryPercentage: .7 }); var chart = new Chart(selectCanvas, { type: "bar", data: { labels: _get_data.labels, datasets: chart_data }, options: { legend: { display: _get_data.legend || !1, rtl: NioApp.State.isRTL, labels: { boxWidth: 30, padding: 20, fontColor: "#6783b8" } }, maintainAspectRatio: !1, tooltips: { enabled: !0, rtl: NioApp.State.isRTL, callbacks: { title: function(a, t) { return t.datasets[a[0].datasetIndex].label }, label: function(a, t) { return t.datasets[a.datasetIndex].data[a.index] + " " + _get_data.dataUnit } }, backgroundColor: "#eff6ff", titleFontSize: 13, titleFontColor: "#6783b8", titleMarginBottom: 6, bodyFontColor: "#9eaecf", bodyFontSize: 12, bodySpacing: 4, yPadding: 10, xPadding: 10, footerMarginTop: 0, displayColors: !1 }, scales: { yAxes: [{ display: !0, stacked: _get_data.stacked || !1, position: NioApp.State.isRTL ? "right" : "left", ticks: { beginAtZero: !0, fontSize: 12, fontColor: "#9eaecf" }, gridLines: { color: NioApp.hexRGB("#526484", .2), tickMarkLength: 0, zeroLineColor: NioApp.hexRGB("#526484", .2) } }], xAxes: [{ display: !0, stacked: _get_data.stacked || !1, ticks: { fontSize: 12, fontColor: "#9eaecf", source: "auto", reverse: NioApp.State.isRTL }, gridLines: { color: "transparent", tickMarkLength: 10, zeroLineColor: "transparent" } }] } } }) })
}
barChart();
var solidLineChart = { labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dataUnit: "BTC", lineTension: .4, legend: !0, datasets: [{ label: "Total Received", color: "#5ce0aa", background: "transparent", data: [110, 80, 125, 55, 95, 75, 90, 110, 80, 125, 55, 95] }, { label: "Total Send", color: "#9d72ff", background: "transparent", data: [80, 54, 105, 120, 82, 85, 60, 80, 54, 105, 120, 82] }] },
filledLineChart = { labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dataUnit: "BTC", lineTension: .4, datasets: [{ label: "Total Received", color: "#9d72ff", background: NioApp.hexRGB("#9d72ff", .4), data: [110, 80, 125, 65, 95, 75, 90, 110, 80, 125, 70, 95] }] },
straightLineChart = { labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dataUnit: "BTC", lineTension: 0, datasets: [{ label: "Total Received", color: "#9d72ff", background: NioApp.hexRGB("#9d72ff", .3), data: [110, 80, 125, 55, 95, 75, 90, 110, 80, 125, 55, 95] }] };
function lineChart(selector, set_data) {
var $selector = $(selector || ".line-chart");
$selector.each(function() { for (var $self = $(this), _self_id = $self.attr("id"), _get_data = void 0 === set_data ? eval(_self_id) : set_data, selectCanvas = document.getElementById(_self_id).getContext("2d"), chart_data = [], i = 0; i < _get_data.datasets.length; i++) chart_data.push({ label: _get_data.datasets[i].label, tension: _get_data.lineTension, backgroundColor: _get_data.datasets[i].background, borderWidth: 2, borderColor: _get_data.datasets[i].color, pointBorderColor: _get_data.datasets[i].color, pointBackgroundColor: "#fff", pointHoverBackgroundColor: "#fff", pointHoverBorderColor: _get_data.datasets[i].color, pointBorderWidth: 2, pointHoverRadius: 4, pointHoverBorderWidth: 2, pointRadius: 4, pointHitRadius: 4, data: _get_data.datasets[i].data }); var chart = new Chart(selectCanvas, { type: "line", data: { labels: _get_data.labels, datasets: chart_data }, options: { legend: { display: _get_data.legend || !1, rtl: NioApp.State.isRTL, labels: { boxWidth: 12, padding: 20, fontColor: "#6783b8" } }, maintainAspectRatio: !1, tooltips: { enabled: !0, rtl: NioApp.State.isRTL, callbacks: { title: function(a, t) { return t.labels[a[0].index] }, label: function(a, t) { return t.datasets[a.datasetIndex].data[a.index] + " " + _get_data.dataUnit } }, backgroundColor: "#eff6ff", titleFontSize: 13, titleFontColor: "#6783b8", titleMarginBottom: 6, bodyFontColor: "#9eaecf", bodyFontSize: 12, bodySpacing: 4, yPadding: 10, xPadding: 10, footerMarginTop: 0, displayColors: !1 }, scales: { yAxes: [{ display: !0, position: NioApp.State.isRTL ? "right" : "left", ticks: { beginAtZero: !1, fontSize: 12, fontColor: "#9eaecf", padding: 10 }, gridLines: { color: NioApp.hexRGB("#526484", .2), tickMarkLength: 0, zeroLineColor: NioApp.hexRGB("#526484", .2) } }], xAxes: [{ display: !0, ticks: { fontSize: 12, fontColor: "#9eaecf", source: "auto", padding: 5, reverse: NioApp.State.isRTL }, gridLines: { color: "transparent", tickMarkLength: 10, zeroLineColor: NioApp.hexRGB("#526484", .2), offsetGridLines: !0 } }] } } }) })
}
lineChart();
var pieChartData = { labels: ["Send", "Receive", "Withdraw"], dataUnit: "BTC", legend: !1, datasets: [{ borderColor: "#fff", background: ["#b695ff", "#f4aaa4", "#8feac5"], data: [110, 80, 125] }] };
function pieChart(selector, set_data) {
var $selector = $(selector || ".pie-chart");
$selector.each(function() { for (var $self = $(this), _self_id = $self.attr("id"), _get_data = void 0 === set_data ? eval(_self_id) : set_data, selectCanvas = document.getElementById(_self_id).getContext("2d"), chart_data = [], i = 0; i < _get_data.datasets.length; i++) chart_data.push({ backgroundColor: _get_data.datasets[i].background, borderWidth: 2, borderColor: _get_data.datasets[i].borderColor, hoverBorderColor: _get_data.datasets[i].borderColor, data: _get_data.datasets[i].data }); var chart = new Chart(selectCanvas, { type: "pie", data: { labels: _get_data.labels, datasets: chart_data }, options: { legend: { display: _get_data.legend || !1, rtl: NioApp.State.isRTL, labels: { boxWidth: 12, padding: 20, fontColor: "#6783b8" } }, rotation: -.2, maintainAspectRatio: !1, tooltips: { enabled: !0, rtl: NioApp.State.isRTL, callbacks: { title: function(a, t) { return t.labels[a[0].index] }, label: function(a, t) { return t.datasets[a.datasetIndex].data[a.index] + " " + _get_data.dataUnit } }, backgroundColor: "#eff6ff", titleFontSize: 13, titleFontColor: "#6783b8", titleMarginBottom: 6, bodyFontColor: "#9eaecf", bodyFontSize: 12, bodySpacing: 4, yPadding: 10, xPadding: 10, footerMarginTop: 0, displayColors: !1 } } }) })
}
pieChart();
var doughnutChartData = { labels: ["Send", "Receive", "Withdraw"], dataUnit: "BTC", legend: !1, datasets: [{ borderColor: "#fff", background: ["#b695ff", "#f4aaa4", "#8feac5"], data: [110, 80, 125] }] };
function doughnutChart(selector, set_data) {
var $selector = $(selector || ".doughnut-chart");
$selector.each(function() { for (var $self = $(this), _self_id = $self.attr("id"), _get_data = void 0 === set_data ? eval(_self_id) : set_data, selectCanvas = document.getElementById(_self_id).getContext("2d"), chart_data = [], i = 0; i < _get_data.datasets.length; i++) chart_data.push({ backgroundColor: _get_data.datasets[i].background, borderWidth: 2, borderColor: _get_data.datasets[i].borderColor, hoverBorderColor: _get_data.datasets[i].borderColor, data: _get_data.datasets[i].data }); var chart = new Chart(selectCanvas, { type: "doughnut", data: { labels: _get_data.labels, datasets: chart_data }, options: { legend: { display: _get_data.legend || !1, rtl: NioApp.State.isRTL, labels: { boxWidth: 12, padding: 20, fontColor: "#6783b8" } }, rotation: 1, cutoutPercentage: 40, maintainAspectRatio: !1, tooltips: { enabled: !0, rtl: NioApp.State.isRTL, callbacks: { title: function(a, t) { return t.labels[a[0].index] }, label: function(a, t) { return t.datasets[a.datasetIndex].data[a.index] + " " + _get_data.dataUnit } }, backgroundColor: "#eff6ff", titleFontSize: 13, titleFontColor: "#6783b8", titleMarginBottom: 6, bodyFontColor: "#9eaecf", bodyFontSize: 12, bodySpacing: 4, yPadding: 10, xPadding: 10, footerMarginTop: 0, displayColors: !1 } } }) })
}
doughnutChart();
var polarChartData = { labels: ["Send", "Receive", "Withdraw"], dataUnit: "BTC", legend: !1, datasets: [{ borderColor: "#fff", background: [NioApp.hexRGB("#b695ff", .8), NioApp.hexRGB("#f4aaa4", .8), NioApp.hexRGB("#8feac5", .8)], data: [110, 80, 125] }] };
function polarAreaChart(selector, set_data) {
var $selector = $(selector || ".polar-chart");
$selector.each(function() { for (var $self = $(this), _self_id = $self.attr("id"), _get_data = void 0 === set_data ? eval(_self_id) : set_data, selectCanvas = document.getElementById(_self_id).getContext("2d"), chart_data = [], i = 0; i < _get_data.datasets.length; i++) chart_data.push({ backgroundColor: _get_data.datasets[i].background, borderWidth: 2, borderColor: _get_data.datasets[i].borderColor, hoverBorderColor: _get_data.datasets[i].borderColor, data: _get_data.datasets[i].data }); var chart = new Chart(selectCanvas, { type: "polarArea", data: { labels: _get_data.labels, datasets: chart_data }, options: { legend: { display: _get_data.legend || !1, rtl: NioApp.State.isRTL, labels: { boxWidth: 12, padding: 20, fontColor: "#6783b8" } }, maintainAspectRatio: !1, tooltips: { enabled: !0, rtl: NioApp.State.isRTL, callbacks: { title: function(a, t) { return t.labels[a[0].index] }, label: function(a, t) { return t.datasets[a.datasetIndex].data[a.index] + " " + _get_data.dataUnit } }, backgroundColor: "#eff6ff", titleFontSize: 13, titleFontColor: "#6783b8", titleMarginBottom: 6, bodyFontColor: "#9eaecf", bodyFontSize: 12, bodySpacing: 4, yPadding: 10, xPadding: 10, footerMarginTop: 0, displayColors: !1 } } }) })
}
polarAreaChart()
}(NioApp, jQuery);

View File

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long