xframelib 0.3.9 → 0.4.3

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.
Files changed (60) hide show
  1. package/README.md +5 -1
  2. package/dist/api/Token.d.ts +20 -0
  3. package/dist/api/User.d.ts +45 -0
  4. package/dist/api/index.d.ts +2 -0
  5. package/dist/controls/collapsepanel/VCollapsiblePanel.vue.d.ts +26 -0
  6. package/dist/controls/collapsepanel/VCollapsiblePanelGroup.vue.d.ts +30 -0
  7. package/dist/controls/collapsepanel/color.util.d.ts +1 -0
  8. package/dist/controls/collapsepanel/composables/store.d.ts +7 -0
  9. package/dist/controls/collapsepanel/constant.d.ts +1 -0
  10. package/dist/controls/collapsepanel/index.d.ts +3 -0
  11. package/dist/controls/layoutcontainer/LayoutManager.d.ts +107 -0
  12. package/dist/controls/layoutcontainer/index.d.ts +3 -0
  13. package/dist/controls/layoutcontainer/layout.vue.d.ts +37 -0
  14. package/dist/controls/splitpanes/index.d.ts +3 -0
  15. package/dist/controls/vuewindow/SinglePointerEvent.d.ts +23 -0
  16. package/dist/controls/vuewindow/dom.d.ts +16 -0
  17. package/dist/controls/vuewindow/draggable_helper.d.ts +20 -0
  18. package/dist/controls/vuewindow/index.d.ts +6 -0
  19. package/dist/controls/vuewindow/resizable_helper.d.ts +16 -0
  20. package/dist/controls/vuewindow/style.d.ts +110 -0
  21. package/dist/controls/vuewindow/window/Button.vue.d.ts +26 -0
  22. package/dist/controls/vuewindow/window/index.vue.d.ts +160 -0
  23. package/dist/controls/vuewindow/window/utils.d.ts +17 -0
  24. package/dist/controls/vuewindow/z_element.d.ts +11 -0
  25. package/dist/core/Global.d.ts +26 -0
  26. package/dist/core/IModel.d.ts +34 -0
  27. package/dist/core/MsgHelper.d.ts +12 -0
  28. package/dist/core/SysEvents.d.ts +16 -0
  29. package/dist/core/index.d.ts +3 -0
  30. package/dist/hprose/HproseClient.d.ts +20 -0
  31. package/dist/hprose/ProxyClient.d.ts +22 -0
  32. package/dist/hprose/index.d.ts +11 -0
  33. package/dist/index.cjs +8 -3
  34. package/dist/index.css +69 -0
  35. package/dist/index.d.ts +10 -832
  36. package/dist/index.js +8 -3
  37. package/dist/mitt/index.d.ts +25 -0
  38. package/dist/model/Config.d.ts +94 -0
  39. package/dist/model/Constants.d.ts +15 -0
  40. package/dist/model/Layout.d.ts +75 -0
  41. package/dist/model/Token.d.ts +66 -0
  42. package/dist/model/index.d.ts +4 -0
  43. package/dist/utils/AxiosHelper.d.ts +51 -0
  44. package/dist/utils/BigFileDownload.d.ts +106 -0
  45. package/dist/utils/Color.d.ts +74 -0
  46. package/dist/utils/FileDownload.d.ts +36 -0
  47. package/dist/utils/FileUpload.d.ts +90 -0
  48. package/dist/utils/H5Tool.d.ts +98 -0
  49. package/dist/utils/IsTool.d.ts +101 -0
  50. package/dist/utils/JQuery.d.ts +35 -0
  51. package/dist/utils/LockHelper.d.ts +17 -0
  52. package/dist/utils/Storage.d.ts +57 -0
  53. package/dist/utils/StringUtils.d.ts +15 -0
  54. package/dist/utils/Time.d.ts +1 -0
  55. package/dist/utils/TokenHelper.d.ts +18 -0
  56. package/dist/utils/URLTool.d.ts +18 -0
  57. package/dist/utils/index.d.ts +16 -0
  58. package/dist/utils/uuid.d.ts +3 -0
  59. package/package.json +14 -15
  60. package/dist/index.cjs.css +0 -237
package/dist/index.d.ts CHANGED
@@ -1,832 +1,10 @@
1
- import { ClientContext, Client } from '@hprose/rpc-core';
2
- import { XhrHeaders } from 'xhr';
3
-
4
- declare class ProxyClient {
5
- private hproseClient;
6
- private hpProxyObj;
7
- private readonly defaultContext;
8
- constructor(hproseUrl: string);
9
- getClientContext(): ClientContext | null;
10
- getHproseProxy(): Promise<any>;
11
- hproseInvoke(methodName: string, args?: any[] | undefined): Promise<any>;
12
- hproseInvokeContext(methodName: string, context: ClientContext | undefined, ...args: any): Promise<any>;
13
- /**
14
- * 编码参数方式请求
15
- * @param request
16
- */
17
- hproseInvokeEncode(requestParamsEncode: string): Promise<any>;
18
- /**
19
- * 对请求参数编码
20
- * @param name 方法名
21
- * @param args 请求参数
22
- */
23
- encodeRequest(name: string, ...args: any): string;
24
- }
25
-
26
- declare type EventType = string | symbol;
27
- declare type Handler<T = any> = (event?: T) => void;
28
- declare type WildcardHandler = (type: EventType, event?: any) => void;
29
- declare type EventHandlerList = Array<Handler>;
30
- declare type WildCardEventHandlerList = Array<WildcardHandler>;
31
- declare type EventHandlerMap = Map<EventType, EventHandlerList | WildCardEventHandlerList>;
32
- interface Emitter {
33
- all: EventHandlerMap;
34
- on<T = any>(type: EventType, handler: Handler<T>): void;
35
- on(type: '*', handler: WildcardHandler): void;
36
- off<T = any>(type: EventType, handler: Handler<T>): void;
37
- off(type: '*', handler: WildcardHandler): void;
38
- emit<T = any>(type: EventType, event?: T): void;
39
- emit(type: '*', event?: any): void;
40
- }
41
- /**
42
- * 默认全局总线对象
43
- */
44
- declare const GlobalMitt: Emitter;
45
-
46
- declare class MsgHelper {
47
- private message;
48
- private eventBus;
49
- constructor(messageui: any, eventbus?: Emitter | undefined);
50
- /**共用消息 */
51
- msg(msgInfo: string, seconds?: number, typename?: string): void;
52
- info(msgInfo: string, seconds?: number): void;
53
- warn(msgInfo: string, seconds?: number): void;
54
- err(msgInfo: string, seconds?: number): void;
55
- }
56
-
57
- /**
58
- * UI界面相关
59
- */
60
- interface IUIObject {
61
- /**
62
- * 网站标题
63
- */
64
- SiteTitle: string;
65
- /**
66
- * 版权
67
- */
68
- CopyRight: string; //'Copyright ©XXX 2021-2025',
69
- /**
70
- * 官方链接
71
- */
72
- WebSite?: string; //网站链接
73
- /**
74
- * 超时锁屏时间(单位:秒s)
75
- */
76
- LockTime?: number; //
77
- /**
78
- * 其他扩展的属性
79
- */
80
- [props: string]: any;
81
- }
82
- /**
83
- * 服务URL
84
- */
85
- interface IServiceURL {
86
- /**
87
- * 用户登录(统一用户登录)
88
- */
89
- LoginAuthURL: string; //用户验证
90
- /**
91
- * Axios普通WebAPI的BaseURL
92
- * 全局默认的http请求地址(一般与主hprose相同或不同);文件上传地址
93
- */
94
- DefaultWebAPI?: string;
95
- /**
96
- * 默认HproseAPI的服务地址
97
- */
98
- DefaultHproseAPI?: string;
99
- /**
100
- * 其他扩展的URL属性
101
- */
102
- [props: string]: any;
103
- }
104
-
105
- /**
106
- * 地图相关Keys
107
- */
108
- interface IMapKeys {
109
- /**
110
- * 天地图Key
111
- */
112
- TDTKey?: string;
113
- /**
114
- * MapboxKey
115
- */
116
- MapboxKey?: string;
117
- /**
118
- * Cesium Key
119
- */
120
- CesiumKey?: string;
121
- /**
122
- * Google地图Key
123
- */
124
- GoogleKey?: string;
125
- /**
126
- * 其他扩展的Key属性
127
- */
128
- [props: string]: any;
129
- }
130
- /**
131
- * 系统配置信息
132
- */
133
- interface ISystemConfig {
134
- /**
135
- * 用户界面配置
136
- */
137
- UI?: IUIObject;
138
- /**
139
- * 服务URL
140
- */
141
- ServiceURL: IServiceURL;
142
- /**
143
- * 地图相关Keys
144
- */
145
- MapKeys?: IMapKeys;
146
- /**
147
- * API服务路径
148
- */
149
- APIPath?: object; //
150
- //其他配置信息
151
- [props: string]: any;
152
- }
153
-
154
- /**
155
- * 当前存储的token对象
156
- */
157
- interface ITokenInfo {
158
- id: string;
159
- name: string;
160
- token: string;
161
- expire: string;
162
- refresh: string;
163
- }
164
- /**
165
- * 单个token对象内容
166
- * 与后台相匹配
167
- */
168
- interface IToken {
169
- /**
170
- * token内容
171
- */
172
- tokenContent: string;
173
- /**
174
- * 超时时间
175
- */
176
- expires: string;
177
- }
178
-
179
- /**
180
- * 双Token接口定义
181
- */
182
- interface IDoubleToken {
183
- /**
184
- * 当前有效token
185
- */
186
- accessToken: IToken;
187
- /**
188
- * 用于刷新的token
189
- */
190
- refreshToken: IToken;
191
- }
192
- /**
193
- * 系统用户
194
- */
195
- interface ISystemUser {
196
- /**
197
- * 用户ID
198
- */
199
- id: string;
200
- /**
201
- * 用户名
202
- */
203
- name: string;
204
- /**
205
- * 用户组ID
206
- */
207
- groupid?: string;
208
- photo?: string;
209
- mobile?: string;
210
- qq?: string;
211
- email?: string;
212
- img?: string;
213
- issystem?: boolean;
214
- createtime?: string;
215
- updatetime?: string;
216
- issecurity?: boolean;
217
- appkey?: string;
218
- role?: string;
219
- doubleToken?: IDoubleToken;
220
- }
221
-
222
- interface InnerObject {
223
- /**
224
- * 当前登录用户对象
225
- */
226
- User?: ISystemUser;
227
- /**
228
- * axios对象
229
- */
230
- Axios: any;
231
- Config: ISystemConfig;
232
- EventBus: Emitter;
233
- DefaultProxyClient: ProxyClient | null | undefined;
234
- Message?: MsgHelper;
235
- [props: string]: any;
236
- }
237
- /**
238
- * 初始化配置信息
239
- */
240
- interface XOptions {
241
- config?: any;
242
- message?: any;
243
- axios?: any;
244
- defaultHproseURL?: string;
245
- }
246
-
247
- declare const Global: InnerObject;
248
- /**
249
- * 通过配置文件初始化系统
250
- * @param options 配置参数对象
251
- */
252
- declare function initXFrame(options: XOptions): void;
253
- /**
254
- * 框架初始化
255
- * @param messageUI 消息UI
256
- * @param defaultHproseURL 默认HproseURL
257
- */
258
- declare const init: (messageUI: any, axiosObj: any, defaultHproseURL?: string | undefined) => void;
259
- /**
260
- * 获取HproseProxy对象
261
- * @param hproseURL Hprose服务链接地址
262
- * @returns Hprose代理对象
263
- */
264
- declare function getProxyClient(hproseURL?: string): ProxyClient | undefined;
265
- /**
266
- * 初始化Global.DefaultProxyClient对象
267
- * @param defaulthproseURL 默认的Hprose服务对象URL
268
- * @returns ProxyClient对象
269
- */
270
- declare function initDefaultProxyClient(defaulthproseURL?: string): ProxyClient | undefined;
271
-
272
- declare const SysEvents: {
273
- HproseServiceErrorEvent: string;
274
- WebAPIErrorEvent: string;
275
- AlertInfoEvent: string;
276
- /**
277
- * 一般通用警告或错误
278
- */
279
- CommonWarnEvent: string;
280
- };
281
-
282
- /**
283
- * 常用H5相关操作
284
- */
285
- declare class H5Tool {
286
- /**
287
- * HTML元素事件监听
288
- * @param element Window或HTMLElement
289
- * @param type 事件名称
290
- * @param handler 处理函数
291
- */
292
- static addHandler(element: Window | HTMLElement | any, type: string, handler: Function): void;
293
- /**
294
- * 窗体变化事件
295
- * @param handlerFunc 窗体变化处理函数
296
- */
297
- static windowResizeHandler(handlerFunc: Function): void;
298
- /**
299
- * 是否支持全屏操作
300
- * @returns true/false
301
- */
302
- static fullscreenEnabled(): boolean;
303
- /**
304
- * 全屏
305
- * @param el HTML元素
306
- * @param isfull 是否全屏
307
- */
308
- static fullScreen(el: any | Element, isfull: boolean): void;
309
- /**
310
- * 进入全屏
311
- * @param element 全屏要素容器
312
- */
313
- static requestFullScreen(element: any | Element): void;
314
- /**
315
- * 退出全屏
316
- */
317
- static exitFullScreen(): void;
318
- /**
319
- * 获取全屏的容器元素
320
- * @returns 全屏的容器元素
321
- */
322
- static fullScreenElement(): Element | HTMLElement | Document | null;
323
- /**
324
- * 是否是全屏
325
- * @returns 全屏状态
326
- */
327
- static isFullScreen(): boolean;
328
- /**
329
- * 监听全屏变化状态
330
- * @param handlerFunc 全屏状态变化的处理函数
331
- */
332
- static onFullScreenChanged(handlerFunc: (isfullscreen: boolean) => any): void;
333
- /**
334
- * 解决对象Json化循环引用问题
335
- * @param key
336
- * @param value
337
- * @returns
338
- */
339
- static stringifyCircularHandler(key: string, value: any): any;
340
- /**
341
- * 对象Json化——解决循环引用问题
342
- * @param obj 传入对象参数
343
- * @returns 无循环引用的新对象
344
- */
345
- static jsonStringify(obj: any): string;
346
- /**
347
- * 去掉JSON循环引用关系
348
- * @param obj 传入对象参数
349
- * @returns 无循环引用的新对象
350
- */
351
- static jsonParse(obj: any): any;
352
- /**
353
- * 获取input File的对象的数据路径
354
- * @param file File对象
355
- * @returns
356
- */
357
- static getObjectURL(file: any): string | undefined;
358
- /**
359
- * 获取文件的短MD5摘要
360
- * @param fileObj file对象
361
- * @param handleMd5Result 处理文件MD5结果
362
- */
363
- static getFileShortMD5(fileObj: any, handleMd5Result: (data: {
364
- isOK: boolean;
365
- data: string;
366
- }) => void): any;
367
- /**
368
- * 提供MD5值计算
369
- * @param content 字符串
370
- * @param needRawHash 是否需要是二进制格式的结果,默认为false
371
- * @returns MD5值
372
- */
373
- static MD5(content: string, needRawHash?: boolean): string;
374
- }
375
-
376
- declare class StringUtils {
377
- /**
378
- * 判断字符串是否为空或undefined,不判断为0,不判断为false
379
- * @param str
380
- * @returns {boolean}
381
- */
382
- static isNullOrEmpty: (str: any) => boolean;
383
- static isNotEmpty: (str: any) => boolean;
384
- }
385
-
386
- /**
387
- * 创建本地缓存对象
388
- */
389
- declare class StorageHelper {
390
- private prefixKey;
391
- private storage;
392
- constructor(prefixKey?: string, storage?: Storage);
393
- private getKey;
394
- /**
395
- * @description 设置缓存
396
- * @param {string} key 缓存键
397
- * @param {*} value 缓存值
398
- * @param expire
399
- */
400
- set(key: string, value: any, expire?: number | null): void;
401
- /**
402
- * 读取缓存
403
- * @param {string} key 缓存键
404
- * @param {*=} def 默认值
405
- */
406
- get(key: string, def?: any): any;
407
- /**
408
- * 从缓存删除某项
409
- * @param {string} key
410
- */
411
- remove(key: string): void;
412
- /**
413
- * 清空所有缓存
414
- * @memberOf Cache
415
- */
416
- clear(): void;
417
- /**
418
- * 设置cookie
419
- * @param {string} name cookie 名称
420
- * @param {*} value cookie 值
421
- * @param {number=} expire 过期时间
422
- * 如果过期时间为设置,默认关闭浏览器自动删除
423
- * @example
424
- */
425
- setCookie(name: string, value: any, expire?: number | null): void;
426
- /**
427
- * 根据名字获取cookie值
428
- * @param name
429
- */
430
- getCookie(name: string): string;
431
- /**
432
- * 根据名字删除指定的cookie
433
- * @param {string} key
434
- */
435
- removeCookie(key: string): void;
436
- /**
437
- * 清空cookie,使所有cookie失效
438
- */
439
- clearCookie(): void;
440
- }
441
- declare const storage: StorageHelper;
442
-
443
- declare function uuid(): string;
444
- declare function newGuid(): string;
445
-
446
- /**
447
- * rgb转十六进制
448
- * @param colorRGB rgb颜色值
449
- * @returns
450
- */
451
- declare function getHexColor(colorRGB: string): string;
452
- /**
453
- * 十六进制转RGB
454
- * @param color16 十六进制颜色值
455
- * @returns
456
- */
457
- declare function getRGBColor(color16: string): string;
458
- /**
459
- * 解决十六进制短颜色问题
460
- * @param colorHex 十六进制颜色
461
- * @returns
462
- */
463
- declare function getLongHexColor(colorHex: string): string;
464
- declare enum EnumColor {
465
- RGBA = 0,
466
- Hex = 1,
467
- Hsla = 2
468
- }
469
- /**
470
- * 判断是否是16进制颜色
471
- * @param colorStr 颜色字符串
472
- * @returns
473
- */
474
- declare function isEnumColor(colorStr: string): EnumColor | undefined;
475
- declare function getRGBColorFromHSLA(colorHSLA: string): string | undefined;
476
-
477
- /**
478
- * 下载文件
479
- * @param content 文本或二进制文件
480
- * @param filename 文件名
481
- */
482
- declare const Download: (content: string | any, filename: string) => void;
483
- /**
484
- * JSON对象下载为.json文件
485
- * @param jsonObject Json对象
486
- * @param jsonID 名称
487
- */
488
- declare const JsonDownload: (jsonObject: object, jsonID: string) => void;
489
- /**
490
- * 从Web上下载文件
491
- * @param requestUrl URL下载地址
492
- * @param fileName 文件名
493
- */
494
- declare const HttpDownload: (axios: any, requestUrl: string, fileName: string) => void;
495
-
496
- declare function sleep(delay: any): void;
497
-
498
- declare type ResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
499
- /**
500
- * Get服务请求
501
- * @param apiUrl API接口路径
502
- * @param baseUrl 基础服务路径
503
- * @param _params 参数
504
- * @param headers headers参数
505
- * @param responseType 响应类型,默认为json
506
- * @param cancelToken 取消标识
507
- * @returns 返回Promise对象
508
- */
509
- declare function requestGet(apiUrl: string, baseUrl?: string, _params?: any, headers?: any, responseType?: ResponseType, cancelToken?: any): Promise<any>;
510
- /**
511
- * Post服务请求-FormData
512
- * @param apiUrl API接口路径
513
- * @param baseUrl 基础服务路径
514
- * @param _params 参数
515
- * @param headers headers参数
516
- * @returns 返回Promise对象
517
- */
518
- declare function requestPost(apiUrl: string, baseUrl?: string, _bodyParams?: any, _queryParams?: any, headers?: any, responseType?: ResponseType): Promise<any>;
519
- /**
520
- * Post服务请求-Body方式
521
- * @param apiUrl API接口路径
522
- * @param baseUrl 基础服务路径
523
- * @param _params 参数
524
- * @returns 返回Promise对象
525
- */
526
- declare function requestPostBody(apiUrl: string, baseUrl?: string, _bodyParams?: any, _queryParams?: any, headers?: any, responseType?: ResponseType): Promise<any>;
527
- /**
528
- * 业务服务Get请求
529
- * @param apiUrl API接口路径
530
- * @param _params 参数
531
- * @returns 返回Promise对象
532
- */
533
- declare function get(apiUrl: string, _params?: any): Promise<any>;
534
- /**
535
- * 业务服务Post请求
536
- * @param apiUrl API接口路径
537
- * @param _params 参数
538
- * @returns 返回Promise对象
539
- */
540
- declare function post(apiUrl: string, _params?: any): Promise<any>;
541
- /**
542
- * 独立的外部Get请求(无token验证信息)
543
- * @param fullRequestURL 完整请求路径
544
- * @param _params 请求参数
545
- * @returns 返回Promise对象
546
- */
547
- declare function getData(fullRequestURL: string, _params?: any): Promise<any>;
548
-
549
- declare const storageHelper: StorageHelper;
550
- /**
551
- * 获取token中的授权Key
552
- * @returns
553
- */
554
- declare function getLocalToken(): ITokenInfo;
555
- /**
556
- * 清除本地Token
557
- */
558
- declare function clearLocalToken(): void;
559
- /**
560
- * 获得RefreshToken
561
- * @returns
562
- */
563
- declare function getRefreshToken(): string;
564
-
565
- declare type FileEventName = 'attempt' | 'attemptFailure' | 'chunkSuccess' | 'error' | 'offline' | 'online' | 'progress' | 'success';
566
- declare type AllowedMethods = 'PUT' | 'POST' | 'PATCH';
567
- /**
568
- * 文件上传配置
569
- */
570
- interface FileUploadOptions {
571
- endpoint: string | ((file?: File) => Promise<string>);
572
- file: File;
573
- method?: AllowedMethods;
574
- headers?: XhrHeaders;
575
- maxFileSize?: number;
576
- chunkSize?: number;
577
- attempts?: number;
578
- /**
579
- * 单位:秒
580
- */
581
- delayBeforeAttempt?: number;
582
- md5?: string;
583
- }
584
- /**
585
- * 文件上传类
586
- */
587
- declare class FileUpload {
588
- endpoint: string | ((file?: File) => Promise<string>);
589
- file: File;
590
- headers: XhrHeaders;
591
- method: AllowedMethods;
592
- chunkSize: number;
593
- attempts: number;
594
- delayBeforeAttempt: number;
595
- md5: string;
596
- private chunk?;
597
- private chunkCount;
598
- private chunkByteSize;
599
- private maxFileBytes;
600
- private endpointValue?;
601
- private totalChunks;
602
- private attemptCount;
603
- private offline;
604
- private paused;
605
- private success;
606
- private currentXhr?;
607
- private reader;
608
- private eventTarget;
609
- private fileName;
610
- constructor(options: FileUploadOptions);
611
- /**
612
- * 订阅事件
613
- */
614
- on(FileEventName: FileEventName, fn: (event: any) => void): void;
615
- abort(): void;
616
- pause(): void;
617
- resume(): void;
618
- /**
619
- * 发送消息
620
- */
621
- private dispatch;
622
- /**
623
- *验证参数的正确性
624
- */
625
- private validateOptions;
626
- /**
627
- * Endpoint can either be a URL or a function that returns a promise that resolves to a string.
628
- */
629
- private getEndpoint;
630
- /**
631
- * Get portion of the file of x bytes corresponding to chunkSize
632
- */
633
- private getChunk;
634
- private xhrPromise;
635
- /**
636
- * Send chunk of the file with appropriate headers and add post parameters if it's last chunk
637
- */
638
- private sendChunk;
639
- /**
640
- * 失败处理和尝试
641
- */
642
- private manageRetries;
643
- /**
644
- * 进行分片上传,并处理错误和重试
645
- */
646
- private sendChunks;
647
- }
648
- /**
649
- * 创建文件上传对象方法
650
- * @param options
651
- * @returns
652
- */
653
- declare const createFileUpload: (options: FileUploadOptions) => FileUpload;
654
-
655
- /**
656
- * 模仿JQuery相关方法
657
- */
658
- declare class JQuery {
659
- /**
660
- * 是否有Style类名
661
- * @param ele HTML元素
662
- * @param className 类名
663
- * @returns
664
- */
665
- hasClass(ele: HTMLElement, className: string): RegExpMatchArray | null;
666
- /**
667
- * 为元素添加Style类名
668
- * @param ele HTML元素
669
- * @param className 类名
670
- */
671
- addClass(ele: HTMLElement, className: string): void;
672
- /**
673
- * 移除元素的Style类名
674
- * @param ele HTML元素
675
- * @param className 类名
676
- */
677
- removeClass(ele: HTMLElement, className: string): void;
678
- /**
679
- * 切换Style类名
680
- * @param ele HTML元素
681
- * @param className 类名
682
- */
683
- toggleClass(ele: HTMLElement, className: string): void;
684
- }
685
- /**
686
- * jquery对象
687
- */
688
- declare const jquery: JQuery;
689
-
690
- interface ILockState {
691
- isLock: boolean;
692
- lockTime: number;
693
- }
694
- /**
695
- * 获取当前Lock状态
696
- * @returns 是否Locked
697
- */
698
- declare function getLockState(): any;
699
- /**
700
- * 全局监听Lock
701
- */
702
- declare function onLockListener(): void;
703
- /**
704
- * 取消全局监听Lock
705
- */
706
- declare function unLockListener(): void;
707
-
708
- /**
709
- * 下载文件信息模型
710
- */
711
- interface IFileMeta {
712
- id?: string;
713
- name: string;
714
- length: number;
715
- downloadID: string;
716
- chunkSize?: number;
717
- }
718
- /**
719
- * 文件下载事件
720
- */
721
- declare type FileDownloadEvent = 'init' | 'info' | 'error' | 'downloadProgress' | 'saveProgress' | 'success';
722
-
723
- declare class HproseClient {
724
- private hproseURL?;
725
- client?: Client;
726
- private hproseProxy;
727
- private static httpTransport?;
728
- constructor(url?: string);
729
- private init;
730
- /**
731
- * 获取HproseProxy
732
- */
733
- getProxy(): Promise<any>;
734
- invoke(methodName: string, args?: any[], context?: ClientContext): Promise<any>;
735
- /**
736
- * 解码和编码
737
- */
738
- encode(name: string, args: any[], context: ClientContext): Uint8Array | undefined;
739
- decode(response: Uint8Array, context: ClientContext): any;
740
- }
741
-
742
- interface GIHprose {
743
- getDefaultClient(): ProxyClient;
744
- registerHprose(hpClientName: string, hproseUrl: string): HproseClient | undefined;
745
- getHprose(hpClientName: string): HproseClient | undefined;
746
- getProxyHprose(hpClientName: string): ProxyClient | undefined;
747
- unregisterHprose(hpClientName: string): void;
748
- }
749
- declare const GlobalHprose: GIHprose;
750
-
751
- /**
752
- * 刷新Token
753
- */
754
- declare function doRefreshToken(): void;
755
- /**
756
- * 检查和刷新Token
757
- * @param userToken
758
- */
759
- declare function checkDoRefreshToken(userToken: ITokenInfo): void;
760
- /**
761
- * 存储Token对象
762
- * @param userToken
763
- */
764
- declare function setLocalToken(userToken: IDoubleToken): void;
765
- /**
766
- * 设置当前用户
767
- * @param userInfo
768
- */
769
- declare function setUser(userInfo: ISystemUser): void;
770
-
771
- interface IUserInfo {
772
- /**
773
- * 用户名
774
- */
775
- username: string;
776
- oldpwd: string;
777
- newpwd: string;
778
- }
779
- interface IUser {
780
- username: string;
781
- pwd: string;
782
- /**
783
- * 所属系统
784
- */
785
- system?: string;
786
- }
787
- /**
788
- * 用户登录
789
- * @param data 用户信息
790
- * @returns
791
- */
792
- declare function login(data: IUser): Promise<any>;
793
- /**
794
- * 检查某一系统的用户
795
- * @param data 用户对象
796
- * @returns
797
- */
798
- declare function checkLogin(data: IUser): Promise<any>;
799
- /**
800
- * 修改密码
801
- * @param data 用户数据
802
- * @returns
803
- */
804
- declare function changePWD(data: IUserInfo): Promise<any>;
805
- /**
806
- * 退出登录
807
- */
808
- declare function logout(): void;
809
- /**
810
- * 验证 已有的token
811
- * @param token 需要验证的token
812
- * @returns
813
- */
814
- declare function checkToken(token: string): Promise<any>;
815
-
816
- /**
817
- * 刷新提前量(毫秒,ms)
818
- */
819
- declare const TOKEN_REFRESH_TIME: number;
820
- /**
821
- * 用户和Token相关服务API
822
- */
823
- declare const USER_TOKEN_API: {
824
- Login: string;
825
- CheckLogin: string;
826
- Logout: string;
827
- ChangePWD: string;
828
- RefreshToken: string;
829
- CheckToken: string;
830
- };
831
-
832
- export { AllowedMethods, Download, Emitter, EnumColor, EventHandlerList, EventHandlerMap, EventType, FileDownloadEvent, FileEventName, FileUploadOptions, GIHprose, Global, GlobalHprose, GlobalMitt, H5Tool, Handler, HproseClient, HttpDownload, IDoubleToken, IFileMeta, ILockState, IMapKeys, IServiceURL, ISystemConfig, ISystemUser, IToken, ITokenInfo, IUIObject, JsonDownload, ProxyClient, ResponseType, StorageHelper as Storage, StringUtils, SysEvents, TOKEN_REFRESH_TIME, USER_TOKEN_API, WildCardEventHandlerList, WildcardHandler, changePWD, checkDoRefreshToken, checkLogin, checkToken, clearLocalToken, createFileUpload, doRefreshToken, get, getData, getHexColor, getLocalToken, getLockState, getLongHexColor, getProxyClient, getRGBColor, getRGBColorFromHSLA, getRefreshToken, init, initDefaultProxyClient, initXFrame, isEnumColor, jquery, login, logout, newGuid, onLockListener, post, requestGet, requestPost, requestPostBody, setLocalToken, setUser, sleep, storage, storageHelper, unLockListener, uuid };
1
+ export * from './controls/splitpanes';
2
+ export * from './controls/collapsepanel';
3
+ export * from './controls/vuewindow';
4
+ export * from './controls/layoutcontainer';
5
+ export * from './core';
6
+ export * from './mitt';
7
+ export * from './utils';
8
+ export * from './hprose';
9
+ export * from './api';
10
+ export * from './model';