xframelib 0.3.7 → 0.4.2

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 (59) hide show
  1. package/README.md +5 -0
  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 +77 -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 +17 -1
  34. package/dist/index.css +146 -76
  35. package/dist/index.d.ts +10 -813
  36. package/dist/index.js +17 -1
  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 +36 -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 +21 -17
package/dist/index.d.ts CHANGED
@@ -1,813 +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 axiosObj axios对象
257
- * @param defaultHproseURL 默认HproseURL
258
- */
259
- declare const init: (messageUI: any, axiosObj?: any, defaultHproseURL?: string | undefined) => void;
260
- /**
261
- * 获取HproseProxy对象
262
- * @param hproseURL Hprose服务链接地址
263
- * @returns Hprose代理对象
264
- */
265
- declare function getProxyClient(hproseURL?: string): ProxyClient | undefined;
266
- /**
267
- * 初始化Global.DefaultProxyClient对象
268
- * @param defaulthproseURL 默认的Hprose服务对象URL
269
- * @returns ProxyClient对象
270
- */
271
- declare function initDefaultProxyClient(defaulthproseURL?: string): ProxyClient | undefined;
272
-
273
- declare const SysEvents: {
274
- HproseServiceErrorEvent: string;
275
- WebAPIErrorEvent: string;
276
- AlertInfoEvent: string;
277
- /**
278
- * 一般通用警告或错误
279
- */
280
- CommonWarnEvent: string;
281
- };
282
-
283
- /**
284
- * 常用H5相关操作
285
- */
286
- declare class H5Tool {
287
- /**
288
- * HTML元素事件监听
289
- * @param element Window或HTMLElement
290
- * @param type 事件名称
291
- * @param handler 处理函数
292
- */
293
- static addHandler(element: Window | HTMLElement | any, type: string, handler: Function): void;
294
- /**
295
- * 窗体变化事件
296
- * @param handlerFunc 窗体变化处理函数
297
- */
298
- static windowResizeHandler(handlerFunc: Function): void;
299
- /**
300
- * 是否支持全屏操作
301
- * @returns true/false
302
- */
303
- static fullscreenEnabled(): boolean;
304
- /**
305
- * 全屏
306
- * @param el HTML元素
307
- * @param isfull 是否全屏
308
- */
309
- static fullScreen(el: any | Element, isfull: boolean): void;
310
- /**
311
- * 进入全屏
312
- * @param element 全屏要素容器
313
- */
314
- static requestFullScreen(element: any | Element): void;
315
- /**
316
- * 退出全屏
317
- */
318
- static exitFullScreen(): void;
319
- /**
320
- * 获取全屏的容器元素
321
- * @returns 全屏的容器元素
322
- */
323
- static fullScreenElement(): Element | HTMLElement | Document | null;
324
- /**
325
- * 是否是全屏
326
- * @returns 全屏状态
327
- */
328
- static isFullScreen(): boolean;
329
- /**
330
- * 监听全屏变化状态
331
- * @param handlerFunc 全屏状态变化的处理函数
332
- */
333
- static onFullScreenChanged(handlerFunc: (isfullscreen: boolean) => any): void;
334
- /**
335
- * 解决对象Json化循环引用问题
336
- * @param key
337
- * @param value
338
- * @returns
339
- */
340
- static stringifyCircularHandler(key: string, value: any): any;
341
- /**
342
- * 对象Json化——解决循环引用问题
343
- * @param obj 传入对象参数
344
- * @returns 无循环引用的新对象
345
- */
346
- static jsonStringify(obj: any): string;
347
- /**
348
- * 去掉JSON循环引用关系
349
- * @param obj 传入对象参数
350
- * @returns 无循环引用的新对象
351
- */
352
- static jsonParse(obj: any): any;
353
- /**
354
- * 获取input File的对象的数据路径
355
- * @param file File对象
356
- * @returns
357
- */
358
- static getObjectURL(file: any): string | undefined;
359
- /**
360
- * 获取文件的短MD5摘要
361
- * @param fileObj file对象
362
- * @param handleMd5Result 处理文件MD5结果
363
- */
364
- static getFileShortMD5(fileObj: any, handleMd5Result: (data: {
365
- isOK: boolean;
366
- data: string;
367
- }) => void): any;
368
- /**
369
- * 提供MD5值计算
370
- * @param content 字符串
371
- * @param needRawHash 是否需要是二进制格式的结果,默认为false
372
- * @returns MD5值
373
- */
374
- static MD5(content: string, needRawHash?: boolean): string;
375
- }
376
-
377
- declare class StringUtils {
378
- /**
379
- * 判断字符串是否为空或undefined,不判断为0,不判断为false
380
- * @param str
381
- * @returns {boolean}
382
- */
383
- static isNullOrEmpty: (str: any) => boolean;
384
- static isNotEmpty: (str: any) => boolean;
385
- }
386
-
387
- /**
388
- * 创建本地缓存对象
389
- */
390
- declare class StorageHelper {
391
- private prefixKey;
392
- private storage;
393
- constructor(prefixKey?: string, storage?: Storage);
394
- private getKey;
395
- /**
396
- * @description 设置缓存
397
- * @param {string} key 缓存键
398
- * @param {*} value 缓存值
399
- * @param expire
400
- */
401
- set(key: string, value: any, expire?: number | null): void;
402
- /**
403
- * 读取缓存
404
- * @param {string} key 缓存键
405
- * @param {*=} def 默认值
406
- */
407
- get(key: string, def?: any): any;
408
- /**
409
- * 从缓存删除某项
410
- * @param {string} key
411
- */
412
- remove(key: string): void;
413
- /**
414
- * 清空所有缓存
415
- * @memberOf Cache
416
- */
417
- clear(): void;
418
- /**
419
- * 设置cookie
420
- * @param {string} name cookie 名称
421
- * @param {*} value cookie 值
422
- * @param {number=} expire 过期时间
423
- * 如果过期时间为设置,默认关闭浏览器自动删除
424
- * @example
425
- */
426
- setCookie(name: string, value: any, expire?: number | null): void;
427
- /**
428
- * 根据名字获取cookie值
429
- * @param name
430
- */
431
- getCookie(name: string): string;
432
- /**
433
- * 根据名字删除指定的cookie
434
- * @param {string} key
435
- */
436
- removeCookie(key: string): void;
437
- /**
438
- * 清空cookie,使所有cookie失效
439
- */
440
- clearCookie(): void;
441
- }
442
- declare const storage: StorageHelper;
443
-
444
- declare function uuid(): string;
445
- declare function newGuid(): string;
446
-
447
- /**
448
- * rgb转十六进制
449
- * @param colorRGB rgb颜色值
450
- * @returns
451
- */
452
- declare function getHexColor(colorRGB: string): string;
453
- /**
454
- * 十六进制转RGB
455
- * @param color16 十六进制颜色值
456
- * @returns
457
- */
458
- declare function getRGBColor(color16: string): string;
459
- /**
460
- * 解决十六进制短颜色问题
461
- * @param colorHex 十六进制颜色
462
- * @returns
463
- */
464
- declare function getLongHexColor(colorHex: string): string;
465
- declare enum EnumColor {
466
- RGBA = 0,
467
- Hex = 1,
468
- Hsla = 2
469
- }
470
- /**
471
- * 判断是否是16进制颜色
472
- * @param colorStr 颜色字符串
473
- * @returns
474
- */
475
- declare function isEnumColor(colorStr: string): EnumColor | undefined;
476
- declare function getRGBColorFromHSLA(colorHSLA: string): string | undefined;
477
-
478
- /**
479
- * 下载文件
480
- * @param content 文本或二进制文件
481
- * @param filename 文件名
482
- */
483
- declare const Download: (content: string | any, filename: string) => void;
484
- /**
485
- * JSON对象下载为.json文件
486
- * @param jsonObject Json对象
487
- * @param jsonID 名称
488
- */
489
- declare const JsonDownload: (jsonObject: object, jsonID: string) => void;
490
- /**
491
- * 从Web上下载文件
492
- * @param requestUrl URL下载地址
493
- * @param fileName 文件名
494
- */
495
- declare const HttpDownload: (axios: any, requestUrl: string, fileName: string) => void;
496
-
497
- declare function sleep(delay: any): void;
498
-
499
- /**
500
- * Get服务请求
501
- * @param apiUrl API接口路径
502
- * @param baseUrl 基础服务路径
503
- * @param _params 参数
504
- * @returns 返回Promise对象
505
- */
506
- declare function requestGet(apiUrl: string, baseUrl?: string, _params?: any): Promise<any>;
507
- /**
508
- * Post服务请求-FormData
509
- * @param apiUrl API接口路径
510
- * @param baseUrl 基础服务路径
511
- * @param _params 参数
512
- * @returns 返回Promise对象
513
- */
514
- declare function requestPost(apiUrl: string, baseUrl?: string, _bodyParams?: any, _queryParams?: any): Promise<any>;
515
- /**
516
- * Post服务请求-Body方式
517
- * @param apiUrl API接口路径
518
- * @param baseUrl 基础服务路径
519
- * @param _params 参数
520
- * @returns 返回Promise对象
521
- */
522
- declare function requestPostBody(apiUrl: string, baseUrl?: string, _bodyParams?: any, _queryParams?: any): Promise<any>;
523
- /**
524
- * 业务服务Get请求
525
- * @param apiUrl API接口路径
526
- * @param _params 参数
527
- * @returns 返回Promise对象
528
- */
529
- declare function get(apiUrl: string, _params?: any): Promise<any>;
530
- /**
531
- * 业务服务Post请求
532
- * @param apiUrl API接口路径
533
- * @param _params 参数
534
- * @returns 返回Promise对象
535
- */
536
- declare function post(apiUrl: string, _params?: any): Promise<any>;
537
- /**
538
- * 独立的外部Get请求(无token验证信息)
539
- * @param fullRequestURL 完整请求路径
540
- * @param _params 请求参数
541
- * @returns 返回Promise对象
542
- */
543
- declare function getData(fullRequestURL: string, _params?: any): Promise<any>;
544
-
545
- declare const storageHelper: StorageHelper;
546
- /**
547
- * 获取token中的授权Key
548
- * @returns
549
- */
550
- declare function getLocalToken(): ITokenInfo;
551
- /**
552
- * 清除本地Token
553
- */
554
- declare function clearLocalToken(): void;
555
- /**
556
- * 获得RefreshToken
557
- * @returns
558
- */
559
- declare function getRefreshToken(): string;
560
-
561
- declare type FileEventName = 'attempt' | 'attemptFailure' | 'chunkSuccess' | 'error' | 'offline' | 'online' | 'progress' | 'success';
562
- declare type AllowedMethods = 'PUT' | 'POST' | 'PATCH';
563
- /**
564
- * 文件上传配置
565
- */
566
- interface FileUploadOptions {
567
- endpoint: string | ((file?: File) => Promise<string>);
568
- file: File;
569
- method?: AllowedMethods;
570
- headers?: XhrHeaders;
571
- maxFileSize?: number;
572
- chunkSize?: number;
573
- attempts?: number;
574
- /**
575
- * 单位:秒
576
- */
577
- delayBeforeAttempt?: number;
578
- md5?: string;
579
- }
580
- /**
581
- * 文件上传类
582
- */
583
- declare class FileUpload {
584
- endpoint: string | ((file?: File) => Promise<string>);
585
- file: File;
586
- headers: XhrHeaders;
587
- method: AllowedMethods;
588
- chunkSize: number;
589
- attempts: number;
590
- delayBeforeAttempt: number;
591
- md5: string;
592
- private chunk?;
593
- private chunkCount;
594
- private chunkByteSize;
595
- private maxFileBytes;
596
- private endpointValue?;
597
- private totalChunks;
598
- private attemptCount;
599
- private offline;
600
- private paused;
601
- private success;
602
- private currentXhr?;
603
- private reader;
604
- private eventTarget;
605
- private fileName;
606
- constructor(options: FileUploadOptions);
607
- /**
608
- * 订阅事件
609
- */
610
- on(FileEventName: FileEventName, fn: (event: any) => void): void;
611
- abort(): void;
612
- pause(): void;
613
- resume(): void;
614
- /**
615
- * 发送消息
616
- */
617
- private dispatch;
618
- /**
619
- *验证参数的正确性
620
- */
621
- private validateOptions;
622
- /**
623
- * Endpoint can either be a URL or a function that returns a promise that resolves to a string.
624
- */
625
- private getEndpoint;
626
- /**
627
- * Get portion of the file of x bytes corresponding to chunkSize
628
- */
629
- private getChunk;
630
- private xhrPromise;
631
- /**
632
- * Send chunk of the file with appropriate headers and add post parameters if it's last chunk
633
- */
634
- private sendChunk;
635
- /**
636
- * 失败处理和尝试
637
- */
638
- private manageRetries;
639
- /**
640
- * 进行分片上传,并处理错误和重试
641
- */
642
- private sendChunks;
643
- }
644
- /**
645
- * 创建文件上传对象方法
646
- * @param options
647
- * @returns
648
- */
649
- declare const createFileUpload: (options: FileUploadOptions) => FileUpload;
650
-
651
- /**
652
- * 模仿JQuery相关方法
653
- */
654
- declare class JQuery {
655
- /**
656
- * 是否有Style类名
657
- * @param ele HTML元素
658
- * @param className 类名
659
- * @returns
660
- */
661
- hasClass(ele: HTMLElement, className: string): RegExpMatchArray | null;
662
- /**
663
- * 为元素添加Style类名
664
- * @param ele HTML元素
665
- * @param className 类名
666
- */
667
- addClass(ele: HTMLElement, className: string): void;
668
- /**
669
- * 移除元素的Style类名
670
- * @param ele HTML元素
671
- * @param className 类名
672
- */
673
- removeClass(ele: HTMLElement, className: string): void;
674
- /**
675
- * 切换Style类名
676
- * @param ele HTML元素
677
- * @param className 类名
678
- */
679
- toggleClass(ele: HTMLElement, className: string): void;
680
- }
681
- /**
682
- * jquery对象
683
- */
684
- declare const jquery: JQuery;
685
-
686
- interface ILockState {
687
- isLock: boolean;
688
- lockTime: number;
689
- }
690
- /**
691
- * 获取当前Lock状态
692
- * @returns 是否Locked
693
- */
694
- declare function getLockState(): any;
695
- /**
696
- * 全局监听Lock
697
- */
698
- declare function onLockListener(): void;
699
- /**
700
- * 取消全局监听Lock
701
- */
702
- declare function unLockListener(): void;
703
-
704
- declare class HproseClient {
705
- private hproseURL?;
706
- client?: Client;
707
- private hproseProxy;
708
- private static httpTransport?;
709
- constructor(url?: string);
710
- private init;
711
- /**
712
- * 获取HproseProxy
713
- */
714
- getProxy(): Promise<any>;
715
- invoke(methodName: string, args?: any[], context?: ClientContext): Promise<any>;
716
- /**
717
- * 解码和编码
718
- */
719
- encode(name: string, args: any[], context: ClientContext): Uint8Array | undefined;
720
- decode(response: Uint8Array, context: ClientContext): any;
721
- }
722
-
723
- interface GIHprose {
724
- getDefaultClient(): ProxyClient;
725
- registerHprose(hpClientName: string, hproseUrl: string): HproseClient | undefined;
726
- getHprose(hpClientName: string): HproseClient | undefined;
727
- getProxyHprose(hpClientName: string): ProxyClient | undefined;
728
- unregisterHprose(hpClientName: string): void;
729
- }
730
- declare const GlobalHprose: GIHprose;
731
-
732
- /**
733
- * 刷新Token
734
- */
735
- declare function doRefreshToken(): void;
736
- /**
737
- * 检查和刷新Token
738
- * @param userToken
739
- */
740
- declare function checkDoRefreshToken(userToken: ITokenInfo): void;
741
- /**
742
- * 存储Token对象
743
- * @param userToken
744
- */
745
- declare function setLocalToken(userToken: IDoubleToken): void;
746
- /**
747
- * 设置当前用户
748
- * @param userInfo
749
- */
750
- declare function setUser(userInfo: ISystemUser): void;
751
-
752
- interface IUserInfo {
753
- /**
754
- * 用户名
755
- */
756
- username: string;
757
- oldpwd: string;
758
- newpwd: string;
759
- }
760
- interface IUser {
761
- username: string;
762
- pwd: string;
763
- /**
764
- * 所属系统
765
- */
766
- system?: string;
767
- }
768
- /**
769
- * 用户登录
770
- * @param data 用户信息
771
- * @returns
772
- */
773
- declare function login(data: IUser): Promise<any>;
774
- /**
775
- * 检查某一系统的用户
776
- * @param data 用户对象
777
- * @returns
778
- */
779
- declare function checkLogin(data: IUser): Promise<any>;
780
- /**
781
- * 修改密码
782
- * @param data 用户数据
783
- * @returns
784
- */
785
- declare function changePWD(data: IUserInfo): Promise<any>;
786
- /**
787
- * 退出登录
788
- */
789
- declare function logout(): void;
790
- /**
791
- * 验证 已有的token
792
- * @param token 需要验证的token
793
- * @returns
794
- */
795
- declare function checkToken(token: string): Promise<any>;
796
-
797
- /**
798
- * 刷新提前量(毫秒,ms)
799
- */
800
- declare const TOKEN_REFRESH_TIME: number;
801
- /**
802
- * 用户和Token相关服务API
803
- */
804
- declare const USER_TOKEN_API: {
805
- Login: string;
806
- CheckLogin: string;
807
- Logout: string;
808
- ChangePWD: string;
809
- RefreshToken: string;
810
- CheckToken: string;
811
- };
812
-
813
- export { AllowedMethods, Download, Emitter, EnumColor, EventHandlerList, EventHandlerMap, EventType, FileEventName, FileUploadOptions, GIHprose, Global, GlobalHprose, GlobalMitt, H5Tool, Handler, HproseClient, HttpDownload, IDoubleToken, ILockState, IMapKeys, IServiceURL, ISystemConfig, ISystemUser, IToken, ITokenInfo, IUIObject, JsonDownload, ProxyClient, 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';