isite 2024.8.3 → 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.
Files changed (133) 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/index.js +1 -1
  99. package/isite.postman_collection.json +7 -7
  100. package/isite_files/css/bootstrap.css +5 -5
  101. package/isite_files/css/font-awesome.css +4 -4
  102. package/isite_files/css/prism.css +139 -139
  103. package/isite_files/fonts/fontawesome-webfont.svg +2671 -2671
  104. package/isite_files/fonts/glyphicons-halflings-regular.svg +287 -287
  105. package/isite_files/html/files.html +9 -9
  106. package/isite_files/html/head.html +12 -12
  107. package/isite_files/html/index.html +30 -30
  108. package/isite_files/html/installing.html +27 -27
  109. package/isite_files/html/navbar.html +51 -51
  110. package/isite_files/html/routes.html +13 -13
  111. package/isite_files/html/sessions.html +13 -13
  112. package/isite_files/html/vars.html +9 -9
  113. package/isite_files/js/angular.js +334 -334
  114. package/isite_files/js/bootstrap.js +6 -6
  115. package/isite_files/js/custom.js +149 -149
  116. package/isite_files/js/jquery.js +4 -4
  117. package/isite_files/js/prism.js +6 -6
  118. package/lib/README.md +1 -1
  119. package/lib/collection.js +111 -17
  120. package/lib/cookie.js +81 -81
  121. package/lib/dashboard.js +189 -189
  122. package/lib/eval.js +48 -0
  123. package/lib/mongodb.js +819 -686
  124. package/lib/parser.js +910 -910
  125. package/lib/security.js +61 -61
  126. package/lib/session.js +153 -158
  127. package/lib/sessions.js +14 -30
  128. package/lib/ws.js +2 -2
  129. package/object-options/index.js +3 -3
  130. package/object-options/lib/fn.js +1 -1
  131. package/object-options/lib/isite.code-workspace +10 -10
  132. package/package.json +58 -55
  133. package/ssl/create_ssl.sh +3 -3
package/lib/collection.js CHANGED
@@ -26,7 +26,7 @@ module.exports = function init(____0, option, db) {
26
26
  $collection.collection = $collection.options.collection;
27
27
  $collection.docs = [];
28
28
 
29
- $collection.busy = !1;
29
+ $collection.busy = !0;
30
30
  $collection.insertBusy = !1;
31
31
  $collection.updateBusy = !1;
32
32
  $collection.deleteBusy = !1;
@@ -34,6 +34,7 @@ module.exports = function init(____0, option, db) {
34
34
  $collection.opration_busy = !1;
35
35
  $collection.opration_list = [];
36
36
  $collection.run_count = 0;
37
+
37
38
  $collection.run = function () {
38
39
  $collection.run_count++;
39
40
  // console.log('run : ' + $collection.run_count + ' , count : ' + $collection.opration_list.length)
@@ -64,11 +65,18 @@ module.exports = function init(____0, option, db) {
64
65
  $collection.getAll(opration.options, opration.callback, 2);
65
66
  }
66
67
  };
68
+
67
69
  $collection.insertOne =
68
70
  $collection.insert =
69
71
  $collection.add =
70
72
  $collection.addOne =
71
73
  ($doc, callback, run) => {
74
+ if ($collection.busy) {
75
+ setTimeout(() => {
76
+ $collection.add($doc, callback, run);
77
+ }, 100);
78
+ return;
79
+ }
72
80
  callback = callback || function () {};
73
81
  if (run !== 2 && run !== !0) {
74
82
  $collection.opration_list.push({
@@ -92,7 +100,6 @@ module.exports = function init(____0, option, db) {
92
100
  if ($collection.identityEnabled === !0 && $doc.id >= ____0.mongodb.collections_indexed[$collection.collection].nextID) {
93
101
  ____0.mongodb.collections_indexed[$collection.collection].nextID = $doc.id + 1;
94
102
  }
95
-
96
103
  if ($doc._id && typeof $doc._id === 'string') {
97
104
  $doc._id = $collection.ObjectID($doc._id);
98
105
  }
@@ -119,7 +126,12 @@ module.exports = function init(____0, option, db) {
119
126
  $collection.edit =
120
127
  $collection.editOne =
121
128
  (options, callback, run) => {
122
- callback = callback || function () {};
129
+ callback =
130
+ callback ||
131
+ function (...args) {
132
+ console.log(args);
133
+ };
134
+
123
135
  if (!options) {
124
136
  return;
125
137
  }
@@ -265,7 +277,6 @@ module.exports = function init(____0, option, db) {
265
277
  $collection.selectOne =
266
278
  (options, callback, run) => {
267
279
  callback = callback || function () {};
268
-
269
280
  if (run !== 2 && run !== !0) {
270
281
  $collection.opration_list.push({
271
282
  options: options,
@@ -544,7 +555,11 @@ module.exports = function init(____0, option, db) {
544
555
  };
545
556
 
546
557
  $collection.drop = (callback) => {
547
- callback = callback || function () {};
558
+ callback =
559
+ callback ||
560
+ function (...args) {
561
+ console.log(args);
562
+ };
548
563
  ____0.mongodb.dropCollection(
549
564
  {
550
565
  collectionName: $collection.collection,
@@ -560,7 +575,11 @@ module.exports = function init(____0, option, db) {
560
575
  };
561
576
 
562
577
  $collection.createUnique = (obj, callback) => {
563
- callback = callback || function () {};
578
+ callback =
579
+ callback ||
580
+ function (...args) {
581
+ console.log(args);
582
+ };
564
583
 
565
584
  ____0.mongodb.createIndex(
566
585
  {
@@ -568,8 +587,8 @@ module.exports = function init(____0, option, db) {
568
587
  dbName: $collection.db,
569
588
  obj: obj,
570
589
  option: {
571
- unique: !0,
572
- dropDups: !0,
590
+ unique: true,
591
+ dropDups: true,
573
592
  },
574
593
  },
575
594
  (err, result) => {
@@ -578,23 +597,80 @@ module.exports = function init(____0, option, db) {
578
597
  );
579
598
  };
580
599
 
581
- $collection.createIndex = (obj, callback) => {
582
- callback = callback || function () {};
600
+ $collection.createIndex = (obj, options, callback) => {
601
+ callback =
602
+ callback ||
603
+ function (...args) {
604
+ console.log(args);
605
+ };
606
+
607
+ if (typeof options == 'function') {
608
+ callback = options;
609
+ }
583
610
 
584
611
  ____0.mongodb.createIndex(
585
612
  {
586
613
  collectionName: $collection.collection,
587
614
  dbName: $collection.db,
588
615
  obj: obj,
616
+ options: options,
617
+ },
618
+ (err, result) => {
619
+ callback(err, result);
620
+ }
621
+ );
622
+ };
623
+ $collection.dropIndex = (obj, options, callback) => {
624
+ callback =
625
+ callback ||
626
+ function (...args) {
627
+ console.log(args);
628
+ };
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,
589
640
  },
590
641
  (err, result) => {
591
642
  callback(err, result);
592
643
  }
593
644
  );
594
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
+ }
595
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
+ };
596
668
  $collection.aggregate = (arr, callback) => {
597
- callback = callback || function () {};
669
+ callback =
670
+ callback ||
671
+ function (...args) {
672
+ console.log(args);
673
+ };
598
674
 
599
675
  ____0.mongodb.aggregate(
600
676
  {
@@ -609,6 +685,12 @@ module.exports = function init(____0, option, db) {
609
685
  };
610
686
 
611
687
  $collection.findDuplicate = (obj, callback) => {
688
+ callback =
689
+ callback ||
690
+ function (...args) {
691
+ console.log(args);
692
+ };
693
+
612
694
  if (typeof obj === 'string') {
613
695
  obj = {
614
696
  value: '$' + obj,
@@ -656,7 +738,11 @@ module.exports = function init(____0, option, db) {
656
738
  };
657
739
 
658
740
  $collection.deleteDuplicate = $collection.removeDuplicate = (obj, callback) => {
659
- callback = callback || function () {};
741
+ callback =
742
+ callback ||
743
+ function (...args) {
744
+ console.log(args);
745
+ };
660
746
 
661
747
  $collection.findDuplicate(obj, (err, result) => {
662
748
  if (!err) {
@@ -692,9 +778,14 @@ module.exports = function init(____0, option, db) {
692
778
  }
693
779
  });
694
780
  };
695
-
781
+
696
782
  $collection.loadAll = (options, callback) => {
697
- callback = callback || function () {};
783
+ callback =
784
+ callback ||
785
+ function (...args) {
786
+ console.log(args);
787
+ };
788
+
698
789
  ____0.mongodb.findMany(
699
790
  {
700
791
  collectionName: $collection.collection,
@@ -816,9 +907,12 @@ module.exports = function init(____0, option, db) {
816
907
  },
817
908
  },
818
909
  (err, result) => {
819
- $collection.createUnique({
820
- id: 1,
821
- });
910
+ $collection.createUnique(
911
+ {
912
+ id: 1,
913
+ },
914
+ () => {}
915
+ );
822
916
  }
823
917
  );
824
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
+ };