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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
36
|
const clickgo = __importStar(require("clickgo"));
|
|
46
37
|
class default_1 extends clickgo.form.AbstractForm {
|
|
@@ -52,11 +43,11 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
52
43
|
this.v4 = ['default'];
|
|
53
44
|
}
|
|
54
45
|
onMounted() {
|
|
55
|
-
clickgo.tool.sleep(500).then(() =>
|
|
46
|
+
clickgo.tool.sleep(500).then(async () => {
|
|
56
47
|
this.v2 = 40;
|
|
57
|
-
|
|
48
|
+
await clickgo.tool.sleep(500);
|
|
58
49
|
this.v2 = 70;
|
|
59
|
-
})
|
|
50
|
+
}).catch(() => {
|
|
60
51
|
});
|
|
61
52
|
}
|
|
62
53
|
}
|
|
@@ -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,14 +40,12 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
49
40
|
this.value = 'radio1';
|
|
50
41
|
this.disabled = false;
|
|
51
42
|
}
|
|
52
|
-
onChange(e) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
yield clickgo.form.dialog('selected: ' + e.detail.selected + ', value: ' + e.detail.value);
|
|
59
|
-
});
|
|
43
|
+
async onChange(e) {
|
|
44
|
+
if (e.detail.selected !== 'radio2') {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
await clickgo.form.dialog('selected: ' + e.detail.selected + ', value: ' + e.detail.value);
|
|
60
49
|
}
|
|
61
50
|
}
|
|
62
51
|
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 {
|
|
@@ -82,8 +73,8 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
82
73
|
'label': 'tip',
|
|
83
74
|
'color': 'tip'
|
|
84
75
|
}, 'haha4', {
|
|
85
|
-
'value': '
|
|
86
|
-
'label': 'The value is
|
|
76
|
+
'value': 'hA5',
|
|
77
|
+
'label': 'The value is hA5'
|
|
87
78
|
}, {
|
|
88
79
|
'value': 'ha6',
|
|
89
80
|
'label': 'Can not be selected',
|
|
@@ -160,21 +151,19 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
160
151
|
}
|
|
161
152
|
return rtn;
|
|
162
153
|
}
|
|
163
|
-
onLoad(value, resolve) {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
resolve(['60']);
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
resolve();
|
|
172
|
-
}
|
|
173
|
-
return;
|
|
154
|
+
async onLoad(value, resolve) {
|
|
155
|
+
if (value !== 'haha4') {
|
|
156
|
+
await clickgo.tool.sleep(100);
|
|
157
|
+
if (value === 'haha2') {
|
|
158
|
+
resolve(['60']);
|
|
174
159
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
160
|
+
else {
|
|
161
|
+
resolve();
|
|
162
|
+
}
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
await clickgo.tool.sleep(300);
|
|
166
|
+
resolve(['he', 'ha']);
|
|
178
167
|
}
|
|
179
168
|
onLoaded() {
|
|
180
169
|
clickgo.form.notify({
|
|
@@ -183,21 +172,19 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
183
172
|
'content': 'Done'
|
|
184
173
|
});
|
|
185
174
|
}
|
|
186
|
-
onRemote(e) {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}]);
|
|
200
|
-
});
|
|
175
|
+
async onRemote(e) {
|
|
176
|
+
await clickgo.tool.sleep(300);
|
|
177
|
+
if (!e.detail.value || e.detail.value === '8') {
|
|
178
|
+
await e.detail.callback();
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
await e.detail.callback(['test', e.detail.value, 'remote', {
|
|
182
|
+
'label': 'label',
|
|
183
|
+
'value': 'ok'
|
|
184
|
+
}, {
|
|
185
|
+
'label': 'label2',
|
|
186
|
+
'value': 2
|
|
187
|
+
}]);
|
|
201
188
|
}
|
|
202
189
|
onGAdd(e) {
|
|
203
190
|
clickgo.form.notify({
|
|
@@ -241,7 +228,7 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
241
228
|
}
|
|
242
229
|
}
|
|
243
230
|
onChanged(e) {
|
|
244
|
-
console.log('onChanged', e);
|
|
231
|
+
console.log('onChanged', JSON.stringify(e, null, 4));
|
|
245
232
|
}
|
|
246
233
|
onTagclick(e) {
|
|
247
234
|
this.addRemoveList.unshift('@tagclick, index: ' + e.detail.index.toString() + ', value: ' + e.detail.value);
|
|
@@ -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,11 +45,9 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
54
45
|
this.disabled = false;
|
|
55
46
|
this.size = ['m'];
|
|
56
47
|
}
|
|
57
|
-
onChange(e) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
yield clickgo.form.dialog('v: ' + (e.detail.value ? 'true' : 'false'));
|
|
61
|
-
});
|
|
48
|
+
async onChange(e) {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
await clickgo.form.dialog('v: ' + (e.detail.value ? 'true' : 'false'));
|
|
62
51
|
}
|
|
63
52
|
}
|
|
64
53
|
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 {
|
|
@@ -58,15 +49,13 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
58
49
|
this.drag = false;
|
|
59
50
|
this.cclose = false;
|
|
60
51
|
}
|
|
61
|
-
onClose(e) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
yield clickgo.form.dialog('The tab can not be close.');
|
|
69
|
-
});
|
|
52
|
+
async onClose(e) {
|
|
53
|
+
if (e.detail.index !== 10) {
|
|
54
|
+
await clickgo.form.dialog('Closed, index: ' + e.detail.index.toString() + ', value: ' + e.detail.value);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
await clickgo.form.dialog('The tab can not be close.');
|
|
70
59
|
}
|
|
71
60
|
add() {
|
|
72
61
|
const len = this.tabs.length;
|
|
@@ -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 {
|
|
@@ -118,10 +109,8 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
118
109
|
}
|
|
119
110
|
return rtn;
|
|
120
111
|
}
|
|
121
|
-
onGesture(dir) {
|
|
122
|
-
|
|
123
|
-
yield clickgo.form.dialog('onGesture: ' + dir);
|
|
124
|
-
});
|
|
112
|
+
async onGesture(dir) {
|
|
113
|
+
await clickgo.form.dialog('onGesture: ' + dir);
|
|
125
114
|
}
|
|
126
115
|
onSelect(area) {
|
|
127
116
|
this.selectionArea = area;
|
|
@@ -137,9 +126,8 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
137
126
|
}
|
|
138
127
|
if (this.sortinfo.index === (this.index ? 1 : 0)) {
|
|
139
128
|
this.data.sort((a, b) => {
|
|
140
|
-
|
|
141
|
-
const
|
|
142
|
-
const bname = (_b = b.name) !== null && _b !== void 0 ? _b : 'name';
|
|
129
|
+
const aname = a.name ?? 'name';
|
|
130
|
+
const bname = b.name ?? 'name';
|
|
143
131
|
if (this.sortinfo.sort === 'asc') {
|
|
144
132
|
return aname.localeCompare(bname);
|
|
145
133
|
}
|
|
@@ -150,9 +138,8 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
150
138
|
return;
|
|
151
139
|
}
|
|
152
140
|
this.data.sort((a, b) => {
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
const btype = (_b = b.type) !== null && _b !== void 0 ? _b : 0;
|
|
141
|
+
const atype = a.type ?? 0;
|
|
142
|
+
const btype = b.type ?? 0;
|
|
156
143
|
if (this.sortinfo.sort === 'asc') {
|
|
157
144
|
return atype - btype;
|
|
158
145
|
}
|
|
@@ -161,10 +148,8 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
161
148
|
}
|
|
162
149
|
});
|
|
163
150
|
}
|
|
164
|
-
showIndex() {
|
|
165
|
-
|
|
166
|
-
yield clickgo.form.dialog('Index is ' + this.val[0].toString() + '.');
|
|
167
|
-
});
|
|
151
|
+
async showIndex() {
|
|
152
|
+
await clickgo.form.dialog('Index is ' + this.val[0].toString() + '.');
|
|
168
153
|
}
|
|
169
154
|
scrollChange() {
|
|
170
155
|
switch (this.scroll) {
|
|
@@ -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 {
|
|
@@ -103,10 +94,8 @@ long`;
|
|
|
103
94
|
this.long = !this.long;
|
|
104
95
|
this.scrollTop = 0;
|
|
105
96
|
}
|
|
106
|
-
onGesture(dir) {
|
|
107
|
-
|
|
108
|
-
yield clickgo.form.dialog('onGesture: ' + dir);
|
|
109
|
-
});
|
|
97
|
+
async onGesture(dir) {
|
|
98
|
+
await clickgo.form.dialog('onGesture: ' + dir);
|
|
110
99
|
}
|
|
111
100
|
onBeforechange(e) {
|
|
112
101
|
if (!this.beforechange) {
|
|
@@ -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
|
};
|
|
@@ -59,15 +50,13 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
59
50
|
this.text = 'a**b**c';
|
|
60
51
|
this.html = '';
|
|
61
52
|
}
|
|
62
|
-
imgselect(cb) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
cb('https://cdn.jsdelivr.net/npm/clickgo@3.7.0/dist/app/demo/' + path);
|
|
70
|
-
});
|
|
53
|
+
async imgselect(cb) {
|
|
54
|
+
const frm = await clickgo.form.create(img_1.default);
|
|
55
|
+
const path = await frm.showDialog();
|
|
56
|
+
if (!path) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
cb('https://cdn.jsdelivr.net/npm/clickgo@3.7.0/dist/app/demo/' + path);
|
|
71
60
|
}
|
|
72
61
|
}
|
|
73
62
|
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
|
};
|
|
@@ -62,30 +53,28 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
62
53
|
this.length = ['7'];
|
|
63
54
|
this.progress = undefined;
|
|
64
55
|
}
|
|
65
|
-
select() {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
56
|
+
async select() {
|
|
57
|
+
const frm = await clickgo.form.create(img_1.default);
|
|
58
|
+
const path = await frm.showDialog();
|
|
59
|
+
if (!path) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
this.progress = 0;
|
|
63
|
+
const timer = clickgo.task.createTimer(async () => {
|
|
64
|
+
if (this.progress === undefined) {
|
|
65
|
+
clickgo.task.removeTimer(timer);
|
|
70
66
|
return;
|
|
71
67
|
}
|
|
72
|
-
this.progress
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
this.progress = 100;
|
|
83
|
-
clickgo.task.removeTimer(timer);
|
|
84
|
-
yield clickgo.tool.sleep(500);
|
|
85
|
-
this.progress = undefined;
|
|
86
|
-
this.list.push(path);
|
|
87
|
-
}), 500);
|
|
88
|
-
});
|
|
68
|
+
this.progress += clickgo.tool.rand(0, 70);
|
|
69
|
+
if (this.progress < 100) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
this.progress = 100;
|
|
73
|
+
clickgo.task.removeTimer(timer);
|
|
74
|
+
await clickgo.tool.sleep(500);
|
|
75
|
+
this.progress = undefined;
|
|
76
|
+
this.list.push(path);
|
|
77
|
+
}, 500);
|
|
89
78
|
}
|
|
90
79
|
}
|
|
91
80
|
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 {
|
|
@@ -103,10 +94,8 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
103
94
|
}
|
|
104
95
|
return is;
|
|
105
96
|
}
|
|
106
|
-
onGesture(dir) {
|
|
107
|
-
|
|
108
|
-
yield clickgo.form.dialog('onGesture: ' + dir);
|
|
109
|
-
});
|
|
97
|
+
async onGesture(dir) {
|
|
98
|
+
await clickgo.form.dialog('onGesture: ' + dir);
|
|
110
99
|
}
|
|
111
100
|
}
|
|
112
101
|
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 {
|
|
@@ -148,19 +139,17 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
148
139
|
this.flist[formId].focus = false;
|
|
149
140
|
this.pushConsole('formBlurred', `taskId: ${taskId}, formId: ${formId}`);
|
|
150
141
|
}
|
|
151
|
-
onFormFlash(taskId, formId) {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
this.flist[formId].flash = false;
|
|
163
|
-
});
|
|
142
|
+
async onFormFlash(taskId, formId) {
|
|
143
|
+
if (!this.flist[formId]) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if (this.flist[formId].flash) {
|
|
147
|
+
clickgo.task.removeTimer(this.flist[formId].flash);
|
|
148
|
+
}
|
|
149
|
+
this.pushConsole('formFlash', `taskId: ${taskId}, formId: ${formId}`);
|
|
150
|
+
this.flist[formId].flash = true;
|
|
151
|
+
await clickgo.tool.sleep(1000);
|
|
152
|
+
this.flist[formId].flash = false;
|
|
164
153
|
}
|
|
165
154
|
onFormShowInSystemTaskChange(taskId, formId, value) {
|
|
166
155
|
if (!this.flist[formId]) {
|
|
@@ -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 {
|
|
@@ -58,28 +49,22 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
58
49
|
'text': text
|
|
59
50
|
});
|
|
60
51
|
}
|
|
61
|
-
run() {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
yield clickgo.form.dialog(`Successfully run, task id is: ${taskId}.`);
|
|
65
|
-
});
|
|
52
|
+
async run() {
|
|
53
|
+
const taskId = await clickgo.task.run('/clickgo/app/demo/');
|
|
54
|
+
await clickgo.form.dialog(`Successfully run, task id is: ${taskId}.`);
|
|
66
55
|
}
|
|
67
|
-
end() {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
});
|
|
56
|
+
async end() {
|
|
57
|
+
if (await clickgo.form.confirm(`Are you sure to end Task ${this.tid[0]}?`)) {
|
|
58
|
+
clickgo.task.end(this.tid[0]);
|
|
59
|
+
}
|
|
73
60
|
}
|
|
74
|
-
runTask() {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
yield clickgo.form.dialog(`Successfully run, task id is: ${taskId}.`);
|
|
82
|
-
});
|
|
61
|
+
async runTask() {
|
|
62
|
+
if (clickgo.task.systemTaskInfo.taskId > 0) {
|
|
63
|
+
await clickgo.form.dialog('The Task APP is already running.');
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const taskId = await clickgo.task.run('/clickgo/app/task/');
|
|
67
|
+
await clickgo.form.dialog(`Successfully run, task id is: ${taskId}.`);
|
|
83
68
|
}
|
|
84
69
|
onTaskStarted(taskId) {
|
|
85
70
|
this.tlist.push({
|