isite 2023.1.8 → 2023.8.10
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/apps/charts/app.js +1 -1
- package/apps/charts/site_files/html/index.html +1 -1
- package/apps/charts/site_files/js/chart-animated.js +1 -20
- package/apps/charts/site_files/js/charts.js +1 -1
- package/apps/charts/site_files/js/custom.js +151 -153
- package/apps/client-side/app.js +39 -14
- package/apps/client-side/site_files/css/bootstrap5-addon.css +20 -8
- package/apps/client-side/site_files/css/effect.css +2 -2
- package/apps/client-side/site_files/css/font-awesome.css +6 -6
- package/apps/client-side/site_files/css/font-awesome.min.css +1 -1
- package/apps/client-side/site_files/css/layout.css +4 -4
- package/apps/client-side/site_files/css/modal.css +3 -3
- package/apps/client-side/site_files/css/print.css +1 -0
- package/apps/client-side/site_files/css/tabs.css +72 -68
- package/apps/client-side/site_files/css/treeview.css +49 -48
- package/apps/client-side/site_files/html/directive/i-date-old.html +24 -0
- package/apps/client-side/site_files/html/directive/i-date.html +19 -15
- package/apps/client-side/site_files/html/directive/i-datetime.html +11 -22
- package/apps/client-side/site_files/html/require_payments.html +11 -12
- package/apps/client-side/site_files/html/require_permissions.html +2 -2
- package/apps/client-side/site_files/html/words.html +66 -0
- package/apps/client-side/site_files/js/app.js +162 -0
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +70 -106
- package/apps/client-side/site_files/js/directive-core.js +1 -7
- package/apps/client-side/site_files/js/site.js +11 -1
- package/index.js +6 -0
- package/lib/app.js +379 -0
- package/lib/collection.js +12 -4
- package/lib/data.js +1 -0
- package/lib/fsm.js +398 -387
- package/lib/mongodb.js +2 -1
- package/lib/parser.js +3 -3
- package/lib/routing.js +36 -25
- package/lib/security.js +9 -5
- package/lib/words.js +17 -30
- package/object-options/index.js +11 -11
- package/object-options/lib/fn.js +0 -30
- package/package.json +2 -1
|
@@ -586,45 +586,34 @@ app.directive('iDate', function () {
|
|
|
586
586
|
restrict: 'E',
|
|
587
587
|
required: 'ngModel',
|
|
588
588
|
scope: {
|
|
589
|
+
v: '@',
|
|
590
|
+
id2: '@',
|
|
589
591
|
label: '@',
|
|
590
|
-
|
|
591
|
-
|
|
592
|
+
type: '@',
|
|
593
|
+
class2: '@',
|
|
594
|
+
disabled: '@',
|
|
592
595
|
ngModel: '=',
|
|
593
596
|
ngChange: '&',
|
|
597
|
+
ngKeydown: '&',
|
|
594
598
|
},
|
|
595
599
|
link: function ($scope, element, attrs) {
|
|
600
|
+
$scope.id2 = $scope.id2 || 'input_' + Math.random().toString().replace('0.', '');
|
|
601
|
+
$scope.v = $scope.v || '';
|
|
602
|
+
$scope.requird = '';
|
|
603
|
+
if ($scope.v.like('*r*')) {
|
|
604
|
+
$scope.requird = '*';
|
|
605
|
+
}
|
|
596
606
|
if (typeof attrs.disabled !== 'undefined') {
|
|
597
607
|
attrs.disabled = 'disabled';
|
|
598
608
|
} else {
|
|
599
609
|
attrs.disabled = '';
|
|
600
610
|
}
|
|
601
|
-
$scope.
|
|
611
|
+
$scope.class2 = $scope.class2 || '';
|
|
602
612
|
|
|
603
613
|
$scope.model = {};
|
|
604
614
|
|
|
605
|
-
$scope.days = [];
|
|
606
|
-
for (let i = 1; i < 32; i++) {
|
|
607
|
-
$scope.days.push({
|
|
608
|
-
id: i,
|
|
609
|
-
name: i,
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
$scope.years = [];
|
|
613
|
-
for (let i = $scope.year; i < 2100; i++) {
|
|
614
|
-
$scope.years.push({
|
|
615
|
-
id: i,
|
|
616
|
-
name: i,
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
$scope.dayTitle = 'Day';
|
|
620
|
-
$scope.monthTitle = 'Month';
|
|
621
|
-
$scope.yearTitle = 'Year';
|
|
622
|
-
|
|
623
615
|
$scope.lang = site.session ? site.session.lang : 'en';
|
|
624
616
|
if ($scope.lang === 'ar') {
|
|
625
|
-
$scope.dayTitle = 'يوم';
|
|
626
|
-
$scope.monthTitle = 'شهر';
|
|
627
|
-
$scope.yearTitle = 'سنة';
|
|
628
617
|
$scope.monthes = [
|
|
629
618
|
{ id: 0, name: 'يناير' },
|
|
630
619
|
{ id: 1, name: 'فبراير' },
|
|
@@ -641,18 +630,18 @@ app.directive('iDate', function () {
|
|
|
641
630
|
];
|
|
642
631
|
} else {
|
|
643
632
|
$scope.monthes = [
|
|
644
|
-
{ id: 0, name: '
|
|
645
|
-
{ id: 1, name: '
|
|
646
|
-
{ id: 2, name: '
|
|
647
|
-
{ id: 3, name: '
|
|
633
|
+
{ id: 0, name: 'January' },
|
|
634
|
+
{ id: 1, name: 'February' },
|
|
635
|
+
{ id: 2, name: 'March' },
|
|
636
|
+
{ id: 3, name: 'April' },
|
|
648
637
|
{ id: 4, name: 'May' },
|
|
649
|
-
{ id: 5, name: '
|
|
650
|
-
{ id: 6, name: '
|
|
651
|
-
{ id: 7, name: '
|
|
652
|
-
{ id: 8, name: '
|
|
653
|
-
{ id: 9, name: '
|
|
654
|
-
{ id: 10, name: '
|
|
655
|
-
{ id: 11, name: '
|
|
638
|
+
{ id: 5, name: 'June' },
|
|
639
|
+
{ id: 6, name: 'July' },
|
|
640
|
+
{ id: 7, name: 'August' },
|
|
641
|
+
{ id: 8, name: 'September' },
|
|
642
|
+
{ id: 9, name: 'October' },
|
|
643
|
+
{ id: 10, name: 'November' },
|
|
644
|
+
{ id: 11, name: 'December' },
|
|
656
645
|
];
|
|
657
646
|
}
|
|
658
647
|
|
|
@@ -660,16 +649,17 @@ app.directive('iDate', function () {
|
|
|
660
649
|
if (ngModel) {
|
|
661
650
|
ngModel = new Date(ngModel);
|
|
662
651
|
$scope.model = $scope.model || {};
|
|
663
|
-
$scope.model.selectedDay =
|
|
652
|
+
$scope.model.selectedDay = site.addZero(ngModel.getDate(), 2);
|
|
664
653
|
$scope.model.selectedMonth = $scope.monthes.find((m) => m.id == ngModel.getMonth());
|
|
665
|
-
$scope.model.selectedYear =
|
|
666
|
-
$
|
|
654
|
+
$scope.model.selectedYear = ngModel.getFullYear();
|
|
655
|
+
$(element).attr('value', ngModel.getTime());
|
|
656
|
+
$scope.ngModel1 = new Date(ngModel);
|
|
667
657
|
} else {
|
|
668
658
|
$scope.model = $scope.model || {};
|
|
669
659
|
$scope.model.selectedDay = null;
|
|
670
660
|
$scope.model.selectedMonth = null;
|
|
671
661
|
$scope.model.selectedYear = null;
|
|
672
|
-
$
|
|
662
|
+
$(element).attr('value', '');
|
|
673
663
|
}
|
|
674
664
|
});
|
|
675
665
|
|
|
@@ -677,9 +667,8 @@ app.directive('iDate', function () {
|
|
|
677
667
|
$scope.ngModel = new Date();
|
|
678
668
|
};
|
|
679
669
|
$scope.updateDate = function (date) {
|
|
680
|
-
if ($scope.
|
|
681
|
-
|
|
682
|
-
$scope.ngModel = new Date($scope.model.selectedYear.id, $scope.model.selectedMonth.id, $scope.model.selectedDay.id, now.getHours(), now.getMinutes(), now.getSeconds());
|
|
670
|
+
if ($scope.ngModel1) {
|
|
671
|
+
$scope.ngModel = $scope.ngModel1;
|
|
683
672
|
$scope.editOnly = false;
|
|
684
673
|
if ($scope.ngChange) {
|
|
685
674
|
$scope.ngChange();
|
|
@@ -704,65 +693,34 @@ app.directive('iDatetime', function () {
|
|
|
704
693
|
restrict: 'E',
|
|
705
694
|
required: 'ngModel',
|
|
706
695
|
scope: {
|
|
696
|
+
v: '@',
|
|
697
|
+
id2: '@',
|
|
707
698
|
label: '@',
|
|
708
|
-
|
|
709
|
-
|
|
699
|
+
type: '@',
|
|
700
|
+
class2: '@',
|
|
701
|
+
disabled: '@',
|
|
710
702
|
ngModel: '=',
|
|
711
703
|
ngChange: '&',
|
|
704
|
+
ngKeydown: '&',
|
|
712
705
|
},
|
|
713
706
|
link: function ($scope, element, attrs) {
|
|
707
|
+
$scope.id2 = $scope.id2 || 'input_' + Math.random().toString().replace('0.', '');
|
|
708
|
+
$scope.v = $scope.v || '';
|
|
709
|
+
$scope.requird = '';
|
|
710
|
+
if ($scope.v.like('*r*')) {
|
|
711
|
+
$scope.requird = '*';
|
|
712
|
+
}
|
|
714
713
|
if (typeof attrs.disabled !== 'undefined') {
|
|
715
714
|
attrs.disabled = 'disabled';
|
|
716
715
|
} else {
|
|
717
716
|
attrs.disabled = '';
|
|
718
717
|
}
|
|
719
|
-
$scope.
|
|
718
|
+
$scope.class2 = $scope.class2 || '';
|
|
720
719
|
|
|
721
720
|
$scope.model = {};
|
|
722
721
|
|
|
723
|
-
$scope.hours = [];
|
|
724
|
-
for (let i = 0; i < 24; i++) {
|
|
725
|
-
$scope.hours.push({
|
|
726
|
-
id: i,
|
|
727
|
-
name: i < 10 ? '0' + i : i,
|
|
728
|
-
});
|
|
729
|
-
}
|
|
730
|
-
$scope.minutes = [];
|
|
731
|
-
for (let i = 0; i < 60; i++) {
|
|
732
|
-
$scope.minutes.push({
|
|
733
|
-
id: i,
|
|
734
|
-
name: i < 10 ? '0' + i : i,
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
$scope.days = [];
|
|
739
|
-
for (let i = 1; i < 32; i++) {
|
|
740
|
-
$scope.days.push({
|
|
741
|
-
id: i,
|
|
742
|
-
name: i,
|
|
743
|
-
});
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
$scope.years = [];
|
|
747
|
-
for (let i = $scope.year; i < 2100; i++) {
|
|
748
|
-
$scope.years.push({
|
|
749
|
-
id: i,
|
|
750
|
-
name: i,
|
|
751
|
-
});
|
|
752
|
-
}
|
|
753
|
-
$scope.dayTitle = 'Day';
|
|
754
|
-
$scope.monthTitle = 'Month';
|
|
755
|
-
$scope.yearTitle = 'Year';
|
|
756
|
-
$scope.hourTitle = 'Hour';
|
|
757
|
-
$scope.minuteTitle = 'Minute';
|
|
758
|
-
|
|
759
722
|
$scope.lang = site.session ? site.session.lang : 'en';
|
|
760
723
|
if ($scope.lang === 'ar') {
|
|
761
|
-
$scope.dayTitle = 'يوم';
|
|
762
|
-
$scope.monthTitle = 'شهر';
|
|
763
|
-
$scope.yearTitle = 'سنة';
|
|
764
|
-
$scope.hourTitle = 'ساعة';
|
|
765
|
-
$scope.minuteTitle = 'دقيقة';
|
|
766
724
|
$scope.monthes = [
|
|
767
725
|
{ id: 0, name: 'يناير' },
|
|
768
726
|
{ id: 1, name: 'فبراير' },
|
|
@@ -779,18 +737,18 @@ app.directive('iDatetime', function () {
|
|
|
779
737
|
];
|
|
780
738
|
} else {
|
|
781
739
|
$scope.monthes = [
|
|
782
|
-
{ id: 0, name: '
|
|
783
|
-
{ id: 1, name: '
|
|
784
|
-
{ id: 2, name: '
|
|
785
|
-
{ id: 3, name: '
|
|
740
|
+
{ id: 0, name: 'January' },
|
|
741
|
+
{ id: 1, name: 'February' },
|
|
742
|
+
{ id: 2, name: 'March' },
|
|
743
|
+
{ id: 3, name: 'April' },
|
|
786
744
|
{ id: 4, name: 'May' },
|
|
787
|
-
{ id: 5, name: '
|
|
788
|
-
{ id: 6, name: '
|
|
789
|
-
{ id: 7, name: '
|
|
790
|
-
{ id: 8, name: '
|
|
791
|
-
{ id: 9, name: '
|
|
792
|
-
{ id: 10, name: '
|
|
793
|
-
{ id: 11, name: '
|
|
745
|
+
{ id: 5, name: 'June' },
|
|
746
|
+
{ id: 6, name: 'July' },
|
|
747
|
+
{ id: 7, name: 'August' },
|
|
748
|
+
{ id: 8, name: 'September' },
|
|
749
|
+
{ id: 9, name: 'October' },
|
|
750
|
+
{ id: 10, name: 'November' },
|
|
751
|
+
{ id: 11, name: 'December' },
|
|
794
752
|
];
|
|
795
753
|
}
|
|
796
754
|
|
|
@@ -798,11 +756,14 @@ app.directive('iDatetime', function () {
|
|
|
798
756
|
if (ngModel) {
|
|
799
757
|
ngModel = new Date(ngModel);
|
|
800
758
|
$scope.model = $scope.model || {};
|
|
801
|
-
$scope.model.selectedDay =
|
|
759
|
+
$scope.model.selectedDay = site.addZero(ngModel.getDate(), 2);
|
|
802
760
|
$scope.model.selectedMonth = $scope.monthes.find((m) => m.id == ngModel.getMonth());
|
|
803
|
-
$scope.model.selectedYear =
|
|
804
|
-
$scope.model.selectedHour =
|
|
805
|
-
$scope.model.selectedMinute =
|
|
761
|
+
$scope.model.selectedYear = ngModel.getFullYear();
|
|
762
|
+
$scope.model.selectedHour = site.addZero(ngModel.getHours(), 2);
|
|
763
|
+
$scope.model.selectedMinute = site.addZero(ngModel.getMinutes(), 2);
|
|
764
|
+
|
|
765
|
+
$scope.ngModel1 = new Date(ngModel);
|
|
766
|
+
$scope.ngModel2 = new Date(0, 0, 0, ngModel.getHours(), ngModel.getMinutes());
|
|
806
767
|
$(element).attr('value', ngModel.getTime());
|
|
807
768
|
} else {
|
|
808
769
|
$scope.model = $scope.model || {};
|
|
@@ -820,8 +781,10 @@ app.directive('iDatetime', function () {
|
|
|
820
781
|
};
|
|
821
782
|
|
|
822
783
|
$scope.updateDate = function (date) {
|
|
823
|
-
|
|
824
|
-
|
|
784
|
+
let time = $('#time_' + $scope.id2).val();
|
|
785
|
+
|
|
786
|
+
if ($scope.ngModel1 && time) {
|
|
787
|
+
$scope.ngModel = new Date($scope.ngModel1.getFullYear(), $scope.ngModel1.getMonth(), $scope.ngModel1.getDate(), time.split(':')[0], time.split(':')[1], 0);
|
|
825
788
|
$scope.editOnly = false;
|
|
826
789
|
$(element).attr('value', $scope.ngModel.getTime());
|
|
827
790
|
if ($scope.ngChange) {
|
|
@@ -943,7 +906,6 @@ app.directive('iImage', [
|
|
|
943
906
|
ngChange: '&',
|
|
944
907
|
},
|
|
945
908
|
link: function ($scope, element, attrs, ctrl) {
|
|
946
|
-
$scope.folder = $scope.folder || 'default';
|
|
947
909
|
$scope.accept = $scope.accept ? $scope.accept : 'image/*';
|
|
948
910
|
$scope.viewOnly = $scope.view === undefined ? false : true;
|
|
949
911
|
|
|
@@ -1214,8 +1176,10 @@ app.directive('iUpload', [
|
|
|
1214
1176
|
$(progress).show();
|
|
1215
1177
|
progress.value = e.loaded;
|
|
1216
1178
|
progress.max = e.total;
|
|
1217
|
-
|
|
1218
|
-
|
|
1179
|
+
} else if (data) {
|
|
1180
|
+
if ($scope.onUploaded) {
|
|
1181
|
+
console.log(err, data, e);
|
|
1182
|
+
$scope.onUploaded({ $data: data });
|
|
1219
1183
|
}
|
|
1220
1184
|
}
|
|
1221
1185
|
}
|
|
@@ -60,12 +60,6 @@ app.service('isite', [
|
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
this.uploadImage = function (files, options, callback) {
|
|
63
|
-
options = Object.assign(
|
|
64
|
-
{
|
|
65
|
-
category: 'default',
|
|
66
|
-
},
|
|
67
|
-
options
|
|
68
|
-
);
|
|
69
63
|
callback = callback || function () {};
|
|
70
64
|
|
|
71
65
|
var fd = new FormData();
|
|
@@ -75,7 +69,7 @@ app.service('isite', [
|
|
|
75
69
|
withCredentials: !0,
|
|
76
70
|
headers: {
|
|
77
71
|
'Content-Type': undefined,
|
|
78
|
-
|
|
72
|
+
...options
|
|
79
73
|
},
|
|
80
74
|
uploadEventHandlers: {
|
|
81
75
|
progress: function (e) {
|
|
@@ -577,6 +577,9 @@
|
|
|
577
577
|
return site.to123(JSON.parse(obj));
|
|
578
578
|
};
|
|
579
579
|
site.show = site.showObject = function (obj) {
|
|
580
|
+
if (!obj) {
|
|
581
|
+
return {};
|
|
582
|
+
}
|
|
580
583
|
return JSON.parse(site.from123(obj));
|
|
581
584
|
};
|
|
582
585
|
|
|
@@ -702,7 +705,14 @@
|
|
|
702
705
|
en: 'Data Is Required',
|
|
703
706
|
ar: 'هذا البيان مطلوب',
|
|
704
707
|
});
|
|
705
|
-
} else if (el.nodeName === '
|
|
708
|
+
} else if (el.nodeName === 'I-DATE' && !el.getAttribute('value')) {
|
|
709
|
+
el.classList.add('is-invalid');
|
|
710
|
+
res.ok = !1;
|
|
711
|
+
res.messages.push({
|
|
712
|
+
en: 'Data Is Required',
|
|
713
|
+
ar: 'هذا البيان مطلوب',
|
|
714
|
+
});
|
|
715
|
+
} else if (el.nodeName === 'INPUT' || el.nodeName === 'SELECT' || el.nodeName === 'TEXTAREA' || el.nodeName === 'I-DATETIME' || el.nodeName === 'I-DATE') {
|
|
706
716
|
el.classList.add('is-valid');
|
|
707
717
|
}
|
|
708
718
|
} else if (vl.like('ml*')) {
|
package/index.js
CHANGED
|
@@ -17,6 +17,7 @@ module.exports = function init(options) {
|
|
|
17
17
|
____0.zlib = require('zlib');
|
|
18
18
|
____0.xlsx = ____0.XLSX = require('xlsx');
|
|
19
19
|
____0.pdf = ____0.PDF = require('pdf-lib');
|
|
20
|
+
____0.archiver = require('archiver');
|
|
20
21
|
____0.fontkit = ____0.FONTKIT = require('@pdf-lib/fontkit');
|
|
21
22
|
____0.querystring = require('querystring');
|
|
22
23
|
____0.formidable = require('formidable');
|
|
@@ -27,8 +28,10 @@ module.exports = function init(options) {
|
|
|
27
28
|
____0.md5 = ____0.hash = ____0.x0md50x = require('md5');
|
|
28
29
|
____0.nodemailer = require('nodemailer');
|
|
29
30
|
____0.child_process = require('child_process');
|
|
31
|
+
____0.webp = require('webp-converter');
|
|
30
32
|
|
|
31
33
|
____0.setting = {};
|
|
34
|
+
____0.collectionList = [];
|
|
32
35
|
____0.apps = [];
|
|
33
36
|
____0.appList = [];
|
|
34
37
|
____0.addApp = function (app) {
|
|
@@ -175,6 +178,8 @@ module.exports = function init(options) {
|
|
|
175
178
|
require('./lib/vars.js')(____0);
|
|
176
179
|
|
|
177
180
|
//DataBase Management Oprations
|
|
181
|
+
|
|
182
|
+
|
|
178
183
|
if (____0.options.mongodb.enabled) {
|
|
179
184
|
____0.mongodb = require('./lib/mongodb.js')(____0);
|
|
180
185
|
____0.connectCollection = function (option, db) {
|
|
@@ -209,6 +214,7 @@ module.exports = function init(options) {
|
|
|
209
214
|
require('./lib/browser.js')(____0);
|
|
210
215
|
require('./lib/helper.js')(____0);
|
|
211
216
|
require('./lib/pdf.js')(____0);
|
|
217
|
+
require('./lib/app.js')(____0);
|
|
212
218
|
|
|
213
219
|
//Master Pages
|
|
214
220
|
____0.masterPages = [];
|