clickgo 3.11.14 → 3.11.15
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/form/control/group/group.js +2 -0
- package/dist/app/demo/form/control/group/group.xml +16 -1
- package/dist/app/demo/form/control/table/table.js +54 -11
- package/dist/app/demo/form/control/table/table.xml +12 -4
- package/dist/app/demo/form/method/native/native.js +1 -1
- package/dist/app/demo/form/method/storage/storage.js +1 -1
- package/dist/clickgo.js +1 -1
- package/dist/clickgo.ts +1 -1
- package/dist/control/arteditor.cgc +0 -0
- package/dist/control/box.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/html.cgc +0 -0
- package/dist/control/iconview.cgc +0 -0
- package/dist/control/map.cgc +0 -0
- package/dist/control/monaco.cgc +0 -0
- package/dist/control/nav.cgc +0 -0
- package/dist/control/page.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/control/tuieditor.cgc +0 -0
- package/dist/control/xterm.cgc +0 -0
- package/dist/index.js +1 -1
- package/dist/lib/control.js +1 -1
- package/dist/lib/core.js +2 -2
- package/dist/lib/dom.js +15 -1
- package/dist/lib/dom.ts +18 -0
- package/dist/lib/form.js +7 -7
- package/dist/lib/fs.js +19 -19
- package/dist/lib/storage.js +1 -1
- package/dist/lib/task.js +10 -7
- package/dist/lib/task.ts +4 -1
- package/dist/lib/zip.js +2 -2
- package/dist/theme/byterun.cgt +0 -0
- package/dist/theme/familiar.cgt +0 -0
- package/dist/theme/light.cgt +0 -0
- package/package.json +6 -6
- package/types/index.d.ts +17 -0
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ Load the module loader first, and then load it using the module loader.
|
|
|
28
28
|
**index.html**
|
|
29
29
|
|
|
30
30
|
```html
|
|
31
|
-
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.1/dist/loader.min.js?path=index&npm={'clickgo':'3.11.
|
|
31
|
+
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.1/dist/loader.min.js?path=index&npm={'clickgo':'3.11.15'}"></script>
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
**index.js**
|
package/dist/app/demo/app.js
CHANGED
|
@@ -39,8 +39,8 @@ const clickgo = __importStar(require("clickgo"));
|
|
|
39
39
|
const main_1 = __importDefault(require("./form/main"));
|
|
40
40
|
class default_1 extends clickgo.core.AbstractApp {
|
|
41
41
|
main(data) {
|
|
42
|
-
var _a;
|
|
43
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
var _a;
|
|
44
44
|
this.run(yield clickgo.form.create(main_1.default, {
|
|
45
45
|
'param': (_a = data.param) !== null && _a !== void 0 ? _a : 'none'
|
|
46
46
|
}));
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
<form title="Group" width="450" height="
|
|
1
|
+
<form title="Group" width="450" height="550" padding="10" background="hsl(0, 0%, 90%)">
|
|
2
2
|
<layout gutter="10" direction="v" style="flex: 1; width: 0;">
|
|
3
3
|
<flow direction="v" style="flex: 1; height: 0;">
|
|
4
4
|
<group :title="title" direction="v" gutter="10">
|
|
5
|
+
<template v-if="slotTitle" v-slot:title>
|
|
6
|
+
<layout align-v="center" style="flex: 1;">
|
|
7
|
+
<label style="flex: 1;">slot title</label>
|
|
8
|
+
<button>test</button>
|
|
9
|
+
</layout>
|
|
10
|
+
</template>
|
|
5
11
|
<label>123</label>
|
|
6
12
|
<button>abc</button>
|
|
7
13
|
<title>Small title</title>
|
|
@@ -14,11 +20,20 @@
|
|
|
14
20
|
<label>123</label>
|
|
15
21
|
<title type="danger">Danger title</title>
|
|
16
22
|
<label>123</label>
|
|
23
|
+
<template v-if="slotFooter" v-slot:footer>
|
|
24
|
+
<layout align-h="end" style="flex: 1;">
|
|
25
|
+
<button>OK</button>
|
|
26
|
+
</layout>
|
|
27
|
+
</template>
|
|
17
28
|
</group>
|
|
18
29
|
</flow>
|
|
19
30
|
<layout gutter="10">
|
|
20
31
|
<button style="flex: 1;" @click="title = title === 'The title' ? 'Changed title' : 'The title'">Change title</button>
|
|
21
32
|
<button style="flex: 1;" @click="title = ''">Set empty</button>
|
|
22
33
|
</layout>
|
|
34
|
+
<layout gutter="10">
|
|
35
|
+
<button style="flex: 1;" @click="slotTitle = !slotTitle">{{slotTitle ? '' : '!'}}slotTitle</button>
|
|
36
|
+
<button style="flex: 1;" @click="slotFooter = !slottFooter">{{slottFooter ? '' : '!'}}slotFooter</button>
|
|
37
|
+
</layout>
|
|
23
38
|
</layout>
|
|
24
39
|
</form>
|
|
@@ -49,10 +49,50 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
49
49
|
this.selectionArea = {};
|
|
50
50
|
this.scroll = 'auto';
|
|
51
51
|
this.sort = undefined;
|
|
52
|
-
this.nowSort = [];
|
|
53
52
|
this.index = false;
|
|
54
53
|
this.split = false;
|
|
55
54
|
this.virtual = false;
|
|
55
|
+
this.slot = false;
|
|
56
|
+
this.checkinfo = {
|
|
57
|
+
'total': 0,
|
|
58
|
+
'selected': 0
|
|
59
|
+
};
|
|
60
|
+
this.sortinfo = {
|
|
61
|
+
'index': -1,
|
|
62
|
+
'sort': 'desc'
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
refreshCheckinfo() {
|
|
66
|
+
this.checkinfo.total = 0;
|
|
67
|
+
this.checkinfo.selected = 0;
|
|
68
|
+
for (const item of this.data) {
|
|
69
|
+
if (item.check === undefined) {
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
++this.checkinfo.total;
|
|
73
|
+
if (item.check) {
|
|
74
|
+
++this.checkinfo.selected;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
onHeaderCheck(e) {
|
|
79
|
+
if (e.detail.value && !e.detail.indeterminate) {
|
|
80
|
+
for (const item of this.data) {
|
|
81
|
+
if (item.check === undefined) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
item.check = false;
|
|
85
|
+
}
|
|
86
|
+
this.checkinfo.selected = 0;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
for (const item of this.data) {
|
|
90
|
+
if (item.check === undefined) {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
item.check = true;
|
|
94
|
+
}
|
|
95
|
+
this.checkinfo.selected = this.checkinfo.total;
|
|
56
96
|
}
|
|
57
97
|
get sizes() {
|
|
58
98
|
const rtn = {};
|
|
@@ -72,22 +112,21 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
72
112
|
onSelect(area) {
|
|
73
113
|
this.selectionArea = area;
|
|
74
114
|
}
|
|
75
|
-
onSort(
|
|
76
|
-
this.
|
|
77
|
-
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
this.nowSort.push(label);
|
|
81
|
-
this.nowSort.push(sort !== null && sort !== void 0 ? sort : 'asc');
|
|
115
|
+
onSort(e) {
|
|
116
|
+
this.sortinfo.index = e.detail.index;
|
|
117
|
+
this.sortinfo.sort = e.detail.sort;
|
|
82
118
|
this.refreshSort();
|
|
83
119
|
}
|
|
84
120
|
refreshSort() {
|
|
85
|
-
if (this.
|
|
121
|
+
if (this.sortinfo.index === -1) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
if (this.sortinfo.index === (this.index ? 1 : 0)) {
|
|
86
125
|
this.data.sort((a, b) => {
|
|
87
126
|
var _a, _b;
|
|
88
127
|
const aname = (_a = a.name) !== null && _a !== void 0 ? _a : 'name';
|
|
89
128
|
const bname = (_b = b.name) !== null && _b !== void 0 ? _b : 'name';
|
|
90
|
-
if (this.
|
|
129
|
+
if (this.sortinfo.sort === 'asc') {
|
|
91
130
|
return aname.localeCompare(bname);
|
|
92
131
|
}
|
|
93
132
|
else {
|
|
@@ -100,7 +139,7 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
100
139
|
var _a, _b;
|
|
101
140
|
const atype = (_a = a.type) !== null && _a !== void 0 ? _a : 0;
|
|
102
141
|
const btype = (_b = b.type) !== null && _b !== void 0 ? _b : 0;
|
|
103
|
-
if (this.
|
|
142
|
+
if (this.sortinfo.sort === 'asc') {
|
|
104
143
|
return atype - btype;
|
|
105
144
|
}
|
|
106
145
|
else {
|
|
@@ -146,14 +185,17 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
146
185
|
load() {
|
|
147
186
|
this.data = [
|
|
148
187
|
{
|
|
188
|
+
'check': false,
|
|
149
189
|
'type': 0,
|
|
150
190
|
'name': 'Appraise'
|
|
151
191
|
},
|
|
152
192
|
{
|
|
193
|
+
'check': false,
|
|
153
194
|
'type': 0,
|
|
154
195
|
'name': 'Card',
|
|
155
196
|
},
|
|
156
197
|
{
|
|
198
|
+
'check': false,
|
|
157
199
|
'type': 0,
|
|
158
200
|
'name': 'Appraise2',
|
|
159
201
|
'disabled': true
|
|
@@ -162,6 +204,7 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
162
204
|
'control': 'split'
|
|
163
205
|
},
|
|
164
206
|
{
|
|
207
|
+
'check': false,
|
|
165
208
|
'type': 1
|
|
166
209
|
}
|
|
167
210
|
];
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
<form width="
|
|
1
|
+
<form width="500" height="500" title="Table" padding="10">
|
|
2
2
|
<layout direction="v" gutter="10" style="flex: 1; width: 0;">
|
|
3
3
|
<label>Value: {{val}}</label>
|
|
4
4
|
<table :data="data" :style="{'flex': adaptation ? undefined : '1'}" v-model="val" :disabled="disabled" :must="must" :multi="multi" :ctrl="ctrl" :selection="selection" :gesture="gesture ? ['top', 'bottom'] : []" :split="split" @gesture="onGesture" :scroll="scroll" :sizes="sizes" :sort="sort" :virtual="virtual" @select="onSelect" @sort="onSort">
|
|
5
5
|
<template v-slot="d">
|
|
6
|
-
<table-item v-if="index"
|
|
6
|
+
<table-item v-if="index" width="100" sort="false" align-h="center" align-v="center">
|
|
7
|
+
<check v-model="d.row.check" @changed="refreshCheckinfo">{{d.index}}</check>
|
|
8
|
+
</table-item>
|
|
7
9
|
<table-item label="name">{{d.row.name ?? 'name'}}</table-item>
|
|
8
|
-
<table-item label="size" width="
|
|
9
|
-
<table-item label="col" width="100" direction="v" gutter="5">
|
|
10
|
+
<table-item label="size" width="80" align-v="center" align-h="center">{{d.row.type ?? '0'}}</table-item>
|
|
11
|
+
<table-item label="col" width="100" direction="v" gutter="5" sort="false">
|
|
10
12
|
<label>line1</label>
|
|
11
13
|
<button>line2</button>
|
|
12
14
|
</table-item>
|
|
@@ -16,6 +18,11 @@
|
|
|
16
18
|
<menulist-item alt="S" @click="showIndex">Show select</menulist-item>
|
|
17
19
|
</menulist>
|
|
18
20
|
</template>
|
|
21
|
+
<template v-if="slot" v-slot:label="d">
|
|
22
|
+
<layout align-h="center" style="flex: 1;">
|
|
23
|
+
<check :modelValue="checkinfo.selected > 0" @change="onHeaderCheck" :indeterminate="checkinfo.selected > 0 && checkinfo.selected < checkinfo.total">index</check>
|
|
24
|
+
</layout>
|
|
25
|
+
</template>
|
|
19
26
|
</table>
|
|
20
27
|
<template v-if="loadFirst">
|
|
21
28
|
<layout gutter="10">
|
|
@@ -39,6 +46,7 @@
|
|
|
39
46
|
<button style="flex: 1;" @click="must = !must">{{must ? '' : '!'}}must</button>
|
|
40
47
|
<button style="flex: 1;" @click="index = !index">{{index ? '' : '!'}}index</button>
|
|
41
48
|
<button style="flex: 1;" @click="virtual = !virtual">{{virtual ? '' : '!'}}virtual</button>
|
|
49
|
+
<button style="flex: 1;" @click="slot = !slot">{{slot ? '' : '!'}}slot</button>
|
|
42
50
|
</layout>
|
|
43
51
|
</template>
|
|
44
52
|
<button v-else @click="load">Load</button>
|
|
@@ -59,8 +59,8 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
ping() {
|
|
62
|
-
var _a;
|
|
63
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
var _a;
|
|
64
64
|
yield clickgo.form.dialog((_a = yield clickgo.native.ping(this.val)) !== null && _a !== void 0 ? _a : 'undefined');
|
|
65
65
|
});
|
|
66
66
|
}
|
|
@@ -42,8 +42,8 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
42
42
|
this.ppath = '';
|
|
43
43
|
}
|
|
44
44
|
get() {
|
|
45
|
-
var _a;
|
|
46
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
var _a;
|
|
47
47
|
yield clickgo.form.dialog((_a = clickgo.storage.get(this.key)) !== null && _a !== void 0 ? _a : 'null');
|
|
48
48
|
});
|
|
49
49
|
}
|
package/dist/clickgo.js
CHANGED
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.zip = exports.tool = exports.theme = exports.task = exports.storage = exports.native = exports.fs = exports.form = exports.dom = exports.core = exports.control = exports.vue = exports.hasFrame = exports.isImmersion = exports.getPlatform = exports.isNative = exports.getVersion = void 0;
|
|
27
|
-
const version = '3.11.
|
|
27
|
+
const version = '3.11.15';
|
|
28
28
|
function getVersion() {
|
|
29
29
|
return version;
|
|
30
30
|
}
|
package/dist/clickgo.ts
CHANGED
|
Binary file
|
package/dist/control/box.cgc
CHANGED
|
Binary file
|
package/dist/control/common.cgc
CHANGED
|
Binary file
|
package/dist/control/desc.cgc
CHANGED
|
Binary file
|
package/dist/control/drawer.cgc
CHANGED
|
Binary file
|
package/dist/control/echarts.cgc
CHANGED
|
Binary file
|
package/dist/control/form.cgc
CHANGED
|
Binary file
|
package/dist/control/html.cgc
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/control/map.cgc
CHANGED
|
Binary file
|
package/dist/control/monaco.cgc
CHANGED
|
Binary file
|
package/dist/control/nav.cgc
CHANGED
|
Binary file
|
package/dist/control/page.cgc
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/control/table.cgc
CHANGED
|
Binary file
|
package/dist/control/task.cgc
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/control/xterm.cgc
CHANGED
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -98,8 +98,8 @@ class AbstractBoot {
|
|
|
98
98
|
exports.AbstractBoot = AbstractBoot;
|
|
99
99
|
function launcher(boot) {
|
|
100
100
|
(function () {
|
|
101
|
-
var _a;
|
|
102
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
var _a;
|
|
103
103
|
const paths = [
|
|
104
104
|
loader.cdn + '/npm/vue@3.4.21/dist/vue.global.prod.min.js'
|
|
105
105
|
];
|
package/dist/lib/control.js
CHANGED
|
@@ -521,8 +521,8 @@ function buildComponents(taskId, formId, path) {
|
|
|
521
521
|
this.onBeforeMount();
|
|
522
522
|
},
|
|
523
523
|
mounted: function () {
|
|
524
|
-
var _a;
|
|
525
524
|
return __awaiter(this, void 0, void 0, function* () {
|
|
525
|
+
var _a;
|
|
526
526
|
if (((_a = this.element.dataset) === null || _a === void 0 ? void 0 : _a.cgRootcontrol) !== undefined) {
|
|
527
527
|
const rc = this.parentByAccess('cgPCMap', this.element.dataset.cgRootcontrol);
|
|
528
528
|
if (rc) {
|
package/dist/lib/core.js
CHANGED
|
@@ -602,8 +602,8 @@ function readApp(blob) {
|
|
|
602
602
|
});
|
|
603
603
|
}
|
|
604
604
|
exports.readApp = readApp;
|
|
605
|
-
function fetchApp(
|
|
606
|
-
return __awaiter(this,
|
|
605
|
+
function fetchApp(url_1) {
|
|
606
|
+
return __awaiter(this, arguments, void 0, function* (url, opt = {}, taskId) {
|
|
607
607
|
let cga = '';
|
|
608
608
|
if (!url.endsWith('/')) {
|
|
609
609
|
const lio = url.lastIndexOf('/');
|
package/dist/lib/dom.js
CHANGED
|
@@ -32,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.createElement = exports.exitFullscreen = exports.fullscreen = exports.siblingsData = exports.siblings = exports.findParentByTag = exports.findParentByClass = exports.findParentByData = exports.bindResize = exports.bindMove = exports.is = exports.bindDrag = exports.setDragData = exports.bindLong = exports.allowEvent = exports.bindGesture = exports.bindDown = exports.bindDblClick = exports.bindClick = exports.getWatchInfo = exports.clearWatchProperty = exports.isWatchProperty = exports.watchProperty = exports.clearWatchStyle = exports.isWatchStyle = exports.watchStyle = exports.clearWatch = exports.isWatch = exports.unwatch = exports.watch = exports.getWatchCount = exports.clearWatchSize = exports.isWatchSize = exports.unwatchSize = exports.watchSize = exports.getWatchSizeCount = exports.getStyleCount = exports.removeStyle = exports.pushStyle = exports.removeFromStyleList = exports.createToStyleList = exports.hasTouchButMouse = exports.setGlobalCursor = exports.inPage = void 0;
|
|
35
|
+
exports.createElement = exports.exitFullscreen = exports.fullscreen = exports.siblingsData = exports.siblings = exports.index = exports.findParentByTag = exports.findParentByClass = exports.findParentByData = exports.bindResize = exports.bindMove = exports.is = exports.bindDrag = exports.setDragData = exports.bindLong = exports.allowEvent = exports.bindGesture = exports.bindDown = exports.bindDblClick = exports.bindClick = exports.getWatchInfo = exports.clearWatchProperty = exports.isWatchProperty = exports.watchProperty = exports.clearWatchStyle = exports.isWatchStyle = exports.watchStyle = exports.clearWatch = exports.isWatch = exports.unwatch = exports.watch = exports.getWatchCount = exports.clearWatchSize = exports.isWatchSize = exports.unwatchSize = exports.watchSize = exports.getWatchSizeCount = exports.getStyleCount = exports.removeStyle = exports.pushStyle = exports.removeFromStyleList = exports.createToStyleList = exports.hasTouchButMouse = exports.setGlobalCursor = exports.inPage = void 0;
|
|
36
36
|
const clickgo = __importStar(require("../clickgo"));
|
|
37
37
|
const form = __importStar(require("./form"));
|
|
38
38
|
const core = __importStar(require("./core"));
|
|
@@ -1814,12 +1814,26 @@ function findParentByTag(el, name) {
|
|
|
1814
1814
|
return null;
|
|
1815
1815
|
}
|
|
1816
1816
|
exports.findParentByTag = findParentByTag;
|
|
1817
|
+
function index(el) {
|
|
1818
|
+
let index = 0;
|
|
1819
|
+
let p = el.previousElementSibling;
|
|
1820
|
+
while (true) {
|
|
1821
|
+
if (!p) {
|
|
1822
|
+
break;
|
|
1823
|
+
}
|
|
1824
|
+
++index;
|
|
1825
|
+
p = p.previousElementSibling;
|
|
1826
|
+
}
|
|
1827
|
+
return index;
|
|
1828
|
+
}
|
|
1829
|
+
exports.index = index;
|
|
1817
1830
|
function siblings(el) {
|
|
1818
1831
|
if (!el.parentNode) {
|
|
1819
1832
|
return [];
|
|
1820
1833
|
}
|
|
1821
1834
|
const list = [];
|
|
1822
1835
|
for (let i = 0; i < el.parentNode.children.length; ++i) {
|
|
1836
|
+
el.previousElementSibling;
|
|
1823
1837
|
const e = el.parentNode.children.item(i);
|
|
1824
1838
|
if (e === el) {
|
|
1825
1839
|
continue;
|
package/dist/lib/dom.ts
CHANGED
|
@@ -2270,6 +2270,23 @@ export function findParentByTag(el: HTMLElement, name: string): HTMLElement | nu
|
|
|
2270
2270
|
return null;
|
|
2271
2271
|
}
|
|
2272
2272
|
|
|
2273
|
+
/**
|
|
2274
|
+
* --- 判断一个元素是当前同级的第几位 ---
|
|
2275
|
+
* @param el 要判断的元素
|
|
2276
|
+
*/
|
|
2277
|
+
export function index(el: HTMLElement): number {
|
|
2278
|
+
let index = 0;
|
|
2279
|
+
let p = el.previousElementSibling;
|
|
2280
|
+
while (true) {
|
|
2281
|
+
if (!p) {
|
|
2282
|
+
break;
|
|
2283
|
+
}
|
|
2284
|
+
++index;
|
|
2285
|
+
p = p.previousElementSibling;
|
|
2286
|
+
}
|
|
2287
|
+
return index;
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2273
2290
|
/**
|
|
2274
2291
|
* --- 查找指定 el 的同级所有元素 ---
|
|
2275
2292
|
* @param el 基准
|
|
@@ -2281,6 +2298,7 @@ export function siblings(el: HTMLElement): HTMLElement[] {
|
|
|
2281
2298
|
}
|
|
2282
2299
|
const list: HTMLElement[] = [];
|
|
2283
2300
|
for (let i = 0; i < el.parentNode.children.length; ++i) {
|
|
2301
|
+
el.previousElementSibling
|
|
2284
2302
|
const e = el.parentNode.children.item(i) as HTMLElement;
|
|
2285
2303
|
if (e === el) {
|
|
2286
2304
|
continue;
|
package/dist/lib/form.js
CHANGED
|
@@ -1908,9 +1908,9 @@ function getForm(taskId, formId) {
|
|
|
1908
1908
|
}
|
|
1909
1909
|
return form;
|
|
1910
1910
|
}
|
|
1911
|
-
function createPanel(
|
|
1912
|
-
|
|
1913
|
-
|
|
1911
|
+
function createPanel(rootPanel_1, cls_1) {
|
|
1912
|
+
return __awaiter(this, arguments, void 0, function* (rootPanel, cls, opt = {}, taskId) {
|
|
1913
|
+
var _a;
|
|
1914
1914
|
if (rootPanel.element.dataset.cgControl !== 'panel') {
|
|
1915
1915
|
const err = new Error('form.createPanel: -0');
|
|
1916
1916
|
core.trigger('error', 0, 0, err, err.message);
|
|
@@ -2214,9 +2214,9 @@ function createPanel(rootPanel, cls, opt = {}, taskId) {
|
|
|
2214
2214
|
});
|
|
2215
2215
|
}
|
|
2216
2216
|
exports.createPanel = createPanel;
|
|
2217
|
-
function create(
|
|
2218
|
-
|
|
2219
|
-
|
|
2217
|
+
function create(cls_1, data_1) {
|
|
2218
|
+
return __awaiter(this, arguments, void 0, function* (cls, data, opt = {}, taskId) {
|
|
2219
|
+
var _a, _b;
|
|
2220
2220
|
if (!taskId) {
|
|
2221
2221
|
const err = new Error('form.create: -1');
|
|
2222
2222
|
core.trigger('error', 0, 0, err, err.message);
|
|
@@ -2681,8 +2681,8 @@ function dialog(opt) {
|
|
|
2681
2681
|
}
|
|
2682
2682
|
exports.dialog = dialog;
|
|
2683
2683
|
function confirm(opt) {
|
|
2684
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2685
2684
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2685
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2686
2686
|
if (typeof opt === 'string') {
|
|
2687
2687
|
opt = {
|
|
2688
2688
|
'content': opt
|
package/dist/lib/fs.js
CHANGED
|
@@ -104,8 +104,8 @@ function mount(name, handler, taskId) {
|
|
|
104
104
|
}
|
|
105
105
|
exports.mount = mount;
|
|
106
106
|
function unmount(name) {
|
|
107
|
-
var _a, _b;
|
|
108
107
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
var _a, _b;
|
|
109
109
|
if (!mounts[name]) {
|
|
110
110
|
return true;
|
|
111
111
|
}
|
|
@@ -119,8 +119,8 @@ function unmount(name) {
|
|
|
119
119
|
}
|
|
120
120
|
exports.unmount = unmount;
|
|
121
121
|
function getContent(path, options, taskId) {
|
|
122
|
-
var _a, _b, _c;
|
|
123
122
|
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
var _a, _b, _c;
|
|
124
124
|
path = tool.urlResolve('/', path);
|
|
125
125
|
const fpath = path.slice(8);
|
|
126
126
|
if (typeof options === 'string') {
|
|
@@ -244,9 +244,9 @@ function getContent(path, options, taskId) {
|
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
exports.getContent = getContent;
|
|
247
|
-
function putContent(
|
|
248
|
-
|
|
249
|
-
|
|
247
|
+
function putContent(path_1, data_1) {
|
|
248
|
+
return __awaiter(this, arguments, void 0, function* (path, data, options = {}, taskId) {
|
|
249
|
+
var _a, _b;
|
|
250
250
|
path = tool.urlResolve('/', path);
|
|
251
251
|
const fpath = path.slice(8);
|
|
252
252
|
if (path.startsWith('/clickgo/')) {
|
|
@@ -287,8 +287,8 @@ function putContent(path, data, options = {}, taskId) {
|
|
|
287
287
|
}
|
|
288
288
|
exports.putContent = putContent;
|
|
289
289
|
function readLink(path, encoding, taskId) {
|
|
290
|
-
var _a, _b;
|
|
291
290
|
return __awaiter(this, void 0, void 0, function* () {
|
|
291
|
+
var _a, _b;
|
|
292
292
|
path = tool.urlResolve('/', path);
|
|
293
293
|
const fpath = path.slice(8);
|
|
294
294
|
if (path.startsWith('/clickgo/')) {
|
|
@@ -325,8 +325,8 @@ function readLink(path, encoding, taskId) {
|
|
|
325
325
|
}
|
|
326
326
|
exports.readLink = readLink;
|
|
327
327
|
function symlink(filePath, linkPath, type, taskId) {
|
|
328
|
-
var _a, _b;
|
|
329
328
|
return __awaiter(this, void 0, void 0, function* () {
|
|
329
|
+
var _a, _b;
|
|
330
330
|
filePath = tool.urlResolve('/', filePath);
|
|
331
331
|
linkPath = tool.urlResolve('/', linkPath);
|
|
332
332
|
if (filePath.startsWith('/clickgo/')) {
|
|
@@ -370,8 +370,8 @@ function symlink(filePath, linkPath, type, taskId) {
|
|
|
370
370
|
}
|
|
371
371
|
exports.symlink = symlink;
|
|
372
372
|
function unlink(path, taskId) {
|
|
373
|
-
var _a, _b;
|
|
374
373
|
return __awaiter(this, void 0, void 0, function* () {
|
|
374
|
+
var _a, _b;
|
|
375
375
|
path = tool.urlResolve('/', path);
|
|
376
376
|
const fpath = path.slice(8);
|
|
377
377
|
if (path.startsWith('/clickgo/')) {
|
|
@@ -487,8 +487,8 @@ function getClickGoStats(path) {
|
|
|
487
487
|
});
|
|
488
488
|
}
|
|
489
489
|
function stats(path, taskId) {
|
|
490
|
-
var _a, _b;
|
|
491
490
|
return __awaiter(this, void 0, void 0, function* () {
|
|
491
|
+
var _a, _b;
|
|
492
492
|
path = tool.urlResolve('/', path);
|
|
493
493
|
if (path.endsWith('/')) {
|
|
494
494
|
path = path.slice(0, -1);
|
|
@@ -719,9 +719,9 @@ function isFile(path, taskId) {
|
|
|
719
719
|
});
|
|
720
720
|
}
|
|
721
721
|
exports.isFile = isFile;
|
|
722
|
-
function mkdir(
|
|
723
|
-
|
|
724
|
-
|
|
722
|
+
function mkdir(path_1) {
|
|
723
|
+
return __awaiter(this, arguments, void 0, function* (path, mode = 0o755, taskId) {
|
|
724
|
+
var _a, _b;
|
|
725
725
|
path = tool.urlResolve('/', path);
|
|
726
726
|
if (yield isDir(path, taskId)) {
|
|
727
727
|
return true;
|
|
@@ -761,8 +761,8 @@ function mkdir(path, mode = 0o755, taskId) {
|
|
|
761
761
|
}
|
|
762
762
|
exports.mkdir = mkdir;
|
|
763
763
|
function rmdir(path, taskId) {
|
|
764
|
-
var _a, _b;
|
|
765
764
|
return __awaiter(this, void 0, void 0, function* () {
|
|
765
|
+
var _a, _b;
|
|
766
766
|
path = tool.urlResolve('/', path);
|
|
767
767
|
const fpath = path.slice(8);
|
|
768
768
|
if (path.startsWith('/clickgo/')) {
|
|
@@ -828,8 +828,8 @@ function rmdirDeep(path, taskId) {
|
|
|
828
828
|
}
|
|
829
829
|
exports.rmdirDeep = rmdirDeep;
|
|
830
830
|
function chmod(path, mod, taskId) {
|
|
831
|
-
var _a, _b;
|
|
832
831
|
return __awaiter(this, void 0, void 0, function* () {
|
|
832
|
+
var _a, _b;
|
|
833
833
|
path = tool.urlResolve('/', path);
|
|
834
834
|
const fpath = path.slice(8);
|
|
835
835
|
if (path.startsWith('/clickgo/')) {
|
|
@@ -866,8 +866,8 @@ function chmod(path, mod, taskId) {
|
|
|
866
866
|
}
|
|
867
867
|
exports.chmod = chmod;
|
|
868
868
|
function rename(oldPath, newPath, taskId) {
|
|
869
|
-
var _a, _b;
|
|
870
869
|
return __awaiter(this, void 0, void 0, function* () {
|
|
870
|
+
var _a, _b;
|
|
871
871
|
oldPath = tool.urlResolve('/', oldPath);
|
|
872
872
|
newPath = tool.urlResolve('/', newPath);
|
|
873
873
|
if (!oldPath.startsWith(newPath.slice(0, 9))) {
|
|
@@ -917,8 +917,8 @@ function rename(oldPath, newPath, taskId) {
|
|
|
917
917
|
}
|
|
918
918
|
exports.rename = rename;
|
|
919
919
|
function readDir(path, encoding, taskId) {
|
|
920
|
-
var _a, _b;
|
|
921
920
|
return __awaiter(this, void 0, void 0, function* () {
|
|
921
|
+
var _a, _b;
|
|
922
922
|
path = tool.urlResolve('/', path);
|
|
923
923
|
if (path === '/') {
|
|
924
924
|
const list = [
|
|
@@ -1141,8 +1141,8 @@ function readDir(path, encoding, taskId) {
|
|
|
1141
1141
|
});
|
|
1142
1142
|
}
|
|
1143
1143
|
exports.readDir = readDir;
|
|
1144
|
-
function copyFolder(
|
|
1145
|
-
return __awaiter(this,
|
|
1144
|
+
function copyFolder(from_1, to_1) {
|
|
1145
|
+
return __awaiter(this, arguments, void 0, function* (from, to, ignore = [], taskId) {
|
|
1146
1146
|
let num = 0;
|
|
1147
1147
|
if (!(yield isDir(from, taskId))) {
|
|
1148
1148
|
return 0;
|
|
@@ -1180,8 +1180,8 @@ function copyFolder(from, to, ignore = [], taskId) {
|
|
|
1180
1180
|
}
|
|
1181
1181
|
exports.copyFolder = copyFolder;
|
|
1182
1182
|
function copyFile(src, dest, taskId) {
|
|
1183
|
-
var _a, _b;
|
|
1184
1183
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1184
|
+
var _a, _b;
|
|
1185
1185
|
src = tool.urlResolve('/', src);
|
|
1186
1186
|
dest = tool.urlResolve('/', dest);
|
|
1187
1187
|
if (!src.startsWith(dest.slice(0, 9))) {
|
package/dist/lib/storage.js
CHANGED
package/dist/lib/task.js
CHANGED
|
@@ -216,9 +216,9 @@ function getList() {
|
|
|
216
216
|
return rtn;
|
|
217
217
|
}
|
|
218
218
|
exports.getList = getList;
|
|
219
|
-
function run(
|
|
220
|
-
|
|
221
|
-
|
|
219
|
+
function run(url_1) {
|
|
220
|
+
return __awaiter(this, arguments, void 0, function* (url, opt = {}, ntid) {
|
|
221
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
222
222
|
let app = null;
|
|
223
223
|
if (typeof url === 'string') {
|
|
224
224
|
if (!url.endsWith('/') && !url.endsWith('.cga')) {
|
|
@@ -554,9 +554,12 @@ function run(url, opt = {}, ntid) {
|
|
|
554
554
|
findParentByClass: function (el, name) {
|
|
555
555
|
return dom.findParentByClass(el, name);
|
|
556
556
|
},
|
|
557
|
-
findParentByTag(el, name) {
|
|
557
|
+
findParentByTag: function (el, name) {
|
|
558
558
|
return dom.findParentByTag(el, name);
|
|
559
559
|
},
|
|
560
|
+
index: function (el) {
|
|
561
|
+
return dom.index(el);
|
|
562
|
+
},
|
|
560
563
|
siblings: function (el) {
|
|
561
564
|
return dom.siblings(el);
|
|
562
565
|
},
|
|
@@ -1331,9 +1334,9 @@ const locale = {
|
|
|
1331
1334
|
'read-write': 'Đọc/ghi'
|
|
1332
1335
|
}
|
|
1333
1336
|
};
|
|
1334
|
-
function checkPermission(
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
+
function checkPermission(vals_1) {
|
|
1338
|
+
return __awaiter(this, arguments, void 0, function* (vals, apply = false, applyHandler, taskId) {
|
|
1339
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1337
1340
|
if (!taskId) {
|
|
1338
1341
|
return [false];
|
|
1339
1342
|
}
|
package/dist/lib/task.ts
CHANGED
|
@@ -642,9 +642,12 @@ export async function run(url: string | types.IApp, opt: types.ITaskRunOptions =
|
|
|
642
642
|
findParentByClass: function(el: HTMLElement, name: string): HTMLElement | null {
|
|
643
643
|
return dom.findParentByClass(el, name);
|
|
644
644
|
},
|
|
645
|
-
findParentByTag(el: HTMLElement, name: string): HTMLElement | null {
|
|
645
|
+
findParentByTag: function(el: HTMLElement, name: string): HTMLElement | null {
|
|
646
646
|
return dom.findParentByTag(el, name);
|
|
647
647
|
},
|
|
648
|
+
index: function(el: HTMLElement): number {
|
|
649
|
+
return dom.index(el);
|
|
650
|
+
},
|
|
648
651
|
siblings: function(el: HTMLElement): HTMLElement[] {
|
|
649
652
|
return dom.siblings(el);
|
|
650
653
|
},
|
package/dist/lib/zip.js
CHANGED
|
@@ -45,8 +45,8 @@ class Zip {
|
|
|
45
45
|
this._zip = zip;
|
|
46
46
|
this._refreshList();
|
|
47
47
|
}
|
|
48
|
-
getContent(
|
|
49
|
-
return __awaiter(this,
|
|
48
|
+
getContent(path_1) {
|
|
49
|
+
return __awaiter(this, arguments, void 0, function* (path, type = 'string') {
|
|
50
50
|
path = tool.urlResolve(this._path, path);
|
|
51
51
|
const f = this._zip.file(path.slice(1));
|
|
52
52
|
if (!f) {
|
package/dist/theme/byterun.cgt
CHANGED
|
Binary file
|
package/dist/theme/familiar.cgt
CHANGED
|
Binary file
|
package/dist/theme/light.cgt
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clickgo",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.15",
|
|
4
4
|
"description": "Background interface, software interface, mobile phone APP interface operation library.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deskrt",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"native4": "electron ./dist/test/native/index4"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@litert/eslint-plugin-rules": "^0.1.
|
|
21
|
+
"@litert/eslint-plugin-rules": "^0.1.7",
|
|
22
22
|
"@litert/loader": "^3.5.1",
|
|
23
|
-
"@types/node": "^20.11.
|
|
24
|
-
"electron": "^29.
|
|
23
|
+
"@types/node": "^20.11.30",
|
|
24
|
+
"electron": "^29.1.5",
|
|
25
25
|
"jszip": "^3.10.1",
|
|
26
|
-
"terser": "^5.
|
|
27
|
-
"typescript": "^5.
|
|
26
|
+
"terser": "^5.29.2",
|
|
27
|
+
"typescript": "^5.4.3"
|
|
28
28
|
}
|
|
29
29
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -654,6 +654,13 @@ export interface ICheckChangeEvent extends ICustomEvent {
|
|
|
654
654
|
};
|
|
655
655
|
}
|
|
656
656
|
|
|
657
|
+
export interface ICheckChangedEvent {
|
|
658
|
+
'detail': {
|
|
659
|
+
'value': boolean;
|
|
660
|
+
'indeterminate': boolean;
|
|
661
|
+
};
|
|
662
|
+
}
|
|
663
|
+
|
|
657
664
|
// --- Form Control ---
|
|
658
665
|
|
|
659
666
|
export interface IFormCloseEvent extends ICustomEvent {
|
|
@@ -909,6 +916,16 @@ export interface ITabCloseEvent extends ICustomEvent {
|
|
|
909
916
|
};
|
|
910
917
|
}
|
|
911
918
|
|
|
919
|
+
// --- Table Control ---
|
|
920
|
+
|
|
921
|
+
export interface ITableSortEvent extends ICustomEvent {
|
|
922
|
+
'detail': {
|
|
923
|
+
'index': number;
|
|
924
|
+
'label': string;
|
|
925
|
+
'sort': 'desc' | 'asc';
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
|
|
912
929
|
// -------------------------
|
|
913
930
|
// ---------- vue ----------
|
|
914
931
|
// -------------------------
|