xframelib 0.7.6 → 0.7.8

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 (32) hide show
  1. package/README.md +16 -6
  2. package/dist/controls/layoutcontainer/LayoutManager.d.ts +7 -0
  3. package/dist/controls/layoutcontainer/layout.vue.d.ts +1 -1
  4. package/dist/controls/routertransition/RouterTransition.vue.d.ts +4 -0
  5. package/dist/controls/routertransition/SuspenseWithError.vue.d.ts +4 -0
  6. package/dist/controls/routertransition/index.d.ts +3 -0
  7. package/dist/controls/vuewindow/index.d.ts +1 -2
  8. package/dist/controls/vuewindow/window/Button.vue.d.ts +1 -1
  9. package/dist/controls/vuewindow/window/index.vue.d.ts +5 -5
  10. package/dist/controls/xwindow/XWindow.vue.d.ts +129 -0
  11. package/dist/controls/xwindow/XWindowManager.d.ts +37 -0
  12. package/dist/controls/xwindow/index.d.ts +4 -0
  13. package/dist/core/IModel.d.ts +18 -1
  14. package/dist/hprose/HproseIO.d.ts +2 -0
  15. package/dist/hprose/index.d.ts +2 -1
  16. package/dist/index.cjs +7 -17
  17. package/dist/index.css +145 -76
  18. package/dist/index.d.ts +2 -1
  19. package/dist/index.js +7 -17
  20. package/dist/model/Config.d.ts +29 -0
  21. package/dist/utils/IsTool.d.ts +2 -2
  22. package/package.json +26 -25
  23. package/dist/assets/index-b43c71d9.css +0 -305
  24. package/dist/assets/output-1225ced9.css +0 -305
  25. package/dist/assets/output-ad5f5cbf.css +0 -307
  26. package/dist/controls/collapsepanel/VCollapsiblePanel.vue.d.ts +0 -27
  27. package/dist/controls/collapsepanel/VCollapsiblePanelGroup.vue.d.ts +0 -33
  28. package/dist/controls/collapsepanel/color.util.d.ts +0 -1
  29. package/dist/controls/collapsepanel/composables/store.d.ts +0 -7
  30. package/dist/controls/collapsepanel/constant.d.ts +0 -1
  31. package/dist/controls/collapsepanel/index.d.ts +0 -3
  32. /package/dist/utils/{SignalRClient.d.ts → SignalrClient.d.ts} +0 -0
package/README.md CHANGED
@@ -1,10 +1,20 @@
1
1
  # xframelib
2
-
3
- 基于 VUE3+Hprose+Typescript 的前端框架
4
-
2
+ <p>
3
+ <a href="https://www.npmjs.com/package/xframelib" target="_blank">
4
+ <img src="https://img.shields.io/npm/v/xframelib?color=orange&logo=npm" />
5
+ </a>
6
+ <a href="https://www.npmjs.com/package/xframelib" target="_blank">
7
+ <img src="https://img.shields.io/npm/dt/xframelib?logo=npm"/>
8
+ </a>
9
+ </p>
10
+ **基于 VUE3+Hprose+Typescript 的前端框架**
11
+
12
+
13
+ - v0.7.8 更新依赖库版本;增加SysConfig默认配置项;controls增加XWindow和XWindowManager取代VWindow;增加全局的Global.WidgetConfigList数组和getLayoutManager方法;删除VCollapsiblePanel、 VCollapsiblePanelGroup组件
14
+ - v0.7.7 增加hprose二进制序列化方法serialize和deserialize;修改Global默认自带LayoutMap和默认为console的Message;为LayoutManager增加静态方法getLayoutManager;增加RouterTransition控件,并应用于layoutcontainer中;更新依赖库版本。
5
15
  - v0.7.6 为LayoutManager增加卸载全部组件unloadAllWidgets、批量卸载组件unloadWidgets、获得已经加载组件ID列表getWidgetLoadedIDList;解决H5Tool的windowResizeHandler和offWindowResizeHandler内部调用错误方法的问题。
6
16
  - ~~v0.7.5 解决上一版LayoutContainer存在问题:CSS样式对应上,调整层级顺序;加入组件引用,changeWidgetVisible能控制Widget组件可见性;修改getWidgetComponent方法,实现对Widget组件的defineExpose方法调用;增加isWidgetVisible判断组件是否可见。~~
7
- - ~~ v0.7.4 完善Axios异常捕捉(对接后端Furion包装异常);更新完善LayoutContainer;H5Tool增加removeHandler和offWindowResizeHandler方法;升级依赖基础库。~~
17
+ - ~~v0.7.4 完善Axios异常捕捉(对接后端Furion包装异常);更新完善LayoutContainer;H5Tool增加removeHandler和offWindowResizeHandler方法;升级依赖基础库。~~
8
18
  - v0.7.3 升级依赖库;loadWidget失败输出日志和事件SysEvents.WidgetLoadedErrorEvent;优化系统权限相关模型;增加GetSignalRClient、ValidateTool、WaterMark等工具。
9
19
  - v0.7.2 解决v0.7.0的deepMerge方法存在复制对象的BUG。
10
20
  - v0.7.0 修改requestPost无法使用FormData参数;修改deepMerge方法;修改isObjectX方法;更新rollup-plugin-scss应用版本。
@@ -66,8 +76,8 @@
66
76
  - Global 全局对象
67
77
  - Message 提示信息
68
78
  - SplitSpanes 封装
69
- - collapsepanel 封装
70
- - vuewindow 封装
79
+ - LayoutContainer 封装
80
+ - XWindow 封装
71
81
  - 增加 utils 里的 Color、FileDownload、StorageHelper
72
82
 
73
83
  ## Installation
@@ -130,4 +130,11 @@ export declare class LayoutManager {
130
130
  * @param idList 组件ID列表
131
131
  */
132
132
  unloadWidgets(idList: string[]): void;
133
+ /**
134
+ * 通过widgetid 获得LayoutManager
135
+ * @param widgetID
136
+ * @param allWidgetConfig
137
+ * @returns
138
+ */
139
+ static getLayoutManager(widgetID: string, allWidgetConfig: Array<IWidgetConfig>): LayoutManager | undefined;
133
140
  }
@@ -34,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{
34
34
  bottomContainer?: import("vue").Ref<HTMLElement | undefined> | undefined;
35
35
  leftContainer?: import("vue").Ref<HTMLElement | undefined> | undefined;
36
36
  rightContainer?: import("vue").Ref<HTMLElement | undefined> | undefined;
37
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "containerLoaded"[], "containerLoaded", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
37
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "containerLoaded"[], "containerLoaded", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
38
38
  widgetConfig: {
39
39
  type: PropType<IWidgetConfig[]>;
40
40
  required: true;
@@ -0,0 +1,4 @@
1
+ declare const _default: import("vue").DefineComponent<{}, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
2
+ [key: string]: any;
3
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ error: import("vue").Ref<any>;
3
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
4
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import RouterTransition from './RouterTransition.vue';
2
+ import SuspenseWithError from './SuspenseWithError.vue';
3
+ export { RouterTransition, SuspenseWithError };
@@ -1,6 +1,5 @@
1
- /// <reference path="../../../../../../src/shims-vue.d.ts" />
2
1
  import VWindow from './window/index.vue';
3
2
  import { StyleBlack, StyleWhite, StyleMetal, StyleGrayblue } from './style';
4
3
  export { WindowResizeEvent } from './window/utils';
5
4
  export { StyleBlack, StyleWhite, StyleMetal, StyleGrayblue, VWindow };
6
- export declare const WindowType: typeof import("*.vue");
5
+ export declare const WindowType: typeof import("./window/index.vue");
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
14
14
  style: () => any;
15
15
  mouseup: (e: MouseEvent & TouchEvent) => void;
16
16
  mousedown: (e: MouseEvent & TouchEvent) => void;
17
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
17
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
18
  disabled: {
19
19
  type: PropType<boolean>;
20
20
  default: boolean;
@@ -92,16 +92,16 @@ declare const _default: import("vue").DefineComponent<{
92
92
  };
93
93
  }, {
94
94
  isOpen: import("vue").Ref<boolean>;
95
- windowEl: any;
96
- titlebar: any;
97
- content: any;
95
+ windowEl: import("vue").Ref<any>;
96
+ titlebar: import("vue").Ref<any>;
97
+ content: import("vue").Ref<any>;
98
98
  activate: () => void;
99
- styleWindow: any;
99
+ styleWindow: import("vue").Ref<any>;
100
100
  styleTitlebar: import("vue").ComputedRef<any>;
101
101
  styleContent: import("vue").ComputedRef<any>;
102
102
  closeButtonClick: () => void;
103
103
  fixPosition: () => void;
104
- } | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
104
+ } | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
105
105
  windowStyle: {
106
106
  type: ObjectConstructor;
107
107
  required: true;
@@ -0,0 +1,129 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ top: {
3
+ type: (StringConstructor | NumberConstructor)[];
4
+ default: number;
5
+ };
6
+ left: {
7
+ type: (StringConstructor | NumberConstructor)[];
8
+ default: number;
9
+ };
10
+ nWidth: {
11
+ type: (StringConstructor | NumberConstructor)[];
12
+ default: string;
13
+ };
14
+ nHeight: {
15
+ type: (StringConstructor | NumberConstructor)[];
16
+ default: string;
17
+ };
18
+ icon: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ title: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ titleHeight: {
27
+ type: (StringConstructor | NumberConstructor)[];
28
+ default: string;
29
+ };
30
+ hasMin: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
34
+ hasMax: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ hasClose: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ isDark: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ pid: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ tag: {
51
+ type: (StringConstructor | NumberConstructor | ArrayConstructor | ObjectConstructor)[];
52
+ default: string;
53
+ };
54
+ }, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
55
+ [key: string]: any;
56
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "open" | "loaded" | "minimize")[], "close" | "open" | "loaded" | "minimize", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
57
+ top: {
58
+ type: (StringConstructor | NumberConstructor)[];
59
+ default: number;
60
+ };
61
+ left: {
62
+ type: (StringConstructor | NumberConstructor)[];
63
+ default: number;
64
+ };
65
+ nWidth: {
66
+ type: (StringConstructor | NumberConstructor)[];
67
+ default: string;
68
+ };
69
+ nHeight: {
70
+ type: (StringConstructor | NumberConstructor)[];
71
+ default: string;
72
+ };
73
+ icon: {
74
+ type: StringConstructor;
75
+ default: string;
76
+ };
77
+ title: {
78
+ type: StringConstructor;
79
+ default: string;
80
+ };
81
+ titleHeight: {
82
+ type: (StringConstructor | NumberConstructor)[];
83
+ default: string;
84
+ };
85
+ hasMin: {
86
+ type: BooleanConstructor;
87
+ default: boolean;
88
+ };
89
+ hasMax: {
90
+ type: BooleanConstructor;
91
+ default: boolean;
92
+ };
93
+ hasClose: {
94
+ type: BooleanConstructor;
95
+ default: boolean;
96
+ };
97
+ isDark: {
98
+ type: BooleanConstructor;
99
+ default: boolean;
100
+ };
101
+ pid: {
102
+ type: StringConstructor;
103
+ default: string;
104
+ };
105
+ tag: {
106
+ type: (StringConstructor | NumberConstructor | ArrayConstructor | ObjectConstructor)[];
107
+ default: string;
108
+ };
109
+ }>> & {
110
+ onClose?: ((...args: any[]) => any) | undefined;
111
+ onOpen?: ((...args: any[]) => any) | undefined;
112
+ onLoaded?: ((...args: any[]) => any) | undefined;
113
+ onMinimize?: ((...args: any[]) => any) | undefined;
114
+ }, {
115
+ top: string | number;
116
+ left: string | number;
117
+ nWidth: string | number;
118
+ nHeight: string | number;
119
+ icon: string;
120
+ title: string;
121
+ titleHeight: string | number;
122
+ hasMin: boolean;
123
+ hasMax: boolean;
124
+ hasClose: boolean;
125
+ isDark: boolean;
126
+ pid: string;
127
+ tag: string | number | Record<string, any> | unknown[];
128
+ }, {}>;
129
+ export default _default;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * 传递的WindowPanel数据模型
3
+ */
4
+ export interface IPanelData {
5
+ id: string;
6
+ icon?: string;
7
+ title?: string;
8
+ pid?: string;
9
+ data?: any;
10
+ }
11
+ /**
12
+ * Windows窗体Map集合
13
+ */
14
+ export declare const WindowsMap: Map<string, IPanelData>;
15
+ /**
16
+ * 最小化窗体Map集合
17
+ */
18
+ export declare const MinWindowMap: import("vue").Ref<Map<string, number> & Omit<Map<string, number>, keyof Map<any, any>>>;
19
+ declare class XWindowManager {
20
+ /**
21
+ * 注册添加窗体对象
22
+ * @param panelData
23
+ */
24
+ static addWindowPanel(panelData: IPanelData): void;
25
+ /**
26
+ * 移除窗体
27
+ * @param id
28
+ */
29
+ static removeWindowPanel(id: string): void;
30
+ static minimizeWindowPanel(id: string): void;
31
+ /**
32
+ * 打开窗体
33
+ * @param id
34
+ */
35
+ static openWindowPanel(id: string): void;
36
+ }
37
+ export default XWindowManager;
@@ -0,0 +1,4 @@
1
+ import XWindow from './XWindow.vue';
2
+ import XWindowManager from './XWindowManager';
3
+ import { WindowsMap, MinWindowMap } from './XWindowManager';
4
+ export { WindowsMap, MinWindowMap, XWindowManager, XWindow };
@@ -5,6 +5,7 @@ import { ISystemConfig } from '../model/Config';
5
5
  import { LayoutManager } from '../controls/layoutcontainer';
6
6
  import { AxiosStatic } from 'axios';
7
7
  import * as Log from "loglevel";
8
+ import { IWidgetConfig } from '../model/Layout';
8
9
  export interface InnerObject {
9
10
  /**
10
11
  * axios对象
@@ -13,11 +14,27 @@ export interface InnerObject {
13
14
  Config: ISystemConfig;
14
15
  EventBus: Emitter;
15
16
  DefaultProxyClient: ProxyClient | null | undefined;
16
- Message?: MsgHelper;
17
+ /**
18
+ * 默认Message为console.log
19
+ */
20
+ Message: MsgHelper;
17
21
  /**
18
22
  * 布局管理对象
19
23
  */
20
24
  LayoutManager?: LayoutManager;
25
+ /**
26
+ * LayoutManager字典
27
+ */
28
+ LayoutMap: Map<string, LayoutManager>;
29
+ /**
30
+ * 权限过滤后的WidgetConfig列表
31
+ */
32
+ WidgetConfigList?: Array<IWidgetConfig>;
33
+ /**
34
+ * 通过WidgetID获取LayoutManager
35
+ * @param widgetID
36
+ */
37
+ getLayoutManager(widgetID: string): LayoutManager | undefined;
21
38
  /**
22
39
  * 系统ID标识
23
40
  */
@@ -0,0 +1,2 @@
1
+ export declare function serialize(value: unknown): string;
2
+ export declare function deserialize(value: string): any;
@@ -1,5 +1,6 @@
1
1
  import ProxyClient from './ProxyClient';
2
2
  import HproseClient from './HproseClient';
3
+ import { deserialize, serialize } from './HproseIO';
3
4
  export interface GIHprose {
4
5
  getDefaultClient(): ProxyClient;
5
6
  registerHprose(hpClientName: string, hproseUrl: string): HproseClient | undefined;
@@ -8,4 +9,4 @@ export interface GIHprose {
8
9
  unregisterHprose(hpClientName: string): void;
9
10
  }
10
11
  declare const GlobalHprose: GIHprose;
11
- export { GlobalHprose, ProxyClient, HproseClient };
12
+ export { GlobalHprose, ProxyClient, HproseClient, deserialize, serialize };