clickgo 3.16.27 → 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 +38 -57
- 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 +25 -38
- 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/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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
36
|
const clickgo = __importStar(require("clickgo"));
|
|
46
37
|
class default_1 extends clickgo.form.AbstractForm {
|
|
@@ -49,80 +40,61 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
49
40
|
this.val = 'test';
|
|
50
41
|
this.activating = false;
|
|
51
42
|
}
|
|
52
|
-
getListenerList() {
|
|
53
|
-
|
|
54
|
-
yield clickgo.form.dialog(JSON.stringify(clickgo.native.getListenerList()));
|
|
55
|
-
});
|
|
43
|
+
async getListenerList() {
|
|
44
|
+
await clickgo.form.dialog(JSON.stringify(clickgo.native.getListenerList()));
|
|
56
45
|
}
|
|
57
|
-
max() {
|
|
58
|
-
|
|
59
|
-
yield clickgo.native.max();
|
|
60
|
-
});
|
|
46
|
+
async max() {
|
|
47
|
+
await clickgo.native.max();
|
|
61
48
|
}
|
|
62
|
-
min() {
|
|
63
|
-
|
|
64
|
-
yield clickgo.native.min();
|
|
65
|
-
});
|
|
49
|
+
async min() {
|
|
50
|
+
await clickgo.native.min();
|
|
66
51
|
}
|
|
67
|
-
activate() {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this.activating = false;
|
|
76
|
-
});
|
|
52
|
+
async activate() {
|
|
53
|
+
if (this.activating) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this.activating = true;
|
|
57
|
+
await clickgo.tool.sleep(2_000);
|
|
58
|
+
await clickgo.native.activate();
|
|
59
|
+
this.activating = false;
|
|
77
60
|
}
|
|
78
|
-
ping() {
|
|
79
|
-
|
|
80
|
-
var _a;
|
|
81
|
-
yield clickgo.form.dialog((_a = yield clickgo.native.ping(this.val)) !== null && _a !== void 0 ? _a : 'undefined');
|
|
82
|
-
});
|
|
61
|
+
async ping() {
|
|
62
|
+
await clickgo.form.dialog(await clickgo.native.ping(this.val) ?? 'undefined');
|
|
83
63
|
}
|
|
84
|
-
isMax() {
|
|
85
|
-
|
|
86
|
-
yield clickgo.form.dialog((yield clickgo.native.isMax()) ? 'true' : 'false');
|
|
87
|
-
});
|
|
64
|
+
async isMax() {
|
|
65
|
+
await clickgo.form.dialog(await clickgo.native.isMax() ? 'true' : 'false');
|
|
88
66
|
}
|
|
89
|
-
open() {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
],
|
|
98
|
-
});
|
|
99
|
-
yield clickgo.form.dialog(JSON.stringify(rtn));
|
|
67
|
+
async open() {
|
|
68
|
+
const rtn = await clickgo.native.open({
|
|
69
|
+
'filters': [
|
|
70
|
+
{
|
|
71
|
+
'name': 'Image',
|
|
72
|
+
'accept': ['jpg', 'png'],
|
|
73
|
+
},
|
|
74
|
+
],
|
|
100
75
|
});
|
|
76
|
+
await clickgo.form.dialog(JSON.stringify(rtn));
|
|
101
77
|
}
|
|
102
|
-
save() {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
],
|
|
111
|
-
});
|
|
112
|
-
yield clickgo.form.dialog(JSON.stringify(rtn));
|
|
78
|
+
async save() {
|
|
79
|
+
const rtn = await clickgo.native.save({
|
|
80
|
+
'filters': [
|
|
81
|
+
{
|
|
82
|
+
'name': 'Image',
|
|
83
|
+
'accept': ['jpg', 'png'],
|
|
84
|
+
},
|
|
85
|
+
],
|
|
113
86
|
});
|
|
87
|
+
await clickgo.form.dialog(JSON.stringify(rtn));
|
|
114
88
|
}
|
|
115
|
-
dialog(opts) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
'buttons': opts.buttons,
|
|
123
|
-
});
|
|
124
|
-
yield clickgo.form.dialog(JSON.stringify(rtn));
|
|
89
|
+
async dialog(opts) {
|
|
90
|
+
const rtn = await clickgo.native.dialog({
|
|
91
|
+
'title': opts.title,
|
|
92
|
+
'message': opts.message,
|
|
93
|
+
'type': opts.type,
|
|
94
|
+
'detail': opts.detail,
|
|
95
|
+
'buttons': opts.buttons,
|
|
125
96
|
});
|
|
97
|
+
await clickgo.form.dialog(JSON.stringify(rtn));
|
|
126
98
|
}
|
|
127
99
|
}
|
|
128
100
|
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 {
|
|
@@ -51,22 +42,15 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
51
42
|
this.list = [];
|
|
52
43
|
this.ppath = '';
|
|
53
44
|
}
|
|
54
|
-
get() {
|
|
55
|
-
|
|
56
|
-
var _a;
|
|
57
|
-
yield clickgo.form.dialog((_a = clickgo.storage.get(this.key)) !== null && _a !== void 0 ? _a : 'null');
|
|
58
|
-
});
|
|
45
|
+
async get() {
|
|
46
|
+
await clickgo.form.dialog(clickgo.storage.get(this.key) ?? 'null');
|
|
59
47
|
}
|
|
60
|
-
set() {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
yield clickgo.form.dialog('done');
|
|
64
|
-
});
|
|
48
|
+
async set() {
|
|
49
|
+
clickgo.storage.set(this.key, this.val);
|
|
50
|
+
await clickgo.form.dialog('done');
|
|
65
51
|
}
|
|
66
|
-
remove() {
|
|
67
|
-
|
|
68
|
-
yield clickgo.form.dialog(clickgo.storage.remove(this.key) ? 'true' : 'false');
|
|
69
|
-
});
|
|
52
|
+
async remove() {
|
|
53
|
+
await clickgo.form.dialog(clickgo.storage.remove(this.key) ? 'true' : 'false');
|
|
70
54
|
}
|
|
71
55
|
getlist() {
|
|
72
56
|
this.list.length = 0;
|
|
@@ -86,10 +70,8 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
86
70
|
this.list.push(key + ': ' + obj[key].toString() + ' Bytes');
|
|
87
71
|
}
|
|
88
72
|
}
|
|
89
|
-
clear() {
|
|
90
|
-
|
|
91
|
-
yield clickgo.form.dialog('Removed ' + (yield clickgo.storage.clear(this.ppath)).toString() + ' items.');
|
|
92
|
-
});
|
|
73
|
+
async clear() {
|
|
74
|
+
await clickgo.form.dialog('Removed ' + (await clickgo.storage.clear(this.ppath)).toString() + ' items.');
|
|
93
75
|
}
|
|
94
76
|
}
|
|
95
77
|
exports.default = default_1;
|
|
@@ -32,57 +32,32 @@ 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 {
|
|
47
|
-
getVersion() {
|
|
48
|
-
|
|
49
|
-
yield clickgo.form.dialog('Version: ' + clickgo.getVersion());
|
|
50
|
-
});
|
|
38
|
+
async getVersion() {
|
|
39
|
+
await clickgo.form.dialog('Version: ' + clickgo.getVersion());
|
|
51
40
|
}
|
|
52
|
-
isNative() {
|
|
53
|
-
|
|
54
|
-
yield clickgo.form.dialog('Native: ' + (clickgo.isNative() ? 'true' : 'false'));
|
|
55
|
-
});
|
|
41
|
+
async isNative() {
|
|
42
|
+
await clickgo.form.dialog('Native: ' + (clickgo.isNative() ? 'true' : 'false'));
|
|
56
43
|
}
|
|
57
|
-
getPlatform() {
|
|
58
|
-
|
|
59
|
-
yield clickgo.form.dialog('Platform: ' + clickgo.getPlatform());
|
|
60
|
-
});
|
|
44
|
+
async getPlatform() {
|
|
45
|
+
await clickgo.form.dialog('Platform: ' + clickgo.getPlatform());
|
|
61
46
|
}
|
|
62
|
-
getDevice() {
|
|
63
|
-
|
|
64
|
-
yield clickgo.form.dialog('Device: ' + JSON.stringify(clickgo.getDevice()));
|
|
65
|
-
});
|
|
47
|
+
async getDevice() {
|
|
48
|
+
await clickgo.form.dialog('Device: ' + JSON.stringify(clickgo.getDevice()));
|
|
66
49
|
}
|
|
67
|
-
isImmersion() {
|
|
68
|
-
|
|
69
|
-
yield clickgo.form.dialog('Immersion: ' + (clickgo.isImmersion() ? 'true' : 'false'));
|
|
70
|
-
});
|
|
50
|
+
async isImmersion() {
|
|
51
|
+
await clickgo.form.dialog('Immersion: ' + (clickgo.isImmersion() ? 'true' : 'false'));
|
|
71
52
|
}
|
|
72
|
-
hasFrame() {
|
|
73
|
-
|
|
74
|
-
yield clickgo.form.dialog('hasFrame: ' + (clickgo.hasFrame() ? 'true' : 'false'));
|
|
75
|
-
});
|
|
53
|
+
async hasFrame() {
|
|
54
|
+
await clickgo.form.dialog('hasFrame: ' + (clickgo.hasFrame() ? 'true' : 'false'));
|
|
76
55
|
}
|
|
77
|
-
ls() {
|
|
78
|
-
|
|
79
|
-
yield clickgo.form.dialog('typeof localStorage: ' + typeof localStorage);
|
|
80
|
-
});
|
|
56
|
+
async ls() {
|
|
57
|
+
await clickgo.form.dialog('typeof localStorage: ' + typeof localStorage);
|
|
81
58
|
}
|
|
82
|
-
map() {
|
|
83
|
-
|
|
84
|
-
yield clickgo.form.dialog('typeof Map: ' + typeof Map);
|
|
85
|
-
});
|
|
59
|
+
async map() {
|
|
60
|
+
await clickgo.form.dialog('typeof Map: ' + typeof Map);
|
|
86
61
|
}
|
|
87
62
|
}
|
|
88
63
|
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 {
|
|
@@ -132,34 +123,24 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
132
123
|
msg = msg.replace(/(data:image\/).+?"/g, '$1..."');
|
|
133
124
|
clickgo.form.dialog(msg).catch((e) => { throw e; });
|
|
134
125
|
}
|
|
135
|
-
run() {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
-
const r = yield clickgo.task.loadLocale(lang, '/package' + clickgo.tool.urlResolve(this.filename, path));
|
|
155
|
-
yield clickgo.form.dialog('Result: ' + (r ? 'true' : 'false'));
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
setLocale(lang, path) {
|
|
159
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
-
const r = yield clickgo.task.setLocale(lang, '/package' + clickgo.tool.urlResolve(this.filename, path));
|
|
161
|
-
yield clickgo.form.dialog('Result: ' + (r ? 'true' : 'false'));
|
|
162
|
-
});
|
|
126
|
+
async run() {
|
|
127
|
+
const tid = await clickgo.task.run('/clickgo/app/demo/');
|
|
128
|
+
await clickgo.form.dialog('Task ID: ' + tid.toString());
|
|
129
|
+
}
|
|
130
|
+
async checkPermission(val) {
|
|
131
|
+
const rtn = await clickgo.task.checkPermission(val, true);
|
|
132
|
+
await clickgo.form.dialog(rtn[0] ? 'Succeed' : 'Failed');
|
|
133
|
+
}
|
|
134
|
+
async end() {
|
|
135
|
+
await clickgo.form.dialog('Result: ' + (clickgo.task.end(parseInt(this.tid)) ? 'true' : 'false'));
|
|
136
|
+
}
|
|
137
|
+
async loadLocale(lang, path) {
|
|
138
|
+
const r = await clickgo.task.loadLocale(lang, '/package' + clickgo.tool.urlResolve(this.filename, path));
|
|
139
|
+
await clickgo.form.dialog('Result: ' + (r ? 'true' : 'false'));
|
|
140
|
+
}
|
|
141
|
+
async setLocale(lang, path) {
|
|
142
|
+
const r = await clickgo.task.setLocale(lang, '/package' + clickgo.tool.urlResolve(this.filename, path));
|
|
143
|
+
await clickgo.form.dialog('Result: ' + (r ? 'true' : 'false'));
|
|
163
144
|
}
|
|
164
145
|
clearLocale() {
|
|
165
146
|
clickgo.task.clearLocale();
|
|
@@ -32,50 +32,37 @@ 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 {
|
|
47
|
-
get(name) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return t;
|
|
61
|
-
});
|
|
38
|
+
async get(name) {
|
|
39
|
+
const f = await clickgo.fs.getContent('/clickgo/theme/' + name + '.cgt');
|
|
40
|
+
if (!f) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
if (typeof f === 'string') {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
const t = await clickgo.theme.read(f);
|
|
47
|
+
if (!t) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return t;
|
|
62
51
|
}
|
|
63
|
-
load() {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
'type': 'info'
|
|
69
|
-
});
|
|
70
|
-
const t = yield this.get('blue');
|
|
71
|
-
if (!t) {
|
|
72
|
-
clickgo.form.hideNotify(n);
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
clickgo.form.hideNotify(n);
|
|
76
|
-
const r = yield clickgo.theme.load(t);
|
|
77
|
-
yield clickgo.form.dialog('Result: ' + (r ? 'true' : 'false'));
|
|
52
|
+
async load() {
|
|
53
|
+
const n = clickgo.form.notify({
|
|
54
|
+
'title': 'Info',
|
|
55
|
+
'content': 'Theme loading...',
|
|
56
|
+
'type': 'info'
|
|
78
57
|
});
|
|
58
|
+
const t = await this.get('blue');
|
|
59
|
+
if (!t) {
|
|
60
|
+
clickgo.form.hideNotify(n);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
clickgo.form.hideNotify(n);
|
|
64
|
+
const r = await clickgo.theme.load(t);
|
|
65
|
+
await clickgo.form.dialog('Result: ' + (r ? 'true' : 'false'));
|
|
79
66
|
}
|
|
80
67
|
remove() {
|
|
81
68
|
clickgo.theme.remove('blue').catch((e) => { throw e; });
|
|
@@ -83,22 +70,20 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
83
70
|
clear() {
|
|
84
71
|
clickgo.theme.clear().catch((e) => { throw e; });
|
|
85
72
|
}
|
|
86
|
-
setGlobal(name) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
'type': 'info'
|
|
92
|
-
});
|
|
93
|
-
const t = yield this.get(name);
|
|
94
|
-
if (!t) {
|
|
95
|
-
clickgo.form.hideNotify(n);
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
clickgo.form.hideNotify(n);
|
|
99
|
-
yield clickgo.theme.setGlobal(t);
|
|
100
|
-
yield clickgo.form.dialog('Done.');
|
|
73
|
+
async setGlobal(name) {
|
|
74
|
+
const n = clickgo.form.notify({
|
|
75
|
+
'title': 'Info',
|
|
76
|
+
'content': 'Theme loading...',
|
|
77
|
+
'type': 'info'
|
|
101
78
|
});
|
|
79
|
+
const t = await this.get(name);
|
|
80
|
+
if (!t) {
|
|
81
|
+
clickgo.form.hideNotify(n);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
clickgo.form.hideNotify(n);
|
|
85
|
+
await clickgo.theme.setGlobal(t);
|
|
86
|
+
await clickgo.form.dialog('Done.');
|
|
102
87
|
}
|
|
103
88
|
clearGlobal() {
|
|
104
89
|
clickgo.theme.clearGlobal();
|
|
@@ -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 {
|
|
@@ -80,15 +71,13 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
80
71
|
this.weight = '8761';
|
|
81
72
|
this.qs = 'a=1&b=2&c=3';
|
|
82
73
|
}
|
|
83
|
-
sleep() {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
this.sleeping = false;
|
|
91
|
-
});
|
|
74
|
+
async sleep() {
|
|
75
|
+
if (this.sleeping) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
this.sleeping = true;
|
|
79
|
+
await clickgo.tool.sleep(1000);
|
|
80
|
+
this.sleeping = false;
|
|
92
81
|
}
|
|
93
82
|
purify() {
|
|
94
83
|
this.purifyTxt = clickgo.tool.purify(this.purifyTxt);
|
|
@@ -96,15 +85,13 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
96
85
|
rand() {
|
|
97
86
|
clickgo.form.dialog(clickgo.tool.rand(parseInt(this.min), parseInt(this.max)).toString()).catch((e) => { throw e; });
|
|
98
87
|
}
|
|
99
|
-
random() {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
'
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
});
|
|
88
|
+
async random() {
|
|
89
|
+
await clickgo.form.dialog({
|
|
90
|
+
'direction': 'v',
|
|
91
|
+
'content': '<text modelValue="' + clickgo.tool.random(parseInt(this.length), clickgo.tool.RANDOM_LUN, this.block) + '" readonly />',
|
|
92
|
+
'data': {
|
|
93
|
+
'txt': 'Text\nLine 2.'
|
|
94
|
+
}
|
|
108
95
|
});
|
|
109
96
|
}
|
|
110
97
|
escapeHTML() {
|
|
@@ -119,25 +106,17 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
119
106
|
urlResolve() {
|
|
120
107
|
clickgo.form.dialog(clickgo.tool.urlResolve(this.url1, this.url2)).catch((e) => { throw e; });
|
|
121
108
|
}
|
|
122
|
-
formatSecond() {
|
|
123
|
-
|
|
124
|
-
yield clickgo.form.dialog(clickgo.tool.formatSecond(parseInt(this.second) || 0));
|
|
125
|
-
});
|
|
109
|
+
async formatSecond() {
|
|
110
|
+
await clickgo.form.dialog(clickgo.tool.formatSecond(parseInt(this.second) || 0));
|
|
126
111
|
}
|
|
127
|
-
weightFormat() {
|
|
128
|
-
|
|
129
|
-
yield clickgo.form.dialog(clickgo.tool.weightFormat(parseInt(this.weight) || 0));
|
|
130
|
-
});
|
|
112
|
+
async weightFormat() {
|
|
113
|
+
await clickgo.form.dialog(clickgo.tool.weightFormat(parseInt(this.weight) || 0));
|
|
131
114
|
}
|
|
132
|
-
queryParse() {
|
|
133
|
-
|
|
134
|
-
yield clickgo.form.dialog(JSON.stringify(clickgo.tool.queryParse(this.qs)));
|
|
135
|
-
});
|
|
115
|
+
async queryParse() {
|
|
116
|
+
await clickgo.form.dialog(JSON.stringify(clickgo.tool.queryParse(this.qs)));
|
|
136
117
|
}
|
|
137
|
-
queryStringify() {
|
|
138
|
-
|
|
139
|
-
yield clickgo.form.dialog(clickgo.tool.queryStringify({ 'a': 1, 'b': 'c' }));
|
|
140
|
-
});
|
|
118
|
+
async queryStringify() {
|
|
119
|
+
await clickgo.form.dialog(clickgo.tool.queryStringify({ 'a': 1, 'b': 'c' }));
|
|
141
120
|
}
|
|
142
121
|
}
|
|
143
122
|
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
|
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 === '/') {
|