isite 2024.8.5 → 2024.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +1384 -1387
- package/apps/charts/site_files/html/PieChart.html +35 -35
- package/apps/charts/site_files/html/PieChart2.html +35 -35
- package/apps/charts/site_files/html/XYChart.html +42 -42
- package/apps/charts/site_files/html/column.html +60 -60
- package/apps/charts/site_files/html/gauge.html +44 -44
- package/apps/charts/site_files/html/index.html +92 -92
- package/apps/charts/site_files/html/line-graph.html +42 -42
- package/apps/charts/site_files/html/pie-chart-rounded-corners.html +38 -38
- package/apps/charts/site_files/html/simple-3D-pie-chart.html +43 -43
- package/apps/charts/site_files/js/chart-animated.js +2 -2
- package/apps/charts/site_files/json/PieChart.json +41 -41
- package/apps/charts/site_files/json/PieChart2.json +23 -23
- package/apps/charts/site_files/json/XYChart.json +74 -74
- package/apps/charts/site_files/json/bar-chart.json +99 -99
- package/apps/charts/site_files/json/column-chart.json +80 -80
- package/apps/charts/site_files/json/gauge.json +36 -36
- package/apps/charts/site_files/json/line-graph.json +1867 -1867
- package/apps/charts/site_files/json/pie-chart-rounded-corners.json +42 -42
- package/apps/charts/site_files/json/simple-3D-pie-chart.json +50 -50
- package/apps/client-side/package-lock.json +5 -5
- package/apps/client-side/package.json +21 -21
- package/apps/client-side/site_files/css/bootstrap3.css +5 -5
- package/apps/client-side/site_files/css/bootstrap4.css +6 -6
- package/apps/client-side/site_files/css/bootstrap5.css +6 -6
- package/apps/client-side/site_files/css/checkbox.css +125 -125
- package/apps/client-side/site_files/css/font-awesome.css +4616 -4616
- package/apps/client-side/site_files/css/font-awesome.min.css +4 -4
- package/apps/client-side/site_files/css/fonts.css +85 -85
- package/apps/client-side/site_files/css/help.css +51 -51
- package/apps/client-side/site_files/css/main-menu.css +66 -66
- package/apps/client-side/site_files/css/print.css +144 -144
- package/apps/client-side/site_files/css/prism.css +139 -139
- package/apps/client-side/site_files/css/progress.css +7 -7
- package/apps/client-side/site_files/css/radio.css +103 -103
- package/apps/client-side/site_files/css/scrollbar.css +13 -13
- package/apps/client-side/site_files/css/semantic.css +363 -363
- package/apps/client-side/site_files/css/table.css +87 -87
- package/apps/client-side/site_files/css/treeview.css +84 -84
- package/apps/client-side/site_files/css/ui.css +28 -28
- package/apps/client-side/site_files/css/video-js.min.css +1 -0
- package/apps/client-side/site_files/fonts/fontawesome-webfont.svg +2671 -2671
- package/apps/client-side/site_files/fonts/glyphicons-halflings-regular.svg +287 -287
- package/apps/client-side/site_files/fonts/icons.svg +684 -684
- package/apps/client-side/site_files/js/Youtube.min.js +1 -0
- package/apps/client-side/site_files/js/angular-animate.js +4179 -4179
- package/apps/client-side/site_files/js/angular.js +36599 -36599
- package/apps/client-side/site_files/js/angular.min.js +351 -351
- package/apps/client-side/site_files/js/angular.min.js.map +8 -8
- package/apps/client-side/site_files/js/barcode.js +1 -1
- package/apps/client-side/site_files/js/base64.js +319 -319
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +1456 -1456
- package/apps/client-side/site_files/js/bootstrap3.js +6 -6
- package/apps/client-side/site_files/js/bootstrap4.js +6 -6
- package/apps/client-side/site_files/js/bootstrap5.js +6 -6
- package/apps/client-side/site_files/js/custom.js +149 -149
- package/apps/client-side/site_files/js/directive.min.js +1 -1
- package/apps/client-side/site_files/js/hijri.js +965 -965
- package/apps/client-side/site_files/js/jquery.js +2 -2
- package/apps/client-side/site_files/js/moment.js +4511 -4511
- package/apps/client-side/site_files/js/prism.js +6 -6
- package/apps/client-side/site_files/js/qrcode.js +1398 -1398
- package/apps/client-side/site_files/js/semantic.js +10 -10
- package/apps/client-side/site_files/js/video.min.js +53 -0
- package/apps/client-side/site_files/js/xlsx.js +23 -23
- package/apps/client-side/site_files/semantic-themes/default/assets/fonts/brand-icons.svg +1008 -1008
- package/apps/client-side/site_files/semantic-themes/default/assets/fonts/icons.svg +1518 -1518
- package/apps/client-side/site_files/semantic-themes/default/assets/fonts/outline-icons.svg +366 -366
- package/apps/client-side/site_files/webfonts/fa-brands-400.svg +3717 -3717
- package/apps/client-side/site_files/webfonts/fa-regular-400.svg +801 -801
- package/apps/client-side/site_files/webfonts/fa-solid-900.svg +5034 -5034
- package/apps/security/README.md +12 -12
- package/apps/security/app.js +288 -288
- package/apps/security/libs/notifications.js +89 -89
- package/apps/security/site_files/html/add_modal.html +36 -36
- package/apps/security/site_files/html/content.html +36 -36
- package/apps/security/site_files/html/delete_modal.html +31 -31
- package/apps/security/site_files/html/head.html +7 -7
- package/apps/security/site_files/html/index.html +80 -80
- package/apps/security/site_files/html/login_modal.html +24 -24
- package/apps/security/site_files/html/logout_modal.html +21 -21
- package/apps/security/site_files/html/navbar.html +8 -8
- package/apps/security/site_files/html/register_modal.html +32 -32
- package/apps/security/site_files/html/update_modal.html +28 -28
- package/apps/security/site_files/html/view.html +74 -74
- package/apps/security/site_files/html/view_modal.html +32 -32
- package/apps/security/site_files/js/app.js +1 -1
- package/apps/security/site_files/js/index.js +278 -278
- package/apps/security/site_files/js/login.js +35 -35
- package/apps/security/site_files/js/logout.js +22 -22
- package/apps/security/site_files/js/navbar.js +26 -26
- package/apps/security/site_files/js/register.js +30 -30
- package/apps/security/site_files/json/permissions.json +7 -7
- package/apps/security/site_files/json/roles.json +33 -33
- package/apps/security/site_files/json/words.json +28 -28
- package/gulpfile.js +17 -17
- package/isite.postman_collection.json +7 -7
- package/isite_files/css/bootstrap.css +5 -5
- package/isite_files/css/font-awesome.css +4 -4
- package/isite_files/css/prism.css +139 -139
- package/isite_files/fonts/fontawesome-webfont.svg +2671 -2671
- package/isite_files/fonts/glyphicons-halflings-regular.svg +287 -287
- package/isite_files/html/files.html +9 -9
- package/isite_files/html/head.html +12 -12
- package/isite_files/html/index.html +30 -30
- package/isite_files/html/installing.html +27 -27
- package/isite_files/html/navbar.html +51 -51
- package/isite_files/html/routes.html +13 -13
- package/isite_files/html/sessions.html +13 -13
- package/isite_files/html/vars.html +9 -9
- package/isite_files/js/angular.js +334 -334
- package/isite_files/js/bootstrap.js +6 -6
- package/isite_files/js/custom.js +149 -149
- package/isite_files/js/jquery.js +4 -4
- package/isite_files/js/prism.js +6 -6
- package/lib/README.md +1 -1
- package/lib/collection.js +92 -41
- package/lib/cookie.js +81 -81
- package/lib/dashboard.js +189 -189
- package/lib/mongodb.js +819 -756
- package/lib/parser.js +910 -910
- package/lib/security.js +48 -57
- package/lib/session.js +153 -153
- package/object-options/index.js +3 -3
- package/object-options/lib/isite.code-workspace +10 -10
- package/package.json +58 -58
- package/ssl/create_ssl.sh +3 -3
package/lib/collection.js
CHANGED
|
@@ -126,12 +126,11 @@ module.exports = function init(____0, option, db) {
|
|
|
126
126
|
$collection.edit =
|
|
127
127
|
$collection.editOne =
|
|
128
128
|
(options, callback, run) => {
|
|
129
|
-
|
|
130
129
|
callback =
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
callback ||
|
|
131
|
+
function (...args) {
|
|
132
|
+
console.log(args);
|
|
133
|
+
};
|
|
135
134
|
|
|
136
135
|
if (!options) {
|
|
137
136
|
return;
|
|
@@ -556,11 +555,11 @@ module.exports = function init(____0, option, db) {
|
|
|
556
555
|
};
|
|
557
556
|
|
|
558
557
|
$collection.drop = (callback) => {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
558
|
+
callback =
|
|
559
|
+
callback ||
|
|
560
|
+
function (...args) {
|
|
561
|
+
console.log(args);
|
|
562
|
+
};
|
|
564
563
|
____0.mongodb.dropCollection(
|
|
565
564
|
{
|
|
566
565
|
collectionName: $collection.collection,
|
|
@@ -577,10 +576,10 @@ module.exports = function init(____0, option, db) {
|
|
|
577
576
|
|
|
578
577
|
$collection.createUnique = (obj, callback) => {
|
|
579
578
|
callback =
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
579
|
+
callback ||
|
|
580
|
+
function (...args) {
|
|
581
|
+
console.log(args);
|
|
582
|
+
};
|
|
584
583
|
|
|
585
584
|
____0.mongodb.createIndex(
|
|
586
585
|
{
|
|
@@ -588,8 +587,8 @@ module.exports = function init(____0, option, db) {
|
|
|
588
587
|
dbName: $collection.db,
|
|
589
588
|
obj: obj,
|
|
590
589
|
option: {
|
|
591
|
-
unique:
|
|
592
|
-
dropDups:
|
|
590
|
+
unique: true,
|
|
591
|
+
dropDups: true,
|
|
593
592
|
},
|
|
594
593
|
},
|
|
595
594
|
(err, result) => {
|
|
@@ -598,31 +597,80 @@ module.exports = function init(____0, option, db) {
|
|
|
598
597
|
);
|
|
599
598
|
};
|
|
600
599
|
|
|
601
|
-
$collection.createIndex = (obj, callback) => {
|
|
600
|
+
$collection.createIndex = (obj, options, callback) => {
|
|
602
601
|
callback =
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
602
|
+
callback ||
|
|
603
|
+
function (...args) {
|
|
604
|
+
console.log(args);
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
if (typeof options == 'function') {
|
|
608
|
+
callback = options;
|
|
609
|
+
}
|
|
607
610
|
|
|
608
611
|
____0.mongodb.createIndex(
|
|
609
612
|
{
|
|
610
613
|
collectionName: $collection.collection,
|
|
611
614
|
dbName: $collection.db,
|
|
612
615
|
obj: obj,
|
|
616
|
+
options: options,
|
|
613
617
|
},
|
|
614
618
|
(err, result) => {
|
|
615
619
|
callback(err, result);
|
|
616
620
|
}
|
|
617
621
|
);
|
|
618
622
|
};
|
|
623
|
+
$collection.dropIndex = (obj, options, callback) => {
|
|
624
|
+
callback =
|
|
625
|
+
callback ||
|
|
626
|
+
function (...args) {
|
|
627
|
+
console.log(args);
|
|
628
|
+
};
|
|
619
629
|
|
|
630
|
+
if (typeof options == 'function') {
|
|
631
|
+
callback = options;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
____0.mongodb.dropIndex(
|
|
635
|
+
{
|
|
636
|
+
collectionName: $collection.collection,
|
|
637
|
+
dbName: $collection.db,
|
|
638
|
+
obj: obj,
|
|
639
|
+
options: options,
|
|
640
|
+
},
|
|
641
|
+
(err, result) => {
|
|
642
|
+
callback(err, result);
|
|
643
|
+
}
|
|
644
|
+
);
|
|
645
|
+
};
|
|
646
|
+
$collection.dropIndexes = (options, callback) => {
|
|
647
|
+
callback =
|
|
648
|
+
callback ||
|
|
649
|
+
function (...args) {
|
|
650
|
+
console.log(args);
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
if (typeof options == 'function') {
|
|
654
|
+
callback = options;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
____0.mongodb.dropIndexes(
|
|
658
|
+
{
|
|
659
|
+
collectionName: $collection.collection,
|
|
660
|
+
dbName: $collection.db,
|
|
661
|
+
options: options,
|
|
662
|
+
},
|
|
663
|
+
(err, result) => {
|
|
664
|
+
callback(err, result);
|
|
665
|
+
}
|
|
666
|
+
);
|
|
667
|
+
};
|
|
620
668
|
$collection.aggregate = (arr, callback) => {
|
|
621
669
|
callback =
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
670
|
+
callback ||
|
|
671
|
+
function (...args) {
|
|
672
|
+
console.log(args);
|
|
673
|
+
};
|
|
626
674
|
|
|
627
675
|
____0.mongodb.aggregate(
|
|
628
676
|
{
|
|
@@ -638,10 +686,10 @@ module.exports = function init(____0, option, db) {
|
|
|
638
686
|
|
|
639
687
|
$collection.findDuplicate = (obj, callback) => {
|
|
640
688
|
callback =
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
689
|
+
callback ||
|
|
690
|
+
function (...args) {
|
|
691
|
+
console.log(args);
|
|
692
|
+
};
|
|
645
693
|
|
|
646
694
|
if (typeof obj === 'string') {
|
|
647
695
|
obj = {
|
|
@@ -691,10 +739,10 @@ module.exports = function init(____0, option, db) {
|
|
|
691
739
|
|
|
692
740
|
$collection.deleteDuplicate = $collection.removeDuplicate = (obj, callback) => {
|
|
693
741
|
callback =
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
742
|
+
callback ||
|
|
743
|
+
function (...args) {
|
|
744
|
+
console.log(args);
|
|
745
|
+
};
|
|
698
746
|
|
|
699
747
|
$collection.findDuplicate(obj, (err, result) => {
|
|
700
748
|
if (!err) {
|
|
@@ -733,11 +781,11 @@ module.exports = function init(____0, option, db) {
|
|
|
733
781
|
|
|
734
782
|
$collection.loadAll = (options, callback) => {
|
|
735
783
|
callback =
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
784
|
+
callback ||
|
|
785
|
+
function (...args) {
|
|
786
|
+
console.log(args);
|
|
787
|
+
};
|
|
788
|
+
|
|
741
789
|
____0.mongodb.findMany(
|
|
742
790
|
{
|
|
743
791
|
collectionName: $collection.collection,
|
|
@@ -859,9 +907,12 @@ module.exports = function init(____0, option, db) {
|
|
|
859
907
|
},
|
|
860
908
|
},
|
|
861
909
|
(err, result) => {
|
|
862
|
-
$collection.createUnique(
|
|
863
|
-
|
|
864
|
-
|
|
910
|
+
$collection.createUnique(
|
|
911
|
+
{
|
|
912
|
+
id: 1,
|
|
913
|
+
},
|
|
914
|
+
() => {}
|
|
915
|
+
);
|
|
865
916
|
}
|
|
866
917
|
);
|
|
867
918
|
}
|
package/lib/cookie.js
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
module.exports = function init(req, res, ____0) {
|
|
2
|
-
let cookie = function (key, value, options) {
|
|
3
|
-
if ((key, value)) {
|
|
4
|
-
return cookie.set(key, value, options);
|
|
5
|
-
} else {
|
|
6
|
-
return cookie.get(key);
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
cookie.newList = [];
|
|
10
|
-
cookie.parse = (cookies) => {
|
|
11
|
-
let obj = {};
|
|
12
|
-
if (!cookies) {
|
|
13
|
-
return obj;
|
|
14
|
-
}
|
|
15
|
-
cookies.split(';').forEach(function (cookie) {
|
|
16
|
-
var parts = cookie.split('=');
|
|
17
|
-
if (parts[0] && parts[1]) {
|
|
18
|
-
obj[parts.shift().trim()] = decodeURI(parts.join('='));
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
return obj;
|
|
22
|
-
// return cookie.split(';').reduce(function (prev, curr) {
|
|
23
|
-
// let m = / *([^=]+)=(.*)/.exec(curr);
|
|
24
|
-
// if (m) {
|
|
25
|
-
// let key = m[1];
|
|
26
|
-
// let value = decodeURIComponent(m[2]);
|
|
27
|
-
// prev[key] = value;
|
|
28
|
-
// }
|
|
29
|
-
// return prev;
|
|
30
|
-
// }, {});
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
cookie.stringify = (co) => {
|
|
34
|
-
let out = '';
|
|
35
|
-
|
|
36
|
-
out += co.key + '=' + encodeURIComponent(co.value) + ';path=' + co.options.path;
|
|
37
|
-
if (co.options.expires > 0) {
|
|
38
|
-
out += '; expires=' + new Date(new Date().getTime() + 1000 * 60 * co.options.expires).toUTCString();
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return out;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
cookie.write = () => {
|
|
45
|
-
let csList = [];
|
|
46
|
-
|
|
47
|
-
for (let i = 0; i < cookie.newList.length; i++) {
|
|
48
|
-
let cs = cookie.stringify(cookie.newList[i]);
|
|
49
|
-
if (cs) {
|
|
50
|
-
csList.push(cs);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
res.set('Set-Cookie', csList);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
cookie.set = function (key, value, _options) {
|
|
57
|
-
let options = Object.assign(
|
|
58
|
-
{
|
|
59
|
-
expires: ____0.options.session.timeout,
|
|
60
|
-
path: '/',
|
|
61
|
-
},
|
|
62
|
-
_options
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
cookie.newList.push({
|
|
66
|
-
key: key,
|
|
67
|
-
value: value,
|
|
68
|
-
options: options,
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
cookie.get = function (key) {
|
|
73
|
-
let value = cookie.obj[key];
|
|
74
|
-
if (typeof value == 'undefined') {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
return value;
|
|
78
|
-
};
|
|
79
|
-
cookie.obj = cookie.parse(req.headers.cookie || '');
|
|
80
|
-
return cookie;
|
|
81
|
-
};
|
|
1
|
+
module.exports = function init(req, res, ____0) {
|
|
2
|
+
let cookie = function (key, value, options) {
|
|
3
|
+
if ((key, value)) {
|
|
4
|
+
return cookie.set(key, value, options);
|
|
5
|
+
} else {
|
|
6
|
+
return cookie.get(key);
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
cookie.newList = [];
|
|
10
|
+
cookie.parse = (cookies) => {
|
|
11
|
+
let obj = {};
|
|
12
|
+
if (!cookies) {
|
|
13
|
+
return obj;
|
|
14
|
+
}
|
|
15
|
+
cookies.split(';').forEach(function (cookie) {
|
|
16
|
+
var parts = cookie.split('=');
|
|
17
|
+
if (parts[0] && parts[1]) {
|
|
18
|
+
obj[parts.shift().trim()] = decodeURI(parts.join('='));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return obj;
|
|
22
|
+
// return cookie.split(';').reduce(function (prev, curr) {
|
|
23
|
+
// let m = / *([^=]+)=(.*)/.exec(curr);
|
|
24
|
+
// if (m) {
|
|
25
|
+
// let key = m[1];
|
|
26
|
+
// let value = decodeURIComponent(m[2]);
|
|
27
|
+
// prev[key] = value;
|
|
28
|
+
// }
|
|
29
|
+
// return prev;
|
|
30
|
+
// }, {});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
cookie.stringify = (co) => {
|
|
34
|
+
let out = '';
|
|
35
|
+
|
|
36
|
+
out += co.key + '=' + encodeURIComponent(co.value) + ';path=' + co.options.path;
|
|
37
|
+
if (co.options.expires > 0) {
|
|
38
|
+
out += '; expires=' + new Date(new Date().getTime() + 1000 * 60 * co.options.expires).toUTCString();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return out;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
cookie.write = () => {
|
|
45
|
+
let csList = [];
|
|
46
|
+
|
|
47
|
+
for (let i = 0; i < cookie.newList.length; i++) {
|
|
48
|
+
let cs = cookie.stringify(cookie.newList[i]);
|
|
49
|
+
if (cs) {
|
|
50
|
+
csList.push(cs);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
res.set('Set-Cookie', csList);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
cookie.set = function (key, value, _options) {
|
|
57
|
+
let options = Object.assign(
|
|
58
|
+
{
|
|
59
|
+
expires: ____0.options.session.timeout,
|
|
60
|
+
path: '/',
|
|
61
|
+
},
|
|
62
|
+
_options
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
cookie.newList.push({
|
|
66
|
+
key: key,
|
|
67
|
+
value: value,
|
|
68
|
+
options: options,
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
cookie.get = function (key) {
|
|
73
|
+
let value = cookie.obj[key];
|
|
74
|
+
if (typeof value == 'undefined') {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return value;
|
|
78
|
+
};
|
|
79
|
+
cookie.obj = cookie.parse(req.headers.cookie || '');
|
|
80
|
+
return cookie;
|
|
81
|
+
};
|