@das-fed/utils 6.4.0-hot.5 → 6.4.0-hot.50

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 (111) hide show
  1. package/api-services/i18n/index.d.ts +53 -0
  2. package/api-services/i18n/index.js +27 -0
  3. package/api-services/i18n/index.js.gz +0 -0
  4. package/api-services/index.js +1443 -1270
  5. package/api-services/index.js.gz +0 -0
  6. package/api-services/modules/app-manage/index.js +1869 -1708
  7. package/api-services/modules/app-manage/index.js.gz +0 -0
  8. package/api-services/modules/authentication/index.js +1869 -1708
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/index.js +1873 -1712
  11. package/api-services/modules/bems/index.js.gz +0 -0
  12. package/api-services/modules/contract/index.js +1869 -1708
  13. package/api-services/modules/contract/index.js.gz +0 -0
  14. package/api-services/modules/duty-manage/index.js +1860 -1699
  15. package/api-services/modules/duty-manage/index.js.gz +0 -0
  16. package/api-services/modules/enterpriseright/index.js +1776 -1629
  17. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  18. package/api-services/modules/file/index.d.ts +1 -0
  19. package/api-services/modules/file/index.js +3109 -156
  20. package/api-services/modules/file/index.js.gz +0 -0
  21. package/api-services/modules/gateway-edge/index.js +1869 -1708
  22. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  23. package/api-services/modules/index.js +1670 -1504
  24. package/api-services/modules/index.js.gz +0 -0
  25. package/api-services/modules/iot/index.d.ts +1 -0
  26. package/api-services/modules/iot/index.js +1885 -1723
  27. package/api-services/modules/iot/index.js.gz +0 -0
  28. package/api-services/modules/justauth/index.js +1813 -1670
  29. package/api-services/modules/justauth/index.js.gz +0 -0
  30. package/api-services/modules/knowledge/index.js +1869 -1708
  31. package/api-services/modules/knowledge/index.js.gz +0 -0
  32. package/api-services/modules/link/index.js +1869 -1708
  33. package/api-services/modules/link/index.js.gz +0 -0
  34. package/api-services/modules/permission/index.js +1769 -1626
  35. package/api-services/modules/permission/index.js.gz +0 -0
  36. package/api-services/modules/platformManage/index.js +1881 -1720
  37. package/api-services/modules/platformManage/index.js.gz +0 -0
  38. package/api-services/modules/portal/index.js +1853 -1692
  39. package/api-services/modules/portal/index.js.gz +0 -0
  40. package/api-services/modules/space-manage/index.js +1869 -1708
  41. package/api-services/modules/space-manage/index.js.gz +0 -0
  42. package/api-services/modules/super-admin/index.js +1817 -1674
  43. package/api-services/modules/super-admin/index.js.gz +0 -0
  44. package/api-services/modules/supplier/index.js +1816 -1673
  45. package/api-services/modules/supplier/index.js.gz +0 -0
  46. package/api-services/modules/supplychain-manage/index.js +1853 -1692
  47. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  48. package/api-services/modules/systemConfiguration/index.js +1868 -1707
  49. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  50. package/api-services/modules/tool/index.js +1869 -1708
  51. package/api-services/modules/tool/index.js.gz +0 -0
  52. package/api-services/src/create-service/index.js +1811 -1668
  53. package/api-services/src/create-service/index.js.gz +0 -0
  54. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  55. package/common-info/index.d.ts +11 -3
  56. package/common-info/index.js +112 -56
  57. package/common-info/index.js.gz +0 -0
  58. package/common-info/set-personal-info/index.js +265 -241
  59. package/common-info/set-personal-info/index.js.gz +0 -0
  60. package/common-info/type.d.ts +218 -104
  61. package/common-tools/calc-text-width/index.d.ts +1 -0
  62. package/common-tools/calc-text-width/index.js +10 -0
  63. package/common-tools/extract-file-name/index.d.ts +1 -0
  64. package/common-tools/extract-file-name/index.js +1466 -0
  65. package/common-tools/extract-file-name/index.js.gz +0 -0
  66. package/common-tools/get-file-extension/index.d.ts +6 -0
  67. package/common-tools/get-file-extension/index.js +7 -0
  68. package/common-tools/get-url-params/index.d.ts +1 -1
  69. package/common-tools/get-url-params/index.js.gz +0 -0
  70. package/common-tools/index.d.ts +4 -0
  71. package/common-tools/index.js +4 -0
  72. package/common-tools/nest-tree-format/index.d.ts +1 -1
  73. package/common-tools/nest-tree-format/index.js +15 -15
  74. package/common-tools/setHtmlMinWH/index.js +4 -8
  75. package/common-tools/update-browser-title/index.d.ts +1 -0
  76. package/common-tools/update-browser-title/index.js +12 -0
  77. package/common-tools/update-fav-icon/index.js +15 -14
  78. package/create-api-service/i18n/index.d.ts +33 -0
  79. package/create-api-service/i18n/index.js +15 -0
  80. package/create-api-service/index.d.ts +3 -1
  81. package/create-api-service/index.js +1872 -1711
  82. package/create-api-service/index.js.gz +0 -0
  83. package/create-api-service/sso/index.d.ts +0 -2
  84. package/create-api-service/sso/index.js +753 -629
  85. package/create-api-service/sso/index.js.gz +0 -0
  86. package/curring-http/index.js +338 -320
  87. package/curring-http/index.js.gz +0 -0
  88. package/curring-http/type.d.ts +87 -87
  89. package/directive/auth/index.js.gz +0 -0
  90. package/directive/hoverInside/index.d.ts +1 -1
  91. package/dom-check-in/index.js +2 -2
  92. package/dom-watcher/index.d.ts +1 -1
  93. package/esm-map.json +9 -2
  94. package/hooks/popup-manager/use-zindex/index.d.ts +0 -2
  95. package/hooks/popup-manager/use-zindex/index.js +7 -20
  96. package/hooks/use-get-auth/index.js.gz +0 -0
  97. package/nextTiken/index.js.gz +0 -0
  98. package/package.json +4 -4
  99. package/pinyin-first-character/index.js +6 -1
  100. package/pinyin-first-character/index.js.gz +0 -0
  101. package/style/index.js.gz +0 -0
  102. package/style/math.d.ts +4 -4
  103. package/token-tools/index.d.ts +6 -6
  104. package/token-tools/index.js +8 -84
  105. package/use-low-code/index.js +13 -13
  106. package/use-low-code/index.js.gz +0 -0
  107. package/use-low-code/style.css +1 -1
  108. package/vue/hooks/use-model-value/index.d.ts +5 -1
  109. package/webSocket-service/index.js.gz +0 -0
  110. package/webSocket-service/type.d.ts +28 -28
  111. package/token-tools/index.js.gz +0 -0
Binary file
@@ -1,89 +1,89 @@
1
1
  import { AxiosInstance, AxiosRequestConfig, AxiosError } from 'axios';
2
2
  import { Ref } from 'vue';
3
-
4
-
5
- /** 请求工具配置项 */
6
- export type CurringConfig = AxiosRequestConfig & {
7
- /** 请求实例 */
8
- axiosInstance?: AxiosInstance
9
-
10
- /** 请求方法 */
11
- method?: Method
12
-
13
- /** 请求的body数据 */
14
- data?: any
15
-
16
- /** 请求的query数据 */
17
- params?: any
18
-
19
- /** 接口地址前缀 */
20
- urlPrefix?: string
21
-
22
- /** 标记为公共接口,不需要鉴权,默认为false */
23
- public?: boolean
24
-
25
- /** 请求成功执行的回调 */
26
- onSuccess?: (res: any, config: CurringConfig) => Promise<any>
27
-
28
- /** 请求失败执行的回调 */
29
- onError?: (error: any, config: CurringConfig) => Promise<any>
30
-
31
- /** 自定义处理请求失败执行的回调 */
32
- onCustomError?: (error: any, config: CurringConfig) => Promise<any>
33
-
34
- /** 不管请求成功或失败都会执行的回调 */
35
- finally?: (config: CurringConfig) => any
36
-
37
- /** 每次请求之前都会执行的函数 */
38
- beforeRun?: (config: CurringConfig) => Promise<CurringConfig>
39
-
40
- /** 自定义错误信息 */
41
- customErrorMessage?: (
42
- /** 原始错误信息 */
43
- message: string,
44
-
45
- /** 原始错误对象 */
46
- error: any,
47
- ) => string | null | undefined
48
-
49
- /** 忽略错误提示 */
50
- ignoreErrorMessage?: boolean
51
-
52
- /** 接口401是否重定向到登录页 */
53
- noRedireLogin?: boolean
54
-
55
- /** 开启CSRF安全选项 */
56
- csrf?: boolean
57
- }
58
-
59
- export type Method = 'get' | 'post' | 'put' | 'delete' | 'patch'
60
-
61
- export type CurringConfigFun = (config: CurringConfig) => CurringConfig | Promise<CurringConfig>
62
-
63
- export type CurringRes = {
64
- /** 请求时返回的接口数据 */
65
- data: Ref<any>
66
-
67
- /** 请求时的错误信息 */
68
- error: Ref<any>
69
-
70
- /** 请求时的loading */
71
- loading: Ref<boolean>
72
-
73
- /** 发起请求 返回格式 [ error, data ] */
74
- run: (payload?: any, config?: CurringConfig) => CurringRunRes
75
-
76
- /** 取消请求控制器 */
77
- abortController: Ref<AbortController | null>
78
- }
79
-
80
- /** 返回为数组 [error, data], 请求成功error为null,请求失败data为null */
81
- export type CurringRunRes = Promise<
82
- [
83
- /** 请求返回的错误信息,请求成功时为null,请求失败时为错误信息 */
84
- error: { code: string | number; msg: string; error: AxiosError } | null,
85
-
86
- /** 请求返回的接口数据,请求成功时为后端数据,请求失败时为null */
87
- data: any | null,
88
- ]
89
- >
3
+
4
+
5
+ /** 请求工具配置项 */
6
+ export type CurringConfig = AxiosRequestConfig & {
7
+ /** 请求实例 */
8
+ axiosInstance?: AxiosInstance
9
+
10
+ /** 请求方法 */
11
+ method?: Method
12
+
13
+ /** 请求的body数据 */
14
+ data?: any
15
+
16
+ /** 请求的query数据 */
17
+ params?: any
18
+
19
+ /** 接口地址前缀 */
20
+ urlPrefix?: string
21
+
22
+ /** 标记为公共接口,不需要鉴权,默认为false */
23
+ public?: boolean
24
+
25
+ /** 请求成功执行的回调 */
26
+ onSuccess?: (res: any, config: CurringConfig) => Promise<any>
27
+
28
+ /** 请求失败执行的回调 */
29
+ onError?: (error: any, config: CurringConfig) => Promise<any>
30
+
31
+ /** 自定义处理请求失败执行的回调 */
32
+ onCustomError?: (error: any, config: CurringConfig) => Promise<any>
33
+
34
+ /** 不管请求成功或失败都会执行的回调 */
35
+ finally?: (config: CurringConfig) => any
36
+
37
+ /** 每次请求之前都会执行的函数 */
38
+ beforeRun?: (config: CurringConfig) => Promise<CurringConfig>
39
+
40
+ /** 自定义错误信息 */
41
+ customErrorMessage?: (
42
+ /** 原始错误信息 */
43
+ message: string,
44
+
45
+ /** 原始错误对象 */
46
+ error: any,
47
+ ) => string | null | undefined
48
+
49
+ /** 忽略错误提示 */
50
+ ignoreErrorMessage?: boolean
51
+
52
+ /** 接口401是否重定向到登录页 */
53
+ noRedireLogin?: boolean
54
+
55
+ /** 开启CSRF安全选项 */
56
+ csrf?: boolean
57
+ }
58
+
59
+ export type Method = 'get' | 'post' | 'put' | 'delete' | 'patch'
60
+
61
+ export type CurringConfigFun = (config: CurringConfig) => CurringConfig | Promise<CurringConfig>
62
+
63
+ export type CurringRes = {
64
+ /** 请求时返回的接口数据 */
65
+ data: Ref<any>
66
+
67
+ /** 请求时的错误信息 */
68
+ error: Ref<any>
69
+
70
+ /** 请求时的loading */
71
+ loading: Ref<boolean>
72
+
73
+ /** 发起请求 返回格式 [ error, data ] */
74
+ run: (payload?: any, config?: CurringConfig) => CurringRunRes
75
+
76
+ /** 取消请求控制器 */
77
+ abortController: Ref<AbortController | null>
78
+ }
79
+
80
+ /** 返回为数组 [error, data], 请求成功error为null,请求失败data为null */
81
+ export type CurringRunRes = Promise<
82
+ [
83
+ /** 请求返回的错误信息,请求成功时为null,请求失败时为错误信息 */
84
+ error: { code: string | number; msg: string; error: AxiosError } | null,
85
+
86
+ /** 请求返回的接口数据,请求成功时为后端数据,请求失败时为null */
87
+ data: any | null,
88
+ ]
89
+ >
Binary file
@@ -1,6 +1,6 @@
1
1
  import { Directive } from 'vue';
2
2
 
3
3
  /**
4
- * 指令:鼠标移入移除dom事件
4
+ * 指令:鼠标移入移出dom事件
5
5
  */
6
6
  export declare const vHoverInside: Directive<HTMLElement>;
@@ -1,7 +1,7 @@
1
1
  const d = (e) => {
2
2
  const t = window.event;
3
- let i = Number(t.clientX), n = Number(t.clientY), l = Number(e.getBoundingClientRect().left), u = Number(l + e.clientWidth), r = Number(e.getBoundingClientRect().top), c = Number(r + e.clientHeight);
4
- return i > l && i < u && n > r && n < c;
3
+ let i = Number(t.clientX), n = Number(t.clientY), l = Number(e.getBoundingClientRect().left), r = Number(l + e.clientWidth), c = Number(e.getBoundingClientRect().top), u = Number(c + e.clientHeight);
4
+ return i > l && i < r && n > c && n < u;
5
5
  };
6
6
  export {
7
7
  d as domCheckIn
@@ -5,7 +5,7 @@ interface Config {
5
5
  attributes?: boolean;
6
6
  /** 要监视的特定属性名称的数组,如果未包含此属性,则对所有属性的更改都会触发变动通知; */
7
7
  attributeFilter?: any[];
8
- /** 在attributes属性已经设为true的前提下, 将发生变化的属性节点之前的属性值记录下来(记录在MutationRecord对象的oldValue属性中); */
8
+ /** 在attributes属性已经设为true的前提下, 将发生变化的属性节点之前的属性值记录下来(记录在MutationRecord对象的oldValue属性中); */
9
9
  attributeOldValue?: boolean;
10
10
  /** 在characterData属性已经设为true的前提下,将发生变化characterData节点之前的文本内容记录下来(记录在MutationRecord对象的oldValue属性中); */
11
11
  characterDataOldValue?: boolean;
package/esm-map.json CHANGED
@@ -112,7 +112,6 @@
112
112
  "getAccessTokenInfo": "/token-tools/index",
113
113
  "setAccessToken": "/token-tools/index",
114
114
  "removeAccessToken": "/token-tools/index",
115
- "clearAllCookies": "/token-tools/index",
116
115
  "socketService": "/webSocket-service/index",
117
116
  "getTokenFromQuery": "/common-info/getInfoFromUrl/index",
118
117
  "getProjectInfoFromQuery": "/common-info/getInfoFromUrl/index",
@@ -135,5 +134,13 @@
135
134
  "useAntvX6": "/dimple-canvas/use-dimple-canvas/core/antv-x6/index",
136
135
  "addObject": "/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index",
137
136
  "useKonva": "/dimple-canvas/use-dimple-canvas/core/konva/index",
138
- "setShowWatermark": "/common-tools/platform-tools/index"
137
+ "setShowWatermark": "/common-tools/platform-tools/index",
138
+ "extractFilename": "/common-tools/extract-file-name/index",
139
+ "setBrowseTitle": "/common-tools/update-browser-title/index",
140
+ "getPersonalConfig": "/common-info/index",
141
+ "getProjectMessage": "/common-info/index",
142
+ "analyApi": "/api-services/modules/iot/index",
143
+ "calcTextWidth": "/common-tools/calc-text-width/index",
144
+ "getFileExtension": "/common-tools/get-file-extension/index",
145
+ "getLanguages": "/common-info/index"
139
146
  }
@@ -1,5 +1,3 @@
1
1
  export declare const useZIndex: () => {
2
- initialZIndex: any;
3
- currentZIndex: any;
4
2
  nextZIndex: () => any;
5
3
  };
@@ -1,22 +1,9 @@
1
- import { ref as I, getCurrentInstance as u, inject as s, computed as e, unref as i } from "vue";
2
- const Z = (n) => typeof n == "number", c = I(0), l = 2e3, a = Symbol("zIndexContextKey"), v = (n) => {
3
- const t = u() ? s(a, void 0) : void 0, r = e(() => {
4
- const d = i(t);
5
- return Z(d) ? d : l;
6
- }), x = e(() => r.value + c.value);
7
- return {
8
- initialZIndex: r,
9
- currentZIndex: x,
10
- nextZIndex: () => (c.value++, x.value)
11
- };
12
- }, o = v(), f = () => {
13
- const n = e(() => o.initialZIndex.value), t = e(() => o.currentZIndex.value);
14
- return {
15
- initialZIndex: n,
16
- currentZIndex: t,
17
- nextZIndex: () => o.nextZIndex()
18
- };
19
- };
1
+ const n = () => [...document.body.querySelectorAll("*")].reduce(
2
+ (e, t) => Math.max(e, +window.getComputedStyle(t).zIndex || 0),
3
+ 0
4
+ ), d = () => ({
5
+ nextZIndex: () => n() + 1
6
+ });
20
7
  export {
21
- f as useZIndex
8
+ d as useZIndex
22
9
  };
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/utils",
3
- "version": "6.4.0-hot.5",
3
+ "version": "6.4.0-hot.50",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -9,7 +9,7 @@
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
11
  "@antv/x6": "^2.18.1",
12
- "@das-fed/utils": "6.4.0-hot.5",
12
+ "@das-fed/utils": "6.4.0-hot.50",
13
13
  "@vue/shared": "^3.4.21",
14
14
  "@vueuse/core": "^9.6.0",
15
15
  "axios": "^1.6.7",
@@ -21,7 +21,8 @@
21
21
  "vue": "^3.4.21"
22
22
  },
23
23
  "devDependencies": {
24
- "@das-fed/cli": "6.4.0-hot.5",
24
+ "@das-fed/cli": "6.4.0-hot.50",
25
+ "@das-fed/web": "6.4.0-hot.50",
25
26
  "@types/js-cookie": "^3.0.6",
26
27
  "@types/lodash-es": "^4.17.12",
27
28
  "@types/qs": "^6.9.15",
@@ -29,7 +30,6 @@
29
30
  "@vitejs/plugin-vue-jsx": "^3.1.0",
30
31
  "ant-design-vue": "3.2.20",
31
32
  "consola": "^3.2.3",
32
- "element-plus": "2.4.2",
33
33
  "execa": "^9.3.0",
34
34
  "fast-glob": "^3.3.2",
35
35
  "fs-extra": "^11.2.0",
@@ -25011,7 +25011,12 @@ function i3(n, h) {
25011
25011
  let g = Array(n.length);
25012
25012
  return g = H(n, g, h.mode || "normal"), g = n3(g), g = J(g, h), k(n, h) && (g = k(n, h)), K(g, h), Q(g, h), X(g, h), Y(g, h, n);
25013
25013
  }
25014
- const g3 = (n) => i3(n, { pattern: "first", toneType: "none", type: "string", separator: "", nonZh: "removed" });
25014
+ const g3 = (n) => i3(n, {
25015
+ pattern: "first",
25016
+ toneType: "none",
25017
+ type: "string",
25018
+ separator: ""
25019
+ });
25015
25020
  export {
25016
25021
  g3 as getPinyinFirstCharacter
25017
25022
  };
Binary file
package/style/index.js.gz CHANGED
Binary file
package/style/math.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /** css中px字符串的数学运算 */
2
2
  declare const curringMath: (a: any) => {
3
- add: (b: any) => any;
4
- subtract: (b: any) => any;
5
- multiply: (b: any) => any;
6
- divide: (b: any) => any;
3
+ add: (b: any) => /*elided*/ any;
4
+ subtract: (b: any) => /*elided*/ any;
5
+ multiply: (b: any) => /*elided*/ any;
6
+ divide: (b: any) => /*elided*/ any;
7
7
  res: () => string;
8
8
  };
9
9
  export { curringMath };
@@ -1,3 +1,7 @@
1
+ declare const accessTokenExpiredAtKey = "accessTokenExpiredAt";
2
+ declare const refreshTokenKey = "refreshToken";
3
+ declare const redirectUriKey = "redirectUri";
4
+ declare const accessTokenInfoKey = "tokenInfo";
1
5
  /**
2
6
  * 获取token
3
7
  * @returns token
@@ -6,16 +10,12 @@ export declare const getAccessToken: () => string;
6
10
  /**
7
11
  * 获取tokenInfo相关信息
8
12
  */
9
- export declare const getAccessTokenInfo: (key: "accessTokenExpiredAt" | "refreshToken" | "redirectUri") => any;
13
+ export declare const getAccessTokenInfo: (key: typeof accessTokenExpiredAtKey | typeof refreshTokenKey | typeof redirectUriKey | typeof accessTokenInfoKey) => any;
10
14
  /**
11
15
  * 存入token、tokenInfo
12
16
  * @param token
13
17
  * @param info
14
18
  */
15
19
  export declare const setAccessToken: (token: string, info?: any) => void;
16
- /**
17
- * 删除token、tokenInfo
18
- */
19
20
  export declare const removeAccessToken: () => void;
20
- /** 清除所有的 cookie */
21
- export declare const clearAllCookies: () => void;
21
+ export {};
@@ -1,87 +1,11 @@
1
- /*! js-cookie v3.0.5 | MIT */
2
- function d(e) {
3
- for (var o = 1; o < arguments.length; o++) {
4
- var f = arguments[o];
5
- for (var p in f)
6
- e[p] = f[p];
7
- }
8
- return e;
9
- }
10
- var m = {
11
- read: function(e) {
12
- return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
13
- },
14
- write: function(e) {
15
- return encodeURIComponent(e).replace(
16
- /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
17
- decodeURIComponent
18
- );
19
- }
20
- };
21
- function u(e, o) {
22
- function f(n, s, r) {
23
- if (!(typeof document > "u")) {
24
- r = d({}, o, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
25
- var t = "";
26
- for (var i in r)
27
- r[i] && (t += "; " + i, r[i] !== !0 && (t += "=" + r[i].split(";")[0]));
28
- return document.cookie = n + "=" + e.write(s, n) + t;
29
- }
30
- }
31
- function p(n) {
32
- if (!(typeof document > "u" || arguments.length && !n)) {
33
- for (var s = document.cookie ? document.cookie.split("; ") : [], r = {}, t = 0; t < s.length; t++) {
34
- var i = s[t].split("="), l = i.slice(1).join("=");
35
- try {
36
- var v = decodeURIComponent(i[0]);
37
- if (r[v] = e.read(l, v), n === v)
38
- break;
39
- } catch {
40
- }
41
- }
42
- return n ? r[n] : r;
43
- }
44
- }
45
- return Object.create(
46
- {
47
- set: f,
48
- get: p,
49
- remove: function(n, s) {
50
- f(
51
- n,
52
- "",
53
- d({}, s, {
54
- expires: -1
55
- })
56
- );
57
- },
58
- withAttributes: function(n) {
59
- return u(this.converter, d({}, this.attributes, n));
60
- },
61
- withConverter: function(n) {
62
- return u(d({}, this.converter, n), this.attributes);
63
- }
64
- },
65
- {
66
- attributes: { value: Object.freeze(o) },
67
- converter: { value: Object.freeze(e) }
68
- }
69
- );
70
- }
71
- var c = u(m, { path: "/" });
72
- const k = "accessToken", g = "accessTokenExpiredAt", a = "refreshToken", h = "redirectUri", T = () => c.get(k) ?? "", x = (e) => c.get(e) ?? "", A = (e, o = {}) => {
73
- c.set(k, e), c.set(g, o.accessTokenExpiredAt ?? "0"), c.set(a, o.refreshToken ?? ""), o.redirectUri && c.set(h, o.redirectUri);
74
- }, U = () => {
75
- c.remove(k), c.remove(g), c.remove(a), c.remove(h);
76
- }, y = () => {
77
- const e = c.get();
78
- for (const o in e)
79
- e.hasOwnProperty(o) && c.remove(o);
1
+ const o = "accessToken", r = "accessTokenExpiredAt", c = "refreshToken", s = "redirectUri", a = () => localStorage.getItem(o) ?? sessionStorage.getItem(o) ?? "", n = (e) => localStorage.getItem(e) ?? sessionStorage.getItem(e) ?? "", l = (e, t = {}) => {
2
+ localStorage.setItem(o, e), localStorage.setItem(r, t.accessTokenExpiredAt ?? "0"), localStorage.setItem(c, t.refreshToken ?? ""), t.redirectUri && localStorage.setItem(s, t.redirectUri);
3
+ }, g = () => {
4
+ localStorage.removeItem(o), localStorage.removeItem(r), localStorage.removeItem(c), localStorage.removeItem(s);
80
5
  };
81
6
  export {
82
- y as clearAllCookies,
83
- T as getAccessToken,
84
- x as getAccessTokenInfo,
85
- U as removeAccessToken,
86
- A as setAccessToken
7
+ a as getAccessToken,
8
+ n as getAccessTokenInfo,
9
+ g as removeAccessToken,
10
+ l as setAccessToken
87
11
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as v, computed as u, onMounted as g, onBeforeUnmount as _, ref as L, openBlock as y, createElementBlock as h } from "vue";
1
+ import { defineComponent as v, computed as u, onMounted as g, onBeforeUnmount as _, ref as L, createElementBlock as y, openBlock as h } from "vue";
2
2
  const x = ["src"], b = /* @__PURE__ */ v({
3
3
  __name: "low-code-iframe",
4
4
  props: {
@@ -14,40 +14,40 @@ const x = ["src"], b = /* @__PURE__ */ v({
14
14
  const o = "";
15
15
  let t = a.query || {};
16
16
  return a.app && (t.app = a.app), e = `${o}/api/node-low-code/v1/visitor/views/index?${new URLSearchParams(t).toString()}`, e;
17
- }), d = s, l = u({
17
+ }), l = s, d = u({
18
18
  get: () => a.iframeLoading,
19
- set: (e) => d("update:iframeLoading", e)
19
+ set: (e) => l("update:iframeLoading", e)
20
20
  }), p = (e) => {
21
21
  const { emitName: o = "", emitData: t = {} } = e.data || {};
22
- o === "app-mounted" ? l.value = !1 : d("emit-change", o, t);
22
+ o === "app-mounted" ? d.value = !1 : l("emit-change", o, t);
23
23
  };
24
24
  g(() => {
25
25
  window.addEventListener("message", p, !1);
26
26
  }), _(() => {
27
27
  window.removeEventListener("message", p, !1);
28
28
  });
29
- const i = L(null), f = (e) => {
29
+ const i = L(null), m = (e) => {
30
30
  var o;
31
- l.value || (o = i.value) != null && o.contentWindow && i.value.contentWindow.postMessage(e);
31
+ d.value || (o = i.value) != null && o.contentWindow && i.value.contentWindow.postMessage(e);
32
32
  };
33
33
  c({
34
34
  onActivated: () => {
35
- f({ type: "onActivated" });
35
+ m({ type: "onActivated" });
36
36
  },
37
37
  onDeactivated: () => {
38
- f({ type: "onDeactivated" });
38
+ m({ type: "onDeactivated" });
39
39
  }
40
40
  });
41
41
  const w = () => {
42
- var o, t, m;
43
- const { origin: e } = new URL(r.value || "");
44
- e && ((m = (t = (o = i.value) == null ? void 0 : o.contentWindow) == null ? void 0 : t.postMessage) == null || m.call(
42
+ var o, t, f;
43
+ const { origin: e } = new URL(r.value || "", location.origin);
44
+ e && ((f = (t = (o = i.value) == null ? void 0 : o.contentWindow) == null ? void 0 : t.postMessage) == null || f.call(
45
45
  t,
46
46
  { type: "setProxSsoStatus", data: { visible: !0, parentHref: location.href } },
47
47
  e
48
48
  ));
49
49
  };
50
- return (e, o) => (y(), h("iframe", {
50
+ return (e, o) => (h(), y("iframe", {
51
51
  class: "low-code-iframe",
52
52
  id: "low-code-iframe",
53
53
  src: r.value,
@@ -63,7 +63,7 @@ const x = ["src"], b = /* @__PURE__ */ v({
63
63
  for (const [a, r] of c)
64
64
  s[a] = r;
65
65
  return s;
66
- }, B = /* @__PURE__ */ C(b, [["__scopeId", "data-v-dfb25e5d"]]);
66
+ }, B = /* @__PURE__ */ C(b, [["__scopeId", "data-v-c5870bec"]]);
67
67
  export {
68
68
  B as LowCode
69
69
  };
Binary file
@@ -1 +1 @@
1
- .low-code-iframe[data-v-dfb25e5d]{padding:0;margin:0;border:none;outline:none;height:100%;width:100%;min-height:100px;min-width:100px}
1
+ .low-code-iframe[data-v-c5870bec]{padding:0;margin:0;border:none;outline:none;height:100%;width:100%;min-height:100px;min-width:100px}
@@ -1,5 +1,9 @@
1
1
  import { Ref } from 'vue';
2
2
 
3
3
  /** 简化组件内使用modelValue时的watch过程 */
4
- declare const useModelValue: (props: any, propKey: string) => Ref;
4
+ declare const useModelValue: (
5
+ /** 组件的props */
6
+ props: any,
7
+ /** 组件props需要使用modelValue的key */
8
+ propKey: string) => Ref;
5
9
  export { useModelValue };
Binary file
@@ -1,28 +1,28 @@
1
- export type socketConfig = {
2
- /** 请求地址 */
3
- url: string
4
-
5
- /** 请求参数 */
6
- params?: Record<string, any>
7
-
8
- /** websocket连接成功回调 */
9
- opened?: (event: any) => void
10
-
11
- /** websocket关闭连接回调 */
12
- close?: (event: any) => void
13
-
14
- /** websocket接收到消息回调 */
15
- message?: (event: any) => void
16
-
17
- /** websocket连接异常回调 */
18
- error?: (event: any) => void
19
-
20
- /** 是否重连,默认开启 */
21
- ifReconnect?: boolean
22
-
23
- /** 连接close关闭时是否重连,默认关闭 */
24
- reconnectWhenClose?: boolean
25
-
26
- /** 重连次数,默认为3,-1 表示一直重连 */
27
- reconnectNum?: number
28
- }
1
+ export type socketConfig = {
2
+ /** 请求地址 */
3
+ url: string
4
+
5
+ /** 请求参数 */
6
+ params?: Record<string, any>
7
+
8
+ /** websocket连接成功回调 */
9
+ opened?: (event: any) => void
10
+
11
+ /** websocket关闭连接回调 */
12
+ close?: (event: any) => void
13
+
14
+ /** websocket接收到消息回调 */
15
+ message?: (event: any) => void
16
+
17
+ /** websocket连接异常回调 */
18
+ error?: (event: any) => void
19
+
20
+ /** 是否重连,默认开启 */
21
+ ifReconnect?: boolean
22
+
23
+ /** 连接close关闭时是否重连,默认关闭 */
24
+ reconnectWhenClose?: boolean
25
+
26
+ /** 重连次数,默认为3,-1 表示一直重连 */
27
+ reconnectNum?: number
28
+ }
Binary file