xframelib 0.9.4 → 0.9.6

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 (50) hide show
  1. package/README.md +3 -1
  2. package/dist/assets/worker-XXTEA-lcP6QMJU.js +6 -0
  3. package/dist/assets/worker-xmath-DWsBwJk9.js +6 -0
  4. package/dist/controls/ADivider.vue.d.ts +19 -6
  5. package/dist/controls/index.d.ts +1 -1
  6. package/dist/controls/layoutcontainer/LayoutManager.d.ts +19 -17
  7. package/dist/controls/layoutcontainer/index.d.ts +1 -1
  8. package/dist/controls/layoutcontainer/layout.vue.d.ts +52 -32
  9. package/dist/controls/routertransition/RouterTransition.vue.d.ts +1 -3
  10. package/dist/controls/routertransition/RouterTransitionAnimate.vue.d.ts +6 -26
  11. package/dist/controls/routertransition/SuspenseWithError.vue.d.ts +3 -3
  12. package/dist/controls/routertransition/index.d.ts +3 -3
  13. package/dist/controls/splitpanes/index.d.ts +2 -2
  14. package/dist/controls/splitpanes/pane.vue.d.ts +40 -0
  15. package/dist/controls/splitpanes/splitpanes.vue.d.ts +109 -0
  16. package/dist/controls/vuewindow/index.d.ts +1 -1
  17. package/dist/controls/vuewindow/window/Button.vue.d.ts +5 -5
  18. package/dist/controls/vuewindow/window/index.vue.d.ts +38 -12
  19. package/dist/controls/xwindow/XWindow.vue.d.ts +51 -11
  20. package/dist/controls/xwindow/XWindowManager.d.ts +2 -1
  21. package/dist/controls/xwindow/index.d.ts +2 -3
  22. package/dist/core/Global.d.ts +1 -1
  23. package/dist/core/IModel.d.ts +14 -4
  24. package/dist/core/Init.d.ts +1 -1
  25. package/dist/directives/dragDirective.d.ts +1 -1
  26. package/dist/directives/index.d.ts +3 -3
  27. package/dist/directives/repeatClick.d.ts +1 -1
  28. package/dist/directives/wowDirective.d.ts +1 -1
  29. package/dist/hprose/index.d.ts +2 -2
  30. package/dist/index.css +198 -157
  31. package/dist/index.d.ts +1 -0
  32. package/dist/index.js +8 -2
  33. package/dist/model/Config.d.ts +6 -1
  34. package/dist/model/Layout.d.ts +1 -1
  35. package/dist/permission/filter.d.ts +7 -0
  36. package/dist/utils/AxiosHelper.d.ts +1 -1
  37. package/dist/utils/H5Tool.d.ts +1 -1
  38. package/dist/utils/RouterURLTool.d.ts +8 -0
  39. package/dist/utils/TokenHelper.d.ts +1 -4
  40. package/dist/utils/XXTEA.d.ts +1 -0
  41. package/dist/utils/ZipTool.d.ts +1 -1
  42. package/dist/utils/index.d.ts +10 -10
  43. package/dist/workers/index.d.ts +13 -0
  44. package/dist/workers/worker-XXTEA.d.ts +1 -0
  45. package/dist/workers/worker-xmath.d.ts +45 -0
  46. package/package.json +15 -14
  47. package/dist/index.cjs +0 -7
  48. package/dist/utils/FileUpload_bak.d.ts +0 -90
  49. package/dist/utils/FileUpload/346/226/260.d.ts +0 -102
  50. package/dist/utils/URLTool.d.ts +0 -18
@@ -1,3 +1,4 @@
1
+ import { Component } from 'vue';
1
2
  /**
2
3
  * UI界面相关
3
4
  */
@@ -27,6 +28,11 @@ export interface IUIObject {
27
28
  * 是否是能访问互联网,还是内网部署应用
28
29
  * */
29
30
  IsInternet?: boolean;
31
+ /**
32
+ * 是否:只用户验证,不验证角色与功能授权,默认为false
33
+ * true:只验证用户,不检查角色授权
34
+ */
35
+ OnlyUserVerify?: boolean;
30
36
  /**
31
37
  * 网站灰色模式,用于可能悼念的日期开启
32
38
  * 默认为false
@@ -159,7 +165,6 @@ export interface ISystemConfig {
159
165
  KEY?: string;
160
166
  [props: string]: any;
161
167
  }
162
- import { Component } from 'vue';
163
168
  export declare type Lazy<T> = () => Promise<T>;
164
169
  /**
165
170
  * 窗体内容配置接口
@@ -1,5 +1,5 @@
1
1
  import { Component } from 'vue';
2
- import type { Lazy } from './Config';
2
+ import { Lazy } from './Config';
3
3
  /**
4
4
  *布局枚举类型
5
5
  */
@@ -35,6 +35,13 @@ export declare function getWidgetMenus(widgetMenuConfig: Array<IWidgetMenu>, rol
35
35
  * @returns
36
36
  */
37
37
  export declare function getWidgetConfig(widgetConfig?: Array<IWidgetConfig>, roleLevel?: number): Array<IWidgetConfig> | undefined;
38
+ /**
39
+ * 获取授权后的WidgetConfig字典,并内部赋值Global.RightWidgetConfigMap
40
+ * @param widgetConfigMap
41
+ * @param roleLevel
42
+ * @returns
43
+ */
44
+ export declare function getWidgetConfigMap(widgetConfigMap: Map<string, Array<IWidgetConfig>>, roleLevel?: number): Map<string, Array<IWidgetConfig>> | undefined;
38
45
  /**
39
46
  * 获取授权的功能点集合
40
47
  * @param functionList 全部功能列表
@@ -1,4 +1,4 @@
1
- import { ResponseType } from "axios";
1
+ import { ResponseType } from 'axios';
2
2
  /**
3
3
  * Get服务请求
4
4
  * @param apiUrl API接口路径
@@ -296,7 +296,7 @@ export default class H5Tool {
296
296
  * @param className
297
297
  * @returns {HTMLDivElement|NodeListOf<ChildNode>}
298
298
  */
299
- static parseDom(domStr: string, withWrapper?: boolean, className?: string): NodeListOf<ChildNode> | HTMLDivElement;
299
+ static parseDom(domStr: string, withWrapper?: boolean, className?: string): HTMLDivElement | NodeListOf<ChildNode>;
300
300
  /**
301
301
  * Creates video
302
302
  * @param url
@@ -1,5 +1,6 @@
1
1
  import { LocationQueryRaw, Router, RouteRecordRaw } from 'vue-router';
2
2
  import { RouteData } from '../model/ITypes';
3
+ import { IWidgetConfig } from '../model';
3
4
  /**
4
5
  * 将对象添加当作参数拼接到URL上面
5
6
  * @param baseUrl 需要拼接的url
@@ -52,6 +53,13 @@ export declare function recursiveRoutes(components: Record<string, unknown>): Ar
52
53
  * @returns
53
54
  */
54
55
  export declare function globFilterObjects<T>(components: Record<string, unknown>, orderIndex?: boolean): Array<T>;
56
+ export declare function globFilterObjectsOld<T>(components: Record<string, unknown>, orderIndex?: boolean): Array<T>;
57
+ /**
58
+ * 递归过滤:widgetConfig配置文件
59
+ * @param components
60
+ * @returns
61
+ */
62
+ export declare function globFilterLayoutWidgetConfig(components: Record<string, unknown>, isProduct?: boolean): Map<string, Array<IWidgetConfig>>;
55
63
  /**
56
64
  * 根据路由路由配置记录,获取RouteData
57
65
  * @param configRouteItem 路由配置记录
@@ -1,8 +1,5 @@
1
- /**
2
- * 为了解决循环引用依赖问题
3
- */
4
1
  import { ITokenInfo } from '../model/IUserModel';
5
- import StorageHelper from '../utils/Storage';
2
+ import { default as StorageHelper } from '../utils/Storage';
6
3
  export declare const storageHelper: StorageHelper;
7
4
  /**
8
5
  * 获取token中的授权Key
@@ -13,3 +13,4 @@ declare const XXTEA: {
13
13
  decryptToString: typeof decryptToString;
14
14
  };
15
15
  export default XXTEA;
16
+ export { toBytes, toString, encrypt, encryptToString, decrypt, decryptToString };
@@ -1,4 +1,4 @@
1
- import { Unzipped } from "fflate";
1
+ import { Unzipped } from 'fflate';
2
2
  export interface IZipFile {
3
3
  filename: string;
4
4
  content: Uint8Array | string | ArrayBuffer;
@@ -1,14 +1,14 @@
1
- import H5Tool from './H5Tool';
2
- import StringUtils from './StringUtils';
3
- import StorageHelper, { storage } from './Storage';
4
- import uuid, { newGuid } from './uuid';
5
- import ZipTool from './ZipTool';
6
- import GzipTool from './GzipTool';
7
- import DayjsTool from './DayjsTool';
8
- import XXTEA from './XXTEA';
9
- import WaterMark from './WaterMark';
1
+ import { default as H5Tool } from './H5Tool';
2
+ import { default as StringUtils } from './StringUtils';
3
+ import { default as StorageHelper, storage } from './Storage';
4
+ import { default as uuid, newGuid } from './uuid';
5
+ import { default as ZipTool } from './ZipTool';
6
+ import { default as GzipTool } from './GzipTool';
7
+ import { default as DayjsTool } from './DayjsTool';
8
+ import { default as XXTEA } from './XXTEA';
9
+ import { default as WaterMark } from './WaterMark';
10
10
  import { GetSignalRClient } from './SignalrClient';
11
- import iconv from 'iconv-lite';
11
+ import { default as iconv } from 'iconv-lite';
12
12
  export * from './Color';
13
13
  export * from './FileDownload';
14
14
  export * from './Time';
@@ -0,0 +1,13 @@
1
+ /**
2
+ * XXTEA 加密解密计算
3
+ */
4
+ declare const xxteaWorker: {
5
+ readonly [x: number]: Worker;
6
+ } & import('comlink').RemoteObject<typeof import("./worker-XXTEA")> & import('comlink').ProxyMethods;
7
+ /**
8
+ * 通用数学计算
9
+ */
10
+ declare const xmathWorker: {
11
+ readonly [x: number]: Worker;
12
+ } & import('comlink').RemoteObject<typeof import("./worker-xmath")> & import('comlink').ProxyMethods;
13
+ export { xmathWorker, xxteaWorker };
@@ -0,0 +1 @@
1
+ export { toBytes, toString, encrypt, encryptToString, decrypt, decryptToString } from '../utils/XXTEA';
@@ -0,0 +1,45 @@
1
+ import { default as iconv } from 'iconv-lite';
2
+ /**
3
+ * 差集
4
+ * @param a
5
+ * @param b
6
+ * @returns
7
+ */
8
+ export declare function getMinus(a: any[], b: any[]): any[];
9
+ /**
10
+ * 交集
11
+ * @param a
12
+ * @param b
13
+ */
14
+ export declare function getIntersect(a: any[], b: any[]): any[];
15
+ /**
16
+ * 提供MD5值计算
17
+ * @param content 字符串
18
+ * @param needRawHash 是否需要是二进制格式的结果,默认为false
19
+ * @returns MD5值
20
+ */
21
+ export declare function MD5(content: string, needRawHash?: boolean): string;
22
+ /**
23
+ * Iconv进行文本编码转换,
24
+ * @param content
25
+ * @param srcEncoding
26
+ * @param targetEncoding
27
+ * @returns
28
+ */
29
+ export declare function convertEncodeByIconv(content: string, srcEncoding: string, targetEncoding: string): string;
30
+ /**
31
+ * 文字——编码——Iconv
32
+ * @param content
33
+ * @param encoding
34
+ * @param options
35
+ * @returns
36
+ */
37
+ export declare function encodeByIconv(content: string, encoding: string, options?: iconv.Options | undefined): Buffer;
38
+ /**
39
+ * 文字——解码——Iconv
40
+ * @param buffer
41
+ * @param encoding
42
+ * @param options
43
+ * @returns
44
+ */
45
+ export declare function decodeByIconv(buffer: Buffer, encoding: string, options?: iconv.Options | undefined): string;
package/package.json CHANGED
@@ -1,16 +1,14 @@
1
1
  {
2
2
  "name": "xframelib",
3
- "version": "0.9.4",
4
- "description": "积累的前端开发基础库",
3
+ "version": "0.9.6",
4
+ "description": "积累的前端开发基础库,来源于项目和服务于项目。",
5
5
  "main": "dist/index.js",
6
6
  "common": "dist/index.cjs",
7
7
  "typings": "dist/index.d.ts",
8
- "type":"module",
8
+ "type": "module",
9
9
  "scripts": {
10
- "dev": "vite --port 8099",
11
10
  "build": "vite build",
12
11
  "lib": "rollup -c ",
13
- "serve": "vite preview",
14
12
  "clean": "rimraf dist && rimraf package-lock.json && rimraf node_modules/.cache && rimraf node_modules/.vite"
15
13
  },
16
14
  "keywords": [
@@ -32,9 +30,9 @@
32
30
  "@hprose/io": "^3.0.10",
33
31
  "@hprose/rpc-core": "^3.0.10",
34
32
  "@hprose/rpc-html5": "^3.0.10",
35
- "@iconify/vue": "^4.3.0",
33
+ "@iconify/vue": "^5.0.0",
36
34
  "@microsoft/signalr": "^8.0.7",
37
- "axios": "^1.8.4",
35
+ "axios": "^1.9.0",
38
36
  "fflate": "^0.8.2",
39
37
  "iconv-lite": "^0.6.3",
40
38
  "localforage": "^1.10.0",
@@ -52,18 +50,21 @@
52
50
  "@rollup/plugin-terser": "^0.4.4",
53
51
  "@rollup/plugin-typescript": "^12.1.2",
54
52
  "@types/streamsaver": "^2.0.5",
55
- "@vitejs/plugin-vue": "^5.2.3",
56
- "esbuild": "^0.25.3",
57
- "rimraf": "^6.0.1",
53
+ "@vitejs/plugin-vue": "^5.2.4",
54
+ "esbuild": "^0.25.5",
58
55
  "rollup-plugin-copy": "^3.5.0",
59
56
  "rollup-plugin-esbuild": "^6.2.1",
60
57
  "rollup-plugin-scss": "^4.0.1",
61
58
  "rollup-plugin-typescript2": "^0.36.0",
62
59
  "rollup-plugin-vue": "^6.0.0",
63
- "sass": "^1.87.0",
60
+ "sass": "^1.89.0",
64
61
  "typescript": "^5.8.3",
65
- "vite": "^6.3.3",
66
- "vue": "^3.5.13",
67
- "vue-router": "^4.5.0"
62
+ "vite": "^6.3.5",
63
+ "vite-plugin-comlink": "^5.1.0",
64
+ "vite-plugin-commonjs": "^0.10.4",
65
+ "vite-plugin-dts": "^4.5.4",
66
+ "vite-plugin-static-copy": "^3.0.0",
67
+ "vue": "^3.5.16",
68
+ "vue-router": "^4.5.1"
68
69
  }
69
70
  }