clickgo 3.1.5-dev14 → 3.1.6-dev15
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 +7 -7
- package/dist/app/demo/app.js +28 -2
- package/dist/app/demo/config.json +17 -1
- package/dist/app/demo/form/control/box/box.js +66 -0
- package/dist/app/demo/form/control/box/box.xml +18 -0
- package/dist/app/demo/form/control/button/button.js +24 -1
- package/dist/app/demo/form/control/check/check.js +24 -1
- package/dist/app/demo/form/control/dialog/dialog.js +24 -1
- package/dist/app/demo/form/control/file/file.js +24 -1
- package/dist/app/demo/form/control/flow/flow.js +24 -1
- package/dist/app/demo/form/control/form/form.js +24 -1
- package/dist/app/demo/form/control/layout/layout.js +57 -0
- package/dist/app/demo/form/control/layout/layout.xml +16 -0
- package/dist/app/demo/form/control/list/list.js +24 -1
- package/dist/app/demo/form/control/list/list.xml +8 -2
- package/dist/app/demo/form/control/marquee/marquee.js +24 -2
- package/dist/app/demo/form/control/marquee/marquee.xml +2 -5
- package/dist/app/demo/form/control/menu/menu.js +24 -1
- package/dist/app/demo/form/control/monaco/monaco.js +24 -1
- package/dist/app/demo/form/control/nav/nav.js +52 -0
- package/dist/app/demo/form/control/nav/nav.xml +43 -0
- package/dist/app/demo/form/control/panel/panel.js +67 -0
- package/dist/app/demo/form/control/panel/panel.xml +11 -0
- package/dist/app/demo/form/control/panel/test1.js +58 -0
- package/dist/app/demo/form/control/panel/test1.xml +16 -0
- package/dist/app/demo/form/control/panel/test2.xml +3 -0
- package/dist/app/demo/form/control/property/property.js +24 -1
- package/dist/app/demo/form/control/radio/radio.js +24 -1
- package/dist/app/demo/form/control/scroll/scroll.js +25 -1
- package/dist/app/demo/form/control/scroll/scroll.xml +5 -2
- package/dist/app/demo/form/control/select/select.js +24 -1
- package/dist/app/demo/form/control/tab/tab.js +24 -1
- package/dist/app/demo/form/control/table/table.js +164 -0
- package/dist/app/demo/form/control/table/table.xml +35 -0
- package/dist/app/demo/form/control/text/text.js +24 -1
- package/dist/app/demo/form/control/vflow/vflow.js +24 -1
- package/dist/app/demo/form/event/form/form.js +24 -1
- package/dist/app/demo/form/event/other/other.js +24 -1
- package/dist/app/demo/form/event/screen/screen.js +24 -1
- package/dist/app/demo/form/event/task/task.js +24 -1
- package/dist/app/demo/form/main.js +84 -33
- package/dist/app/demo/form/main.xml +5 -0
- package/dist/app/demo/form/method/aform/aform.js +28 -2
- package/dist/app/demo/form/method/aform/sd.js +24 -1
- package/dist/app/demo/form/method/core/core.js +24 -1
- package/dist/app/demo/form/method/dom/dom.js +48 -2
- package/dist/app/demo/form/method/dom/dom.xml +11 -0
- package/dist/app/demo/form/method/form/form.js +35 -1
- package/dist/app/demo/form/method/form/form.xml +2 -0
- package/dist/app/demo/form/method/fs/fs.js +138 -4
- package/dist/app/demo/form/method/fs/fs.xml +11 -1
- package/dist/app/demo/form/method/fs/text.js +24 -1
- package/dist/app/demo/form/method/native/native.js +24 -1
- package/dist/app/demo/form/method/system/system.js +24 -1
- package/dist/app/demo/form/method/task/task.js +31 -4
- package/dist/app/demo/form/method/task/task.xml +6 -1
- package/dist/app/demo/form/method/theme/theme.js +24 -1
- package/dist/app/demo/form/method/tool/tool.js +35 -1
- package/dist/app/demo/form/method/zip/zip.js +29 -3
- package/dist/app/task/app.js +28 -2
- package/dist/app/task/form/bar/bar.js +24 -1
- package/dist/clickgo.js +33 -10
- package/dist/control/box.cgc +0 -0
- package/dist/control/common.cgc +0 -0
- package/dist/control/form.cgc +0 -0
- package/dist/control/monaco.cgc +0 -0
- package/dist/control/nav.cgc +0 -0
- package/dist/control/property.cgc +0 -0
- package/dist/control/table.cgc +0 -0
- package/dist/control/task.cgc +0 -0
- package/dist/global.css +1 -1
- package/dist/lib/control.js +53 -12
- package/dist/lib/control.ts +25 -5
- package/dist/lib/core.js +44 -45
- package/dist/lib/core.ts +17 -41
- package/dist/lib/dom.js +322 -108
- package/dist/lib/dom.ts +394 -127
- package/dist/lib/form.js +441 -58
- package/dist/lib/form.ts +525 -74
- package/dist/lib/fs.js +485 -224
- package/dist/lib/fs.ts +493 -287
- package/dist/lib/native.js +24 -1
- package/dist/lib/task.js +143 -136
- package/dist/lib/task.ts +124 -127
- package/dist/lib/theme.js +27 -4
- package/dist/lib/tool.js +19 -2
- package/dist/lib/tool.ts +23 -1
- package/dist/lib/zip.js +29 -3
- package/dist/lib/zip.ts +1 -1
- package/dist/theme/familiar.cgt +0 -0
- package/package.json +4 -6
- package/types/index.d.ts +42 -34
|
@@ -9,13 +9,24 @@
|
|
|
9
9
|
<button @click="watchSize" ref="watchSize" :style="{'height': (watchSizeHeight ? 30 : 50) + 'px'}" style="padding: 0 5px; flex: 1;">{{watchSizeText ? '' : '!'}}watchSize</button>
|
|
10
10
|
<button @click="watchSizeHeight = !watchSizeHeight" style="padding: 0 5px; flex: 1;">Change</button>
|
|
11
11
|
</layout>
|
|
12
|
+
<layout gutter="10">
|
|
13
|
+
<button style="height: 30px; flex: 1;" @click="getWatchSizeCount()">getWatchSizeCount()</button>
|
|
14
|
+
<button style="height: 30px; flex: 1;" @click="getWatchSizeCount(taskId)">getWatchSizeCount({{taskId}})</button>
|
|
15
|
+
</layout>
|
|
12
16
|
<layout gutter="10">
|
|
13
17
|
<layout ref="watch" align-v="center" align-h="center" style="flex: 1; background: #FFF;">{{watchInner ? 'inner' : 'Inner'}}</layout>
|
|
14
18
|
<button @click="wwatch" style="height: 30px; padding: 0 5px;">{{watchText ? '' : '!'}}watch</button>
|
|
15
19
|
<button @click="watchInner = !watchInner" style="padding: 0 5px;">Change</button>
|
|
16
20
|
</layout>
|
|
21
|
+
<layout gutter="10">
|
|
22
|
+
<button style="height: 30px; flex: 1;" @click="getWatchCount()">getWatchCount()</button>
|
|
23
|
+
<button style="height: 30px; flex: 1;" @click="getWatchCount(taskId)">getWatchCount({{taskId}})</button>
|
|
24
|
+
</layout>
|
|
17
25
|
<button @click="watchStyleChange = !watchStyleChange" ref="watchStyle" style="height: 30px;" :style="{'font-size': watchStyleChange ? 'inherit' : '16px'}">watchStyle(this.refs.watchStyle.$el, 'font-size', (n, v) => { ... })</button>
|
|
18
26
|
<button @click="isWatchStyle" style="height: 30px;">isWatchStyle(this.refs.watchStyle.$el)</button>
|
|
27
|
+
<!-- getWatchInfo -->
|
|
28
|
+
<text :model-value="getWatchInfoText" readonly multi style="height: 300px;"></text>
|
|
29
|
+
<button @click="getWatchInfo" :disabled="getWatchInfoDisabled" style="height: 30px; padding: 0 10px;">getWatchInfo 20s</button>
|
|
19
30
|
<block @mousedown="bindGesture" @touchstart="bindGesture" style="height: 50px; background: #FFF; display: flex; justify-content: center; align-items: center; color: rgba(0, 0, 0, .5); font-size: 14px;">{{bindGestureText ? bindGestureText : 'bindGesture(e: Touch | Mouse, { ... })'}}</block>
|
|
20
31
|
<block @wheel="bindGestureWheel" style="height: 50px; background: #FFF; display: flex; justify-content: center; align-items: center; color: rgba(0, 0, 0, .5); font-size: 14px;">{{bindGestureWheelText ? bindGestureWheelText : 'bindGesture(e: Wheel, { ... })'}}</block>
|
|
21
32
|
<button @click="bindLong" ref="bindLong" @mousedown="bindLongDown" @touchstart="bindLongDown" style="height: 30px;">{{bindLongText ? 'Yeah!' : 'bindLong(e, () => { ... })'}}</button>
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -9,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
32
|
});
|
|
10
33
|
};
|
|
11
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const clickgo = require("clickgo");
|
|
35
|
+
const clickgo = __importStar(require("clickgo"));
|
|
13
36
|
class default_1 extends clickgo.form.AbstractForm {
|
|
14
37
|
constructor() {
|
|
15
38
|
super(...arguments);
|
|
@@ -41,6 +64,17 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
41
64
|
get() {
|
|
42
65
|
clickgo.form.dialog(JSON.stringify(clickgo.form.get(parseInt(this.fid)))).catch((e) => { throw e; });
|
|
43
66
|
}
|
|
67
|
+
getActivePanel() {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
yield clickgo.form.dialog(JSON.stringify(clickgo.form.getActivePanel(parseInt(this.fid))));
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
getFocus() {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const f = clickgo.form.getFocus();
|
|
75
|
+
yield clickgo.form.dialog(f ? f.toString() : 'null');
|
|
76
|
+
});
|
|
77
|
+
}
|
|
44
78
|
changeFocus() {
|
|
45
79
|
clickgo.form.changeFocus(parseInt(this.fid));
|
|
46
80
|
}
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
</layout>
|
|
14
14
|
<button @click="getTaskId" style="height: 30px;">getTaskId({{fid}})</button>
|
|
15
15
|
<button @click="get" style="height: 30px;">get({{fid}})</button>
|
|
16
|
+
<button @click="getActivePanel" style="height: 30px;">getActivePanel({{fid}})</button>
|
|
16
17
|
<layout gutter="10" align-v="center">
|
|
17
18
|
<label>Task ID:</label>
|
|
18
19
|
<text v-model="tid" style="flex: 1; width: 0; height: 30px;"></text>
|
|
19
20
|
<button @click="getList" style="padding: 0 10px;">getList({{tid}})</button>
|
|
20
21
|
</layout>
|
|
22
|
+
<button @click="getFocus" style="height: 30px;">getFocus()</button>
|
|
21
23
|
<button @click="changeFocus" style="height: 30px;">changeFocus({{fid}})</button>
|
|
22
24
|
<button @click="getMaxZIndexID" style="height: 30px;">getMaxZIndexID()</button>
|
|
23
25
|
<button @click="getRectByBorder" style="height: 30px;">getRectByBorder('rb')</button>
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,15 +31,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
32
|
});
|
|
10
33
|
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
11
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const clickgo = require("clickgo");
|
|
13
|
-
const text_1 = require("./text");
|
|
38
|
+
const clickgo = __importStar(require("clickgo"));
|
|
39
|
+
const text_1 = __importDefault(require("./text"));
|
|
14
40
|
class default_1 extends clickgo.form.AbstractForm {
|
|
15
41
|
constructor() {
|
|
16
42
|
super(...arguments);
|
|
17
43
|
this.ppath = '/';
|
|
18
44
|
this.list = [];
|
|
19
45
|
this.val = [];
|
|
46
|
+
this.get = false;
|
|
20
47
|
}
|
|
21
48
|
open(path) {
|
|
22
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -34,6 +61,12 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
34
61
|
this.ppath = path;
|
|
35
62
|
});
|
|
36
63
|
}
|
|
64
|
+
stats() {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const stats = yield clickgo.fs.stats(this.val[0]);
|
|
67
|
+
yield clickgo.form.dialog(stats ? JSON.stringify(stats) : 'null');
|
|
68
|
+
});
|
|
69
|
+
}
|
|
37
70
|
dblclick() {
|
|
38
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
72
|
const r = yield clickgo.fs.isFile(this.val[0]);
|
|
@@ -44,8 +77,11 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
44
77
|
return;
|
|
45
78
|
}
|
|
46
79
|
const ext = this.val[0].toLowerCase().slice(extlio + 1);
|
|
47
|
-
if (['xml', 'js', 'ts', 'json', 'css', 'html', 'php'].includes(ext)) {
|
|
48
|
-
let content = yield clickgo.fs.getContent(this.val[0]
|
|
80
|
+
if (['xml', 'js', 'ts', 'json', 'css', 'html', 'php', 'txt'].includes(ext)) {
|
|
81
|
+
let content = yield clickgo.fs.getContent(this.val[0], this.get ? {
|
|
82
|
+
'start': 2,
|
|
83
|
+
'end': 4
|
|
84
|
+
} : undefined);
|
|
49
85
|
if (!content) {
|
|
50
86
|
yield clickgo.form.dialog('This file cannot be opened.');
|
|
51
87
|
return;
|
|
@@ -77,6 +113,104 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
77
113
|
yield this.open(npath);
|
|
78
114
|
});
|
|
79
115
|
}
|
|
116
|
+
mount() {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
yield clickgo.form.dialog(clickgo.fs.mount('test', {
|
|
119
|
+
readDir: (path) => {
|
|
120
|
+
const list = [];
|
|
121
|
+
switch (path) {
|
|
122
|
+
case '/': {
|
|
123
|
+
list.push({
|
|
124
|
+
isFile: function () {
|
|
125
|
+
return false;
|
|
126
|
+
},
|
|
127
|
+
isDirectory: function () {
|
|
128
|
+
return true;
|
|
129
|
+
},
|
|
130
|
+
isSymbolicLink: function () {
|
|
131
|
+
return false;
|
|
132
|
+
},
|
|
133
|
+
'name': 'test1'
|
|
134
|
+
});
|
|
135
|
+
list.push({
|
|
136
|
+
isFile: function () {
|
|
137
|
+
return false;
|
|
138
|
+
},
|
|
139
|
+
isDirectory: function () {
|
|
140
|
+
return true;
|
|
141
|
+
},
|
|
142
|
+
isSymbolicLink: function () {
|
|
143
|
+
return false;
|
|
144
|
+
},
|
|
145
|
+
'name': 'test2'
|
|
146
|
+
});
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
case '/test2/': {
|
|
150
|
+
list.push({
|
|
151
|
+
isFile: function () {
|
|
152
|
+
return true;
|
|
153
|
+
},
|
|
154
|
+
isDirectory: function () {
|
|
155
|
+
return false;
|
|
156
|
+
},
|
|
157
|
+
isSymbolicLink: function () {
|
|
158
|
+
return false;
|
|
159
|
+
},
|
|
160
|
+
'name': 'test.txt'
|
|
161
|
+
});
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return list;
|
|
166
|
+
},
|
|
167
|
+
stats: (path) => {
|
|
168
|
+
if (path !== '/test2/test.txt') {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
const date = new Date();
|
|
172
|
+
const ms = date.getTime();
|
|
173
|
+
const size = 7;
|
|
174
|
+
return {
|
|
175
|
+
isFile: function () {
|
|
176
|
+
return true;
|
|
177
|
+
},
|
|
178
|
+
isDirectory: function () {
|
|
179
|
+
return false;
|
|
180
|
+
},
|
|
181
|
+
isSymbolicLink: function () {
|
|
182
|
+
return false;
|
|
183
|
+
},
|
|
184
|
+
'size': size,
|
|
185
|
+
'blksize': size,
|
|
186
|
+
'atimeMs': ms,
|
|
187
|
+
'mtimeMs': ms,
|
|
188
|
+
'ctimeMs': ms,
|
|
189
|
+
'birthtimeMs': ms,
|
|
190
|
+
'atime': date,
|
|
191
|
+
'mtime': date,
|
|
192
|
+
'ctime': date,
|
|
193
|
+
'birthtime': date
|
|
194
|
+
};
|
|
195
|
+
},
|
|
196
|
+
getContent: (path, options) => {
|
|
197
|
+
if (path !== '/test2/test.txt') {
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
const content = 'testabc';
|
|
201
|
+
if (!options || typeof options === 'string') {
|
|
202
|
+
return content;
|
|
203
|
+
}
|
|
204
|
+
return content.slice(options.start, options.end);
|
|
205
|
+
},
|
|
206
|
+
}) ? 'true' : 'fasle');
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
unmount() {
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
yield clickgo.form.dialog((yield clickgo.fs.unmount('test')) ? 'true' : 'false');
|
|
212
|
+
});
|
|
213
|
+
}
|
|
80
214
|
onMounted() {
|
|
81
215
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
216
|
yield this.open('/');
|
|
@@ -2,7 +2,17 @@
|
|
|
2
2
|
<layout gutter="10" direction="v" style="flex: 1;">
|
|
3
3
|
<label>Double click the item below:</label>
|
|
4
4
|
<block style="background: #000; color: #FFF; padding: 5px;">{{ppath}}</block>
|
|
5
|
+
<label>{{val[0]}}</label>
|
|
5
6
|
<list v-model="val" :data="list" @dblclick="dblclick" style="flex: 1; height: 0;"></list>
|
|
6
|
-
<
|
|
7
|
+
<layout gutter="10">
|
|
8
|
+
<button style="height: 30px; padding: 0 10px;" @click="open(ppath)">Refresh</button>
|
|
9
|
+
<button style="height: 30px; padding: 0 10px;" @click="stats">Stats</button>
|
|
10
|
+
<button style="height: 30px; flex: 1;" @click="up">Up</button>
|
|
11
|
+
</layout>
|
|
12
|
+
<layout gutter="10">
|
|
13
|
+
<button style="height: 30px; flex: 1;" @click="mount">Mount "test"</button>
|
|
14
|
+
<button style="height: 30px; flex: 1;" @click="unmount">Unmount</button>
|
|
15
|
+
<button style="height: 30px; flex: 1;" @click="get = !get">{{get ? '' : '!'}}get(2,4)</button>
|
|
16
|
+
</layout>
|
|
7
17
|
</layout>
|
|
8
18
|
</form>
|
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const clickgo = require("clickgo");
|
|
26
|
+
const clickgo = __importStar(require("clickgo"));
|
|
4
27
|
class default_1 extends clickgo.form.AbstractForm {
|
|
5
28
|
constructor() {
|
|
6
29
|
super(...arguments);
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -9,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
32
|
});
|
|
10
33
|
};
|
|
11
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const clickgo = require("clickgo");
|
|
35
|
+
const clickgo = __importStar(require("clickgo"));
|
|
13
36
|
class default_1 extends clickgo.form.AbstractForm {
|
|
14
37
|
constructor() {
|
|
15
38
|
super(...arguments);
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -9,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
32
|
});
|
|
10
33
|
};
|
|
11
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const clickgo = require("clickgo");
|
|
35
|
+
const clickgo = __importStar(require("clickgo"));
|
|
13
36
|
class default_1 extends clickgo.form.AbstractForm {
|
|
14
37
|
getVersion() {
|
|
15
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -9,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
32
|
});
|
|
10
33
|
};
|
|
11
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const clickgo = require("clickgo");
|
|
35
|
+
const clickgo = __importStar(require("clickgo"));
|
|
13
36
|
class default_1 extends clickgo.form.AbstractForm {
|
|
14
37
|
constructor() {
|
|
15
38
|
super(...arguments);
|
|
@@ -88,7 +111,11 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
88
111
|
}
|
|
89
112
|
get() {
|
|
90
113
|
const r = clickgo.task.get(parseInt(this.tid));
|
|
91
|
-
clickgo.form.dialog(r ? JSON.stringify(r) : 'null').catch((e) => { throw e; });
|
|
114
|
+
clickgo.form.dialog(r ? JSON.stringify(r).replace(/(data:image\/).+?"/g, '$1..."') : 'null').catch((e) => { throw e; });
|
|
115
|
+
}
|
|
116
|
+
getPermissions() {
|
|
117
|
+
const r = clickgo.task.getPermissions(parseInt(this.tid));
|
|
118
|
+
clickgo.form.dialog(JSON.stringify(r)).catch((e) => { throw e; });
|
|
92
119
|
}
|
|
93
120
|
getList() {
|
|
94
121
|
let msg = JSON.stringify(clickgo.task.getList());
|
|
@@ -101,9 +128,9 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
101
128
|
yield clickgo.form.dialog('Task ID: ' + tid.toString());
|
|
102
129
|
});
|
|
103
130
|
}
|
|
104
|
-
checkPermission() {
|
|
131
|
+
checkPermission(val) {
|
|
105
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
const rtn = yield clickgo.task.checkPermission(
|
|
133
|
+
const rtn = yield clickgo.task.checkPermission(val, true);
|
|
107
134
|
yield clickgo.form.dialog(rtn[0] ? 'Succeed' : 'Failed');
|
|
108
135
|
});
|
|
109
136
|
}
|
|
@@ -28,9 +28,14 @@
|
|
|
28
28
|
<text v-model="tid" style="flex: 1; width: 0; height: 30px;"></text>
|
|
29
29
|
<button @click="get" style="height: 30px; padding: 0 10px;">get({{tid}})</button>
|
|
30
30
|
</layout>
|
|
31
|
+
<button @click="getPermissions" style="height: 30px;">getPermissions({{tid}})</button>
|
|
31
32
|
<button @click="getList" style="height: 30px;">getList()</button>
|
|
32
33
|
<button @click="run" style="height: 30px;">run('/clickgo/app/demo/')</button>
|
|
33
|
-
<
|
|
34
|
+
<layout gutter="10" align-v="center">
|
|
35
|
+
<label>checkPermission:</label>
|
|
36
|
+
<button @click="checkPermission('hash')" style="height: 30px; flex: 1;">hash</button>
|
|
37
|
+
<button @click="checkPermission('root')" style="height: 30px; flex: 1; color: red;">root</button>
|
|
38
|
+
</layout>
|
|
34
39
|
<button @click="end" style="height: 30px;">end('{{tid}}')</button>
|
|
35
40
|
<label>Now locale: {{locale}}, Global locale: {{globalLocale}}</label>
|
|
36
41
|
<label>l('File name'): {{l('File name')}}</label>
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -9,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
32
|
});
|
|
10
33
|
};
|
|
11
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const clickgo = require("clickgo");
|
|
35
|
+
const clickgo = __importStar(require("clickgo"));
|
|
13
36
|
class default_1 extends clickgo.form.AbstractForm {
|
|
14
37
|
get() {
|
|
15
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -9,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
32
|
});
|
|
10
33
|
};
|
|
11
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const clickgo = require("clickgo");
|
|
35
|
+
const clickgo = __importStar(require("clickgo"));
|
|
13
36
|
class default_1 extends clickgo.form.AbstractForm {
|
|
14
37
|
constructor() {
|
|
15
38
|
super(...arguments);
|
|
@@ -23,6 +46,17 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
23
46
|
<h1>Title</h1>
|
|
24
47
|
<!-- content -->
|
|
25
48
|
<div>content</div>
|
|
49
|
+
<div>// abc</div>
|
|
50
|
+
<script>
|
|
51
|
+
// --- test ---
|
|
52
|
+
if (a) {
|
|
53
|
+
alert('zzz');
|
|
54
|
+
}
|
|
55
|
+
/* --- test 2 --- */
|
|
56
|
+
if (b) {
|
|
57
|
+
alert('zzz');
|
|
58
|
+
}
|
|
59
|
+
</script>
|
|
26
60
|
</body>
|
|
27
61
|
</html>`;
|
|
28
62
|
this.min = '10';
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,9 +31,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
32
|
});
|
|
10
33
|
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
11
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const clickgo = require("clickgo");
|
|
13
|
-
const text_1 = require("../fs/text");
|
|
38
|
+
const clickgo = __importStar(require("clickgo"));
|
|
39
|
+
const text_1 = __importDefault(require("../fs/text"));
|
|
14
40
|
class default_1 extends clickgo.form.AbstractForm {
|
|
15
41
|
constructor() {
|
|
16
42
|
super(...arguments);
|
|
@@ -68,7 +94,7 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
68
94
|
return;
|
|
69
95
|
}
|
|
70
96
|
const ext = this.val[0].toLowerCase().slice(extlio + 1);
|
|
71
|
-
if (['xml', 'js', 'ts', 'json', 'css', 'html', 'php'].includes(ext)) {
|
|
97
|
+
if (['xml', 'js', 'ts', 'json', 'css', 'html', 'php', 'txt'].includes(ext)) {
|
|
72
98
|
const content = yield this.access.zip.getContent(this.val[0]);
|
|
73
99
|
if (!content) {
|
|
74
100
|
yield clickgo.form.dialog('This file cannot be opened.');
|