isite 2022.8.2 → 2022.8.5

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 (28) hide show
  1. package/apps/client-side/app.js +27 -17
  2. package/apps/client-side/site_files/css/bootstrap5-addon.css +76 -1
  3. package/apps/client-side/site_files/css/dropdown.css +22 -4
  4. package/apps/client-side/site_files/css/effect.css +283 -283
  5. package/apps/client-side/site_files/css/images.css +40 -35
  6. package/apps/client-side/site_files/css/table.css +3 -3
  7. package/apps/client-side/site_files/html/directive/i-date.html +19 -0
  8. package/apps/client-side/site_files/html/directive/i-file.html +19 -0
  9. package/apps/client-side/site_files/html/directive/i-image.html +7 -0
  10. package/apps/client-side/site_files/html/directive/i-list.html +20 -0
  11. package/apps/client-side/site_files/images/no.jpg +0 -0
  12. package/apps/client-side/site_files/js/bootstrap-5-directive.js +302 -966
  13. package/apps/client-side/site_files/js/directive-core.js +7 -8
  14. package/apps/client-side/site_files/js/directive.js +2 -2
  15. package/apps/client-side/site_files/js/site.js +18 -2
  16. package/index.js +280 -278
  17. package/isite_files/images/no.jpg +0 -0
  18. package/lib/cookie.js +3 -5
  19. package/lib/email.js +108 -0
  20. package/lib/integrated.js +10 -26
  21. package/lib/routing.js +2 -0
  22. package/lib/security.js +1109 -1081
  23. package/object-options/index.js +18 -0
  24. package/object-options/lib/fn.js +6 -3
  25. package/package.json +3 -2
  26. package/apps/client-side/site_files/html/sub/i-date2.content.html +0 -64
  27. package/apps/client-side/site_files/html/sub/i-list.content.html +0 -31
  28. package/apps/client-side/site_files/html/sub/i-list2.content.html +0 -22
@@ -71,10 +71,11 @@ app.service('isite', [
71
71
  var fd = new FormData();
72
72
  fd.append('fileToUpload', files[0]);
73
73
  $http
74
- .post('/api/upload/image/' + options.category, fd, {
74
+ .post('/x-api/upload/image' , fd, {
75
75
  withCredentials: !0,
76
76
  headers: {
77
77
  'Content-Type': undefined,
78
+ folder: options.folder,
78
79
  },
79
80
  uploadEventHandlers: {
80
81
  progress: function (e) {
@@ -86,7 +87,7 @@ app.service('isite', [
86
87
  .then(
87
88
  function (res) {
88
89
  if (res.data && res.data.done) {
89
- callback(null, res.data.image_url);
90
+ callback(null, res.data.image);
90
91
  }
91
92
  },
92
93
  function (error) {
@@ -98,7 +99,7 @@ app.service('isite', [
98
99
  this.uploadFile = function (files, options, callback) {
99
100
  options = Object.assign(
100
101
  {
101
- category: 'default',
102
+ folder: 'default',
102
103
  },
103
104
  options
104
105
  );
@@ -107,10 +108,11 @@ app.service('isite', [
107
108
  var fd = new FormData();
108
109
  fd.append('fileToUpload', files[0]);
109
110
  $http
110
- .post('/api/upload/file/' + options.category, fd, {
111
+ .post('/x-api/upload/file', fd, {
111
112
  withCredentials: !0,
112
113
  headers: {
113
114
  'Content-Type': undefined,
115
+ folder: options.folder,
114
116
  },
115
117
  uploadEventHandlers: {
116
118
  progress: function (e) {
@@ -122,10 +124,7 @@ app.service('isite', [
122
124
  .then(
123
125
  function (res) {
124
126
  if (res.data && res.data.done && res.data.file) {
125
- callback(null, {
126
- name: res.data.file.name,
127
- url: res.data.file.url,
128
- });
127
+ callback(null, res.data.file);
129
128
  }
130
129
  },
131
130
  function (error) {
@@ -339,7 +339,7 @@ app.directive('iDate2', function () {
339
339
  label: '@',
340
340
  ngModel: '=',
341
341
  },
342
- template: `/*##client-side/sub/i-date2.content.html*/`,
342
+ template: `/*##client-side/directive/i-date.html*/`,
343
343
  };
344
344
  });
345
345
 
@@ -1225,7 +1225,7 @@ app.directive('iList', [
1225
1225
  $scope.hide();
1226
1226
  };
1227
1227
  },
1228
- template: `/*##client-side/sub/i-list2.content.html*/`,
1228
+ template: `/*##client-side/directive/i-list.html*/`,
1229
1229
  };
1230
1230
  },
1231
1231
  ]);
@@ -110,7 +110,7 @@
110
110
 
111
111
  return site.printerList;
112
112
  };
113
-
113
+
114
114
  site.render = function (selector, data) {
115
115
  let template = document.querySelector(selector);
116
116
  if (template) {
@@ -543,6 +543,13 @@
543
543
  return newData;
544
544
  };
545
545
 
546
+ site.hide = function (obj) {
547
+ return site.to123(obj);
548
+ };
549
+ site.show = function (obj) {
550
+ return JSON.parse(site.from123(obj));
551
+ };
552
+
546
553
  site.typeOf = site.typeof = function type(elem) {
547
554
  return Object.prototype.toString.call(elem).slice(8, -1);
548
555
  };
@@ -609,6 +616,15 @@
609
616
  return '';
610
617
  };
611
618
 
619
+ site.resetValidated = function (s) {
620
+ s = s || 'body';
621
+ const arr = document.querySelectorAll(s + ' [v]');
622
+ arr.forEach((el) => {
623
+ el.classList.remove('is-invalid');
624
+ el.classList.remove('is-valid');
625
+ });
626
+ };
627
+
612
628
  site.validated = function (s) {
613
629
  const res = {
614
630
  ok: !0,
@@ -639,7 +655,7 @@
639
655
  en: 'Data Is Required',
640
656
  ar: 'هذا البيان مطلوب',
641
657
  });
642
- }else{
658
+ } else {
643
659
  el.classList.add('is-valid');
644
660
  }
645
661
  } else if (vl.like('ml*')) {