isite 2024.8.5 → 2024.8.7

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.
Files changed (129) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +1384 -1387
  3. package/apps/charts/site_files/html/PieChart.html +35 -35
  4. package/apps/charts/site_files/html/PieChart2.html +35 -35
  5. package/apps/charts/site_files/html/XYChart.html +42 -42
  6. package/apps/charts/site_files/html/column.html +60 -60
  7. package/apps/charts/site_files/html/gauge.html +44 -44
  8. package/apps/charts/site_files/html/index.html +92 -92
  9. package/apps/charts/site_files/html/line-graph.html +42 -42
  10. package/apps/charts/site_files/html/pie-chart-rounded-corners.html +38 -38
  11. package/apps/charts/site_files/html/simple-3D-pie-chart.html +43 -43
  12. package/apps/charts/site_files/js/chart-animated.js +2 -2
  13. package/apps/charts/site_files/json/PieChart.json +41 -41
  14. package/apps/charts/site_files/json/PieChart2.json +23 -23
  15. package/apps/charts/site_files/json/XYChart.json +74 -74
  16. package/apps/charts/site_files/json/bar-chart.json +99 -99
  17. package/apps/charts/site_files/json/column-chart.json +80 -80
  18. package/apps/charts/site_files/json/gauge.json +36 -36
  19. package/apps/charts/site_files/json/line-graph.json +1867 -1867
  20. package/apps/charts/site_files/json/pie-chart-rounded-corners.json +42 -42
  21. package/apps/charts/site_files/json/simple-3D-pie-chart.json +50 -50
  22. package/apps/client-side/package-lock.json +5 -5
  23. package/apps/client-side/package.json +21 -21
  24. package/apps/client-side/site_files/css/bootstrap3.css +5 -5
  25. package/apps/client-side/site_files/css/bootstrap4.css +6 -6
  26. package/apps/client-side/site_files/css/bootstrap5.css +6 -6
  27. package/apps/client-side/site_files/css/checkbox.css +125 -125
  28. package/apps/client-side/site_files/css/font-awesome.css +4616 -4616
  29. package/apps/client-side/site_files/css/font-awesome.min.css +4 -4
  30. package/apps/client-side/site_files/css/fonts.css +85 -85
  31. package/apps/client-side/site_files/css/help.css +51 -51
  32. package/apps/client-side/site_files/css/main-menu.css +66 -66
  33. package/apps/client-side/site_files/css/print.css +144 -144
  34. package/apps/client-side/site_files/css/prism.css +139 -139
  35. package/apps/client-side/site_files/css/progress.css +7 -7
  36. package/apps/client-side/site_files/css/radio.css +103 -103
  37. package/apps/client-side/site_files/css/scrollbar.css +13 -13
  38. package/apps/client-side/site_files/css/semantic.css +363 -363
  39. package/apps/client-side/site_files/css/table.css +87 -87
  40. package/apps/client-side/site_files/css/treeview.css +84 -84
  41. package/apps/client-side/site_files/css/ui.css +28 -28
  42. package/apps/client-side/site_files/css/video-js.min.css +1 -0
  43. package/apps/client-side/site_files/fonts/fontawesome-webfont.svg +2671 -2671
  44. package/apps/client-side/site_files/fonts/glyphicons-halflings-regular.svg +287 -287
  45. package/apps/client-side/site_files/fonts/icons.svg +684 -684
  46. package/apps/client-side/site_files/js/Youtube.min.js +1 -0
  47. package/apps/client-side/site_files/js/angular-animate.js +4179 -4179
  48. package/apps/client-side/site_files/js/angular.js +36599 -36599
  49. package/apps/client-side/site_files/js/angular.min.js +351 -351
  50. package/apps/client-side/site_files/js/angular.min.js.map +8 -8
  51. package/apps/client-side/site_files/js/barcode.js +1 -1
  52. package/apps/client-side/site_files/js/base64.js +319 -319
  53. package/apps/client-side/site_files/js/bootstrap-5-directive.js +1456 -1456
  54. package/apps/client-side/site_files/js/bootstrap3.js +6 -6
  55. package/apps/client-side/site_files/js/bootstrap4.js +6 -6
  56. package/apps/client-side/site_files/js/bootstrap5.js +6 -6
  57. package/apps/client-side/site_files/js/custom.js +149 -149
  58. package/apps/client-side/site_files/js/directive.min.js +1 -1
  59. package/apps/client-side/site_files/js/hijri.js +965 -965
  60. package/apps/client-side/site_files/js/jquery.js +2 -2
  61. package/apps/client-side/site_files/js/moment.js +4511 -4511
  62. package/apps/client-side/site_files/js/prism.js +6 -6
  63. package/apps/client-side/site_files/js/qrcode.js +1398 -1398
  64. package/apps/client-side/site_files/js/semantic.js +10 -10
  65. package/apps/client-side/site_files/js/video.min.js +53 -0
  66. package/apps/client-side/site_files/js/xlsx.js +23 -23
  67. package/apps/client-side/site_files/semantic-themes/default/assets/fonts/brand-icons.svg +1008 -1008
  68. package/apps/client-side/site_files/semantic-themes/default/assets/fonts/icons.svg +1518 -1518
  69. package/apps/client-side/site_files/semantic-themes/default/assets/fonts/outline-icons.svg +366 -366
  70. package/apps/client-side/site_files/webfonts/fa-brands-400.svg +3717 -3717
  71. package/apps/client-side/site_files/webfonts/fa-regular-400.svg +801 -801
  72. package/apps/client-side/site_files/webfonts/fa-solid-900.svg +5034 -5034
  73. package/apps/security/README.md +12 -12
  74. package/apps/security/app.js +288 -288
  75. package/apps/security/libs/notifications.js +89 -89
  76. package/apps/security/site_files/html/add_modal.html +36 -36
  77. package/apps/security/site_files/html/content.html +36 -36
  78. package/apps/security/site_files/html/delete_modal.html +31 -31
  79. package/apps/security/site_files/html/head.html +7 -7
  80. package/apps/security/site_files/html/index.html +80 -80
  81. package/apps/security/site_files/html/login_modal.html +24 -24
  82. package/apps/security/site_files/html/logout_modal.html +21 -21
  83. package/apps/security/site_files/html/navbar.html +8 -8
  84. package/apps/security/site_files/html/register_modal.html +32 -32
  85. package/apps/security/site_files/html/update_modal.html +28 -28
  86. package/apps/security/site_files/html/view.html +74 -74
  87. package/apps/security/site_files/html/view_modal.html +32 -32
  88. package/apps/security/site_files/js/app.js +1 -1
  89. package/apps/security/site_files/js/index.js +278 -278
  90. package/apps/security/site_files/js/login.js +35 -35
  91. package/apps/security/site_files/js/logout.js +22 -22
  92. package/apps/security/site_files/js/navbar.js +26 -26
  93. package/apps/security/site_files/js/register.js +30 -30
  94. package/apps/security/site_files/json/permissions.json +7 -7
  95. package/apps/security/site_files/json/roles.json +33 -33
  96. package/apps/security/site_files/json/words.json +28 -28
  97. package/gulpfile.js +17 -17
  98. package/isite.postman_collection.json +7 -7
  99. package/isite_files/css/bootstrap.css +5 -5
  100. package/isite_files/css/font-awesome.css +4 -4
  101. package/isite_files/css/prism.css +139 -139
  102. package/isite_files/fonts/fontawesome-webfont.svg +2671 -2671
  103. package/isite_files/fonts/glyphicons-halflings-regular.svg +287 -287
  104. package/isite_files/html/files.html +9 -9
  105. package/isite_files/html/head.html +12 -12
  106. package/isite_files/html/index.html +30 -30
  107. package/isite_files/html/installing.html +27 -27
  108. package/isite_files/html/navbar.html +51 -51
  109. package/isite_files/html/routes.html +13 -13
  110. package/isite_files/html/sessions.html +13 -13
  111. package/isite_files/html/vars.html +9 -9
  112. package/isite_files/js/angular.js +334 -334
  113. package/isite_files/js/bootstrap.js +6 -6
  114. package/isite_files/js/custom.js +149 -149
  115. package/isite_files/js/jquery.js +4 -4
  116. package/isite_files/js/prism.js +6 -6
  117. package/lib/README.md +1 -1
  118. package/lib/collection.js +92 -41
  119. package/lib/collectionFile.js +21 -18
  120. package/lib/cookie.js +81 -81
  121. package/lib/dashboard.js +189 -189
  122. package/lib/mongodb.js +819 -756
  123. package/lib/parser.js +910 -910
  124. package/lib/security.js +48 -57
  125. package/lib/session.js +153 -153
  126. package/object-options/index.js +3 -3
  127. package/object-options/lib/isite.code-workspace +10 -10
  128. package/package.json +58 -58
  129. 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
- callback ||
132
- function (...args) {
133
- console.log(args);
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
- callback =
560
- callback ||
561
- function (...args) {
562
- console.log(args);
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
- callback ||
581
- function (...args) {
582
- console.log(args);
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: !0,
592
- dropDups: !0,
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
- callback ||
604
- function (...args) {
605
- console.log(args);
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
- callback ||
623
- function (...args) {
624
- console.log(args);
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
- callback ||
642
- function (...args) {
643
- console.log(args);
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
- callback ||
695
- function (...args) {
696
- console.log(args);
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
- callback ||
737
- function (...args) {
738
- console.log(args);
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
- id: 1,
864
- } , ()=>{});
910
+ $collection.createUnique(
911
+ {
912
+ id: 1,
913
+ },
914
+ () => {}
915
+ );
865
916
  }
866
917
  );
867
918
  }
@@ -1,19 +1,22 @@
1
1
  module.exports = function init(____0, options, db) {
2
- return {
3
- options : options,
4
- db : db,
5
- busy: !0,
6
- deleteDuplicate: function () {},
7
- createUnique: function () {},
8
- findOne: function () {},
9
- findAll: function () {},
10
- findMany: function () {},
11
- get: function () {},
12
- getAll: function () {},
13
- find: function () {},
14
- add: function () {},
15
- update: function () {},
16
- delete: function () {},
17
- };
18
-
19
- }
2
+ return {
3
+ options: options,
4
+ db: db,
5
+ busy: true,
6
+ deleteDuplicate: function () {},
7
+ createUnique: function () {},
8
+ createIndex: function () {},
9
+ createIndexs: function () {},
10
+ dropIndex: function () {},
11
+ dropIndexes: function () {},
12
+ findOne: function () {},
13
+ findAll: function () {},
14
+ findMany: function () {},
15
+ get: function () {},
16
+ getAll: function () {},
17
+ find: function () {},
18
+ add: function () {},
19
+ update: function () {},
20
+ delete: function () {},
21
+ };
22
+ };
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
+ };