@das-fed/utils 6.4.0-hot.25 → 6.4.0-hot.27

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/api-services/index.js +382 -383
  2. package/api-services/index.js.gz +0 -0
  3. package/api-services/modules/app-manage/index.js.gz +0 -0
  4. package/api-services/modules/authentication/index.js.gz +0 -0
  5. package/api-services/modules/bems/index.js.gz +0 -0
  6. package/api-services/modules/contract/index.js.gz +0 -0
  7. package/api-services/modules/duty-manage/index.js.gz +0 -0
  8. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  9. package/api-services/modules/file/index.js +3254 -156
  10. package/api-services/modules/file/index.js.gz +0 -0
  11. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  12. package/api-services/modules/index.js +382 -383
  13. package/api-services/modules/index.js.gz +0 -0
  14. package/api-services/modules/iot/index.js.gz +0 -0
  15. package/api-services/modules/justauth/index.js.gz +0 -0
  16. package/api-services/modules/knowledge/index.js.gz +0 -0
  17. package/api-services/modules/link/index.js.gz +0 -0
  18. package/api-services/modules/permission/index.js.gz +0 -0
  19. package/api-services/modules/platformManage/index.js.gz +0 -0
  20. package/api-services/modules/portal/index.js.gz +0 -0
  21. package/api-services/modules/space-manage/index.js.gz +0 -0
  22. package/api-services/modules/super-admin/index.js.gz +0 -0
  23. package/api-services/modules/supplier/index.js.gz +0 -0
  24. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  25. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  26. package/api-services/modules/tool/index.js.gz +0 -0
  27. package/api-services/src/create-service/index.js.gz +0 -0
  28. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  29. package/common-info/index.js +4 -3
  30. package/common-info/index.js.gz +0 -0
  31. package/common-info/set-personal-info/index.js.gz +0 -0
  32. package/common-info/type.d.ts +106 -104
  33. package/common-tools/extract-file-name/index.js.gz +0 -0
  34. package/common-tools/get-url-params/index.js.gz +0 -0
  35. package/common-tools/index.d.ts +1 -0
  36. package/common-tools/index.js +1 -0
  37. package/common-tools/update-browser-title/index.d.ts +1 -0
  38. package/common-tools/update-browser-title/index.js +12 -0
  39. package/create-api-service/index.js.gz +0 -0
  40. package/create-api-service/sso/index.js +783 -690
  41. package/create-api-service/sso/index.js.gz +0 -0
  42. package/curring-http/index.js.gz +0 -0
  43. package/curring-http/type.d.ts +87 -87
  44. package/directive/auth/index.js.gz +0 -0
  45. package/esm-map.json +2 -2
  46. package/hooks/use-get-auth/index.js.gz +0 -0
  47. package/i18n-collection/en.js +21 -0
  48. package/i18n-collection/zh-CN.js +21 -0
  49. package/nextTiken/index.js.gz +0 -0
  50. package/package.json +4 -4
  51. package/pinyin-first-character/index.js.gz +0 -0
  52. package/style/index.js.gz +0 -0
  53. package/token-tools/index.d.ts +0 -5
  54. package/token-tools/index.js +8 -84
  55. package/use-low-code/index.js +3 -3
  56. package/use-low-code/index.js.gz +0 -0
  57. package/use-low-code/style.css +1 -1
  58. package/webSocket-service/index.js.gz +0 -0
  59. package/webSocket-service/type.d.ts +28 -28
  60. package/token-tools/index.js.gz +0 -0
Binary file
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
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",
@@ -136,5 +135,6 @@
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
137
  "setShowWatermark": "/common-tools/platform-tools/index",
139
- "extractFilename": "/common-tools/extract-file-name/index"
138
+ "extractFilename": "/common-tools/extract-file-name/index",
139
+ "setBrowseTitle": "/common-tools/update-browser-title/index"
140
140
  }
Binary file
@@ -0,0 +1,21 @@
1
+ export default {
2
+ 导入进度: "",
3
+ 上传失败: "",
4
+ 导入成功: "",
5
+ 导出进度: "",
6
+ 导出: "",
7
+ 导入: "",
8
+ 失败: "",
9
+ 部分数据校验不通过: "",
10
+ 请下载附件并修改: "",
11
+ 重新导入: "",
12
+ 成功: "",
13
+ 部分: "",
14
+ 参数校验错误: "",
15
+ 接口地址未找到: "",
16
+ 服务器内部错误: "",
17
+ 解析错误: "",
18
+ 网络异常: "",
19
+ 请检查您的网络情况: "",
20
+ 请求配置异常: "",
21
+ };
@@ -0,0 +1,21 @@
1
+ export default {
2
+ 导入进度: "",
3
+ 上传失败: "",
4
+ 导入成功: "",
5
+ 导出进度: "",
6
+ 导出: "",
7
+ 导入: "",
8
+ 失败: "",
9
+ 部分数据校验不通过: "",
10
+ 请下载附件并修改: "",
11
+ 重新导入: "",
12
+ 成功: "",
13
+ 部分: "",
14
+ 参数校验错误: "",
15
+ 接口地址未找到: "",
16
+ 服务器内部错误: "",
17
+ 解析错误: "",
18
+ 网络异常: "",
19
+ 请检查您的网络情况: "",
20
+ 请求配置异常: "",
21
+ };
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/utils",
3
- "version": "6.4.0-hot.25",
3
+ "version": "6.4.0-hot.27",
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.25",
12
+ "@das-fed/utils": "6.4.0-hot.27",
13
13
  "@vue/shared": "^3.4.21",
14
14
  "@vueuse/core": "^9.6.0",
15
15
  "axios": "^1.6.7",
@@ -21,8 +21,8 @@
21
21
  "vue": "^3.4.21"
22
22
  },
23
23
  "devDependencies": {
24
- "@das-fed/cli": "6.4.0-hot.25",
25
- "@das-fed/web": "6.4.0-hot.25",
24
+ "@das-fed/cli": "6.4.0-hot.27",
25
+ "@das-fed/web": "6.4.0-hot.27",
26
26
  "@types/js-cookie": "^3.0.6",
27
27
  "@types/lodash-es": "^4.17.12",
28
28
  "@types/qs": "^6.9.15",
Binary file
package/style/index.js.gz CHANGED
Binary file
@@ -13,9 +13,4 @@ export declare const getAccessTokenInfo: (key: "accessTokenExpiredAt" | "refresh
13
13
  * @param info
14
14
  */
15
15
  export declare const setAccessToken: (token: string, info?: any) => void;
16
- /**
17
- * 删除token、tokenInfo
18
- */
19
16
  export declare const removeAccessToken: () => void;
20
- /** 清除所有的 cookie */
21
- export declare const clearAllCookies: () => void;
@@ -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 l = {
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, i, 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 c = "";
26
- for (var s in r)
27
- r[s] && (c += "; " + s, r[s] !== !0 && (c += "=" + r[s].split(";")[0]));
28
- return document.cookie = n + "=" + e.write(i, n) + c;
29
- }
30
- }
31
- function p(n) {
32
- if (!(typeof document > "u" || arguments.length && !n)) {
33
- for (var i = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < i.length; c++) {
34
- var s = i[c].split("="), h = s.slice(1).join("=");
35
- try {
36
- var v = decodeURIComponent(s[0]);
37
- if (r[v] = e.read(h, 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, i) {
50
- f(
51
- n,
52
- "",
53
- d({}, i, {
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 t = u(l, { path: "/" });
72
- const g = "accessToken", a = "accessTokenExpiredAt", k = "refreshToken", m = "redirectUri", T = () => t.get(g) || sessionStorage.getItem(g) || "", x = (e) => t.get(e) || sessionStorage.getItem(e) || "", A = (e, o = {}) => {
73
- t.set(g, e), t.set(a, o.accessTokenExpiredAt ?? "0"), t.set(k, o.refreshToken ?? ""), o.redirectUri && t.set(m, o.redirectUri);
74
- }, U = () => {
75
- t.remove(g), t.remove(a), t.remove(k), t.remove(m);
76
- }, I = () => {
77
- const e = t.get();
78
- for (const o in e)
79
- e.hasOwnProperty(o) && t.remove(o);
1
+ const o = "accessToken", r = "accessTokenExpiredAt", c = "refreshToken", s = "redirectUri", a = () => localStorage.getItem(o) ?? "", l = (t) => localStorage.getItem(t) ?? "", n = (t, e = {}) => {
2
+ localStorage.setItem(o, t), localStorage.setItem(r, e.accessTokenExpiredAt ?? "0"), localStorage.setItem(c, e.refreshToken ?? ""), e.redirectUri && localStorage.setItem(s, e.redirectUri);
3
+ }, m = () => {
4
+ localStorage.removeItem(o), localStorage.removeItem(r), localStorage.removeItem(c), localStorage.removeItem(s);
80
5
  };
81
6
  export {
82
- I as clearAllCookies,
83
- T as getAccessToken,
84
- x as getAccessTokenInfo,
85
- U as removeAccessToken,
86
- A as setAccessToken
7
+ a as getAccessToken,
8
+ l as getAccessTokenInfo,
9
+ m as removeAccessToken,
10
+ n as setAccessToken
87
11
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as v, computed as u, onMounted as g, onBeforeUnmount as _, ref as L, openBlock as y, createElementBlock as h } from "vue";
2
- const x = ["src"], C = /* @__PURE__ */ v({
2
+ const x = ["src"], b = /* @__PURE__ */ v({
3
3
  __name: "low-code-iframe",
4
4
  props: {
5
5
  app: {},
@@ -58,12 +58,12 @@ const x = ["src"], C = /* @__PURE__ */ v({
58
58
  onLoad: w
59
59
  }, null, 40, x));
60
60
  }
61
- }), M = (n, c) => {
61
+ }), C = (n, c) => {
62
62
  const s = n.__vccOpts || n;
63
63
  for (const [a, r] of c)
64
64
  s[a] = r;
65
65
  return s;
66
- }, B = /* @__PURE__ */ M(C, [["__scopeId", "data-v-67190e50"]]);
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-67190e50]{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}
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