@das-fed/utils 6.3.0-beta.10 → 6.3.0-beta.12

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 (74) hide show
  1. package/api-services/index.js +2 -2
  2. package/api-services/modules/app-manage/index.js +1 -1
  3. package/api-services/modules/authentication/index.js +1 -1
  4. package/api-services/modules/bems/index.js +1 -1
  5. package/api-services/modules/contract/index.js +1 -1
  6. package/api-services/modules/duty-manage/index.js +1 -1
  7. package/api-services/modules/enterpriseright/index.js +1 -1
  8. package/api-services/modules/file/index.d.ts +1 -1
  9. package/api-services/modules/file/index.js +255 -246
  10. package/api-services/modules/file/index.js.gz +0 -0
  11. package/api-services/modules/gateway-edge/index.js +1 -1
  12. package/api-services/modules/index.js +21 -21
  13. package/api-services/modules/index.js.gz +0 -0
  14. package/api-services/modules/iot/index.js +1 -1
  15. package/api-services/modules/justauth/index.js +1 -1
  16. package/api-services/modules/knowledge/index.js +1 -1
  17. package/api-services/modules/link/index.js +1 -1
  18. package/api-services/modules/permission/index.js +1 -1
  19. package/api-services/modules/platformManage/index.js +1 -1
  20. package/api-services/modules/portal/index.js +1 -1
  21. package/api-services/modules/space-manage/index.js +1 -1
  22. package/api-services/modules/super-admin/index.js +1 -1
  23. package/api-services/modules/supplier/index.js +1 -1
  24. package/api-services/modules/supplychain-manage/index.js +1 -1
  25. package/api-services/modules/systemConfiguration/index.js +1 -1
  26. package/api-services/modules/tool/index.js +1 -1
  27. package/api-services/src/create-service/index.js +1 -1
  28. package/common-info/getIframeUrl/index.js +1 -1
  29. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  30. package/common-info/index.js +4 -4
  31. package/common-info/index.js.gz +0 -0
  32. package/common-info/set-personal-info/index.js +591 -565
  33. package/common-info/set-personal-info/index.js.gz +0 -0
  34. package/common-info/type.d.ts +104 -104
  35. package/common-tools/date-format/index.js +2 -1
  36. package/common-tools/get-url-params/index.d.ts +1 -1
  37. package/common-tools/get-url-params/index.js +49 -46
  38. package/common-tools/get-url-params/index.js.gz +0 -0
  39. package/common-tools/index.js +10 -10
  40. package/common-tools/platform-tools/index.js +1 -1
  41. package/common-tools/update-fav-icon/index.js +3 -3
  42. package/create-api-service/index.js +1405 -1371
  43. package/create-api-service/index.js.gz +0 -0
  44. package/create-api-service/sso/index.js +739 -714
  45. package/create-api-service/sso/index.js.gz +0 -0
  46. package/curring-http/index.js +856 -830
  47. package/curring-http/index.js.gz +0 -0
  48. package/curring-http/type.d.ts +87 -87
  49. package/dimple-canvas/index.js +1 -1
  50. package/directive/auth/index.js +3 -3
  51. package/directive/auth/index.js.gz +0 -0
  52. package/directive/clickOutside/index.js +1 -1
  53. package/directive/hoverInside/index.js +1 -1
  54. package/directive/index.js +3 -3
  55. package/hooks/use-get-auth/index.js +4 -4
  56. package/hooks/use-get-auth/index.js.gz +0 -0
  57. package/index.js +2 -2
  58. package/load-js/index.js +1 -1
  59. package/nextTiken/index.js +1 -1
  60. package/nextTiken/index.js.gz +0 -0
  61. package/oss/index.js +1 -1
  62. package/package.json +5 -3
  63. package/pinyin-first-character/index.js +142 -132
  64. package/pinyin-first-character/index.js.gz +0 -0
  65. package/style/index.js +1 -1
  66. package/style/index.js.gz +0 -0
  67. package/token-tools/index.js.gz +0 -0
  68. package/use-low-code/index.js +12 -12
  69. package/use-low-code/index.js.gz +0 -0
  70. package/use-low-code/style.css +1 -1
  71. package/vue/index.js +1 -1
  72. package/webSocket-service/index.js +3 -3
  73. package/webSocket-service/index.js.gz +0 -0
  74. package/webSocket-service/type.d.ts +28 -28
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
+ >
@@ -1,4 +1,4 @@
1
- import { Konva as o, useDimpleCanvas as m } from "@das-fed/utils/dimple-canvas/use-dimple-canvas";
1
+ import { Konva as o, useDimpleCanvas as m } from "@das-fed/utils/dimple-canvas/use-dimple-canvas/index.js";
2
2
  export {
3
3
  o as Konva,
4
4
  m as useDimpleCanvas
@@ -1,6 +1,6 @@
1
- import { getUrlParams as i, flatTree as P } from "@das-fed/utils/common-tools";
2
- import { getSubApps as v, getPageAuth as o } from "@das-fed/utils/common-info";
3
- import { getEl as h } from "@das-fed/utils/directive/utils";
1
+ import { getUrlParams as i, flatTree as P } from "@das-fed/utils/common-tools/index.js";
2
+ import { getSubApps as v, getPageAuth as o } from "@das-fed/utils/common-info/index.js";
3
+ import { getEl as h } from "@das-fed/utils/directive/utils/index.js";
4
4
  const A = (e, t) => {
5
5
  if (!e || !t) return !1;
6
6
  if (typeof t == "string")
Binary file
@@ -1,4 +1,4 @@
1
- import { getEl as r } from "@das-fed/utils/directive/utils";
1
+ import { getEl as r } from "@das-fed/utils/directive/utils/index.js";
2
2
  const f = {
3
3
  mounted: async (i, _) => {
4
4
  const e = _.value, t = await r(i, e);
@@ -1,4 +1,4 @@
1
- import { getEl as r } from "@das-fed/utils/directive/utils";
1
+ import { getEl as r } from "@das-fed/utils/directive/utils/index.js";
2
2
  const o = {
3
3
  mounted: async (s, a) => {
4
4
  const e = a.value, n = await r(s, e);
@@ -1,6 +1,6 @@
1
- import { vAuth as e } from "@das-fed/utils/directive/auth";
2
- import { vClickOutside as v } from "@das-fed/utils/directive/clickOutside";
3
- import { vHoverInside as i } from "@das-fed/utils/directive/hoverInside";
1
+ import { vAuth as e } from "@das-fed/utils/directive/auth/index.js";
2
+ import { vClickOutside as v } from "@das-fed/utils/directive/clickOutside/index.js";
3
+ import { vHoverInside as i } from "@das-fed/utils/directive/hoverInside/index.js";
4
4
  export {
5
5
  e as vAuth,
6
6
  v as vClickOutside,
@@ -1,7 +1,7 @@
1
- import { flatTree as w } from "@das-fed/utils/common-tools";
2
- import { projectNextTick as A } from "@das-fed/utils/nextTiken";
3
- import { vAuth as M } from "@das-fed/utils/directive/auth";
4
- import { portal as T, superadminPortal as y, enterpriseright as U } from "@das-fed/utils/api-services/modules";
1
+ import { flatTree as w } from "@das-fed/utils/common-tools/index.js";
2
+ import { projectNextTick as A } from "@das-fed/utils/nextTiken/index.js";
3
+ import { vAuth as M } from "@das-fed/utils/directive/auth/index.js";
4
+ import { portal as T, superadminPortal as y, enterpriseright as U } from "@das-fed/utils/api-services/modules/index.js";
5
5
  const v = T.get("/appcategory"), B = y.get("/appcategory"), C = U.get("/permissionset/user-portal-menu"), L = y.get("/user-menu"), k = () => {
6
6
  const d = async (r, i = "enterpriseadmin") => {
7
7
  let t = null, s = {};
Binary file
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "@das-fed/utils/directive";
2
- export * from "@das-fed/utils/with-install";
1
+ export * from "@das-fed/utils/directive/index.js";
2
+ export * from "@das-fed/utils/with-install/index.js";
package/load-js/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getConfig as r } from "@das-fed/utils/config";
1
+ import { getConfig as r } from "@das-fed/utils/config/index.js";
2
2
  const c = (t) => {
3
3
  let { baseURL: i, publicPath: n = "" } = r();
4
4
  if (document.getElementById(t)) return;
@@ -1,4 +1,4 @@
1
- import { getToken as r, getProjectInfo as c, getPersonalInfo as s, getTenantInfo as i } from "@das-fed/utils/common-info";
1
+ import { getToken as r, getProjectInfo as c, getPersonalInfo as s, getTenantInfo as i } from "@das-fed/utils/common-info/index.js";
2
2
  const k = () => new Promise((n) => {
3
3
  const e = () => {
4
4
  const t = r();
Binary file
package/oss/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getConfig as o } from "@das-fed/utils/config";
1
+ import { getConfig as o } from "@das-fed/utils/config/index.js";
2
2
  const n = (r) => {
3
3
  let t = r;
4
4
  if (!t) return t;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/utils",
3
- "version": "6.3.0-beta.10",
3
+ "version": "6.3.0-beta.12",
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.3.0-beta.10",
12
+ "@das-fed/utils": "6.3.0-beta.12",
13
13
  "@vue/shared": "^3.4.21",
14
14
  "@vueuse/core": "^9.6.0",
15
15
  "axios": "^1.6.7",
@@ -21,8 +21,10 @@
21
21
  "vue": "^3.4.21"
22
22
  },
23
23
  "devDependencies": {
24
- "@das-fed/cli": "6.3.0-beta.10",
24
+ "@das-fed/cli": "6.3.0-beta.12",
25
+ "@types/js-cookie": "^3.0.6",
25
26
  "@types/lodash-es": "^4.17.12",
27
+ "@types/qs": "^6.9.15",
26
28
  "@vitejs/plugin-vue": "^5.0.4",
27
29
  "@vitejs/plugin-vue-jsx": "^3.1.0",
28
30
  "ant-design-vue": "3.2.20",