clickgo 3.16.26 → 3.16.28
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/README.md +1 -1
- package/dist/app/demo/app.js +4 -16
- package/dist/app/demo/config.json +4 -1
- package/dist/app/demo/form/control/arteditor/arteditor.js +7 -18
- package/dist/app/demo/form/control/button/button.js +2 -13
- package/dist/app/demo/form/control/check/check.js +3 -14
- package/dist/app/demo/form/control/content/content.js +3 -14
- package/dist/app/demo/form/control/daterange/daterange.js +1 -1
- package/dist/app/demo/form/control/delete/delete.js +3 -14
- package/dist/app/demo/form/control/dialog/dialog.js +2 -0
- package/dist/app/demo/form/control/dialog/dialog.xml +26 -12
- package/dist/app/demo/form/control/flow/flow.js +2 -13
- package/dist/app/demo/form/control/form/form.js +4 -15
- package/dist/app/demo/form/control/iconview/iconview.js +12 -29
- package/dist/app/demo/form/control/jodit/jodit.js +7 -18
- package/dist/app/demo/form/control/link/link.js +2 -13
- package/dist/app/demo/form/control/list/list.js +40 -52
- package/dist/app/demo/form/control/list/list.xml +20 -10
- package/dist/app/demo/form/control/map/map.js +17 -28
- package/dist/app/demo/form/control/menu/menu.js +6 -17
- package/dist/app/demo/form/control/mpegts/mpegts.js +1 -1
- package/dist/app/demo/form/control/nav/nav.js +6 -17
- package/dist/app/demo/form/control/novnc/novnc.js +75 -0
- package/dist/app/demo/form/control/novnc/novnc.xml +13 -0
- package/dist/app/demo/form/control/panel/panel.js +9 -20
- package/dist/app/demo/form/control/panel/test1.js +20 -41
- package/dist/app/demo/form/control/pdf/pdf.js +7 -20
- package/dist/app/demo/form/control/progress/progress.js +3 -12
- package/dist/app/demo/form/control/radio/radio.js +6 -17
- package/dist/app/demo/form/control/select/select.js +28 -41
- package/dist/app/demo/form/control/switch/switch.js +3 -14
- package/dist/app/demo/form/control/tab/tab.js +7 -18
- package/dist/app/demo/form/control/table/table.js +8 -23
- package/dist/app/demo/form/control/text/text.js +2 -13
- package/dist/app/demo/form/control/tuieditor/tuieditor.js +7 -18
- package/dist/app/demo/form/control/uploader/uploader.js +20 -31
- package/dist/app/demo/form/control/vflow/vflow.js +2 -13
- package/dist/app/demo/form/event/form/form.js +11 -22
- package/dist/app/demo/form/event/task/task.js +14 -29
- package/dist/app/demo/form/main.js +381 -387
- package/dist/app/demo/form/main.xml +3 -0
- package/dist/app/demo/form/method/acontrol/acontrol.js +2 -13
- package/dist/app/demo/form/method/aform/aform.js +41 -60
- package/dist/app/demo/form/method/aform/sd.js +3 -14
- package/dist/app/demo/form/method/core/core.js +25 -50
- package/dist/app/demo/form/method/dom/dom.js +35 -58
- package/dist/app/demo/form/method/form/form.js +106 -149
- package/dist/app/demo/form/method/fs/fs.js +126 -147
- package/dist/app/demo/form/method/native/native.js +44 -72
- package/dist/app/demo/form/method/storage/storage.js +9 -27
- package/dist/app/demo/form/method/system/system.js +16 -41
- package/dist/app/demo/form/method/task/task.js +18 -37
- package/dist/app/demo/form/method/theme/theme.js +39 -54
- package/dist/app/demo/form/method/tool/tool.js +22 -43
- package/dist/app/demo/form/method/tool/tool.xml +1 -1
- package/dist/app/demo/form/method/zip/zip.js +18 -29
- package/dist/app/demo/form/solution/backpanel/backpanel.js +10 -23
- package/dist/app/task/app.js +2 -13
- package/dist/app/task/form/bar/bar.js +32 -45
- package/dist/clickgo.js +1 -1
- package/dist/control/arteditor.cgc +0 -0
- package/dist/control/box.cgc +0 -0
- package/dist/control/captcha.cgc +0 -0
- package/dist/control/common.cgc +0 -0
- package/dist/control/desc.cgc +0 -0
- package/dist/control/drawer.cgc +0 -0
- package/dist/control/echarts.cgc +0 -0
- package/dist/control/form.cgc +0 -0
- package/dist/control/iconview.cgc +0 -0
- package/dist/control/jodit.cgc +0 -0
- package/dist/control/map.cgc +0 -0
- package/dist/control/monaco.cgc +0 -0
- package/dist/control/mpegts.cgc +0 -0
- package/dist/control/nav.cgc +0 -0
- package/dist/control/novnc.cgc +0 -0
- package/dist/control/page.cgc +0 -0
- package/dist/control/pdf.cgc +0 -0
- package/dist/control/property.cgc +0 -0
- package/dist/control/qrcode.cgc +0 -0
- package/dist/control/table.cgc +0 -0
- package/dist/control/task.cgc +0 -0
- package/dist/control/tplink.cgc +0 -0
- package/dist/control/tuieditor.cgc +0 -0
- package/dist/control/tuiviewer.cgc +0 -0
- package/dist/control/xterm.cgc +0 -0
- package/dist/index.js +59 -71
- package/dist/lib/control.js +213 -235
- package/dist/lib/core.js +356 -379
- package/dist/lib/dom.js +62 -91
- package/dist/lib/form.js +834 -906
- package/dist/lib/fs.js +834 -892
- package/dist/lib/native.js +32 -63
- package/dist/lib/storage.js +21 -33
- package/dist/lib/task.js +1054 -1098
- package/dist/lib/theme.js +102 -121
- package/dist/lib/tool.js +65 -98
- package/dist/lib/zip.js +27 -42
- package/dist/theme/blue.cgt +0 -0
- package/dist/theme/byterun.cgt +0 -0
- package/dist/theme/dark.cgt +0 -0
- package/dist/theme/light.cgt +0 -0
- package/package.json +1 -1
|
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
37
|
};
|
|
@@ -60,19 +51,17 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
60
51
|
select() {
|
|
61
52
|
this.refs.file.select();
|
|
62
53
|
}
|
|
63
|
-
change(files) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
this.open('/');
|
|
75
|
-
});
|
|
54
|
+
async change(files) {
|
|
55
|
+
if (!files) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const zip = await clickgo.zip.get(files[0]);
|
|
59
|
+
if (!zip) {
|
|
60
|
+
await clickgo.form.dialog('File failed to open.');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
this.access.zip = zip;
|
|
64
|
+
this.open('/');
|
|
76
65
|
}
|
|
77
66
|
open(path) {
|
|
78
67
|
if (!this.access.zip) {
|
|
@@ -92,7 +81,7 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
92
81
|
this.ppath = path;
|
|
93
82
|
}
|
|
94
83
|
dblclick(e) {
|
|
95
|
-
clickgo.dom.bindDblClick(e, () =>
|
|
84
|
+
clickgo.dom.bindDblClick(e, async () => {
|
|
96
85
|
if (!this.access.zip) {
|
|
97
86
|
return;
|
|
98
87
|
}
|
|
@@ -100,17 +89,17 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
100
89
|
if (r) {
|
|
101
90
|
const extlio = this.val[0].lastIndexOf('.');
|
|
102
91
|
if (extlio === -1) {
|
|
103
|
-
|
|
92
|
+
await clickgo.form.dialog('This extension is not supported.');
|
|
104
93
|
return;
|
|
105
94
|
}
|
|
106
95
|
const ext = this.val[0].toLowerCase().slice(extlio + 1);
|
|
107
96
|
if (['xml', 'js', 'ts', 'json', 'css', 'html', 'php', 'txt'].includes(ext)) {
|
|
108
|
-
const content =
|
|
97
|
+
const content = await this.access.zip.getContent(this.val[0]);
|
|
109
98
|
if (!content) {
|
|
110
|
-
|
|
99
|
+
await clickgo.form.dialog('This file cannot be opened.');
|
|
111
100
|
return;
|
|
112
101
|
}
|
|
113
|
-
const f =
|
|
102
|
+
const f = await clickgo.form.create(text_1.default);
|
|
114
103
|
f.show();
|
|
115
104
|
this.send(f.formId, {
|
|
116
105
|
'title': this.val[0].slice(this.val[0].lastIndexOf('/') + 1),
|
|
@@ -118,11 +107,11 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
118
107
|
});
|
|
119
108
|
return;
|
|
120
109
|
}
|
|
121
|
-
|
|
110
|
+
await clickgo.form.dialog('This extension is not supported.');
|
|
122
111
|
return;
|
|
123
112
|
}
|
|
124
113
|
this.open(this.val[0]);
|
|
125
|
-
})
|
|
114
|
+
});
|
|
126
115
|
}
|
|
127
116
|
up() {
|
|
128
117
|
if (this.ppath === '/') {
|
|
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
37
|
};
|
|
@@ -64,26 +55,22 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
64
55
|
}
|
|
65
56
|
this.fh = value;
|
|
66
57
|
}
|
|
67
|
-
onSelect(e) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
yield clickgo.form.dialog('Show form');
|
|
71
|
-
});
|
|
58
|
+
async onSelect(e) {
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
await clickgo.form.dialog('Show form');
|
|
72
61
|
}
|
|
73
62
|
onJumpdataSelect(e) {
|
|
74
63
|
e.preventDefault();
|
|
75
64
|
this.formHashData = { 'key': 'form hash data' };
|
|
76
65
|
this.formHash = 'test1';
|
|
77
66
|
}
|
|
78
|
-
onMounted(data) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
this.mountData = 'ok';
|
|
86
|
-
});
|
|
67
|
+
async onMounted(data) {
|
|
68
|
+
if (!data.hash) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
this.formHash = data.hash;
|
|
72
|
+
await clickgo.tool.sleep(500);
|
|
73
|
+
this.mountData = 'ok';
|
|
87
74
|
}
|
|
88
75
|
}
|
|
89
76
|
exports.default = default_1;
|
package/dist/app/task/app.js
CHANGED
|
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
37
|
};
|
|
@@ -48,10 +39,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
48
39
|
const clickgo = __importStar(require("clickgo"));
|
|
49
40
|
const bar_1 = __importDefault(require("./form/bar/bar"));
|
|
50
41
|
class default_1 extends clickgo.core.AbstractApp {
|
|
51
|
-
main() {
|
|
52
|
-
|
|
53
|
-
this.run(yield clickgo.form.create(bar_1.default));
|
|
54
|
-
});
|
|
42
|
+
async main() {
|
|
43
|
+
this.run(await clickgo.form.create(bar_1.default));
|
|
55
44
|
}
|
|
56
45
|
}
|
|
57
46
|
exports.default = default_1;
|
|
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
36
|
const clickgo = __importStar(require("clickgo"));
|
|
46
37
|
class default_1 extends clickgo.form.AbstractForm {
|
|
@@ -54,43 +45,39 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
54
45
|
showLauncher() {
|
|
55
46
|
clickgo.form.showLauncher();
|
|
56
47
|
}
|
|
57
|
-
itemClick(appIndex) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
yield clickgo.task.run(this.apps[appIndex].path);
|
|
62
|
-
}
|
|
63
|
-
catch (_a) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
48
|
+
async itemClick(appIndex) {
|
|
49
|
+
if (this.apps[appIndex].formCount === 0) {
|
|
50
|
+
try {
|
|
51
|
+
await clickgo.task.run(this.apps[appIndex].path);
|
|
66
52
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const formId = parseInt(formIds[0]);
|
|
70
|
-
const form = clickgo.form.get(formId);
|
|
71
|
-
if (!form) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
if (form.focus) {
|
|
75
|
-
clickgo.form.min(formId);
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
clickgo.form.changeFocus(formId);
|
|
79
|
-
}
|
|
53
|
+
catch {
|
|
54
|
+
return;
|
|
80
55
|
}
|
|
81
|
-
|
|
56
|
+
}
|
|
57
|
+
else if (this.apps[appIndex].formCount === 1) {
|
|
58
|
+
const formIds = Object.keys(this.apps[appIndex].forms);
|
|
59
|
+
const formId = parseInt(formIds[0]);
|
|
60
|
+
const form = clickgo.form.get(formId);
|
|
61
|
+
if (!form) {
|
|
62
|
+
return;
|
|
82
63
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
run(path) {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
-
try {
|
|
88
|
-
yield clickgo.task.run(path);
|
|
64
|
+
if (form.focus) {
|
|
65
|
+
clickgo.form.min(formId);
|
|
89
66
|
}
|
|
90
|
-
|
|
91
|
-
|
|
67
|
+
else {
|
|
68
|
+
clickgo.form.changeFocus(formId);
|
|
92
69
|
}
|
|
93
|
-
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async run(path) {
|
|
75
|
+
try {
|
|
76
|
+
await clickgo.task.run(path);
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
94
81
|
}
|
|
95
82
|
pin(index) {
|
|
96
83
|
const app = this.apps[index];
|
|
@@ -180,13 +167,13 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
180
167
|
if (!form.show) {
|
|
181
168
|
continue;
|
|
182
169
|
}
|
|
183
|
-
(app
|
|
170
|
+
(app ?? this.apps[appIndex]).forms[formId] = {
|
|
184
171
|
'title': form.title,
|
|
185
|
-
'icon': form.icon || (app
|
|
172
|
+
'icon': form.icon || (app ?? this.apps[appIndex]).icon
|
|
186
173
|
};
|
|
187
174
|
}
|
|
188
|
-
(app
|
|
189
|
-
if (app
|
|
175
|
+
(app ?? this.apps[appIndex]).formCount = Object.keys((app ?? this.apps[appIndex]).forms).length;
|
|
176
|
+
if (app?.formCount) {
|
|
190
177
|
this.apps.push(app);
|
|
191
178
|
}
|
|
192
179
|
}
|
package/dist/clickgo.js
CHANGED
|
Binary file
|
package/dist/control/box.cgc
CHANGED
|
Binary file
|
package/dist/control/captcha.cgc
CHANGED
|
Binary file
|
package/dist/control/common.cgc
CHANGED
|
Binary file
|
package/dist/control/desc.cgc
CHANGED
|
Binary file
|
package/dist/control/drawer.cgc
CHANGED
|
Binary file
|
package/dist/control/echarts.cgc
CHANGED
|
Binary file
|
package/dist/control/form.cgc
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/control/jodit.cgc
CHANGED
|
Binary file
|
package/dist/control/map.cgc
CHANGED
|
Binary file
|
package/dist/control/monaco.cgc
CHANGED
|
Binary file
|
package/dist/control/mpegts.cgc
CHANGED
|
Binary file
|
package/dist/control/nav.cgc
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/control/page.cgc
CHANGED
|
Binary file
|
package/dist/control/pdf.cgc
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/control/qrcode.cgc
CHANGED
|
Binary file
|
package/dist/control/table.cgc
CHANGED
|
Binary file
|
package/dist/control/task.cgc
CHANGED
|
Binary file
|
package/dist/control/tplink.cgc
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/control/xterm.cgc
CHANGED
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.AbstractBoot = exports.vue = exports.zip = exports.tool = exports.theme = exports.task = exports.storage = exports.native = exports.fs = exports.form = exports.dom = exports.core = exports.control = exports.clickgo = void 0;
|
|
13
4
|
exports.getVersion = getVersion;
|
|
@@ -117,70 +108,67 @@ class AbstractBoot {
|
|
|
117
108
|
}
|
|
118
109
|
exports.AbstractBoot = AbstractBoot;
|
|
119
110
|
function launcher(boot) {
|
|
120
|
-
(function () {
|
|
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
|
-
'loaded': (url, state) => {
|
|
151
|
-
boot.onRuntimeFileLoaded(url, state);
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
const cg = loader.require('clickgo', files, {
|
|
155
|
-
'dir': __dirname + '/',
|
|
156
|
-
'map': map
|
|
157
|
-
})[0];
|
|
158
|
-
try {
|
|
159
|
-
let style = yield (yield fetch(__dirname + '/global.css' + (__dirname.startsWith(loader.cdn) ? '' : '?' + Math.random().toString()))).text();
|
|
160
|
-
const reg = /url\(["']{0,1}(.+?)["']{0,1}\)/ig;
|
|
161
|
-
let match = null;
|
|
162
|
-
while ((match = reg.exec(style))) {
|
|
163
|
-
style = style.replace(match[0], `url('${__dirname}/${match[1]}')`);
|
|
164
|
-
}
|
|
165
|
-
(_a = document.getElementById('cg-global')) === null || _a === void 0 ? void 0 : _a.insertAdjacentHTML('afterbegin', style);
|
|
166
|
-
}
|
|
167
|
-
catch (_b) {
|
|
168
|
-
alert(`ClickGo: "${__dirname}/global.css'" failed.`);
|
|
111
|
+
(async function () {
|
|
112
|
+
const paths = [
|
|
113
|
+
`${loader.cdn}/npm/vue@3.5.13/dist/vue.global${boot.isDebug() ? '' : '.prod.min'}.js`
|
|
114
|
+
];
|
|
115
|
+
if (!(window.TouchEvent)) {
|
|
116
|
+
window.TouchEvent = CustomEvent;
|
|
117
|
+
}
|
|
118
|
+
let ro = true;
|
|
119
|
+
if (!(window.ResizeObserver)) {
|
|
120
|
+
ro = false;
|
|
121
|
+
paths.push(loader.cdn + '/npm/@juggle/resize-observer@3.4.0/lib/exports/resize-observer.umd.min.js');
|
|
122
|
+
}
|
|
123
|
+
await loader.loadScripts(paths);
|
|
124
|
+
if (!ro) {
|
|
125
|
+
window.ResizeObserverEntry = window.ResizeObserver.ResizeObserverEntry;
|
|
126
|
+
window.ResizeObserver = window.ResizeObserver.ResizeObserver;
|
|
127
|
+
}
|
|
128
|
+
const map = {
|
|
129
|
+
'jszip': loader.cdn + '/npm/jszip@3.10.1/dist/jszip.min'
|
|
130
|
+
};
|
|
131
|
+
const after = '?' + Math.random().toString();
|
|
132
|
+
const files = await loader.sniffFiles('clickgo.js', {
|
|
133
|
+
'dir': __dirname + '/',
|
|
134
|
+
'after': after,
|
|
135
|
+
'map': map,
|
|
136
|
+
'load': (url) => {
|
|
137
|
+
boot.onRuntimeFileLoad(url);
|
|
138
|
+
},
|
|
139
|
+
'loaded': (url, state) => {
|
|
140
|
+
boot.onRuntimeFileLoaded(url, state);
|
|
169
141
|
}
|
|
170
|
-
exports.clickgo = cg;
|
|
171
|
-
exports.control = cg.control;
|
|
172
|
-
exports.core = cg.core;
|
|
173
|
-
exports.dom = cg.dom;
|
|
174
|
-
exports.form = cg.form;
|
|
175
|
-
exports.fs = cg.fs;
|
|
176
|
-
exports.native = cg.native;
|
|
177
|
-
exports.task = cg.task;
|
|
178
|
-
exports.theme = cg.theme;
|
|
179
|
-
exports.tool = cg.tool;
|
|
180
|
-
exports.zip = cg.zip;
|
|
181
|
-
exports.core.boot = boot;
|
|
182
|
-
yield boot.main();
|
|
183
142
|
});
|
|
143
|
+
const cg = loader.require('clickgo', files, {
|
|
144
|
+
'dir': __dirname + '/',
|
|
145
|
+
'map': map
|
|
146
|
+
})[0];
|
|
147
|
+
try {
|
|
148
|
+
let style = await (await fetch(__dirname + '/global.css' + (__dirname.startsWith(loader.cdn) ? '' : '?' + Math.random().toString()))).text();
|
|
149
|
+
const reg = /url\(["']{0,1}(.+?)["']{0,1}\)/ig;
|
|
150
|
+
let match = null;
|
|
151
|
+
while ((match = reg.exec(style))) {
|
|
152
|
+
style = style.replace(match[0], `url('${__dirname}/${match[1]}')`);
|
|
153
|
+
}
|
|
154
|
+
document.getElementById('cg-global')?.insertAdjacentHTML('afterbegin', style);
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
alert(`ClickGo: "${__dirname}/global.css'" failed.`);
|
|
158
|
+
}
|
|
159
|
+
exports.clickgo = cg;
|
|
160
|
+
exports.control = cg.control;
|
|
161
|
+
exports.core = cg.core;
|
|
162
|
+
exports.dom = cg.dom;
|
|
163
|
+
exports.form = cg.form;
|
|
164
|
+
exports.fs = cg.fs;
|
|
165
|
+
exports.native = cg.native;
|
|
166
|
+
exports.task = cg.task;
|
|
167
|
+
exports.theme = cg.theme;
|
|
168
|
+
exports.tool = cg.tool;
|
|
169
|
+
exports.zip = cg.zip;
|
|
170
|
+
exports.core.boot = boot;
|
|
171
|
+
await boot.main();
|
|
184
172
|
})().catch(function (e) {
|
|
185
173
|
console.log('launcher', e);
|
|
186
174
|
});
|