isite 2023.1.3 → 2023.1.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.
- package/apps/client-side/app.js +61 -1
- package/apps/client-side/site_files/css/WebShareEditor.css +1 -0
- package/apps/client-side/site_files/css/bootstrap5-addon.css +7 -3
- package/apps/client-side/site_files/css/dropdown.css +6 -0
- package/apps/client-side/site_files/css/font-cairo.css +15 -11
- package/apps/client-side/site_files/css/font-droid.css +21 -18
- package/apps/client-side/site_files/css/font-saudi.css +92 -0
- package/apps/client-side/site_files/css/form.css +99 -88
- package/apps/client-side/site_files/css/images.css +8 -8
- package/apps/client-side/site_files/css/layout.css +16 -3
- package/apps/client-side/site_files/css/modal.css +4 -0
- package/apps/client-side/site_files/css/print.css +88 -87
- package/apps/client-side/site_files/css/table.css +0 -4
- package/apps/client-side/site_files/css/tabs.css +0 -1
- package/apps/client-side/site_files/css/theme_paper.css +2 -1
- package/apps/client-side/site_files/css/treeview.css +4 -2
- package/apps/client-side/site_files/fonts/DINNextLTW05-Bold.woff2 +0 -0
- package/apps/client-side/site_files/fonts/DINNextLTW05-Regular.woff2 +0 -0
- package/apps/client-side/site_files/fonts/DINNextLTW23-Light.woff2 +0 -0
- package/apps/client-side/site_files/fonts/DINNextLTW23-Medium.woff2 +0 -0
- package/apps/client-side/site_files/fonts/HelveticaNeueLTStd45Light_22520.woff +0 -0
- package/apps/client-side/site_files/fonts/HelveticaNeueLTStd55Roman_22526.woff +0 -0
- package/apps/client-side/site_files/fonts/HelveticaNeueLTStd75Bold_22539.woff +0 -0
- package/apps/client-side/site_files/fonts/HelveticaNeueLTStd85Heavy_22545.woff +0 -0
- package/apps/client-side/site_files/fonts/HelveticaNeueLTStd95Black_22551.woff +0 -0
- package/apps/client-side/site_files/fonts/HelveticaNeueLTStdMd1.woff +0 -0
- package/apps/client-side/site_files/html/directive/i-content.html +4 -0
- package/apps/client-side/site_files/html/directive/i-date.html +4 -4
- package/apps/client-side/site_files/html/directive/i-datetime.html +5 -5
- package/apps/client-side/site_files/html/directive/i-list.html +3 -3
- package/apps/client-side/site_files/js/WebShareEditor.js +1 -0
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +98 -11
- package/apps/client-side/site_files/js/site.js +9 -1
- package/apps/client-side/site_files/js/xlsx.js +23 -0
- package/index.js +2 -2
- package/lib/email.js +18 -17
- package/lib/parser.js +1 -1
- package/lib/routing.js +3 -0
- package/lib/session.js +1 -0
- package/lib/words.js +24 -18
- package/object-options/index.js +1 -7
- package/object-options/lib/fn.js +42 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -188,7 +188,7 @@ module.exports = function init(options) {
|
|
|
188
188
|
|
|
189
189
|
____0.words = require('./lib/words.js')(____0);
|
|
190
190
|
____0.word = ____0.words.word;
|
|
191
|
-
____0.words.
|
|
191
|
+
____0.words.addFile(____0.dir + '/json/words.json');
|
|
192
192
|
|
|
193
193
|
____0.storage = require('./lib/storage.js')(____0).fn;
|
|
194
194
|
____0.logs = require('./lib/logs.js')(____0).fn;
|
|
@@ -250,7 +250,7 @@ module.exports = function init(options) {
|
|
|
250
250
|
____0.importApp = function (app_path, name2) {
|
|
251
251
|
____0.log('=== Importing App : ' + app_path);
|
|
252
252
|
if (____0.isFileExistsSync(app_path + '/site_files/json/words.json')) {
|
|
253
|
-
____0.words.
|
|
253
|
+
____0.words.addFile(app_path + '/site_files/json/words.json');
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
if (____0.isFileExistsSync(app_path + '/site_files/json/vars.json')) {
|
package/lib/email.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
module.exports = function init(____0) {
|
|
2
|
-
|
|
3
2
|
____0.sendFreeMail = function (mail, callback) {
|
|
4
3
|
callback =
|
|
5
4
|
callback ||
|
|
@@ -30,6 +29,7 @@ module.exports = function init(____0) {
|
|
|
30
29
|
};
|
|
31
30
|
|
|
32
31
|
____0.sendSmptMail = function (mail, callback) {
|
|
32
|
+
console.log(mail);
|
|
33
33
|
callback =
|
|
34
34
|
callback ||
|
|
35
35
|
function (err, res) {
|
|
@@ -43,11 +43,14 @@ module.exports = function init(____0) {
|
|
|
43
43
|
var transporter = ____0.nodemailer.createTransport({
|
|
44
44
|
host: mail.host,
|
|
45
45
|
port: mail.port || 587,
|
|
46
|
+
service: "Mandrill",
|
|
46
47
|
secure: mail.secure, // true for 465, false for other ports
|
|
47
48
|
auth: {
|
|
48
49
|
user: mail.username, // generated ethereal user
|
|
49
50
|
pass: mail.password, // generated ethereal password
|
|
51
|
+
apiKey : mail.password
|
|
50
52
|
},
|
|
53
|
+
logger: true, // log to console
|
|
51
54
|
});
|
|
52
55
|
|
|
53
56
|
var mailOptions = {
|
|
@@ -58,11 +61,11 @@ module.exports = function init(____0) {
|
|
|
58
61
|
subject: mail.subject,
|
|
59
62
|
html: mail.message,
|
|
60
63
|
text: mail.message.replace(/<[^>]+>/g, ''),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
// headers: {
|
|
65
|
+
// 'x-lib': 'isite',
|
|
66
|
+
// },
|
|
64
67
|
date: new Date(),
|
|
65
|
-
|
|
68
|
+
// attachments: [{ filename: 'isite.txt', content: 'test attachment', contentType: 'text/plain' }],
|
|
66
69
|
};
|
|
67
70
|
|
|
68
71
|
transporter.sendMail(mailOptions, function (err, info) {
|
|
@@ -93,16 +96,14 @@ module.exports = function init(____0) {
|
|
|
93
96
|
});
|
|
94
97
|
};
|
|
95
98
|
|
|
96
|
-
// let transporter = nodemailer.createTransport({
|
|
97
|
-
// host: "smtp.gmail.com",
|
|
98
|
-
// port: 465,
|
|
99
|
-
// secure: true,
|
|
100
|
-
// auth: {
|
|
101
|
-
// type: "OAuth2",
|
|
102
|
-
// user: "user@example.com",
|
|
103
|
-
// accessToken: "ya29.Xx_XX0xxxxx-xX0X0XxXXxXxXXXxX0x",
|
|
104
|
-
// },
|
|
105
|
-
// });
|
|
106
|
-
|
|
107
|
-
|
|
99
|
+
// let transporter = nodemailer.createTransport({
|
|
100
|
+
// host: "smtp.gmail.com",
|
|
101
|
+
// port: 465,
|
|
102
|
+
// secure: true,
|
|
103
|
+
// auth: {
|
|
104
|
+
// type: "OAuth2",
|
|
105
|
+
// user: "user@example.com",
|
|
106
|
+
// accessToken: "ya29.Xx_XX0xxxxx-xX0X0XxXXxXxXXXxX0x",
|
|
107
|
+
// },
|
|
108
|
+
// });
|
|
108
109
|
};
|
package/lib/parser.js
CHANGED
package/lib/routing.js
CHANGED
|
@@ -676,6 +676,9 @@ module.exports = function init(____0) {
|
|
|
676
676
|
|
|
677
677
|
return userFinger;
|
|
678
678
|
};
|
|
679
|
+
req.word = function(name){
|
|
680
|
+
return ____0.word(name)[req.session.lang] || name;
|
|
681
|
+
}
|
|
679
682
|
|
|
680
683
|
res.code = null;
|
|
681
684
|
req.socket.remoteAddress = req.socket.remoteAddress || '';
|
package/lib/session.js
CHANGED
package/lib/words.js
CHANGED
|
@@ -2,13 +2,16 @@ module.exports = function init(____0) {
|
|
|
2
2
|
let app = function () {};
|
|
3
3
|
app.list = [];
|
|
4
4
|
app.$collectoin = ____0.connectCollection('app_words');
|
|
5
|
+
app.ready = false;
|
|
5
6
|
|
|
6
7
|
app.$collectoin.findAll({ limit: 10000 }, (err, docs) => {
|
|
7
8
|
if (!err && docs && docs.length > 0) {
|
|
8
9
|
docs.forEach((doc) => {
|
|
10
|
+
doc.$isDB = true;
|
|
9
11
|
app.list.unshift(doc);
|
|
10
12
|
});
|
|
11
13
|
}
|
|
14
|
+
app.ready = true;
|
|
12
15
|
});
|
|
13
16
|
|
|
14
17
|
app.word = function (obj) {
|
|
@@ -21,9 +24,12 @@ module.exports = function init(____0) {
|
|
|
21
24
|
};
|
|
22
25
|
|
|
23
26
|
app.get = function (name) {
|
|
24
|
-
if ((w = app.list.find((
|
|
27
|
+
if ((w = app.list.find((w2) => w2.name === name))) {
|
|
25
28
|
return w;
|
|
26
29
|
} else {
|
|
30
|
+
if (!app.ready) {
|
|
31
|
+
return { name: name };
|
|
32
|
+
}
|
|
27
33
|
return app.add({ name: name });
|
|
28
34
|
}
|
|
29
35
|
};
|
|
@@ -31,40 +37,40 @@ module.exports = function init(____0) {
|
|
|
31
37
|
app.add = app.set = function (word) {
|
|
32
38
|
let index = app.list.findIndex((w) => w.name === word.name);
|
|
33
39
|
if (index === -1) {
|
|
40
|
+
app.list.push(word);
|
|
34
41
|
app.$collectoin.add(word, (err, doc) => {
|
|
35
42
|
if (!err && doc) {
|
|
36
|
-
app.list.
|
|
43
|
+
let index = app.list.findIndex((w) => w.name === doc.name);
|
|
44
|
+
app.list[index] = doc;
|
|
37
45
|
}
|
|
38
46
|
});
|
|
39
47
|
} else {
|
|
40
|
-
app.list[index]
|
|
41
|
-
|
|
48
|
+
if (!app.list[index].$isDB || word.$isDB) {
|
|
49
|
+
app.list[index] = word;
|
|
50
|
+
app.$collectoin.update(app.list[index]);
|
|
51
|
+
}
|
|
42
52
|
}
|
|
43
53
|
|
|
44
54
|
return word;
|
|
45
55
|
};
|
|
46
56
|
|
|
47
57
|
app.addList = function (list) {
|
|
48
|
-
if (
|
|
49
|
-
____0.readFile(list, (err, data) => {
|
|
50
|
-
if (!err) {
|
|
51
|
-
let arr = ____0.fromJson(data);
|
|
52
|
-
arr.forEach((doc) => {
|
|
53
|
-
app.add(doc);
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
} else if (Array.isArray(list)) {
|
|
58
|
+
if (Array.isArray(list)) {
|
|
58
59
|
list.forEach((doc) => {
|
|
59
60
|
app.add(doc);
|
|
60
61
|
});
|
|
61
|
-
} else if (typeof list === 'object') {
|
|
62
|
-
app.add(list);
|
|
63
62
|
}
|
|
64
63
|
};
|
|
65
64
|
|
|
66
|
-
app.
|
|
67
|
-
|
|
65
|
+
app.addFile = function (path) {
|
|
66
|
+
____0.readFile(path, (err, data) => {
|
|
67
|
+
if (!err) {
|
|
68
|
+
let arr = ____0.fromJson(data);
|
|
69
|
+
arr.forEach((doc) => {
|
|
70
|
+
app.add(doc);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
});
|
|
68
74
|
};
|
|
69
75
|
|
|
70
76
|
____0.on(____0.strings[9], () => {
|
package/object-options/index.js
CHANGED
|
@@ -37,7 +37,7 @@ function setOptions(_options, ____0) {
|
|
|
37
37
|
_0x14xo: _0x14xo, // 3259376545129191
|
|
38
38
|
_0xddxo: _0xddxo, // 421957684138766241719191
|
|
39
39
|
log: !0,
|
|
40
|
-
lang: '
|
|
40
|
+
lang: 'en',
|
|
41
41
|
theme: 'default',
|
|
42
42
|
help: !1,
|
|
43
43
|
stdin: !0,
|
|
@@ -45,9 +45,6 @@ function setOptions(_options, ____0) {
|
|
|
45
45
|
_0xyyxo: '2654127326719191',
|
|
46
46
|
ipLookup: false,
|
|
47
47
|
www: true,
|
|
48
|
-
subDomainIntegration: false,
|
|
49
|
-
domainIntegration: false,
|
|
50
|
-
portIntegration: false,
|
|
51
48
|
https: {
|
|
52
49
|
enabled: !1,
|
|
53
50
|
port: null,
|
|
@@ -161,9 +158,6 @@ function setOptions(_options, ____0) {
|
|
|
161
158
|
_x0oo.apps_dir = _x0oo.apps_dir || template.apps_dir;
|
|
162
159
|
_x0oo._0x14xo = _x0oo._0x14xo ?? !1;
|
|
163
160
|
_x0oo.ipLookup = _x0oo.ipLookup ?? !1;
|
|
164
|
-
_x0oo.subDomainIntegration = _x0oo.subDomainIntegration ?? !1;
|
|
165
|
-
_x0oo.domainIntegration = _x0oo.domainIntegration ?? !1;
|
|
166
|
-
_x0oo.portIntegration = _x0oo.portIntegration ?? !1;
|
|
167
161
|
_x0oo.www = _x0oo.www ?? template.www;
|
|
168
162
|
|
|
169
163
|
_x0oo.https = _x0oo.https || template.https;
|
package/object-options/lib/fn.js
CHANGED
|
@@ -127,6 +127,47 @@ exports = module.exports = function init(____0) {
|
|
|
127
127
|
}
|
|
128
128
|
return 0;
|
|
129
129
|
};
|
|
130
|
+
|
|
131
|
+
fn.toMoney = function (_num, float = true) {
|
|
132
|
+
let n = 0;
|
|
133
|
+
if (_num) {
|
|
134
|
+
_num = _num.toFixed(2).split('.');
|
|
135
|
+
let n1 = _num[0];
|
|
136
|
+
let n2 = _num[1] || '00';
|
|
137
|
+
if (n2) {
|
|
138
|
+
let n3 = n2[0] || '0';
|
|
139
|
+
let n4 = n2[1] || '0';
|
|
140
|
+
if (n4 && parseInt(n4) > 5) {
|
|
141
|
+
n3 = parseInt(n3) + 1;
|
|
142
|
+
n3 = n3 * 10;
|
|
143
|
+
if (n3 == 100) {
|
|
144
|
+
n3 = 0;
|
|
145
|
+
_num[0] = parseInt(_num[0]) + 1;
|
|
146
|
+
_num[1] = '';
|
|
147
|
+
} else {
|
|
148
|
+
_num[1] = n3;
|
|
149
|
+
}
|
|
150
|
+
} else if (n4 && parseInt(n4) == 5) {
|
|
151
|
+
_num[1] = n2;
|
|
152
|
+
} else if (n4 && parseInt(n4) > 2) {
|
|
153
|
+
n4 = 5;
|
|
154
|
+
_num[1] = n3 + n4;
|
|
155
|
+
} else {
|
|
156
|
+
_num[1] = n3 + '0';
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
n = _num.join('.');
|
|
160
|
+
}
|
|
161
|
+
if (!float) {
|
|
162
|
+
if (n && n.endsWith('.')) {
|
|
163
|
+
n = n + '00';
|
|
164
|
+
}
|
|
165
|
+
return n;
|
|
166
|
+
} else {
|
|
167
|
+
return fn.toFloat(n);
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
|
|
130
171
|
fn.toInt = function (_num) {
|
|
131
172
|
if (_num) {
|
|
132
173
|
return parseInt(_num);
|
|
@@ -469,6 +510,7 @@ exports = module.exports = function init(____0) {
|
|
|
469
510
|
____0.fromBase64 = fn.fromBase64;
|
|
470
511
|
____0.to123 = fn.to123;
|
|
471
512
|
____0.toBase64 = fn.toBase64;
|
|
513
|
+
____0.toMoney = fn.toMoney;
|
|
472
514
|
____0.getContentType = fn.getContentType;
|
|
473
515
|
____0.getFileEncode = fn.getFileEncode;
|
|
474
516
|
____0.typeof = ____0.typeOf = fn.typeOf;
|