isite 2022.8.4 → 2022.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 (50) hide show
  1. package/README.md +7 -7
  2. package/apps/client-side/app.js +8 -3
  3. package/apps/client-side/site_files/css/bootstrap5-addon.css +55 -7
  4. package/apps/client-side/site_files/css/bootstrap5.css +1 -1
  5. package/apps/client-side/site_files/css/bootstrap5.css.map +1 -0
  6. package/apps/client-side/site_files/css/dropdown.css +3 -0
  7. package/apps/client-side/site_files/css/effect.css +136 -77
  8. package/apps/client-side/site_files/css/images.css +0 -3
  9. package/apps/client-side/site_files/css/layout.css +45 -51
  10. package/apps/client-side/site_files/css/modal.css +5 -6
  11. package/apps/client-side/site_files/css/normalize.css +146 -0
  12. package/apps/client-side/site_files/css/scrollbar.css +5 -5
  13. package/apps/client-side/site_files/css/table.css +3 -3
  14. package/apps/client-side/site_files/html/directive/i-button.html +5 -0
  15. package/apps/client-side/site_files/html/directive/i-checkbox.html +4 -0
  16. package/apps/client-side/site_files/html/directive/i-checklist.html +6 -0
  17. package/apps/client-side/site_files/html/directive/i-control.html +5 -0
  18. package/apps/client-side/site_files/html/directive/i-date.html +21 -16
  19. package/apps/client-side/site_files/html/directive/i-datetime.html +32 -0
  20. package/apps/client-side/site_files/html/{sub/i-file.content.html → directive/i-file.html} +3 -5
  21. package/apps/client-side/site_files/html/directive/i-image.html +7 -0
  22. package/apps/client-side/site_files/html/{sub/i-list2.content.html → directive/i-list.html} +2 -2
  23. package/apps/client-side/site_files/html/directive/i-radio.html +4 -0
  24. package/apps/client-side/site_files/html/directive/i-textarea.html +4 -0
  25. package/apps/client-side/site_files/html/directive/i-treenode.html +20 -0
  26. package/apps/client-side/site_files/html/directive/i-treeview.html +13 -0
  27. package/apps/client-side/site_files/html/directive/i-upload.html +5 -0
  28. package/apps/client-side/site_files/html/directive-core/i-date.html +64 -0
  29. package/apps/client-side/site_files/html/directive-core/i-list.html +22 -0
  30. package/apps/client-side/site_files/js/bootstrap-5-addon.js +1 -0
  31. package/apps/client-side/site_files/js/bootstrap-5-directive.js +171 -862
  32. package/apps/client-side/site_files/js/bootstrap.js.map +1 -0
  33. package/apps/client-side/site_files/js/directive.js +1865 -2044
  34. package/apps/client-side/site_files/js/directive.min.js +2 -2
  35. package/apps/client-side/site_files/js/site.js +26 -3
  36. package/apps/client-side/site_files/js/site.min.js +1 -1
  37. package/apps/security/site_files/html/login_modal.html +18 -26
  38. package/index.js +277 -278
  39. package/lib/email.js +108 -0
  40. package/lib/integrated.js +10 -26
  41. package/lib/parser.js +538 -514
  42. package/lib/routing.js +21 -15
  43. package/lib/security.js +1109 -1081
  44. package/lib/sessions.js +182 -247
  45. package/object-options/index.js +24 -4
  46. package/object-options/lib/fn.js +9 -3
  47. package/package.json +5 -3
  48. package/pull.bat +3 -0
  49. package/push.bat +2 -5
  50. package/apps/client-side/site_files/html/sub/i-list.content.html +0 -31
package/README.md CHANGED
@@ -88,8 +88,8 @@ site = isite({
88
88
  apps: !0,
89
89
  apps_dir: process.cwd() + '/apps',
90
90
  name: 'Your Site',
91
- dynamic: false, // (auto set )dynamic db & prot based on folder name [ smart-pos-3000 ]
92
- savingTime: 60,
91
+ dynamic: false, // (auto set )dynamic db & prot based on folder name [ smart-Your Site-3000 ]
92
+ savingTime: 60 // 60 minutes then save sessions and site data,
93
93
  log: !0,
94
94
  lang: 'ar',
95
95
  theme: 'default',
@@ -99,8 +99,8 @@ site = isite({
99
99
  enabled: false,
100
100
  port: null,
101
101
  ports: [],
102
- key: null,
103
- cert: null,
102
+ key: null // path or will use default,
103
+ cert: null // path or will use default,
104
104
  },
105
105
  mongodb: {
106
106
  enabled: !0,
@@ -124,7 +124,7 @@ site = isite({
124
124
  session: {
125
125
  timeout: 60 * 24 * 30,
126
126
  enabled: !0,
127
- storage: 'mongodb',
127
+ storage: 'file' || 'mongodb',
128
128
  db: null,
129
129
  collection: 'users_sessions',
130
130
  },
@@ -1043,8 +1043,8 @@ $scope.uploadFile = function (files) {
1043
1043
  site.onPOST('uploadFile', (req, res) => {
1044
1044
  var response = { done: !0 };
1045
1045
  var file = req.files.fileToUpload;
1046
- var newpath = site.dir + '/../../uploads/' + file.name;
1047
- site.mv(file.path, newpath, function (err) {
1046
+ var newpath = site.dir + '/../../uploads/' + file.originalFilename;
1047
+ site.mv(file.filepath, newpath, function (err) {
1048
1048
  if (err) {
1049
1049
  response.error = err;
1050
1050
  response.done = false;
@@ -43,6 +43,7 @@ module.exports = function (site) {
43
43
  __dirname + '/site_files/js/qrcode.js',
44
44
  __dirname + '/site_files/js/angular.js',
45
45
  __dirname + '/site_files/js/app.js',
46
+ __dirname + '/site_files/js/directive-core.js',
46
47
  __dirname + '/site_files/js/directive.js',
47
48
  __dirname + '/site_files/js/last.js',
48
49
  ],
@@ -62,6 +63,7 @@ module.exports = function (site) {
62
63
  __dirname + '/site_files/js/qrcode.min.js',
63
64
  __dirname + '/site_files/js/angular.min.js',
64
65
  __dirname + '/site_files/js/app.js',
66
+ __dirname + '/site_files/js/directive-core.js',
65
67
  __dirname + '/site_files/js/directive.min.js',
66
68
  __dirname + '/site_files/js/last.js',
67
69
  ],
@@ -120,6 +122,7 @@ module.exports = function (site) {
120
122
  public: true,
121
123
  compress: !0,
122
124
  path: [
125
+ __dirname + '/site_files/css/normalize.css',
123
126
  __dirname + '/site_files/css/theme.css',
124
127
  __dirname + '/site_files/css/layout.css',
125
128
  __dirname + '/site_files/css/scrollbar.css',
@@ -157,6 +160,7 @@ module.exports = function (site) {
157
160
  public: true,
158
161
  compress: !0,
159
162
  path: [
163
+ __dirname + '/site_files/css/normalize.css',
160
164
  __dirname + '/site_files/css/theme.css',
161
165
  __dirname + '/site_files/css/layout.css',
162
166
  __dirname + '/site_files/css/modal.css',
@@ -178,7 +182,6 @@ module.exports = function (site) {
178
182
  ],
179
183
  });
180
184
 
181
- site.createDir(site.dir + '/../../uploads');
182
185
 
183
186
  site.post({ name: '/x-api/upload/image', public: true }, (req, res) => {
184
187
  site.createDir(site.options.upload_dir + '/' + req.headers['folder'], () => {
@@ -189,13 +192,14 @@ module.exports = function (site) {
189
192
  };
190
193
  let file = req.files.fileToUpload;
191
194
  if (file) {
192
- let newName = 'image_' + (new Date().getTime().toString() + Math.random()).replaceAll('.', '_') + site.path.extname(file.originalFilename);
195
+ let newName = 'image_' + (new Date().getTime().toString() + Math.random().toString()).replaceAll('.', '_') + site.path.extname(file.originalFilename);
193
196
  let newpath = site.path.resolve(site.options.upload_dir + '/' + req.headers['folder'] + '/images/' + newName);
194
197
  site.mv(file.filepath, newpath, function (err) {
195
198
  if (err) {
196
199
  response.error = err;
197
200
  response.done = !1;
198
201
  } else {
202
+ response.image.name = file.originalFilename;
199
203
  response.image.path = newpath;
200
204
  response.image.url = '/x-api/image/' + req.headers['folder'] + '/' + newName;
201
205
  response.image.size = file.size;
@@ -230,13 +234,14 @@ module.exports = function (site) {
230
234
  res.json(response);
231
235
  return;
232
236
  }
233
- let newName = 'file_' + (new Date().getTime().toString() + Math.random()).replaceAll('.', '_') + site.path.extname(file.originalFilename);
237
+ let newName = 'file_' + (new Date().getTime().toString() + Math.random().toString()).replaceAll('.', '_') + site.path.extname(file.originalFilename);
234
238
  let newpath = site.path.resolve(site.options.upload_dir + '/' + req.headers['folder'] + '/files/' + newName);
235
239
  site.mv(file.filepath, newpath, function (err) {
236
240
  if (err) {
237
241
  response.error = err;
238
242
  response.done = !1;
239
243
  }
244
+ response.file.name = file.originalFilename;
240
245
  response.file.path = newpath;
241
246
  response.file.url = '/x-api/file/' + req.headers['folder'] + '/' + newName;
242
247
  response.file.size = file.size;
@@ -8,16 +8,34 @@
8
8
 
9
9
  /* Large devices (desktops, 992px and up) */
10
10
  @media (min-width: 992px) {
11
+ .navbar-nav .dropdown-menu.show {
12
+ display: table;
13
+ }
11
14
  }
12
15
 
13
16
  /* X-Large devices (large desktops, 1200px and up) */
14
17
  @media (min-width: 1200px) {
18
+ .navbar-nav .dropdown-menu.show {
19
+ display: table;
20
+ }
15
21
  }
16
22
 
17
23
  /* XX-Large devices (larger desktops, 1400px and up) */
18
24
  @media (min-width: 1400px) {
25
+ .navbar-nav .dropdown-menu.show {
26
+ display: table;
27
+ }
19
28
  }
20
29
 
30
+ :root {
31
+ --table-hover-background-color: #0dcaf09e;
32
+ }
33
+ body {
34
+ margin-bottom: 100px;
35
+ }
36
+ .container {
37
+ max-width: 90%;
38
+ }
21
39
  .ar .form-check .form-check-input {
22
40
  float: right;
23
41
  margin-right: -1.5em;
@@ -33,6 +51,7 @@ fieldset {
33
51
  margin: var(--fieldset-margin);
34
52
  background: var(--fieldset-background);
35
53
  border: var(--fieldset-border);
54
+ border-radius: 10px;
36
55
  }
37
56
 
38
57
  fieldset legend {
@@ -42,9 +61,19 @@ fieldset legend {
42
61
  font-weight: var(--legend-font-weight);
43
62
  background: var(--fieldset-background);
44
63
  border: var(--legend-border);
64
+ float: none;
65
+ width: auto;
66
+ padding: 5px;
67
+ }
68
+ legend::after {
69
+ content: ' : ';
70
+ }
71
+ .border {
72
+ border: 1px solid #ced4da !important;
73
+ border-radius: 0.375rem;
45
74
  }
46
75
  i-textarea {
47
- margin: 10px;
76
+ margin: 0px;
48
77
  }
49
78
  i-checkbox,
50
79
  i-radio {
@@ -60,7 +89,14 @@ i-button {
60
89
  i-button button {
61
90
  margin: 5px;
62
91
  }
92
+ i-button.default button {
93
+ margin: 3px;
94
+ padding: 3px;
95
+ width: 32px;
96
+ height: 32px;
97
+ }
63
98
  i-file {
99
+ display: block;
64
100
  padding: 10px !important;
65
101
  border: 1px dashed var(--theme-color);
66
102
  margin: 10px;
@@ -69,21 +105,28 @@ i-file {
69
105
  i-file button {
70
106
  max-width: 100px;
71
107
  }
72
- i-file .view button {
73
- width: 40px;
74
- height: 40px;
75
- }
108
+
76
109
  i-date .fa {
77
110
  font-size: 24px;
78
111
  vertical-align: middle;
79
112
  margin-top: 5px;
80
113
  }
114
+ i-date p,
115
+ i-datetime p {
116
+ margin-top: 10px !important;
117
+ }
118
+ i-datetime.is-invalid .row {
119
+ border: 1px solid #dc3545 !important;
120
+ border-radius: 10px !important;
121
+ }
81
122
  .modal-content {
82
- width: 75%;
123
+ width: 75vw;
124
+ height: 100vh;
83
125
  }
84
126
  .modal-body {
85
- padding: 10px;
127
+ padding: 1rem;
86
128
  display: block;
129
+ overflow: visible !important;
87
130
  }
88
131
  .modal-footer {
89
132
  display: block;
@@ -97,12 +140,17 @@ i-date .fa {
97
140
  background: #fff;
98
141
  position: relative;
99
142
  cursor: pointer;
143
+ font-weight: bold;
144
+ width: auto;
100
145
  }
101
146
 
102
147
  .v-tabs .nav-link.active {
103
148
  color: #45b649;
104
149
  background: #fff;
105
150
  }
151
+ .nav-link {
152
+ width: max-content;
153
+ }
106
154
 
107
155
  @media (min-width: 992px) {
108
156
  .v-tabs .nav-link::before {