clickgo 4.2.0 → 5.0.0
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 +30 -0
- package/dist/app/demo.cga +0 -0
- package/dist/app/task.cga +0 -0
- package/dist/clickgo.d.ts +2 -0
- package/dist/control/arteditor.cgc +0 -0
- package/dist/control/box.cgc +0 -0
- package/dist/control/captcha.cgc +0 -0
- package/dist/control/common.cgc +0 -0
- package/dist/control/cube.cgc +0 -0
- package/dist/control/desc.cgc +0 -0
- package/dist/control/drawer.cgc +0 -0
- package/dist/control/echarts.cgc +0 -0
- package/dist/control/form.cgc +0 -0
- package/dist/control/iconview.cgc +0 -0
- package/dist/control/jodit.cgc +0 -0
- package/dist/control/map.cgc +0 -0
- package/dist/control/marked.cgc +0 -0
- package/dist/control/monaco.cgc +0 -0
- package/dist/control/mpegts.cgc +0 -0
- package/dist/control/nav.cgc +0 -0
- package/dist/control/novnc.cgc +0 -0
- package/dist/control/objviewer.cgc +0 -0
- package/dist/control/page.cgc +0 -0
- package/dist/control/pdf.cgc +0 -0
- package/dist/control/property.cgc +0 -0
- package/dist/control/qrcode.cgc +0 -0
- package/dist/control/table.cgc +0 -0
- package/dist/control/task.cgc +0 -0
- package/dist/control/tplink.cgc +0 -0
- package/dist/control/tuieditor.cgc +0 -0
- package/dist/control/tuiviewer.cgc +0 -0
- package/dist/control/tums.cgc +0 -0
- package/dist/control/xterm.cgc +0 -0
- package/dist/global.css +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/control.d.ts +1 -1
- package/dist/lib/core.d.ts +6 -5
- package/dist/lib/dom.d.ts +3 -160
- package/dist/lib/form.d.ts +9 -27
- package/dist/lib/fs.d.ts +1 -1
- package/dist/lib/task.d.ts +1 -1
- package/dist/lib/tool.d.ts +15 -5
- package/dist/lib/zip.d.ts +0 -1
- package/dist/theme/cyber.cgt +0 -0
- package/dist/theme/dark.cgt +0 -0
- package/dist/theme/light.cgt +0 -0
- package/package.json +16 -9
package/dist/lib/control.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ export declare abstract class AbstractControl {
|
|
|
89
89
|
* --- 判断当前事件可否执行 ---
|
|
90
90
|
* @param e 鼠标、触摸、键盘事件
|
|
91
91
|
*/
|
|
92
|
-
allowEvent(e:
|
|
92
|
+
allowEvent(e: PointerEvent | KeyboardEvent): boolean;
|
|
93
93
|
/**
|
|
94
94
|
* --- 触发系统方法 ---
|
|
95
95
|
* @param name 方法名
|
package/dist/lib/core.d.ts
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import * as mpegts from 'mpegts.js';
|
|
16
17
|
import * as clickgo from '../clickgo';
|
|
17
18
|
import * as lForm from './form';
|
|
18
19
|
import * as lControl from './control';
|
|
@@ -92,9 +93,9 @@ export declare function trigger(name: TGlobalEvent, taskId?: string | boolean |
|
|
|
92
93
|
export declare function readApp(blob: Blob): Promise<false | IApp>;
|
|
93
94
|
/**
|
|
94
95
|
* --- 从网址下载应用 ---
|
|
95
|
-
* @param url 对于当前网页的相对、绝对路径,以 .cga 结尾的文件 ---
|
|
96
|
-
* @param opt,notifyId:显示进度条的 notify id,current:设置则以设置的为准,不以 / 结尾,否则以 location 为准 ---
|
|
97
96
|
* @param taskId 所属任务 ID
|
|
97
|
+
* @param url 对于当前网页的相对、绝对路径,以 .cga 结尾的文件
|
|
98
|
+
* @param opt 选项
|
|
98
99
|
*/
|
|
99
100
|
export declare function fetchApp(taskId: string, url: string, opt?: ICoreFetchAppOptions): Promise<null | IApp>;
|
|
100
101
|
/**
|
|
@@ -103,7 +104,7 @@ export declare function fetchApp(taskId: string, url: string, opt?: ICoreFetchAp
|
|
|
103
104
|
export declare function getAvailArea(): IAvailArea;
|
|
104
105
|
/**
|
|
105
106
|
* --- 修改浏览器 hash ---
|
|
106
|
-
* @param
|
|
107
|
+
* @param current 当前任务 id
|
|
107
108
|
* @param hash 修改的值,不含 #
|
|
108
109
|
*/
|
|
109
110
|
export declare function hash(current: TCurrent, hash: string): Promise<boolean>;
|
|
@@ -139,8 +140,7 @@ export declare function open(url: string): void;
|
|
|
139
140
|
* --- 注册模块 ---
|
|
140
141
|
* @param current 当前任务 id
|
|
141
142
|
* @param name 模块名
|
|
142
|
-
* @param
|
|
143
|
-
* @param version 版本号,非 ESM 可留空
|
|
143
|
+
* @param opt 选项
|
|
144
144
|
*/
|
|
145
145
|
export declare function regModule(current: TCurrent, name: string, opt: {
|
|
146
146
|
/** --- ESM 模式必填 --- */
|
|
@@ -154,6 +154,7 @@ export declare function regModule(current: TCurrent, name: string, opt: {
|
|
|
154
154
|
*/
|
|
155
155
|
export declare function checkModule(name: string): boolean;
|
|
156
156
|
export declare function getModule(name: 'tums-player'): Promise<ITumsPlayer | null>;
|
|
157
|
+
export declare function getModule(name: 'mpegts'): Promise<typeof mpegts.default | null>;
|
|
157
158
|
export declare function getModule(name: string): Promise<any | null>;
|
|
158
159
|
/**
|
|
159
160
|
* --- 加载模块,返回 true / false ---
|
package/dist/lib/dom.d.ts
CHANGED
|
@@ -38,10 +38,6 @@ export declare function setGlobalCursor(type?: string): void;
|
|
|
38
38
|
* @param enable 是否启用
|
|
39
39
|
*/
|
|
40
40
|
export declare function setGlobalTransition(enable: boolean): void;
|
|
41
|
-
/**
|
|
42
|
-
* --- 判断当前的事件是否是含有 touch 的设备触发的,如果当前就是 touch 则直接返回 false(false 代表 OK,true 代表 touch 设备却触发了 mouse 事件) ---
|
|
43
|
-
*/
|
|
44
|
-
export declare function hasTouchButMouse(e: MouseEvent | TouchEvent | PointerEvent): boolean;
|
|
45
41
|
/**
|
|
46
42
|
* --- 创建任务时连同一起创建的 style 标签 ---
|
|
47
43
|
* @param taskId 任务 id
|
|
@@ -136,10 +132,10 @@ export declare function clearWatchSize(taskId: lCore.TCurrent): void;
|
|
|
136
132
|
export declare function getWatchCount(taskId?: string): number;
|
|
137
133
|
/**
|
|
138
134
|
* --- 添加 DOM 内容变化监视 ---
|
|
139
|
-
* @param current 当前任务
|
|
135
|
+
* @param current 当前任务
|
|
140
136
|
* @param el dom 对象
|
|
141
137
|
* @param cb 回调
|
|
142
|
-
* @param mode
|
|
138
|
+
* @param mode 监听模式,默认 default
|
|
143
139
|
*/
|
|
144
140
|
export declare function watch(current: lCore.TCurrent, el: HTMLElement, cb: (mutations: MutationRecord[]) => void | Promise<void>, mode?: 'child' | 'childsub' | 'style' | 'text' | 'default', immediate?: boolean): boolean;
|
|
145
141
|
/**
|
|
@@ -197,69 +193,7 @@ export declare function isWatchProperty(el: HTMLElement): boolean;
|
|
|
197
193
|
*/
|
|
198
194
|
export declare function clearWatchProperty(formId: string, panelId?: string): void;
|
|
199
195
|
export declare function getWatchInfo(): IGetWatchInfoResult;
|
|
200
|
-
/**
|
|
201
|
-
* --- 鼠标/手指没移动时,click 才生效 ---
|
|
202
|
-
* @param e 事件对象
|
|
203
|
-
* @param handler 回调
|
|
204
|
-
*/
|
|
205
|
-
export declare function bindClick(e: MouseEvent | TouchEvent, handler: (e: MouseEvent | TouchEvent, x: number, y: number) => void | Promise<void>): void;
|
|
206
|
-
/**
|
|
207
|
-
* --- 相当于鼠标/手指两次 click 的效果,并且两次位置差别不太大,dblclick 才生效 ---
|
|
208
|
-
* @param e 事件对象
|
|
209
|
-
* @param handler 回调
|
|
210
|
-
*/
|
|
211
|
-
export declare function bindDblClick(e: MouseEvent | TouchEvent, handler: (e: MouseEvent | TouchEvent, x: number, y: number) => void | Promise<void>): void;
|
|
212
|
-
/**
|
|
213
|
-
* --- 绑定按下以及弹起事件,touch 和 mouse 只会绑定一个 ---
|
|
214
|
-
* @param oe MouseEvent | TouchEvent
|
|
215
|
-
* @param opt 回调选项
|
|
216
|
-
*/
|
|
217
|
-
export declare function bindDown<T extends MouseEvent | TouchEvent>(oe: T, opt: IBindDownOptions<T>): void;
|
|
218
|
-
/**
|
|
219
|
-
* --- 绑定缩放,要绑定到 mousedown、touchstart、touchmove、touchend、wheel 上 ---
|
|
220
|
-
* @param oe 触发的时间
|
|
221
|
-
* @param handler 回调函数
|
|
222
|
-
*/
|
|
223
|
-
export declare function bindScale(oe: MouseEvent | TouchEvent | WheelEvent, handler: (e: MouseEvent | TouchEvent | WheelEvent, scale: number, cpos: {
|
|
224
|
-
'x': number;
|
|
225
|
-
'y': number;
|
|
226
|
-
}) => void | Promise<void>): void;
|
|
227
|
-
/**
|
|
228
|
-
* --- 绑定上拉、下拉、左拉、右拉 ---
|
|
229
|
-
* @param oe 响应事件
|
|
230
|
-
* @param before before 事件,返回 1 则显示 gesture,0 则不处理(可能会向上传递事件),-1 则 stopPropagation(本层可拖动,若实际不可拖动则可能导致浏览器页面滚动)
|
|
231
|
-
* @param handler 执行完毕的话才会回调
|
|
232
|
-
*/
|
|
233
|
-
export declare function bindGesture(oe: MouseEvent | TouchEvent | WheelEvent, before: (e: MouseEvent | TouchEvent | WheelEvent, dir: 'top' | 'right' | 'bottom' | 'left') => number, handler?: (dir: 'top' | 'right' | 'bottom' | 'left') => void | Promise<void>): void;
|
|
234
|
-
export declare function allowEvent(e: MouseEvent | TouchEvent | KeyboardEvent): boolean;
|
|
235
|
-
/**
|
|
236
|
-
* --- 绑定长按事件 ---
|
|
237
|
-
* @param e 事件原型
|
|
238
|
-
* @param long 回调
|
|
239
|
-
*/
|
|
240
|
-
export declare function bindLong(e: MouseEvent | TouchEvent, long: (e: MouseEvent | TouchEvent) => void | Promise<void>): void;
|
|
241
|
-
/**
|
|
242
|
-
* --- 重新绑定 drag 数据 ---
|
|
243
|
-
* @param data 要绑定的数据
|
|
244
|
-
*/
|
|
245
|
-
export declare function setDragData(data?: string | number | boolean | Record<string, any>): void;
|
|
246
|
-
/**
|
|
247
|
-
* --- 绑定拖动 ---
|
|
248
|
-
* @param e 鼠标事件
|
|
249
|
-
* @param opt 参数
|
|
250
|
-
*/
|
|
251
|
-
export declare function bindDrag(e: MouseEvent | TouchEvent, opt: {
|
|
252
|
-
'el': HTMLElement;
|
|
253
|
-
'data'?: any;
|
|
254
|
-
'start'?: (x: number, y: number) => any;
|
|
255
|
-
'move'?: (e: MouseEvent | TouchEvent, opt: IBindMoveMoveOptions) => void;
|
|
256
|
-
'end'?: (moveTimes: Array<{
|
|
257
|
-
'time': number;
|
|
258
|
-
'ox': number;
|
|
259
|
-
'oy': number;
|
|
260
|
-
}>, e: MouseEvent | TouchEvent) => void;
|
|
261
|
-
}): void;
|
|
262
|
-
/** --- 目前是否已绑定了 bindMove --- */
|
|
196
|
+
/** --- 相关状态 --- */
|
|
263
197
|
export declare let is: {
|
|
264
198
|
'move': boolean;
|
|
265
199
|
'shift': boolean;
|
|
@@ -274,18 +208,6 @@ export declare let is: {
|
|
|
274
208
|
/** --- 动画开启状态 --- */
|
|
275
209
|
'transition': boolean;
|
|
276
210
|
};
|
|
277
|
-
/**
|
|
278
|
-
* --- 绑定拖动事件 ---
|
|
279
|
-
* @param e mousedown 或 touchstart 的 event
|
|
280
|
-
* @param opt 回调选项
|
|
281
|
-
*/
|
|
282
|
-
export declare function bindMove(e: MouseEvent | TouchEvent, opt: IBindMoveOptions): IBindMoveResult;
|
|
283
|
-
/**
|
|
284
|
-
* --- 绑定拖动改变大小事件 ---
|
|
285
|
-
* @param e mousedown 或 touchstart 的 event
|
|
286
|
-
* @param opt 选项,width, height 当前对象宽高
|
|
287
|
-
*/
|
|
288
|
-
export declare function bindResize(e: MouseEvent | TouchEvent, opt: IBindResizeOptions): void;
|
|
289
211
|
/**
|
|
290
212
|
* --- 通过 data 名查找上层所有标签是否存在 ---
|
|
291
213
|
* @param el 当前标签
|
|
@@ -410,85 +332,6 @@ export interface IDomSize {
|
|
|
410
332
|
'scrollWidth': number;
|
|
411
333
|
'scrollHeight': number;
|
|
412
334
|
}
|
|
413
|
-
/** --- 绑定鼠标事件选项 --- */
|
|
414
|
-
export interface IBindDownOptions<T extends MouseEvent | TouchEvent> {
|
|
415
|
-
'down'?: (e: T) => void;
|
|
416
|
-
'start'?: (e: T) => any;
|
|
417
|
-
'move'?: (e: T, dir: 'top' | 'right' | 'bottom' | 'left') => any;
|
|
418
|
-
'up'?: (e: T) => void | Promise<void>;
|
|
419
|
-
'end'?: (e: T) => void | Promise<void>;
|
|
420
|
-
}
|
|
421
|
-
/** --- 绑定拖动选项 move 回调的回调参数 --- */
|
|
422
|
-
export interface IBindMoveMoveOptions {
|
|
423
|
-
'ox': number;
|
|
424
|
-
'oy': number;
|
|
425
|
-
'x': number;
|
|
426
|
-
'y': number;
|
|
427
|
-
'border': TDomBorder;
|
|
428
|
-
'inBorder': {
|
|
429
|
-
'top': boolean;
|
|
430
|
-
'right': boolean;
|
|
431
|
-
'bottom': boolean;
|
|
432
|
-
'left': boolean;
|
|
433
|
-
};
|
|
434
|
-
'dir': 'top' | 'right' | 'bottom' | 'left';
|
|
435
|
-
}
|
|
436
|
-
/** --- 绑定拖动选项 --- */
|
|
437
|
-
export interface IBindMoveOptions {
|
|
438
|
-
'areaObject'?: HTMLElement | lCore.IVue;
|
|
439
|
-
'left'?: number;
|
|
440
|
-
'top'?: number;
|
|
441
|
-
'right'?: number;
|
|
442
|
-
'bottom'?: number;
|
|
443
|
-
'offsetLeft'?: number;
|
|
444
|
-
'offsetTop'?: number;
|
|
445
|
-
'offsetRight'?: number;
|
|
446
|
-
'offsetBottom'?: number;
|
|
447
|
-
'objectLeft'?: number;
|
|
448
|
-
'objectTop'?: number;
|
|
449
|
-
'objectWidth'?: number;
|
|
450
|
-
'objectHeight'?: number;
|
|
451
|
-
'object'?: HTMLElement | lCore.IVue;
|
|
452
|
-
'showRect'?: boolean;
|
|
453
|
-
'cursor'?: string;
|
|
454
|
-
'start'?: (x: number, y: number) => any;
|
|
455
|
-
'move'?: (e: MouseEvent | TouchEvent, opt: IBindMoveMoveOptions) => void;
|
|
456
|
-
'up'?: (moveTimes: Array<{
|
|
457
|
-
'time': number;
|
|
458
|
-
'ox': number;
|
|
459
|
-
'oy': number;
|
|
460
|
-
}>, e: MouseEvent | TouchEvent) => void;
|
|
461
|
-
'end'?: (moveTimes: Array<{
|
|
462
|
-
'time': number;
|
|
463
|
-
'ox': number;
|
|
464
|
-
'oy': number;
|
|
465
|
-
}>, e: MouseEvent | TouchEvent) => void;
|
|
466
|
-
'borderIn'?: (x: number, y: number, border: TDomBorder, e: MouseEvent | TouchEvent) => void;
|
|
467
|
-
'borderOut'?: () => void;
|
|
468
|
-
}
|
|
469
|
-
/** --- 绑定拖动返回值 --- */
|
|
470
|
-
export interface IBindMoveResult {
|
|
471
|
-
'left': number;
|
|
472
|
-
'top': number;
|
|
473
|
-
'right': number;
|
|
474
|
-
'bottom': number;
|
|
475
|
-
}
|
|
476
|
-
/** --- 绑定改变大小选项 --- */
|
|
477
|
-
export interface IBindResizeOptions {
|
|
478
|
-
'objectLeft'?: number;
|
|
479
|
-
'objectTop'?: number;
|
|
480
|
-
'objectWidth'?: number;
|
|
481
|
-
'objectHeight'?: number;
|
|
482
|
-
'object'?: HTMLElement | lCore.IVue;
|
|
483
|
-
'minWidth'?: number;
|
|
484
|
-
'minHeight'?: number;
|
|
485
|
-
'maxWidth'?: number;
|
|
486
|
-
'maxHeight'?: number;
|
|
487
|
-
'border': TDomBorder;
|
|
488
|
-
'start'?: (x: number, y: number) => any;
|
|
489
|
-
'move'?: (left: number, top: number, width: number, height: number, x: number, y: number, border: TDomBorder) => void;
|
|
490
|
-
'end'?: () => void;
|
|
491
|
-
}
|
|
492
335
|
/** --- 监视位置中的元素 --- */
|
|
493
336
|
export interface IWatchPositionItem {
|
|
494
337
|
'el': HTMLElement;
|
package/dist/lib/form.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ declare abstract class AbstractCommon {
|
|
|
54
54
|
* --- 判断当前事件可否执行 ---
|
|
55
55
|
* @param e 鼠标、触摸、键盘事件
|
|
56
56
|
*/
|
|
57
|
-
allowEvent(e:
|
|
57
|
+
allowEvent(e: PointerEvent | KeyboardEvent): boolean;
|
|
58
58
|
/**
|
|
59
59
|
* --- 触发系统方法 ---
|
|
60
60
|
* @param name 方法名
|
|
@@ -255,8 +255,6 @@ export declare const elements: {
|
|
|
255
255
|
'popList': HTMLDivElement;
|
|
256
256
|
'circular': HTMLDivElement;
|
|
257
257
|
'rectangle': HTMLDivElement;
|
|
258
|
-
'gesture': HTMLDivElement;
|
|
259
|
-
'drag': HTMLDivElement;
|
|
260
258
|
'keyboard': HTMLDivElement;
|
|
261
259
|
'notify': HTMLElement;
|
|
262
260
|
'alert': HTMLElement;
|
|
@@ -287,16 +285,16 @@ export declare function max(formId: string): boolean;
|
|
|
287
285
|
*/
|
|
288
286
|
export declare function close(formId: string): boolean;
|
|
289
287
|
/**
|
|
290
|
-
* --- 绑定窗体拖动大小事件,在
|
|
288
|
+
* --- 绑定窗体拖动大小事件,在 pointerdown 中绑定 ---
|
|
291
289
|
* @param e 事件源
|
|
292
290
|
* @param border 调整大小的方位
|
|
293
291
|
*/
|
|
294
|
-
export declare function bindResize(e:
|
|
292
|
+
export declare function bindResize(e: PointerEvent, border: lDom.TDomBorder): void;
|
|
295
293
|
/**
|
|
296
|
-
* --- 绑定窗体拖动事件,在
|
|
294
|
+
* --- 绑定窗体拖动事件,在 pointerdown 中绑定 ---
|
|
297
295
|
* @param e 事件源
|
|
298
296
|
*/
|
|
299
|
-
export declare function bindDrag(e:
|
|
297
|
+
export declare function bindDrag(e: PointerEvent): void;
|
|
300
298
|
/**
|
|
301
299
|
* --- 重置所有已经最大化的窗体大小和位置 ---
|
|
302
300
|
*/
|
|
@@ -413,22 +411,6 @@ export declare function showRectangle(x: number, y: number, border: lDom.TDomBor
|
|
|
413
411
|
* --- 结束时请隐藏矩形 ---
|
|
414
412
|
*/
|
|
415
413
|
export declare function hideRectangle(): void;
|
|
416
|
-
/**
|
|
417
|
-
* --- 显示 drag 虚拟框 ---
|
|
418
|
-
*/
|
|
419
|
-
export declare function showDrag(opt?: {
|
|
420
|
-
/** --- 传入要拖动的对象,让系统仿照他的圆角等形象 --- */
|
|
421
|
-
'element'?: HTMLElement;
|
|
422
|
-
}): void;
|
|
423
|
-
/**
|
|
424
|
-
* --- 移动 drag 到新位置 ---
|
|
425
|
-
* @param opt top:顶部位置,left:左侧位置,width:宽度位置,height:高度位置
|
|
426
|
-
*/
|
|
427
|
-
export declare function moveDrag(opt: IMoveDragOptions): void;
|
|
428
|
-
/**
|
|
429
|
-
* --- 隐藏拖拽框框 ---
|
|
430
|
-
*/
|
|
431
|
-
export declare function hideDrag(): void;
|
|
432
414
|
/**
|
|
433
415
|
* --- 从下方弹出 alert ---
|
|
434
416
|
* @param content 内容
|
|
@@ -475,7 +457,7 @@ export declare function removeFromPop(el: HTMLElement): void;
|
|
|
475
457
|
* @param direction 要显示方向(以 $el 为准的 h 水平 v 垂直 t 垂直水平居中)或坐标
|
|
476
458
|
* @param opt width / height 显示的 pop 定义自定义宽/高度,可省略;null,true 代表为空也会显示,默认为 false; autoPosition, 因 pop 内部内容变动导致的自动更新 pop 位置,默认 false,autoScroll,因原元素位置变更导致 pop 位置变更,默认 false,flow: 是否加入 pop 流,默认加入,不加入的话将不会自动隐藏
|
|
477
459
|
*/
|
|
478
|
-
export declare function showPop(el: HTMLElement | lCore.IVue, pop: HTMLElement | lCore.IVue | undefined, direction: 'h' | 'v' | 't' |
|
|
460
|
+
export declare function showPop(el: HTMLElement | lCore.IVue, pop: HTMLElement | lCore.IVue | undefined, direction: 'h' | 'v' | 't' | PointerEvent | {
|
|
479
461
|
x: number;
|
|
480
462
|
y: number;
|
|
481
463
|
}, opt?: {
|
|
@@ -497,10 +479,10 @@ export declare function hidePop(pop?: HTMLElement | lCore.IVue): void;
|
|
|
497
479
|
/** --- 检测 pop 是不是刚刚显示的 --- */
|
|
498
480
|
export declare function isJustPop(el: HTMLElement | number): boolean;
|
|
499
481
|
/**
|
|
500
|
-
* --- 点下
|
|
482
|
+
* --- 点下 pointerdown 屏幕任意一位置时根据点击处处理隐藏 pop 和焦点丢失事件,鼠标和 touch 只会响应一个 ---
|
|
501
483
|
* @param e 事件对象
|
|
502
484
|
*/
|
|
503
|
-
export declare function doFocusAndPopEvent(e:
|
|
485
|
+
export declare function doFocusAndPopEvent(e: PointerEvent): Promise<void>;
|
|
504
486
|
/**
|
|
505
487
|
* --- 移除一个 form(关闭窗口) ---
|
|
506
488
|
* @param formId 要移除的 form id
|
|
@@ -564,7 +546,7 @@ export declare function confirm(current: lCore.TCurrent, opt: string | IFormConf
|
|
|
564
546
|
export declare function prompt(current: lCore.TCurrent, opt: string | IFormPromptOptions): Promise<string>;
|
|
565
547
|
/**
|
|
566
548
|
* --- 让窗体闪烁 ---
|
|
567
|
-
* @param
|
|
549
|
+
* @param current 所属的 taskId
|
|
568
550
|
* @param formId 要闪烁的窗体 id,必填
|
|
569
551
|
*/
|
|
570
552
|
export declare function flash(current: lCore.TCurrent, formId: string): Promise<void>;
|
package/dist/lib/fs.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export declare function putContent(current: lCore.TCurrent, path: string, data:
|
|
|
45
45
|
* --- 读取链接的 target ---
|
|
46
46
|
* @param current 当前任务 id
|
|
47
47
|
* @param path 要读取的路径
|
|
48
|
-
* @param
|
|
48
|
+
* @param encoding 编码
|
|
49
49
|
*/
|
|
50
50
|
export declare function readLink(current: lCore.TCurrent, path: string, encoding?: BufferEncoding): Promise<string | null>;
|
|
51
51
|
/**
|
package/dist/lib/task.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare function getRuntime(current: lCore.TCurrent, taskId: string): IRu
|
|
|
16
16
|
export declare function getOriginList(current: lCore.TCurrent): Promise<Record<string, ITask>>;
|
|
17
17
|
/**
|
|
18
18
|
* --- 获取任务简略信息 ---
|
|
19
|
-
* @param
|
|
19
|
+
* @param taskId 任务 id
|
|
20
20
|
*/
|
|
21
21
|
export declare function get(taskId: lCore.TCurrent): ITaskInfo | null;
|
|
22
22
|
/**
|
package/dist/lib/tool.d.ts
CHANGED
|
@@ -32,8 +32,11 @@ export declare function compressor<T extends File | Blob>(file: T, options?: {
|
|
|
32
32
|
/** --- 压缩质量,默认 0.8 --- */
|
|
33
33
|
'quality'?: number;
|
|
34
34
|
}): Promise<T | false>;
|
|
35
|
-
|
|
35
|
+
/** --- 类原型信息 --- */
|
|
36
|
+
export interface IClassPrototype {
|
|
37
|
+
/** --- 方法列表,key 为方法名,value 为函数体,例如:{'method1': function() { ... }} --- */
|
|
36
38
|
'method': Record<string, any>;
|
|
39
|
+
/** --- 访问器列表,key 为属性名,value 为包含 get 和 set 的对象,例如:{'prop1': { 'get': function() { ... }, 'set': function(v) { ... } }} --- */
|
|
37
40
|
'access': Record<string, {
|
|
38
41
|
'get': any;
|
|
39
42
|
'set': any;
|
|
@@ -123,7 +126,7 @@ export declare function layoutInsertAttr(layout: string, insert: string, opt?: {
|
|
|
123
126
|
*/
|
|
124
127
|
export declare function layoutClassPrepend(layout: string, preps: string[]): string;
|
|
125
128
|
/**
|
|
126
|
-
* --- 对 layout 的
|
|
129
|
+
* --- 对 layout 的 events 事件进行包裹 ---
|
|
127
130
|
* @param layout 要包裹的 layout
|
|
128
131
|
*/
|
|
129
132
|
export declare function eventsAttrWrap(layout: string): string;
|
|
@@ -218,7 +221,11 @@ export declare function hex2rgb(hex: string): {
|
|
|
218
221
|
};
|
|
219
222
|
/**
|
|
220
223
|
* --- rgb 字符串转 hsl 数组 ---
|
|
221
|
-
* @param
|
|
224
|
+
* @param r r 值或 rgb(x, x, x) 或直接 x,x,x
|
|
225
|
+
* @param g g 值
|
|
226
|
+
* @param b b 值
|
|
227
|
+
* @param a a 值
|
|
228
|
+
* @param decimal 是否保留小数
|
|
222
229
|
*/
|
|
223
230
|
export declare function rgb2hsl(r: string | number, g?: string | number, b?: string | number, a?: string | number, decimal?: boolean): {
|
|
224
231
|
'h': number;
|
|
@@ -229,7 +236,11 @@ export declare function rgb2hsl(r: string | number, g?: string | number, b?: str
|
|
|
229
236
|
};
|
|
230
237
|
/**
|
|
231
238
|
* --- hsl 字符串转 rgb 数组 ---
|
|
232
|
-
* @param
|
|
239
|
+
* @param h h 值或 hsl(x, x, x) 或直接 x,x,x
|
|
240
|
+
* @param s s 值
|
|
241
|
+
* @param l l 值
|
|
242
|
+
* @param a a 值
|
|
243
|
+
* @param decimal 是否保留小数
|
|
233
244
|
*/
|
|
234
245
|
export declare function hsl2rgb(h: string | number, s?: string | number, l?: string | number, a?: string | number, decimal?: boolean): {
|
|
235
246
|
'r': number;
|
|
@@ -528,4 +539,3 @@ export interface IRequestOptions {
|
|
|
528
539
|
}
|
|
529
540
|
/** --- 虚假值类型 --- */
|
|
530
541
|
export type TFalsy = false | '' | 0 | null | undefined | typeof NaN;
|
|
531
|
-
export {};
|
package/dist/lib/zip.d.ts
CHANGED
|
Binary file
|
package/dist/theme/dark.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
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Background interface, software interface, mobile phone APP interface operation library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -13,23 +13,30 @@
|
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"types": "./dist/clickgo.d.ts",
|
|
15
15
|
"scripts": {
|
|
16
|
+
"sass": "sass --watch dist/:dist/ --style compressed --no-source-map",
|
|
16
17
|
"native": "electron ./dist/test/native",
|
|
17
18
|
"native2": "electron ./dist/test/native/index2",
|
|
18
|
-
"native3": "electron ./dist/test/native/index3"
|
|
19
|
+
"native3": "electron ./dist/test/native/index3",
|
|
20
|
+
"build-doc": "bash ./utils/build-doc.sh"
|
|
19
21
|
},
|
|
20
22
|
"devDependencies": {
|
|
21
23
|
"@litert/eslint-plugin-rules": "^0.3.1",
|
|
24
|
+
"@litert/pointer": "^1.6.0",
|
|
22
25
|
"@types/clean-css": "^4.2.11",
|
|
23
|
-
"@types/
|
|
26
|
+
"@types/google.maps": "^3.58.1",
|
|
27
|
+
"@types/node": "^25.0.3",
|
|
24
28
|
"clean-css": "^5.3.3",
|
|
25
|
-
"commander": "^14.0.
|
|
29
|
+
"commander": "^14.0.2",
|
|
26
30
|
"compressorjs": "^1.2.1",
|
|
27
31
|
"echarts": "^6.0.0",
|
|
28
|
-
"electron": "^
|
|
32
|
+
"electron": "^39.2.7",
|
|
29
33
|
"jszip": "^3.10.1",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
+
"mpegts.js": "^1.8.0",
|
|
35
|
+
"rollup": "^4.54.0",
|
|
36
|
+
"terser": "^5.44.1",
|
|
37
|
+
"typedoc": "^0.28.15",
|
|
38
|
+
"typedoc-plugin-markdown": "^4.9.0",
|
|
39
|
+
"typescript": "^5.9.3",
|
|
40
|
+
"vue": "^3.5.26"
|
|
34
41
|
}
|
|
35
42
|
}
|