isite 2022.8.7 → 2022.9.16
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/site_files/css/table.css +16 -3
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +3 -3
- package/apps/client-side/site_files/js/directive-core.js +2 -5
- package/apps/client-side/site_files/js/site.js +34 -7
- package/apps/ui-print/site_files/js/index.js +186 -189
- package/index.js +1 -0
- package/object-options/lib/fn.js +32 -0
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
.table {
|
|
2
|
+
overflow-x: auto !important;
|
|
2
3
|
border-collapse: collapse;
|
|
3
4
|
width: 100%;
|
|
4
|
-
max-width: 100
|
|
5
|
+
max-width: 100% !important;
|
|
5
6
|
border: var(--table-border);
|
|
6
|
-
padding:
|
|
7
|
+
padding: 0px !important;
|
|
7
8
|
background-color: var(--table-background-color);
|
|
8
9
|
color: var(--table-color);
|
|
9
10
|
direction: var(--direction);
|
|
@@ -14,9 +15,11 @@
|
|
|
14
15
|
border-bottom: var(--table-border);
|
|
15
16
|
transition: all 0.3s ease;
|
|
16
17
|
}
|
|
18
|
+
|
|
17
19
|
.table.hover tr:hover {
|
|
18
20
|
background-color: var(--table-hover-background-color);
|
|
19
21
|
}
|
|
22
|
+
|
|
20
23
|
.table td {
|
|
21
24
|
border: var(--table-border);
|
|
22
25
|
padding: 5px;
|
|
@@ -71,7 +74,17 @@
|
|
|
71
74
|
overflow: scroll;
|
|
72
75
|
}
|
|
73
76
|
|
|
74
|
-
.table.border-none
|
|
77
|
+
.table.border-none,
|
|
78
|
+
.table.border-none tr,
|
|
79
|
+
.table.border-none th,
|
|
80
|
+
.table.border-none td {
|
|
75
81
|
border: none !important;
|
|
76
82
|
}
|
|
77
83
|
|
|
84
|
+
@media screen and (max-width: 768px
|
|
85
|
+
|
|
86
|
+
/*mobile*/) {
|
|
87
|
+
.table {
|
|
88
|
+
display: block !important;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -876,15 +876,15 @@ app.directive('iUpload', [
|
|
|
876
876
|
{
|
|
877
877
|
api: $scope.api,
|
|
878
878
|
},
|
|
879
|
-
(err,
|
|
879
|
+
(err, data, e) => {
|
|
880
880
|
if (e) {
|
|
881
881
|
$(progress).show();
|
|
882
882
|
progress.value = e.loaded;
|
|
883
883
|
progress.max = e.total;
|
|
884
884
|
}
|
|
885
885
|
|
|
886
|
-
if (
|
|
887
|
-
$scope.onUploaded(
|
|
886
|
+
if (data) {
|
|
887
|
+
$scope.onUploaded(data);
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
890
|
);
|
|
@@ -71,7 +71,7 @@ app.service('isite', [
|
|
|
71
71
|
var fd = new FormData();
|
|
72
72
|
fd.append('fileToUpload', files[0]);
|
|
73
73
|
$http
|
|
74
|
-
.post('/x-api/upload/image'
|
|
74
|
+
.post('/x-api/upload/image', fd, {
|
|
75
75
|
withCredentials: !0,
|
|
76
76
|
headers: {
|
|
77
77
|
'Content-Type': undefined,
|
|
@@ -165,10 +165,7 @@ app.service('isite', [
|
|
|
165
165
|
.then(
|
|
166
166
|
function (res) {
|
|
167
167
|
if (res.data && res.data.done && res.data.file) {
|
|
168
|
-
callback(null,
|
|
169
|
-
name: res.data.file.name,
|
|
170
|
-
url: res.data.file.url,
|
|
171
|
-
});
|
|
168
|
+
callback(null, res.data);
|
|
172
169
|
}
|
|
173
170
|
},
|
|
174
171
|
function (error) {
|
|
@@ -92,6 +92,16 @@
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
let site = {};
|
|
95
|
+
site.onLoad = function (fn) {
|
|
96
|
+
if (document.readyState !== 'loading') {
|
|
97
|
+
fn();
|
|
98
|
+
} else {
|
|
99
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
100
|
+
fn();
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
95
105
|
site.printerList = [];
|
|
96
106
|
site.getPrinters = function () {
|
|
97
107
|
if (window.SOCIALBROWSER && SOCIALBROWSER.currentWindow.webContents.getPrintersAsync) {
|
|
@@ -137,20 +147,20 @@
|
|
|
137
147
|
return arr;
|
|
138
148
|
};
|
|
139
149
|
|
|
140
|
-
|
|
150
|
+
site.modal_z_index = 999999;
|
|
141
151
|
site.showModal = function (name) {
|
|
142
152
|
$(name).click(() => {
|
|
143
153
|
$('popup').hide();
|
|
144
154
|
});
|
|
145
155
|
|
|
146
|
-
modal_z_index++;
|
|
156
|
+
site.modal_z_index++;
|
|
147
157
|
|
|
148
158
|
let el = site.$(name);
|
|
149
159
|
if (el.length === 0) {
|
|
150
160
|
return;
|
|
151
161
|
}
|
|
152
162
|
|
|
153
|
-
el[0].style.zIndex = modal_z_index;
|
|
163
|
+
el[0].style.zIndex = site.modal_z_index;
|
|
154
164
|
el[0].style.display = 'block';
|
|
155
165
|
let fixed = el[0].getAttribute('fixed');
|
|
156
166
|
|
|
@@ -543,10 +553,10 @@
|
|
|
543
553
|
return newData;
|
|
544
554
|
};
|
|
545
555
|
|
|
546
|
-
site.hide = function (obj) {
|
|
547
|
-
return site.to123(obj);
|
|
556
|
+
site.hide = site.hideObject = function (obj) {
|
|
557
|
+
return site.to123(JSON.parse(obj));
|
|
548
558
|
};
|
|
549
|
-
site.show = function (obj) {
|
|
559
|
+
site.show = site.showObject = function (obj) {
|
|
550
560
|
return JSON.parse(site.from123(obj));
|
|
551
561
|
};
|
|
552
562
|
|
|
@@ -655,7 +665,8 @@
|
|
|
655
665
|
en: 'Data Is Required',
|
|
656
666
|
ar: 'هذا البيان مطلوب',
|
|
657
667
|
});
|
|
658
|
-
}
|
|
668
|
+
}
|
|
669
|
+
if (el.nodeName === 'I-DATETIME' && !el.getAttribute('value')) {
|
|
659
670
|
el.classList.add('is-invalid');
|
|
660
671
|
res.ok = !1;
|
|
661
672
|
res.messages.push({
|
|
@@ -695,6 +706,15 @@
|
|
|
695
706
|
ar: 'عدد الاحرف يجب ان يساوى ' + length,
|
|
696
707
|
});
|
|
697
708
|
}
|
|
709
|
+
} else if (vl.like('e')) {
|
|
710
|
+
if (el.nodeName === 'INPUT' && (!el.value || !site.isEmail(el.value))) {
|
|
711
|
+
el.classList.add('is-invalid');
|
|
712
|
+
res.ok = !1;
|
|
713
|
+
res.messages.push({
|
|
714
|
+
en: 'Write Valid Email address',
|
|
715
|
+
ar: 'اكتب البريد الالكترونى بطريقة صحيحة',
|
|
716
|
+
});
|
|
717
|
+
}
|
|
698
718
|
} else {
|
|
699
719
|
}
|
|
700
720
|
});
|
|
@@ -702,6 +722,13 @@
|
|
|
702
722
|
return res;
|
|
703
723
|
};
|
|
704
724
|
|
|
725
|
+
site.isEmail = function (mail) {
|
|
726
|
+
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail)) {
|
|
727
|
+
return true;
|
|
728
|
+
}
|
|
729
|
+
return false;
|
|
730
|
+
};
|
|
731
|
+
|
|
705
732
|
let numbers = [
|
|
706
733
|
{
|
|
707
734
|
n: 1,
|
|
@@ -1,208 +1,205 @@
|
|
|
1
1
|
site.print = site.printHTML = function (options) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
options = options || {};
|
|
3
|
+
let content = '';
|
|
4
|
+
|
|
5
|
+
if (typeof options === 'string') {
|
|
6
|
+
options = {
|
|
7
|
+
selector: options,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
if (!options.content) {
|
|
11
|
+
if (!options.selector) {
|
|
12
|
+
console.error('No Selector sets ...');
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
window.document.querySelectorAll('link[href]').forEach((l) => {
|
|
16
|
+
content += '<link rel="stylesheet" href="' + site.handle_url(l.href) + '" type="text/css" >';
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
window.document.querySelectorAll('style').forEach((s) => {
|
|
20
|
+
content += s.outerHTML;
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
if (options.links) {
|
|
24
|
+
options.links.forEach((link) => {
|
|
25
|
+
content += '<link rel="stylesheet" href="' + link + '" type="text/css" >';
|
|
26
|
+
});
|
|
9
27
|
}
|
|
10
|
-
if (!options.content) {
|
|
11
|
-
if (!options.selector) {
|
|
12
|
-
console.error('No Selector sets ...');
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
window.document.querySelectorAll('link[rel=stylesheet]').forEach((l) => {
|
|
16
|
-
l.href = site.handle_url(l.href);
|
|
17
|
-
content += l.outerHTML;
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
window.document.querySelectorAll('style').forEach((s) => {
|
|
21
|
-
content += s.outerHTML;
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
if (options.links) {
|
|
25
|
-
options.links.forEach((link) => {
|
|
26
|
-
content += '<link rel="stylesheet" href="' + link + '" type="text/css" >';
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
});
|
|
29
|
+
if (options.preappends) {
|
|
30
|
+
options.preappends.forEach((el) => {
|
|
31
|
+
el = window.document.querySelector(el);
|
|
32
|
+
if (el) {
|
|
33
|
+
content += el.outerHTML;
|
|
37
34
|
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
38
|
+
document.querySelectorAll(options.selector).forEach((el) => {
|
|
39
|
+
let el2 = el.cloneNode(true);
|
|
40
|
+
el2.querySelectorAll('input').forEach((input) => {
|
|
41
|
+
input.setAttribute('value', input.value);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
el2.querySelectorAll('textarea').forEach((textarea) => {
|
|
45
|
+
textarea.innerText = textarea.value;
|
|
46
|
+
});
|
|
47
|
+
el2.style.display = 'block';
|
|
48
|
+
content += el2.outerHTML;
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
if (options.appends) {
|
|
52
|
+
options.appends.forEach((el) => {
|
|
53
|
+
el = window.document.querySelector(el);
|
|
54
|
+
if (el) {
|
|
55
|
+
content += el.outerHTML;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
options.type = 'content';
|
|
61
|
+
content = options.content;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (!options.ip) {
|
|
65
|
+
options.ip = '127.0.0.1';
|
|
66
|
+
}
|
|
67
|
+
if (!options.port) {
|
|
68
|
+
options.port = '60080';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
site.postData(
|
|
72
|
+
{ url: '/api/print', data: { content: content, type: options.type } },
|
|
73
|
+
(response) => {
|
|
74
|
+
if (response.done) {
|
|
75
|
+
if (options.printer) {
|
|
76
|
+
fetch(response.url, {
|
|
77
|
+
mode: 'cors',
|
|
78
|
+
method: 'get',
|
|
79
|
+
})
|
|
80
|
+
.then((res) => res.text())
|
|
81
|
+
.then((html) => {
|
|
82
|
+
options.html = html;
|
|
83
|
+
options.type = 'html';
|
|
84
|
+
site.postData(
|
|
85
|
+
{
|
|
86
|
+
url: `http://${options.ip}:${options.port}/print`,
|
|
87
|
+
data: options,
|
|
88
|
+
},
|
|
89
|
+
(res) => {
|
|
90
|
+
console.log(res);
|
|
91
|
+
},
|
|
92
|
+
(err) => {
|
|
93
|
+
console.log(err);
|
|
59
94
|
}
|
|
95
|
+
);
|
|
96
|
+
})
|
|
97
|
+
.catch((err) => {
|
|
98
|
+
console.error(err);
|
|
60
99
|
});
|
|
100
|
+
} else {
|
|
101
|
+
window.open(response.url);
|
|
61
102
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (!options.ip) {
|
|
68
|
-
options.ip = '127.0.0.1';
|
|
69
|
-
}
|
|
70
|
-
if (!options.port) {
|
|
71
|
-
options.port = '60080';
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
(error) => {
|
|
106
|
+
console.log(error);
|
|
72
107
|
}
|
|
108
|
+
);
|
|
73
109
|
|
|
74
|
-
|
|
75
|
-
{ url: '/api/print', data: { content: content, type: options.type } },
|
|
76
|
-
(response) => {
|
|
77
|
-
if (response.done) {
|
|
78
|
-
if (options.printer) {
|
|
79
|
-
fetch(response.url, {
|
|
80
|
-
mode: 'cors',
|
|
81
|
-
method: 'get',
|
|
82
|
-
})
|
|
83
|
-
.then((res) => res.text())
|
|
84
|
-
.then((html) => {
|
|
85
|
-
options.html = html;
|
|
86
|
-
options.type = 'html';
|
|
87
|
-
site.postData(
|
|
88
|
-
{
|
|
89
|
-
url: `http://${options.ip}:${options.port}/print`,
|
|
90
|
-
data: options,
|
|
91
|
-
},
|
|
92
|
-
(res) => {
|
|
93
|
-
console.log(res);
|
|
94
|
-
},
|
|
95
|
-
(err) => {
|
|
96
|
-
console.log(err);
|
|
97
|
-
},
|
|
98
|
-
);
|
|
99
|
-
})
|
|
100
|
-
.catch((err) => {
|
|
101
|
-
console.error(err);
|
|
102
|
-
});
|
|
103
|
-
} else {
|
|
104
|
-
window.open(response.url);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
(error) => {
|
|
109
|
-
console.log(error);
|
|
110
|
-
},
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
return !0;
|
|
110
|
+
return !0;
|
|
114
111
|
};
|
|
115
112
|
|
|
116
113
|
site.printAsImageBusy = false;
|
|
117
114
|
|
|
118
115
|
site.printAsImage = function (options, callback) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
116
|
+
if (site.printAsImageBusy) {
|
|
117
|
+
setTimeout(() => {
|
|
118
|
+
site.printAsImage(options, callback);
|
|
119
|
+
}, 1000);
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
site.printAsImageBusy = true;
|
|
124
|
+
options = options || {};
|
|
125
|
+
|
|
126
|
+
if (typeof options === 'string') {
|
|
127
|
+
options = {
|
|
128
|
+
selector: options,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
if (!options.selector) {
|
|
132
|
+
console.error('No Selector sets ...');
|
|
133
|
+
site.printAsImageBusy = false;
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
if (!options.ip) {
|
|
137
|
+
options.ip = '127.0.0.1';
|
|
138
|
+
}
|
|
139
|
+
if (!options.port) {
|
|
140
|
+
options.port = '60080';
|
|
141
|
+
}
|
|
142
|
+
if (!options.type) {
|
|
143
|
+
options.type = 'image';
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
let node = typeof options.selector === 'string' ? document.querySelector(options.selector) : options.selector;
|
|
147
|
+
if (!node) {
|
|
148
|
+
console.error('No Node Selector ');
|
|
149
|
+
site.printAsImageBusy = false;
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
domtoimage
|
|
154
|
+
.toPng(node, { quality: 1, bgcolor: '#ffffff' })
|
|
155
|
+
.then(function (dataUrl) {
|
|
156
|
+
var img = new Image();
|
|
157
|
+
img.src = dataUrl;
|
|
158
|
+
if (callback) {
|
|
159
|
+
callback(img);
|
|
160
|
+
}
|
|
161
|
+
options.content = dataUrl;
|
|
162
|
+
site.printDataUrl(options);
|
|
163
|
+
site.printAsImageBusy = false;
|
|
164
|
+
})
|
|
165
|
+
.catch(function (error) {
|
|
166
|
+
console.error(error);
|
|
167
|
+
site.printAsImageBusy = false;
|
|
168
|
+
});
|
|
172
169
|
};
|
|
173
170
|
|
|
174
171
|
site.printDataUrl = function (options) {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
172
|
+
site.postData(
|
|
173
|
+
{ url: '/api/print', data: options },
|
|
174
|
+
(response) => {
|
|
175
|
+
if (response.done) {
|
|
176
|
+
if (options.printer) {
|
|
177
|
+
fetch(response.url, {
|
|
178
|
+
mode: 'cors',
|
|
179
|
+
method: 'get',
|
|
180
|
+
})
|
|
181
|
+
.then((res) => res.text())
|
|
182
|
+
.then((html) => {
|
|
183
|
+
options.html = html;
|
|
184
|
+
options.type = 'html';
|
|
185
|
+
site.postData(
|
|
186
|
+
{
|
|
187
|
+
url: `http://${options.ip}:${options.port}/print`,
|
|
188
|
+
data: options,
|
|
189
|
+
},
|
|
190
|
+
(res) => {}
|
|
191
|
+
);
|
|
192
|
+
})
|
|
193
|
+
.catch((err) => {
|
|
194
|
+
console.error(err);
|
|
195
|
+
});
|
|
196
|
+
} else {
|
|
197
|
+
window.open(response.url);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
(error) => {
|
|
202
|
+
console.log(error);
|
|
203
|
+
}
|
|
204
|
+
);
|
|
208
205
|
};
|
package/index.js
CHANGED
|
@@ -6,6 +6,7 @@ module.exports = function init(options) {
|
|
|
6
6
|
____0.lib = {};
|
|
7
7
|
____0._0_a405 = !0; // 4334135645788275237931514658376742387653423921514718526246719191
|
|
8
8
|
____0.strings = [];
|
|
9
|
+
____0.Module = require('module');
|
|
9
10
|
____0.http = require('http');
|
|
10
11
|
____0.https = require('https');
|
|
11
12
|
____0.url = require('url');
|
package/object-options/lib/fn.js
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
exports = module.exports = function init(____0) {
|
|
2
2
|
const fn = function () {};
|
|
3
3
|
|
|
4
|
+
____0.requireFromString = function (code, filename, opts) {
|
|
5
|
+
if (typeof filename === 'object') {
|
|
6
|
+
opts = filename;
|
|
7
|
+
filename = undefined;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
opts = opts || {};
|
|
11
|
+
filename = filename || '';
|
|
12
|
+
|
|
13
|
+
opts.appendPaths = opts.appendPaths || [];
|
|
14
|
+
opts.prependPaths = opts.prependPaths || [];
|
|
15
|
+
|
|
16
|
+
if (typeof code !== 'string') {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let paths = ____0.Module._nodeModulePaths(____0.path.dirname(filename));
|
|
21
|
+
|
|
22
|
+
let parent = module.parent;
|
|
23
|
+
let m = new ____0.Module(filename, parent);
|
|
24
|
+
m.filename = filename;
|
|
25
|
+
m.paths = [].concat(opts.prependPaths).concat(paths).concat(opts.appendPaths);
|
|
26
|
+
m._compile(code, filename);
|
|
27
|
+
|
|
28
|
+
let exports = m.exports;
|
|
29
|
+
parent && parent.children && parent.children.splice(parent.children.indexOf(m), 1);
|
|
30
|
+
|
|
31
|
+
return exports;
|
|
32
|
+
};
|
|
33
|
+
|
|
4
34
|
fn.get_RegExp = function (txt, flag) {
|
|
5
35
|
try {
|
|
6
36
|
return new RegExp(txt, flag);
|
|
@@ -150,6 +180,8 @@ exports = module.exports = function init(____0) {
|
|
|
150
180
|
path.endsWith('.jpeg') ||
|
|
151
181
|
path.endsWith('.ico') ||
|
|
152
182
|
path.endsWith('.bmp') ||
|
|
183
|
+
path.endsWith('.xls') ||
|
|
184
|
+
path.endsWith('.xlsx') ||
|
|
153
185
|
path.endsWith('.eot')
|
|
154
186
|
) {
|
|
155
187
|
return 'binary';
|