clickgo 7.8.0 → 7.9.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/dist/app/demo.cga +0 -0
- package/dist/app/task.cga +0 -0
- package/dist/control/common.cgc +0 -0
- package/dist/control/form.cgc +0 -0
- package/dist/index.js +1 -1
- package/dist/lib/form/abstract-component.d.ts +49 -0
- package/dist/lib/form/abstract-form.d.ts +195 -0
- package/dist/lib/form/abstract-panel.d.ts +50 -0
- package/dist/lib/form/base.d.ts +79 -0
- package/dist/lib/form/create.d.ts +35 -0
- package/dist/lib/form/dialog.d.ts +28 -0
- package/dist/lib/form/effects.d.ts +45 -0
- package/dist/lib/form/notification.d.ts +51 -0
- package/dist/lib/form/popup.d.ts +78 -0
- package/dist/lib/form/remove.d.ts +28 -0
- package/dist/lib/form/state.d.ts +29 -0
- package/dist/lib/form/system.d.ts +63 -0
- package/dist/lib/form/system.types.d.ts +72 -0
- package/dist/lib/form/types.d.ts +181 -0
- package/dist/lib/form/view.d.ts +55 -0
- package/dist/lib/form/window.d.ts +125 -0
- package/dist/lib/form.d.ts +27 -872
- package/dist/theme/classic-light.cgt +0 -0
- package/dist/theme/cloud-dark.cgt +0 -0
- package/dist/theme/cloud-light.cgt +0 -0
- package/dist/theme/dark.cgt +0 -0
- package/dist/theme/dashboard-light.cgt +0 -0
- package/dist/theme/light.cgt +0 -0
- package/dist/theme/software-dark.cgt +0 -0
- package/dist/theme/software-light.cgt +0 -0
- package/doc/clickgo-rag.md +572 -445
- package/package.json +4 -3
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as lCore from '../core';
|
|
2
|
+
/** --- 系统任务栏的 Vue 根实例 --- */
|
|
3
|
+
export declare let simpleSystemTaskRoot: lCore.IVue;
|
|
4
|
+
/** --- 启动器的 Vue 根实例 --- */
|
|
5
|
+
export declare let launcherRoot: lCore.IVue;
|
|
6
|
+
/** --- 系统宿主 DOM 节点 --- */
|
|
7
|
+
export declare const elements: {
|
|
8
|
+
'wrap': HTMLDivElement;
|
|
9
|
+
'list': HTMLDivElement;
|
|
10
|
+
'popList': HTMLDivElement;
|
|
11
|
+
'circular': HTMLDivElement;
|
|
12
|
+
'rectangle': HTMLDivElement;
|
|
13
|
+
'keyboard': HTMLDivElement;
|
|
14
|
+
'notify': HTMLElement;
|
|
15
|
+
'alert': HTMLElement;
|
|
16
|
+
'simpletask': HTMLDivElement;
|
|
17
|
+
'launcher': HTMLDivElement;
|
|
18
|
+
'confirm': HTMLDivElement;
|
|
19
|
+
'init': () => void;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* --- 刷新系统根节点及任务窗体的语言方向 ---
|
|
23
|
+
* @param taskId 仅刷新指定任务,省略时刷新全部任务
|
|
24
|
+
* @returns 无返回值
|
|
25
|
+
*/
|
|
26
|
+
export declare function refreshLocaleDirection(taskId?: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* --- 显示系统级询问框 ---
|
|
29
|
+
* @param current 系统级 ID
|
|
30
|
+
* @param html 询问框内容
|
|
31
|
+
* @returns 用户选择;ID 不匹配或已有询问框时返回 false
|
|
32
|
+
*/
|
|
33
|
+
export declare function superConfirm(current: string, html: string): Promise<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* --- 显示系统级虚拟键盘 ---
|
|
36
|
+
* @returns 无返回值
|
|
37
|
+
*/
|
|
38
|
+
export declare function showKeyboard(): void;
|
|
39
|
+
/**
|
|
40
|
+
* --- 隐藏系统级虚拟键盘 ---
|
|
41
|
+
* @returns 无返回值
|
|
42
|
+
*/
|
|
43
|
+
export declare function hideKeyboard(): void;
|
|
44
|
+
/**
|
|
45
|
+
* --- 查询 Launcher 当前显示状态,供首次挂载时同步 ---
|
|
46
|
+
* @returns 是否显示
|
|
47
|
+
*/
|
|
48
|
+
export declare function getLauncherShow(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* --- 显示 launcher 界面;状态变化时通知所有应用与窗体 ---
|
|
51
|
+
* @returns 无返回值
|
|
52
|
+
*/
|
|
53
|
+
export declare function showLauncher(): void;
|
|
54
|
+
/**
|
|
55
|
+
* --- 隐藏 launcher 界面;重复关闭不重复通知或安排清理 ---
|
|
56
|
+
* @returns 无返回值
|
|
57
|
+
*/
|
|
58
|
+
export declare function hideLauncher(): void;
|
|
59
|
+
/**
|
|
60
|
+
* --- 初始化系统宿主,多次调用仅执行一次 ---
|
|
61
|
+
* @returns 无返回值
|
|
62
|
+
*/
|
|
63
|
+
export declare function init(): void;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type * as clickgo from '../../clickgo';
|
|
2
|
+
import type * as lCore from '../core';
|
|
3
|
+
import type * as lTask from '../task';
|
|
4
|
+
import type * as lTool from '../tool';
|
|
5
|
+
import type * as lDom from '../dom';
|
|
6
|
+
import type { state, info } from './state';
|
|
7
|
+
import type { changeFocus, getMaxZIndexID } from './window';
|
|
8
|
+
/** --- 系统宿主所需的框架能力和状态;挂载后通过回调同步 Vue 根实例 --- */
|
|
9
|
+
export interface ISystemDependencies {
|
|
10
|
+
/** --- Vue 与指针模块 --- */
|
|
11
|
+
'clickgo': typeof clickgo;
|
|
12
|
+
/** --- 配置、事件及 Vue 类型 --- */
|
|
13
|
+
'lCore': typeof lCore;
|
|
14
|
+
/** --- 任务启动及语言查询 --- */
|
|
15
|
+
'lTask': typeof lTask;
|
|
16
|
+
/** --- 语言标签、方向及回退工具 --- */
|
|
17
|
+
'lTool': typeof lTool;
|
|
18
|
+
/** --- 滚动容器与键盘状态 --- */
|
|
19
|
+
'lDom': typeof lDom;
|
|
20
|
+
/** --- 系统 ID 等共享状态 --- */
|
|
21
|
+
'state': typeof state;
|
|
22
|
+
/** --- 系统语言文本及窗体信息 --- */
|
|
23
|
+
'info': typeof info;
|
|
24
|
+
/** --- 切换窗体焦点 --- */
|
|
25
|
+
'changeFocus': typeof changeFocus;
|
|
26
|
+
/** --- 查询可恢复焦点的最上层窗体 --- */
|
|
27
|
+
'getMaxZIndexID': typeof getMaxZIndexID;
|
|
28
|
+
/** --- 语言方向变化后刷新通知位置 --- */
|
|
29
|
+
'refreshNotifyPosition': () => void;
|
|
30
|
+
/** --- 任务栏 Vue 挂载后同步根实例 --- */
|
|
31
|
+
'setSimpleSystemTaskRoot': (root: lCore.IVue) => void;
|
|
32
|
+
/** --- 启动器 Vue 挂载后同步根实例 --- */
|
|
33
|
+
'setLauncherRoot': (root: lCore.IVue) => void;
|
|
34
|
+
}
|
|
35
|
+
/** --- 系统宿主创建的 DOM 节点,init 将它们挂载到页面 --- */
|
|
36
|
+
export interface ISystemElements {
|
|
37
|
+
'wrap': HTMLDivElement;
|
|
38
|
+
'list': HTMLDivElement;
|
|
39
|
+
'popList': HTMLDivElement;
|
|
40
|
+
'circular': HTMLDivElement;
|
|
41
|
+
'rectangle': HTMLDivElement;
|
|
42
|
+
'keyboard': HTMLDivElement;
|
|
43
|
+
'notify': HTMLElement;
|
|
44
|
+
'alert': HTMLElement;
|
|
45
|
+
'simpletask': HTMLDivElement;
|
|
46
|
+
'launcher': HTMLDivElement;
|
|
47
|
+
'confirm': HTMLDivElement;
|
|
48
|
+
'init': () => void;
|
|
49
|
+
}
|
|
50
|
+
/** --- 系统宿主运行时能力,节点和 Vue 根实例在初始化时挂载 --- */
|
|
51
|
+
export interface ISystemRuntime {
|
|
52
|
+
'elements': ISystemElements;
|
|
53
|
+
/** @param taskId 仅刷新指定任务,省略时刷新全部任务 */
|
|
54
|
+
refreshLocaleDirection(taskId?: string): void;
|
|
55
|
+
/** @param current 系统级 ID
|
|
56
|
+
* @param html 询问框内容
|
|
57
|
+
* @returns 用户选择;ID 不匹配或已有询问框时返回 false
|
|
58
|
+
*/
|
|
59
|
+
superConfirm(current: string, html: string): Promise<boolean>;
|
|
60
|
+
/** --- 显示虚拟键盘 --- */
|
|
61
|
+
showKeyboard(): void;
|
|
62
|
+
/** --- 隐藏虚拟键盘 --- */
|
|
63
|
+
hideKeyboard(): void;
|
|
64
|
+
/** @returns 启动器是否显示,不包含关闭动画 */
|
|
65
|
+
getLauncherShow(): boolean;
|
|
66
|
+
/** --- 显示启动器并广播状态变化 --- */
|
|
67
|
+
showLauncher(): void;
|
|
68
|
+
/** --- 隐藏启动器并广播状态变化 --- */
|
|
69
|
+
hideLauncher(): void;
|
|
70
|
+
/** --- 初始化宿主,重复调用无操作 --- */
|
|
71
|
+
init(): void;
|
|
72
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2007-2025 MAIYUN.NET
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type * as lCore from '../core';
|
|
17
|
+
import type * as lControl from '../control';
|
|
18
|
+
import type { AbstractForm } from '../form';
|
|
19
|
+
/** --- AbstractPanel 显示事件 --- */
|
|
20
|
+
export interface IAbstractPanelShowEvent {
|
|
21
|
+
'detail': {
|
|
22
|
+
'data': Record<string, any>;
|
|
23
|
+
/** --- 是否是 nav 模式 --- */
|
|
24
|
+
'nav': boolean;
|
|
25
|
+
/** --- 仅 nav 联动时有效,代表是前进还是回退 --- */
|
|
26
|
+
'action': 'forword' | 'back';
|
|
27
|
+
/** --- 仅 nav 联动时有效,代表上一个的 formHash 的值 --- */
|
|
28
|
+
'previous': string;
|
|
29
|
+
/** --- 仅 nav 联动时有效,代表本次 show 的时候 qs 是否发生了变化 --- */
|
|
30
|
+
'qsChange': boolean;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/** --- AbstractPanel qsChange 显示事件 --- */
|
|
34
|
+
export interface IAbstractPanelQsChangeShowEvent {
|
|
35
|
+
'detail': {
|
|
36
|
+
'data': Record<string, any>;
|
|
37
|
+
/** --- 是否是 nav 模式 --- */
|
|
38
|
+
'nav': boolean;
|
|
39
|
+
/** --- 仅 nav 联动时有效,代表是前进还是回退 --- */
|
|
40
|
+
'action': 'forword' | 'back';
|
|
41
|
+
/** --- 仅 nav 联动时有效,代表上一个的 formHash 的值 --- */
|
|
42
|
+
'previous': string;
|
|
43
|
+
/** --- 仅 nav 联动时有效,代表本次 qs 是否发生了变化 --- */
|
|
44
|
+
'qsChange': boolean;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/** --- 运行时 task 中的 form 对象 --- */
|
|
48
|
+
export interface IForm {
|
|
49
|
+
'id': string;
|
|
50
|
+
'vapp': lCore.IVApp;
|
|
51
|
+
'vroot': lCore.IVue;
|
|
52
|
+
/** --- 是否已经执行过了关闭窗体方法,此处加判断为了防止重复执行 close 导致的 bug --- */
|
|
53
|
+
'closed': boolean;
|
|
54
|
+
}
|
|
55
|
+
/** --- Form 的简略情况,通常在 list 当中 --- */
|
|
56
|
+
export interface IFormInfo {
|
|
57
|
+
'taskId': string;
|
|
58
|
+
'title': string;
|
|
59
|
+
'icon': string;
|
|
60
|
+
'stateMax': boolean;
|
|
61
|
+
'stateMin': boolean;
|
|
62
|
+
'show': boolean;
|
|
63
|
+
'focus': boolean;
|
|
64
|
+
'showInSystemTask': boolean;
|
|
65
|
+
}
|
|
66
|
+
/** --- 移动 drag 到新位置函数的选项 --- */
|
|
67
|
+
export interface IMoveDragOptions {
|
|
68
|
+
'top'?: number;
|
|
69
|
+
'left'?: number;
|
|
70
|
+
'width'?: number;
|
|
71
|
+
'height'?: number;
|
|
72
|
+
'icon'?: boolean;
|
|
73
|
+
}
|
|
74
|
+
/** --- 弹出 notify 信息框的选项 --- */
|
|
75
|
+
export interface INotifyOptions {
|
|
76
|
+
'title'?: string;
|
|
77
|
+
/** --- 正文 --- */
|
|
78
|
+
'content'?: string;
|
|
79
|
+
/** --- 浅色描述 --- */
|
|
80
|
+
'note'?: string;
|
|
81
|
+
'icon'?: string | null;
|
|
82
|
+
'timeout'?: number;
|
|
83
|
+
'type'?: 'primary' | 'info' | 'warning' | 'danger' | 'progress';
|
|
84
|
+
'progress'?: boolean;
|
|
85
|
+
}
|
|
86
|
+
/** --- notify 信息框的修改选项 --- */
|
|
87
|
+
export interface INotifyContentOptions {
|
|
88
|
+
'title'?: string;
|
|
89
|
+
'content'?: string;
|
|
90
|
+
'note'?: string;
|
|
91
|
+
/** --- 可顺便修改进度 --- */
|
|
92
|
+
'progress'?: number;
|
|
93
|
+
/** --- 设置后将在 x 毫秒后隐藏,这不会大于创建时的设置的总时长 --- */
|
|
94
|
+
'timeout'?: number;
|
|
95
|
+
}
|
|
96
|
+
/** --- Dialog 选项 --- */
|
|
97
|
+
export interface IFormDialogOptions {
|
|
98
|
+
/** --- dialog 窗体标题,不传则使用默认标题 dialog --- */
|
|
99
|
+
'title'?: string;
|
|
100
|
+
/** --- dialog 内容,支持直接传布局字符串 --- */
|
|
101
|
+
'content': string;
|
|
102
|
+
/** --- 底部按钮文本列表,默认使用当前语言的确定按钮文本 --- */
|
|
103
|
+
'buttons'?: string[];
|
|
104
|
+
/** --- 点击按钮后是否自动将按钮文本写入 dialogResult,默认 true --- */
|
|
105
|
+
'autoDialogResult'?: boolean;
|
|
106
|
+
/** --- dialog 控件内容布局方向,h 为横向,v 为纵向 --- */
|
|
107
|
+
'direction'?: 'h' | 'v';
|
|
108
|
+
/** --- dialog 控件内容区项目间距,会透传给 dialog 控件 --- */
|
|
109
|
+
'gutter'?: number | string;
|
|
110
|
+
/** --- dialog 控件宽度,传数字时为像素值,传 fill 时代表填充可用宽度 --- */
|
|
111
|
+
'width'?: number | string;
|
|
112
|
+
/** --- dialog 控件高度,传数字时为像素值,传 fill 时代表填充可用高度 --- */
|
|
113
|
+
'height'?: number | string;
|
|
114
|
+
/** --- dialog 控件内容区是否显示内边距,默认表现与控件自身一致 --- */
|
|
115
|
+
'padding'?: boolean | string;
|
|
116
|
+
/** --- 传值,需要用 data.x 读取 --- */
|
|
117
|
+
'data'?: Record<string, any>;
|
|
118
|
+
/** --- 传值,需要用 methods.x 读取 --- */
|
|
119
|
+
'methods'?: Record<string, (...param: any) => any>;
|
|
120
|
+
/** --- 样式表 --- */
|
|
121
|
+
'style'?: string;
|
|
122
|
+
/** --- 路径基,以 / 结束或文件路径则以文件的基路径为准,可留空 --- */
|
|
123
|
+
'path'?: string;
|
|
124
|
+
/**
|
|
125
|
+
* --- 点击按钮触发事件,不能用 Promise ---
|
|
126
|
+
* @param e 数据事件
|
|
127
|
+
* @param button 按钮的文本
|
|
128
|
+
*/
|
|
129
|
+
select?: (this: AbstractForm & {
|
|
130
|
+
'data': Record<string, any>;
|
|
131
|
+
'methods': Record<string, (...param: any) => any>;
|
|
132
|
+
}, e: IFormDialogSelectEvent, button: string) => void;
|
|
133
|
+
/**
|
|
134
|
+
* --- 窗体挂载完成事件 ---
|
|
135
|
+
*/
|
|
136
|
+
onMounted?: () => void | Promise<void>;
|
|
137
|
+
}
|
|
138
|
+
export interface IFormDialogSelectEvent extends lControl.ICustomEvent {
|
|
139
|
+
'detail': {
|
|
140
|
+
'button': string;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
/** --- Confirm 选项 --- */
|
|
144
|
+
export interface IFormConfirmOptions {
|
|
145
|
+
'title'?: string;
|
|
146
|
+
'content': string;
|
|
147
|
+
'cancel'?: boolean;
|
|
148
|
+
}
|
|
149
|
+
/** --- 显示验证码选项 --- */
|
|
150
|
+
export interface IFormCaptchaOptions {
|
|
151
|
+
/** --- 验证码服务商 --- */
|
|
152
|
+
'factory': 'tc' | 'cf';
|
|
153
|
+
/** --- 验证码 key --- */
|
|
154
|
+
'akey': string;
|
|
155
|
+
}
|
|
156
|
+
/** --- Prompt 选项 --- */
|
|
157
|
+
export interface IFormPromptOptions {
|
|
158
|
+
/** --- 标题 --- */
|
|
159
|
+
'title'?: string;
|
|
160
|
+
/** --- 内容说明 --- */
|
|
161
|
+
'content': string;
|
|
162
|
+
/** --- 文本默认值 --- */
|
|
163
|
+
'text'?: string;
|
|
164
|
+
/** --- 是否显示取消按钮,默认显示 --- */
|
|
165
|
+
'cancel'?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* --- 点击按钮触发事件 ---
|
|
168
|
+
* @param e 数据事件
|
|
169
|
+
* @param button true 代表确定,false 代表取消
|
|
170
|
+
*/
|
|
171
|
+
'select'?: (this: AbstractForm & {
|
|
172
|
+
'data': Record<string, any>;
|
|
173
|
+
}, e: IFormPromptSelectEvent, button: boolean) => void;
|
|
174
|
+
}
|
|
175
|
+
export interface IFormPromptSelectEvent extends lControl.ICustomEvent {
|
|
176
|
+
'detail': {
|
|
177
|
+
/** --- true 代表确定,false 代表取消 --- */
|
|
178
|
+
'button': boolean;
|
|
179
|
+
'value': string;
|
|
180
|
+
};
|
|
181
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2007-2025 MAIYUN.NET
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { AbstractComponent } from './abstract-component';
|
|
17
|
+
import type * as lTask from '../task';
|
|
18
|
+
import { notify } from './notification';
|
|
19
|
+
import * as lTool from '../tool';
|
|
20
|
+
import * as lDom from '../dom';
|
|
21
|
+
import * as lControl from '../control';
|
|
22
|
+
/** --- 隔离后的视图源码 --- */
|
|
23
|
+
export interface IPreparedView {
|
|
24
|
+
'layout': string;
|
|
25
|
+
'style': string;
|
|
26
|
+
'prep': string;
|
|
27
|
+
}
|
|
28
|
+
/** --- 视图构建依赖,由框架入口提供 --- */
|
|
29
|
+
export interface IViewDependencies {
|
|
30
|
+
'lTool': typeof lTool;
|
|
31
|
+
'lDom': typeof lDom;
|
|
32
|
+
'lControl': typeof lControl;
|
|
33
|
+
'notify': typeof notify;
|
|
34
|
+
'componentClass': typeof AbstractComponent;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* --- 隔离视图布局与样式,按任务和源码复用结果 ---
|
|
38
|
+
* @param task 所属任务
|
|
39
|
+
* @param path 资源基准路径
|
|
40
|
+
* @param layout 布局源码
|
|
41
|
+
* @param style 样式源码
|
|
42
|
+
* @returns 隔离后的布局、样式和前缀;处理失败时拒绝
|
|
43
|
+
*/
|
|
44
|
+
export declare function prepareView(task: lTask.ITask, path: string, layout: string, style: string): Promise<IPreparedView>;
|
|
45
|
+
/**
|
|
46
|
+
* --- 构建窗体或面板的局部组件定义 ---
|
|
47
|
+
* @param task 所属任务
|
|
48
|
+
* @param formId 所属窗体 ID
|
|
49
|
+
* @param findex 窗体创建序号
|
|
50
|
+
* @param componentClasses 要注册的组件类
|
|
51
|
+
* @param panelId 所属面板 ID
|
|
52
|
+
* @param chain 当前递归构建链
|
|
53
|
+
* @returns 组件定义;源码无效或构建失败时拒绝
|
|
54
|
+
*/
|
|
55
|
+
export declare function buildLocalComponents(task: lTask.ITask, formId: string, findex: number, componentClasses: Record<string, new () => AbstractComponent>, panelId?: string, chain?: Array<new () => AbstractComponent>): Promise<Record<string, any>>;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as lCore from '../core';
|
|
2
|
+
import * as lDom from '../dom';
|
|
3
|
+
import type { IForm, IFormInfo } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* --- 最小化某个窗体 ---
|
|
6
|
+
* @param formId 窗体 id
|
|
7
|
+
*/
|
|
8
|
+
export declare function min(formId: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* --- 最大化某个窗体 ---
|
|
11
|
+
* @param formId 窗体 id
|
|
12
|
+
*/
|
|
13
|
+
export declare function max(formId: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* --- 关闭一个窗体 ---
|
|
16
|
+
* @param formId 窗体 id
|
|
17
|
+
*/
|
|
18
|
+
export declare function close(formId: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* --- 绑定窗体拖动大小事件,在 pointerdown 中绑定 ---
|
|
21
|
+
* @param e 事件源
|
|
22
|
+
* @param border 调整大小的方位
|
|
23
|
+
*/
|
|
24
|
+
export declare function bindResize(e: PointerEvent, border: lDom.TDomBorder): void;
|
|
25
|
+
/**
|
|
26
|
+
* --- 绑定窗体拖动事件,在 pointerdown 中绑定 ---
|
|
27
|
+
* @param e 事件源
|
|
28
|
+
*/
|
|
29
|
+
export declare function bindDrag(e: PointerEvent): void;
|
|
30
|
+
/**
|
|
31
|
+
* --- 重置所有已经最大化的窗体大小和位置 ---
|
|
32
|
+
*/
|
|
33
|
+
export declare function refreshMaxPosition(): void;
|
|
34
|
+
/**
|
|
35
|
+
* --- 根据窗体 id 获取 task id ---
|
|
36
|
+
* @param formId 窗体 id
|
|
37
|
+
*/
|
|
38
|
+
export declare function getTaskId(formId: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* --- 获取窗体信息 ---
|
|
41
|
+
* @param formId 窗体 id
|
|
42
|
+
*/
|
|
43
|
+
export declare function get(formId: string): IFormInfo | null;
|
|
44
|
+
/**
|
|
45
|
+
* --- 给一个窗体发送一个对象,不会知道成功与失败状态,用 this.send 替代 ---
|
|
46
|
+
* @param formId 要接收对象的 form id
|
|
47
|
+
* @param obj 要发送的对象
|
|
48
|
+
*/
|
|
49
|
+
export declare function send(formId: string, obj: Record<string, any>): void;
|
|
50
|
+
/**
|
|
51
|
+
* --- 获取 form list 的简略情况 ---
|
|
52
|
+
* @param taskId 任务 ID
|
|
53
|
+
*/
|
|
54
|
+
export declare function getList(taskId: lCore.TCurrent): Record<string, IFormInfo>;
|
|
55
|
+
/**
|
|
56
|
+
* --- 获取当前有焦点的窗体 form id ---
|
|
57
|
+
*/
|
|
58
|
+
export declare function getFocus(): string | null;
|
|
59
|
+
/**
|
|
60
|
+
* --- 当前活跃中的 panelId 列表 ---
|
|
61
|
+
*/
|
|
62
|
+
export declare const activePanels: Record<string, string[]>;
|
|
63
|
+
/**
|
|
64
|
+
* --- 获取窗体当前活跃中的 panelId 列表 ---
|
|
65
|
+
* @param formId 要获取的窗体 id
|
|
66
|
+
*/
|
|
67
|
+
export declare function getActivePanel(formId: string): string[];
|
|
68
|
+
/**
|
|
69
|
+
* --- 移除 form 中正在活跃中的 panel id (panel 本身被置于隐藏时)
|
|
70
|
+
* @param current 当前任务 id
|
|
71
|
+
* @param formId 所属 form id
|
|
72
|
+
* @param panelId panel id
|
|
73
|
+
*/
|
|
74
|
+
export declare function removeActivePanel(current: lCore.TCurrent, formId: string, panelId: string): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* --- 将 form 中某个 panel 设置为活动的 ---
|
|
77
|
+
* @param current 当前任务 id
|
|
78
|
+
* @param formId 所属 form id
|
|
79
|
+
* @param panelId panel id
|
|
80
|
+
*/
|
|
81
|
+
export declare function setActivePanel(current: lCore.TCurrent, formId: string, panelId: string): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* --- 修改窗体 hash ---
|
|
84
|
+
* @param formId 要修改的窗体 ID
|
|
85
|
+
* @param hash 修改的值,不含 #
|
|
86
|
+
*/
|
|
87
|
+
export declare function hash(formId: string, hash: string): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* --- 获取窗体的 hash ---
|
|
90
|
+
*/
|
|
91
|
+
export declare function getHash(formId: string): string;
|
|
92
|
+
/**
|
|
93
|
+
* --- 将窗体的 hash 退回上一个 ---
|
|
94
|
+
*/
|
|
95
|
+
export declare function hashBack(formId: string): Promise<boolean>;
|
|
96
|
+
/**
|
|
97
|
+
* --- 改变 form 的焦点 class ---
|
|
98
|
+
* @param formId 变更后的 form id
|
|
99
|
+
*/
|
|
100
|
+
export declare function changeFocus(formId?: string): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* --- 获取当前 z-index 值最大的 form id(除了 top 模式的窗体和最小化的窗体) ---
|
|
103
|
+
* @param current 当前任务 id
|
|
104
|
+
* @param out 排除选项
|
|
105
|
+
*/
|
|
106
|
+
export declare function getMaxZIndexID(current: lCore.TCurrent, out?: {
|
|
107
|
+
'taskIds'?: string[];
|
|
108
|
+
'formIds'?: string[];
|
|
109
|
+
}): Promise<string | null>;
|
|
110
|
+
/**
|
|
111
|
+
* --- 让最大的 z index 窗体获取焦点(不含 top 和最小化的) ---
|
|
112
|
+
*/
|
|
113
|
+
export declare function changeFocusMaxZIndex(): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* --- 根据任务 id 和 form id 获取 IForm 对象 ---
|
|
116
|
+
* @param taskId 任务 id
|
|
117
|
+
* @param formId 窗体 id
|
|
118
|
+
*/
|
|
119
|
+
export declare function getForm(taskId: string, formId: string): IForm | null;
|
|
120
|
+
/**
|
|
121
|
+
* --- 让窗体闪烁 ---
|
|
122
|
+
* @param current 所属的 taskId
|
|
123
|
+
* @param formId 要闪烁的窗体 id,必填
|
|
124
|
+
*/
|
|
125
|
+
export declare function flash(current: lCore.TCurrent, formId: string): Promise<void>;
|