clickgo 3.1.3-dev12 → 3.1.5-dev14
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 +1 -1
- package/dist/app/demo/config.json +9 -2
- package/dist/app/demo/form/control/text/text.js +1 -0
- package/dist/app/demo/form/control/text/text.xml +1 -1
- package/dist/app/demo/form/event/other/other.js +29 -0
- package/dist/app/demo/form/event/other/other.xml +5 -0
- package/dist/app/demo/form/main.js +51 -51
- package/dist/app/demo/form/main.xml +1 -0
- package/dist/app/demo/form/method/aform/aform.js +2 -13
- package/dist/app/demo/form/method/aform/aform.xml +0 -1
- package/dist/app/demo/form/method/aform/sd.js +25 -0
- package/dist/app/demo/form/method/aform/{test.xml → sd.xml} +3 -2
- package/dist/app/demo/form/method/core/core.js +12 -0
- package/dist/app/demo/form/method/core/core.xml +4 -0
- package/dist/app/demo/form/method/form/form.js +5 -6
- package/dist/app/demo/form/method/form/form.xml +1 -0
- package/dist/app/demo/form/method/form/test.xml +5 -0
- package/dist/app/demo/form/method/fs/fs.js +1 -4
- package/dist/app/demo/form/method/task/task.js +9 -1
- package/dist/app/demo/form/method/task/task.xml +1 -0
- package/dist/app/demo/form/method/tool/tool.js +3 -0
- package/dist/app/demo/form/method/tool/tool.xml +1 -0
- package/dist/app/demo/form/method/zip/zip.js +1 -4
- package/dist/app/task/app.js +1 -1
- package/dist/control/common.cgc +0 -0
- package/dist/control/form.cgc +0 -0
- package/dist/control/monaco.cgc +0 -0
- package/dist/control/property.cgc +0 -0
- package/dist/control/task.cgc +0 -0
- package/dist/global.css +1 -1
- package/dist/index.js +3 -0
- package/dist/index.ts +6 -0
- package/dist/lib/core.js +59 -10
- package/dist/lib/core.ts +67 -10
- package/dist/lib/dom.js +3 -3
- package/dist/lib/dom.ts +4 -4
- package/dist/lib/form.js +240 -215
- package/dist/lib/form.ts +290 -249
- package/dist/lib/fs.js +107 -12
- package/dist/lib/fs.ts +111 -20
- package/dist/lib/native.js +8 -1
- package/dist/lib/native.ts +6 -0
- package/dist/lib/task.js +253 -14
- package/dist/lib/task.ts +298 -12
- package/dist/lib/tool.js +39 -1
- package/dist/lib/tool.ts +45 -0
- package/dist/theme/familiar.cgt +0 -0
- package/package.json +3 -3
- package/types/index.d.ts +70 -52
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Load the module loader first, and then load it using the module loader.
|
|
|
19
19
|
**index.html**
|
|
20
20
|
|
|
21
21
|
```html
|
|
22
|
-
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.4.
|
|
22
|
+
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.4.4/dist/loader.min.js?path=index&npm={'clickgo':'3.1.5-dev14'}"></script>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
**index.js**
|
package/dist/app/demo/app.js
CHANGED
|
@@ -14,7 +14,7 @@ const main_1 = require("./form/main");
|
|
|
14
14
|
class default_1 extends clickgo.core.AbstractApp {
|
|
15
15
|
main() {
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
this.run(yield
|
|
17
|
+
this.run(yield clickgo.form.create(main_1.default));
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -60,13 +60,16 @@
|
|
|
60
60
|
"/form/event/form/form.css",
|
|
61
61
|
"/form/event/form/form.js",
|
|
62
62
|
"/form/event/form/form.xml",
|
|
63
|
+
"/form/event/other/other.js",
|
|
64
|
+
"/form/event/other/other.xml",
|
|
63
65
|
"/form/event/screen/screen.js",
|
|
64
66
|
"/form/event/screen/screen.xml",
|
|
65
67
|
"/form/event/task/task.js",
|
|
66
68
|
"/form/event/task/task.xml",
|
|
67
69
|
"/form/method/aform/aform.js",
|
|
68
70
|
"/form/method/aform/aform.xml",
|
|
69
|
-
"/form/method/aform/
|
|
71
|
+
"/form/method/aform/sd.js",
|
|
72
|
+
"/form/method/aform/sd.xml",
|
|
70
73
|
"/form/method/core/core.js",
|
|
71
74
|
"/form/method/core/core.xml",
|
|
72
75
|
"/form/method/dom/dom.css",
|
|
@@ -75,6 +78,7 @@
|
|
|
75
78
|
"/form/method/form/form.css",
|
|
76
79
|
"/form/method/form/form.js",
|
|
77
80
|
"/form/method/form/form.xml",
|
|
81
|
+
"/form/method/form/test.xml",
|
|
78
82
|
"/form/method/fs/fs.js",
|
|
79
83
|
"/form/method/fs/fs.xml",
|
|
80
84
|
"/form/method/fs/text.js",
|
|
@@ -105,5 +109,8 @@
|
|
|
105
109
|
"/res/zip.svg",
|
|
106
110
|
"/app.js",
|
|
107
111
|
"/global.css"
|
|
108
|
-
]
|
|
112
|
+
],
|
|
113
|
+
"map": {
|
|
114
|
+
"~c/": "/form/control/"
|
|
115
|
+
}
|
|
109
116
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<layout direction="v" gutter="10" style="padding: 10px; flex: 1; width: 0;">
|
|
3
3
|
<label>Text Length: {{value.length}}, Selection Start: {{selectionStart}}, Selection End: {{selectionEnd}}, Focus: {{isFocus}}</label>
|
|
4
4
|
<label>Scroll Left: {{scrollLeft}}, Scroll Top: {{scrollTop}}, Scroll Height: {{scrollHeight}}, Scroll Width: {{scrollWidth}}, Client Height: {{clientHeight}}, Client Width: {{clientWidth}}</label>
|
|
5
|
-
<text v-model="value" :multi="multi" :gesture="gesture ? ['top', 'bottom'] : []" @gesture="onGesture" :disabled="disabled" :readonly="readonly" :password="password" :wrap="wrap" v-model:scroll-left="scrollLeft" v-model:scroll-top="scrollTop" v-model:selection-start="selectionStart" v-model:selection-end="selectionEnd" @clientheight="clientHeight = $event" @clientwidth="clientWidth = $event" @scrollheight="scrollHeight = $event" @scrollwidth="scrollWidth = $event" @focus="isFocus = true" @blur="isFocus = false" :style="{'flex': multi ? '1' : undefined, 'line-height': lineHeight, 'font-size': fontSize + 'px', 'background': background, 'color': background ? '#FFF' : undefined, 'height': multi ? undefined : '30px', 'border-width': textBorder}">
|
|
5
|
+
<text v-model="value" placeholder="placeholder" :multi="multi" :gesture="gesture ? ['top', 'bottom'] : []" @gesture="onGesture" :disabled="disabled" :readonly="readonly" :password="password" :wrap="wrap" v-model:scroll-left="scrollLeft" v-model:scroll-top="scrollTop" v-model:selection-start="selectionStart" v-model:selection-end="selectionEnd" @clientheight="clientHeight = $event" @clientwidth="clientWidth = $event" @scrollheight="scrollHeight = $event" @scrollwidth="scrollWidth = $event" @focus="isFocus = true" @blur="isFocus = false" :style="{'flex': multi ? '1' : undefined, 'line-height': lineHeight, 'font-size': fontSize + 'px', 'background': background, 'color': background ? '#FFF' : undefined, 'height': multi ? undefined : '30px', 'border-width': textBorder}" :class="[phcolor && ('ph-' + phcolor)]">
|
|
6
6
|
<menulist v-if="menu">
|
|
7
7
|
<menulist-item>Custom</menulist-item>
|
|
8
8
|
</menulist>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const clickgo = require("clickgo");
|
|
4
|
+
class default_1 extends clickgo.form.AbstractForm {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.list = [];
|
|
8
|
+
}
|
|
9
|
+
onLauncherFolderNameChanged(id, name) {
|
|
10
|
+
const date = new Date();
|
|
11
|
+
this.list.unshift({
|
|
12
|
+
'time': date.getHours().toString() + ':' + date.getMinutes().toString() + ':' + date.getSeconds().toString(),
|
|
13
|
+
'name': 'launcherFolderNameChanged',
|
|
14
|
+
'content': JSON.stringify({
|
|
15
|
+
'id': id,
|
|
16
|
+
'name': name
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
onHashChanged(hash) {
|
|
21
|
+
const date = new Date();
|
|
22
|
+
this.list.unshift({
|
|
23
|
+
'time': date.getHours().toString() + ':' + date.getMinutes().toString() + ':' + date.getSeconds().toString(),
|
|
24
|
+
'name': 'hashChanged',
|
|
25
|
+
'content': hash
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = default_1;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<form width="500" height="550" title="About other" padding="10">
|
|
2
|
+
<vflow v-slot="data" :data="list" direction="v" style="color: #FFF; background: hsl(0, 0%, 20%); line-height: 1.5; padding: 10px; flex: 1;">
|
|
3
|
+
<label>[{{data.row.time}}] {{data.row.name}}, {{data.row.content}}.</label>
|
|
4
|
+
</vflow>
|
|
5
|
+
</form>
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const clickgo = require("clickgo");
|
|
13
|
-
const button_1 = require("
|
|
13
|
+
const button_1 = require("~c/button/button");
|
|
14
14
|
const check_1 = require("./control/check/check");
|
|
15
15
|
const dialog_1 = require("./control/dialog/dialog");
|
|
16
16
|
const file_1 = require("./control/file/file");
|
|
@@ -28,6 +28,7 @@ const tab_1 = require("./control/tab/tab");
|
|
|
28
28
|
const text_1 = require("./control/text/text");
|
|
29
29
|
const vflow_1 = require("./control/vflow/vflow");
|
|
30
30
|
const form_2 = require("./event/form/form");
|
|
31
|
+
const other_1 = require("./event/other/other");
|
|
31
32
|
const screen_1 = require("./event/screen/screen");
|
|
32
33
|
const task_1 = require("./event/task/task");
|
|
33
34
|
const aform_1 = require("./method/aform/aform");
|
|
@@ -45,164 +46,163 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
45
46
|
constructor() {
|
|
46
47
|
super(...arguments);
|
|
47
48
|
this.ntab = '';
|
|
48
|
-
this.test = 0;
|
|
49
|
-
}
|
|
50
|
-
onMounted() {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
while (true) {
|
|
53
|
-
yield clickgo.tool.sleep(2000);
|
|
54
|
-
this.test += 1;
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
49
|
}
|
|
58
50
|
openForm(name) {
|
|
59
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
let frm
|
|
52
|
+
let frm;
|
|
61
53
|
switch (name) {
|
|
62
54
|
case 'cblock': {
|
|
63
|
-
frm = yield
|
|
55
|
+
frm = yield clickgo.form.create('control/block/block', undefined, {
|
|
56
|
+
'path': this.filename
|
|
57
|
+
});
|
|
64
58
|
break;
|
|
65
59
|
}
|
|
66
60
|
case 'cbutton': {
|
|
67
|
-
frm = yield
|
|
61
|
+
frm = yield clickgo.form.create(button_1.default);
|
|
68
62
|
break;
|
|
69
63
|
}
|
|
70
64
|
case 'ccheck': {
|
|
71
|
-
frm = yield
|
|
65
|
+
frm = yield clickgo.form.create(check_1.default);
|
|
72
66
|
break;
|
|
73
67
|
}
|
|
74
68
|
case 'cdialog': {
|
|
75
|
-
frm = yield
|
|
69
|
+
frm = yield clickgo.form.create(dialog_1.default);
|
|
76
70
|
break;
|
|
77
71
|
}
|
|
78
72
|
case 'cfile': {
|
|
79
|
-
frm = yield
|
|
73
|
+
frm = yield clickgo.form.create(file_1.default);
|
|
80
74
|
break;
|
|
81
75
|
}
|
|
82
76
|
case 'cform': {
|
|
83
|
-
frm = yield
|
|
77
|
+
frm = yield clickgo.form.create(form_1.default);
|
|
84
78
|
break;
|
|
85
79
|
}
|
|
86
80
|
case 'cvflow': {
|
|
87
|
-
frm = yield
|
|
81
|
+
frm = yield clickgo.form.create(vflow_1.default);
|
|
88
82
|
break;
|
|
89
83
|
}
|
|
90
84
|
case 'cimg': {
|
|
91
|
-
frm = yield
|
|
85
|
+
frm = yield clickgo.form.create('control/img/img', undefined, {
|
|
86
|
+
'path': this.filename
|
|
87
|
+
});
|
|
92
88
|
break;
|
|
93
89
|
}
|
|
94
90
|
case 'clabel': {
|
|
95
|
-
frm = yield
|
|
91
|
+
frm = yield clickgo.form.create('control/label/label', undefined, {
|
|
92
|
+
'path': this.filename
|
|
93
|
+
});
|
|
96
94
|
break;
|
|
97
95
|
}
|
|
98
96
|
case 'clist': {
|
|
99
|
-
frm = yield
|
|
97
|
+
frm = yield clickgo.form.create(list_1.default);
|
|
100
98
|
break;
|
|
101
99
|
}
|
|
102
100
|
case 'cloading': {
|
|
103
|
-
frm = yield
|
|
101
|
+
frm = yield clickgo.form.create('control/loading/loading', undefined, {
|
|
102
|
+
'path': this.filename
|
|
103
|
+
});
|
|
104
104
|
break;
|
|
105
105
|
}
|
|
106
106
|
case 'cmarquee': {
|
|
107
|
-
frm = yield
|
|
107
|
+
frm = yield clickgo.form.create(marquee_1.default);
|
|
108
108
|
break;
|
|
109
109
|
}
|
|
110
110
|
case 'cmenu': {
|
|
111
|
-
frm = yield
|
|
111
|
+
frm = yield clickgo.form.create(menu_1.default);
|
|
112
112
|
break;
|
|
113
113
|
}
|
|
114
114
|
case 'cmonaco': {
|
|
115
|
-
frm = yield
|
|
115
|
+
frm = yield clickgo.form.create(monaco_1.default);
|
|
116
116
|
break;
|
|
117
117
|
}
|
|
118
118
|
case 'cflow': {
|
|
119
|
-
frm = yield
|
|
119
|
+
frm = yield clickgo.form.create(flow_1.default);
|
|
120
120
|
break;
|
|
121
121
|
}
|
|
122
122
|
case 'cproperty': {
|
|
123
|
-
frm = yield
|
|
123
|
+
frm = yield clickgo.form.create(property_1.default);
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
126
126
|
case 'cradio': {
|
|
127
|
-
frm = yield
|
|
127
|
+
frm = yield clickgo.form.create(radio_1.default);
|
|
128
128
|
break;
|
|
129
129
|
}
|
|
130
130
|
case 'cscroll': {
|
|
131
|
-
frm = yield
|
|
131
|
+
frm = yield clickgo.form.create(scroll_1.default);
|
|
132
132
|
break;
|
|
133
133
|
}
|
|
134
134
|
case 'cselect': {
|
|
135
|
-
frm = yield
|
|
135
|
+
frm = yield clickgo.form.create(select_1.default);
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
138
138
|
case 'ctab': {
|
|
139
|
-
frm = yield
|
|
139
|
+
frm = yield clickgo.form.create(tab_1.default);
|
|
140
140
|
break;
|
|
141
141
|
}
|
|
142
142
|
case 'ctext': {
|
|
143
|
-
frm = yield
|
|
143
|
+
frm = yield clickgo.form.create(text_1.default);
|
|
144
144
|
break;
|
|
145
145
|
}
|
|
146
146
|
case 'eform': {
|
|
147
|
-
frm = yield
|
|
147
|
+
frm = yield clickgo.form.create(form_2.default);
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
case 'eother': {
|
|
151
|
+
frm = yield clickgo.form.create(other_1.default);
|
|
148
152
|
break;
|
|
149
153
|
}
|
|
150
154
|
case 'escreen': {
|
|
151
|
-
frm = yield
|
|
155
|
+
frm = yield clickgo.form.create(screen_1.default);
|
|
152
156
|
break;
|
|
153
157
|
}
|
|
154
158
|
case 'etask': {
|
|
155
|
-
frm = yield
|
|
159
|
+
frm = yield clickgo.form.create(task_1.default);
|
|
156
160
|
break;
|
|
157
161
|
}
|
|
158
162
|
case 'aform': {
|
|
159
|
-
frm = yield
|
|
163
|
+
frm = yield clickgo.form.create(aform_1.default);
|
|
160
164
|
break;
|
|
161
165
|
}
|
|
162
166
|
case 'mcore': {
|
|
163
|
-
frm = yield
|
|
167
|
+
frm = yield clickgo.form.create(core_1.default);
|
|
164
168
|
break;
|
|
165
169
|
}
|
|
166
170
|
case 'mdom': {
|
|
167
|
-
frm = yield
|
|
171
|
+
frm = yield clickgo.form.create(dom_1.default);
|
|
168
172
|
break;
|
|
169
173
|
}
|
|
170
174
|
case 'mform': {
|
|
171
|
-
frm = yield
|
|
175
|
+
frm = yield clickgo.form.create(form_3.default);
|
|
172
176
|
break;
|
|
173
177
|
}
|
|
174
178
|
case 'mfs': {
|
|
175
|
-
frm = yield
|
|
179
|
+
frm = yield clickgo.form.create(fs_1.default);
|
|
176
180
|
break;
|
|
177
181
|
}
|
|
178
182
|
case 'mnative': {
|
|
179
|
-
frm = yield
|
|
183
|
+
frm = yield clickgo.form.create(native_1.default);
|
|
180
184
|
break;
|
|
181
185
|
}
|
|
182
186
|
case 'msystem': {
|
|
183
|
-
frm = yield
|
|
187
|
+
frm = yield clickgo.form.create(system_1.default);
|
|
184
188
|
break;
|
|
185
189
|
}
|
|
186
190
|
case 'mtask': {
|
|
187
|
-
frm = yield
|
|
191
|
+
frm = yield clickgo.form.create(task_2.default);
|
|
188
192
|
break;
|
|
189
193
|
}
|
|
190
194
|
case 'mtheme': {
|
|
191
|
-
frm = yield
|
|
195
|
+
frm = yield clickgo.form.create(theme_1.default);
|
|
192
196
|
break;
|
|
193
197
|
}
|
|
194
198
|
case 'mtool': {
|
|
195
|
-
frm = yield
|
|
199
|
+
frm = yield clickgo.form.create(tool_1.default);
|
|
196
200
|
break;
|
|
197
201
|
}
|
|
198
|
-
|
|
199
|
-
frm = yield
|
|
200
|
-
break;
|
|
202
|
+
default: {
|
|
203
|
+
frm = yield clickgo.form.create(zip_1.default);
|
|
201
204
|
}
|
|
202
205
|
}
|
|
203
|
-
if (typeof frm === 'number') {
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
206
|
frm.show();
|
|
207
207
|
});
|
|
208
208
|
}
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
<button @click="openForm('escreen')">About screen</button>
|
|
46
46
|
<button @click="openForm('eform')">About form</button>
|
|
47
47
|
<button @click="openForm('etask')">About task</button>
|
|
48
|
+
<button @click="openForm('eother')">About other</button>
|
|
48
49
|
</layout>
|
|
49
50
|
</flow>
|
|
50
51
|
</tab>
|
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const clickgo = require("clickgo");
|
|
13
|
+
const sd_1 = require("./sd");
|
|
13
14
|
class default_1 extends clickgo.form.AbstractForm {
|
|
14
15
|
constructor() {
|
|
15
16
|
super(...arguments);
|
|
@@ -18,15 +19,6 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
18
19
|
this.test = 'A';
|
|
19
20
|
this.dr = '';
|
|
20
21
|
}
|
|
21
|
-
ccreateForm() {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
const frm = yield this.createForm('test');
|
|
24
|
-
if (typeof frm === 'number') {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
frm.show();
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
22
|
ssend() {
|
|
31
23
|
this.send(parseInt(this.fid), {
|
|
32
24
|
'key': this.sendValue
|
|
@@ -41,10 +33,7 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
41
33
|
}
|
|
42
34
|
sshowDialog() {
|
|
43
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
const frm = yield
|
|
45
|
-
if (typeof frm === 'number') {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
36
|
+
const frm = yield clickgo.form.create(sd_1.default);
|
|
48
37
|
this.dr = yield frm.showDialog();
|
|
49
38
|
});
|
|
50
39
|
}
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
<label>test: {{test}}</label>
|
|
14
14
|
<button @click="test = test === 'A' ? 'B' : 'A'" style="height: 30px; flex: 1;">watch('test', () => { dialog })</button>
|
|
15
15
|
</layout>
|
|
16
|
-
<button @click="ccreateForm" style="height: 30px;">createForm('test')</button>
|
|
17
16
|
<button @click="topMost = !topMost" style="height: 30px;">topMost: {{topMost ? 'true' : 'false'}}</button>
|
|
18
17
|
<layout gutter="10" align-v="center">
|
|
19
18
|
<label>Form ID:</label>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const clickgo = require("clickgo");
|
|
13
|
+
class Sd extends clickgo.form.AbstractForm {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.dr = '';
|
|
17
|
+
}
|
|
18
|
+
newDialog() {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
const frm = yield clickgo.form.create(Sd);
|
|
21
|
+
this.dr = yield frm.showDialog();
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.default = Sd;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
<form width="200" height="200" title="
|
|
1
|
+
<form width="200" height="200" title="dialog">
|
|
2
2
|
<layout align-v="center" align-h="center" direction="v" gutter="10" style="flex: 1; width: 0;">
|
|
3
|
-
<label>Haha
|
|
3
|
+
<label>Haha! Result: {{dr}}</label>
|
|
4
4
|
<button @click="dialogResult = dialogResult ? '' : 'Done'" style="padding: 10px;">{{dialogResult ? 'Remove' : 'Set'}} dialogResult</button>
|
|
5
|
+
<button @click="newDialog"style="padding: 10px;">showDialog()</button>
|
|
5
6
|
</layout>
|
|
6
7
|
</form>
|
|
@@ -11,6 +11,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const clickgo = require("clickgo");
|
|
13
13
|
class default_1 extends clickgo.form.AbstractForm {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.hash = 'test';
|
|
17
|
+
}
|
|
14
18
|
get config() {
|
|
15
19
|
return JSON.stringify(clickgo.core.config, null, 4).replace(/"icon": "([\s\S]+?)"/g, '"icon": "data:image/..."');
|
|
16
20
|
}
|
|
@@ -24,5 +28,13 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
24
28
|
yield clickgo.form.dialog(JSON.stringify(clickgo.core.getAvailArea()));
|
|
25
29
|
});
|
|
26
30
|
}
|
|
31
|
+
hashe() {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
if (clickgo.core.hash(this.hash)) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
yield clickgo.form.dialog('No permission.');
|
|
37
|
+
});
|
|
38
|
+
}
|
|
27
39
|
}
|
|
28
40
|
exports.default = default_1;
|
|
@@ -4,5 +4,9 @@
|
|
|
4
4
|
<text v-model="config" readonly multi style="flex: 1;"></text>
|
|
5
5
|
<button @click="getCdn" style="height: 30px;">getCdn()</button>
|
|
6
6
|
<button @click="getAvailArea" style="height: 30px;">getAvailArea()</button>
|
|
7
|
+
<layout gutter="10" align-v="center">
|
|
8
|
+
<text v-model="hash" style="flex: 1;" />
|
|
9
|
+
<button @click="hashe" style="height: 30px; padding: 0 10px;">hash('{{hash}}')</button>
|
|
10
|
+
</layout>
|
|
7
11
|
</layout>
|
|
8
12
|
</form>
|
|
@@ -118,13 +118,12 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
118
118
|
}
|
|
119
119
|
clickgo.form.showPop(e.currentTarget, this.refs.pop, 'v');
|
|
120
120
|
}
|
|
121
|
-
|
|
121
|
+
create() {
|
|
122
122
|
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
-
const frm = yield
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
frm.topMost = true;
|
|
123
|
+
const frm = yield clickgo.form.create('test', undefined, {
|
|
124
|
+
'path': this.filename
|
|
125
|
+
});
|
|
126
|
+
frm.show();
|
|
128
127
|
});
|
|
129
128
|
}
|
|
130
129
|
dialog() {
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
<teleport to="system">
|
|
34
34
|
<block ref="pop" style="border: solid 1px #000; background: #FFF; width: 200px; height: 100px; display: flex; justify-content: center; align-items: center;">refs.pop</block>
|
|
35
35
|
</teleport>
|
|
36
|
+
<button @click="create" style="height: 30px;">create('test', undefined, { 'path': this.filename })</button>
|
|
36
37
|
<label>Dialog result: {{dr}}.</label>
|
|
37
38
|
<button @click="dialog" style="height: 30px;">dialog('Hello world!')</button>
|
|
38
39
|
<button @click="dialogLong">dialog('long...')</button>
|
|
@@ -53,13 +53,10 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
53
53
|
if (content instanceof Blob) {
|
|
54
54
|
content = yield clickgo.tool.blob2Text(content);
|
|
55
55
|
}
|
|
56
|
-
const f = yield
|
|
56
|
+
const f = yield clickgo.form.create(text_1.default, {
|
|
57
57
|
'title': this.val[0].slice(this.val[0].lastIndexOf('/') + 1),
|
|
58
58
|
'content': content
|
|
59
59
|
});
|
|
60
|
-
if (typeof f === 'number') {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
60
|
f.show();
|
|
64
61
|
return;
|
|
65
62
|
}
|
|
@@ -91,7 +91,9 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
91
91
|
clickgo.form.dialog(r ? JSON.stringify(r) : 'null').catch((e) => { throw e; });
|
|
92
92
|
}
|
|
93
93
|
getList() {
|
|
94
|
-
|
|
94
|
+
let msg = JSON.stringify(clickgo.task.getList());
|
|
95
|
+
msg = msg.replace(/(data:image\/).+?"/g, '$1..."');
|
|
96
|
+
clickgo.form.dialog(msg).catch((e) => { throw e; });
|
|
95
97
|
}
|
|
96
98
|
run() {
|
|
97
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -99,6 +101,12 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
99
101
|
yield clickgo.form.dialog('Task ID: ' + tid.toString());
|
|
100
102
|
});
|
|
101
103
|
}
|
|
104
|
+
checkPermission() {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
const rtn = yield clickgo.task.checkPermission('hash', true);
|
|
107
|
+
yield clickgo.form.dialog(rtn[0] ? 'Succeed' : 'Failed');
|
|
108
|
+
});
|
|
109
|
+
}
|
|
102
110
|
end() {
|
|
103
111
|
return __awaiter(this, void 0, void 0, function* () {
|
|
104
112
|
yield clickgo.form.dialog('Result: ' + (clickgo.task.end(parseInt(this.tid)) ? 'true' : 'false'));
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
</layout>
|
|
31
31
|
<button @click="getList" style="height: 30px;">getList()</button>
|
|
32
32
|
<button @click="run" style="height: 30px;">run('/clickgo/app/demo/')</button>
|
|
33
|
+
<button @click="checkPermission" style="height: 30px;">checkPermission('hash')</button>
|
|
33
34
|
<button @click="end" style="height: 30px;">end('{{tid}}')</button>
|
|
34
35
|
<label>Now locale: {{locale}}, Global locale: {{globalLocale}}</label>
|
|
35
36
|
<label>l('File name'): {{l('File name')}}</label>
|
|
@@ -55,6 +55,9 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
55
55
|
escapeHTML() {
|
|
56
56
|
clickgo.form.dialog(clickgo.tool.escapeHTML(this.purifyTxt)).catch((e) => { throw e; });
|
|
57
57
|
}
|
|
58
|
+
rgb2hsl() {
|
|
59
|
+
clickgo.form.dialog(JSON.stringify(clickgo.tool.rgb2hsl('9,105,218'))).catch((e) => { throw e; });
|
|
60
|
+
}
|
|
58
61
|
parseUrl() {
|
|
59
62
|
clickgo.form.dialog(JSON.stringify(clickgo.tool.parseUrl(this.url))).catch((e) => { throw e; });
|
|
60
63
|
}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
<button @click="random" style="height: 30px; padding: 0 10px;">random({{length}}, RANDOM_LN, '{{block}}')</button>
|
|
16
16
|
</layout>
|
|
17
17
|
<button @click="escapeHTML" style="height: 30px;">escapeHTML('{{purifyTxt.slice(0, 5).replace("'", "\\'")}}...')</button>
|
|
18
|
+
<button @click="rgb2hsl" style="height: 30px;">rgb2hsl('9,105,218')</button>
|
|
18
19
|
<text v-model="url" style="height: 30px;"></text>
|
|
19
20
|
<button @click="parseUrl" style="height: 30px;">parseUrl('{{url.slice(0, 5).replace("'","\\'")}}...')</button>
|
|
20
21
|
<label>urlResolve:</label>
|
|
@@ -74,10 +74,7 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
74
74
|
yield clickgo.form.dialog('This file cannot be opened.');
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
|
-
const f = yield
|
|
78
|
-
if (typeof f === 'number') {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
77
|
+
const f = yield clickgo.form.create(text_1.default);
|
|
81
78
|
f.show();
|
|
82
79
|
this.send(f.formId, {
|
|
83
80
|
'title': this.val[0].slice(this.val[0].lastIndexOf('/') + 1),
|
package/dist/app/task/app.js
CHANGED
|
@@ -14,7 +14,7 @@ const bar_1 = require("./form/bar/bar");
|
|
|
14
14
|
class default_1 extends clickgo.core.AbstractApp {
|
|
15
15
|
main() {
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
this.run(yield
|
|
17
|
+
this.run(yield clickgo.form.create(bar_1.default));
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
package/dist/control/common.cgc
CHANGED
|
Binary file
|
package/dist/control/form.cgc
CHANGED
|
Binary file
|
package/dist/control/monaco.cgc
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/control/task.cgc
CHANGED
|
Binary file
|