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

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 (81) hide show
  1. package/api-services/i18n/index.d.ts +68 -0
  2. package/api-services/i18n/index.js +26 -0
  3. package/api-services/i18n/index.js.gz +0 -0
  4. package/api-services/index.js +1070 -1011
  5. package/api-services/index.js.gz +0 -0
  6. package/api-services/modules/app-manage/index.js +671 -642
  7. package/api-services/modules/app-manage/index.js.gz +0 -0
  8. package/api-services/modules/authentication/index.js +671 -642
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/index.js +671 -642
  11. package/api-services/modules/bems/index.js.gz +0 -0
  12. package/api-services/modules/contract/index.js +671 -642
  13. package/api-services/modules/contract/index.js.gz +0 -0
  14. package/api-services/modules/duty-manage/index.js +671 -642
  15. package/api-services/modules/duty-manage/index.js.gz +0 -0
  16. package/api-services/modules/enterpriseright/index.js +671 -642
  17. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  18. package/api-services/modules/file/index.js +967 -932
  19. package/api-services/modules/file/index.js.gz +0 -0
  20. package/api-services/modules/gateway-edge/index.js +671 -642
  21. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  22. package/api-services/modules/index.js +1002 -967
  23. package/api-services/modules/index.js.gz +0 -0
  24. package/api-services/modules/iot/index.js +672 -643
  25. package/api-services/modules/iot/index.js.gz +0 -0
  26. package/api-services/modules/justauth/index.js +675 -646
  27. package/api-services/modules/justauth/index.js.gz +0 -0
  28. package/api-services/modules/knowledge/index.js +668 -639
  29. package/api-services/modules/knowledge/index.js.gz +0 -0
  30. package/api-services/modules/link/index.js +671 -642
  31. package/api-services/modules/link/index.js.gz +0 -0
  32. package/api-services/modules/permission/index.js +671 -642
  33. package/api-services/modules/permission/index.js.gz +0 -0
  34. package/api-services/modules/platformManage/index.js +676 -647
  35. package/api-services/modules/platformManage/index.js.gz +0 -0
  36. package/api-services/modules/portal/index.js +671 -642
  37. package/api-services/modules/portal/index.js.gz +0 -0
  38. package/api-services/modules/space-manage/index.js +671 -642
  39. package/api-services/modules/space-manage/index.js.gz +0 -0
  40. package/api-services/modules/super-admin/index.js +669 -640
  41. package/api-services/modules/super-admin/index.js.gz +0 -0
  42. package/api-services/modules/supplier/index.js +669 -640
  43. package/api-services/modules/supplier/index.js.gz +0 -0
  44. package/api-services/modules/supplychain-manage/index.js +671 -642
  45. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  46. package/api-services/modules/systemConfiguration/index.js +671 -642
  47. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  48. package/api-services/modules/tool/index.js +671 -642
  49. package/api-services/modules/tool/index.js.gz +0 -0
  50. package/api-services/src/create-service/index.js +672 -643
  51. package/api-services/src/create-service/index.js.gz +0 -0
  52. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  53. package/common-info/index.js +44 -37
  54. package/common-info/index.js.gz +0 -0
  55. package/common-info/set-personal-info/index.js.gz +0 -0
  56. package/common-info/type.d.ts +120 -106
  57. package/common-tools/extract-file-name/index.js.gz +0 -0
  58. package/common-tools/get-url-params/index.js.gz +0 -0
  59. package/create-api-service/i18n/index.d.ts +33 -0
  60. package/create-api-service/i18n/index.js +15 -0
  61. package/create-api-service/index.js +672 -643
  62. package/create-api-service/index.js.gz +0 -0
  63. package/create-api-service/sso/index.js +55 -55
  64. package/create-api-service/sso/index.js.gz +0 -0
  65. package/curring-http/index.js.gz +0 -0
  66. package/curring-http/type.d.ts +87 -87
  67. package/directive/auth/index.js.gz +0 -0
  68. package/hooks/use-get-auth/index.js.gz +0 -0
  69. package/nextTiken/index.js.gz +0 -0
  70. package/package.json +4 -4
  71. package/pinyin-first-character/index.js.gz +0 -0
  72. package/style/index.js.gz +0 -0
  73. package/token-tools/index.d.ts +6 -1
  74. package/token-tools/index.js +6 -6
  75. package/use-low-code/index.js +3 -3
  76. package/use-low-code/index.js.gz +0 -0
  77. package/use-low-code/style.css +1 -1
  78. package/webSocket-service/index.js.gz +0 -0
  79. package/webSocket-service/type.d.ts +28 -28
  80. package/i18n-collection/en.js +0 -21
  81. package/i18n-collection/zh-CN.js +0 -21
@@ -1,8 +1,8 @@
1
- import { getConfig as i } from "@das-fed/utils/config";
2
- import { getUrlParams as p } from "@das-fed/utils/common-tools";
3
- import { getAccessToken as I } from "@das-fed/utils/token-tools";
4
- import { getTokenFromQuery as m, getProjectInfoFromQuery as d } from "@das-fed/utils/common-info/getInfoFromUrl";
5
- const S = I, O = () => {
1
+ import { getConfig as p } from "@das-fed/utils/config";
2
+ import { getUrlParams as g } from "@das-fed/utils/common-tools";
3
+ import { getAccessToken as m } from "@das-fed/utils/token-tools";
4
+ import { getTokenFromQuery as f, getProjectInfoFromQuery as d } from "@das-fed/utils/common-info/getInfoFromUrl";
5
+ const S = m, J = () => {
6
6
  var n;
7
7
  let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
8
8
  return {
@@ -11,9 +11,9 @@ const S = I, O = () => {
11
11
  flag: e.flag ?? null,
12
12
  tenantId: ((n = e == null ? void 0 : e.tenant) == null ? void 0 : n.id) ?? ""
13
13
  };
14
- }, P = () => {
14
+ }, O = () => {
15
15
  let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
16
- const t = i();
16
+ const t = p();
17
17
  return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
18
18
  id: e.id ?? "",
19
19
  name: e.name ?? "",
@@ -22,7 +22,7 @@ const S = I, O = () => {
22
22
  email: e.email ?? "",
23
23
  headPicture: e.headPicture ?? ""
24
24
  };
25
- }, y = () => {
25
+ }, P = () => {
26
26
  let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
27
27
  return {
28
28
  userId: e.id ?? "",
@@ -35,14 +35,21 @@ const S = I, O = () => {
35
35
  };
36
36
  }, b = () => {
37
37
  let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
38
- const t = i();
38
+ const t = p();
39
39
  return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
40
40
  id: (e == null ? void 0 : e.id) ?? 0,
41
- parentId: (e == null ? void 0 : e.parentId) ?? "",
41
+ code: (e == null ? void 0 : e.code) ?? 0,
42
42
  name: (e == null ? void 0 : e.name) ?? "",
43
- tenantId: (e == null ? void 0 : e.tenant) ?? ""
43
+ type: (e == null ? void 0 : e.type) ?? null,
44
+ parentId: (e == null ? void 0 : e.parentId) ?? "",
45
+ parentName: (e == null ? void 0 : e.parentName) ?? "",
46
+ parentType: (e == null ? void 0 : e.parentType) ?? null,
47
+ tenantId: (e == null ? void 0 : e.tenant) ?? "",
48
+ isParent: (e == null ? void 0 : e.isParent) ?? !1,
49
+ leaf: (e == null ? void 0 : e.leaf) ?? !1,
50
+ optional: (e == null ? void 0 : e.leaf) ?? !0
44
51
  };
45
- }, M = () => {
52
+ }, T = () => {
46
53
  const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
47
54
  return {
48
55
  applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
@@ -53,13 +60,13 @@ const S = I, O = () => {
53
60
  type: (e == null ? void 0 : e.type) ?? null
54
61
  };
55
62
  }, h = (e, t) => {
56
- const n = "permission-btn", s = f(), a = p(location.href, "app") || "", o = t || a || s.currentSubAppCode;
57
- if (!o) return;
58
- const r = p(location.href, "menu") || "", g = e || r || s.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(n) || "{}");
63
+ const n = "permission-btn", s = I(), a = g(location.href, "app") || "", r = t || a || s.currentSubAppCode;
64
+ if (!r) return;
65
+ const o = g(location.href, "menu") || "", l = e || o || s.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(n) || "{}");
59
66
  if (!c || JSON.stringify(c) === "{}") return;
60
- const u = c[o][g];
61
- return u && u.length ? u : c[o]["origin-auth"] ? c[o]["origin-auth"][g] ?? [] : [];
62
- }, T = (e, t) => h(e, t) ?? [], f = () => {
67
+ const u = c[r][l];
68
+ return u && u.length ? u : c[r]["origin-auth"] ? c[r]["origin-auth"][l] ?? [] : [];
69
+ }, M = (e, t) => h(e, t) ?? [], I = () => {
63
70
  const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
64
71
  return {
65
72
  appcategorys: e.appcategorys ?? [],
@@ -70,16 +77,16 @@ const S = I, O = () => {
70
77
  };
71
78
  }, j = (e, t = !1) => {
72
79
  var s, a;
73
- const n = f().subAppList;
80
+ const n = I().subAppList;
74
81
  if (e)
75
- return t ? ((s = n == null ? void 0 : n.find((o) => o.code === e)) == null ? void 0 : s.originalMenus) ?? [] : ((a = n == null ? void 0 : n.find((o) => o.code === e)) == null ? void 0 : a.menus) ?? [];
82
+ return t ? ((s = n == null ? void 0 : n.find((r) => r.code === e)) == null ? void 0 : s.originalMenus) ?? [] : ((a = n == null ? void 0 : n.find((r) => r.code === e)) == null ? void 0 : a.menus) ?? [];
76
83
  {
77
- let o = {};
78
- return t ? n == null || n.forEach((r) => {
79
- o[r.code] = r.originalMenus ?? [];
80
- }) : n == null || n.forEach((r) => {
81
- o[r.code] = r.menus ?? [];
82
- }), o;
84
+ let r = {};
85
+ return t ? n == null || n.forEach((o) => {
86
+ r[o.code] = o.originalMenus ?? [];
87
+ }) : n == null || n.forEach((o) => {
88
+ r[o.code] = o.menus ?? [];
89
+ }), r;
83
90
  }
84
91
  }, v = () => {
85
92
  const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
@@ -90,27 +97,27 @@ const S = I, O = () => {
90
97
  preTab: e.preTab ?? {}
91
98
  };
92
99
  }, U = () => {
93
- const e = i(), t = sessionStorage.getItem("minioAddress");
100
+ const e = p(), t = sessionStorage.getItem("minioAddress");
94
101
  return t || (e.baseURL ? e.baseURL : location.origin);
95
102
  }, k = () => ({
96
103
  instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
97
- }), E = () => localStorage.getItem("fav-icon") || "";
98
- S() || m();
99
- var l;
100
- (l = b()) != null && l.id || d();
104
+ }), E = () => localStorage.getItem("fav-icon") || "./logo.svg";
105
+ S() || f();
106
+ var i;
107
+ (i = b()) != null && i.id || d();
101
108
  export {
102
109
  E as getFavIcon,
103
- M as getHomeInfo,
110
+ T as getHomeInfo,
104
111
  k as getInstanceInfo,
105
112
  j as getMenus,
106
113
  U as getMinioAddress,
107
114
  h as getPageAuth,
108
- T as getPageAuthBtn,
109
- P as getPersonalInfo,
115
+ M as getPageAuthBtn,
116
+ O as getPersonalInfo,
110
117
  b as getProjectInfo,
111
- f as getSubApps,
118
+ I as getSubApps,
112
119
  v as getTabInfo,
113
- y as getTenantInfo,
120
+ P as getTenantInfo,
114
121
  S as getToken,
115
- O as getUserInfo
122
+ J as getUserInfo
116
123
  };
Binary file
@@ -1,106 +1,120 @@
1
- export interface UserInfo {
2
- /** 用户id */
3
- id: string
4
- /** 用户名称 */
5
- name: string
6
- /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
7
- flag: number
8
- /** 租户id */
9
- tenantId: string
10
- }
11
-
12
- export interface PersonalInfo {
13
- /** id */
14
- id: string
15
- /** 名称 */
16
- name: string
17
- /** 手机号 */
18
- phone: string
19
- /** 用户名称 */
20
- userName: string
21
- /** 邮箱 */
22
- email: string
23
- /** 头像 */
24
- headPicture: string
25
- }
26
-
27
- export interface TenantInfo {
28
- /** 用户ID */
29
- userId: string
30
- /** 用户名 */
31
- userName: string
32
- name: string
33
- /** 租户信息 */
34
- tenant: {
35
- id: string
36
- name: string
37
- adminUserId: string
38
- description: string
39
- domain: string
40
- }
41
- /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
42
- flag: number
43
- areaCode: string
44
- /** 手机号 */
45
- phone: string
46
- }
47
-
48
- export interface HomeInfo {
49
- applicationCode: string
50
- applicationPath: string
51
- enable: boolean
52
- originalCode: string
53
- routeUrl: string
54
- type: number | null
55
- }
56
-
57
- export interface ProjectInfo {
58
- /** 项目id */
59
- id: string | number
60
- /** 父级id */
61
- parentId?: string
62
- /** 项目名称 */
63
- name: string
64
- /** 租户id */
65
- tenantId?: string
66
- }
67
-
68
- export interface SubAppsInfo {
69
- /** 所有应用信息 */
70
- appcategorys?: any[]
71
- /** 当前应用完整信息 */
72
- currentSubApp?: any
73
- /** 所有应用 */
74
- flatSubAppList?: any[]
75
- /** 当前应用code */
76
- currentSubAppCode?: string
77
- /** 当前打开的应用 */
78
- subAppList?: any[]
79
- /** 当前菜单折叠的应用key集合 */
80
- menuCollapses?: any[]
81
- }
82
-
83
- interface TabItem {
84
- /** 当前应用url */
85
- currentApplication: string
86
- /** 当前加载的应用 */
87
- applicationPath: string
88
- applicationCode: string
89
- menuId: string
90
- name: string
91
- path: string
92
- code: string
93
- query?: any
94
- }
95
- export interface TabInfo {
96
- /** 当前tabs key */
97
- currentCode?: string
98
- /** 当前tabs */
99
- currentTab?: TabItem
100
- /** 用于记录该应用上次开启的tab */
101
- preTab?: Record<string, TabItem>
102
- /** 当前打开的tabs(微前端环境会存入) */
103
- tabMap?: Record<string, TabItem[]>
104
- }
105
-
106
- export type permissionBtnInfo = { code?: string; name?: string }[]
1
+ export interface UserInfo {
2
+ /** 用户id */
3
+ id: string
4
+ /** 用户名称 */
5
+ name: string
6
+ /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
7
+ flag: number
8
+ /** 租户id */
9
+ tenantId: string
10
+ }
11
+
12
+ export interface PersonalInfo {
13
+ /** id */
14
+ id: string
15
+ /** 名称 */
16
+ name: string
17
+ /** 手机号 */
18
+ phone: string
19
+ /** 用户名称 */
20
+ userName: string
21
+ /** 邮箱 */
22
+ email: string
23
+ /** 头像 */
24
+ headPicture: string
25
+ }
26
+
27
+ export interface TenantInfo {
28
+ /** 用户ID */
29
+ userId: string
30
+ /** 用户名 */
31
+ userName: string
32
+ name: string
33
+ /** 租户信息 */
34
+ tenant: {
35
+ id: string
36
+ name: string
37
+ adminUserId: string
38
+ description: string
39
+ domain: string
40
+ }
41
+ /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
42
+ flag: number
43
+ areaCode: string
44
+ /** 手机号 */
45
+ phone: string
46
+ }
47
+
48
+ export interface HomeInfo {
49
+ applicationCode: string
50
+ applicationPath: string
51
+ enable: boolean
52
+ originalCode: string
53
+ routeUrl: string
54
+ type: number | null
55
+ }
56
+
57
+ export interface ProjectInfo {
58
+ /** 项目id */
59
+ id: string
60
+ /** 项目编码 */
61
+ code: string
62
+ /** 项目名称 */
63
+ name: string
64
+ /** 项目类型: 1: 集团、 2:公司、3: 区域、4: 分公司、 5: 子公司、6: 管理中心、 7: 项目、8: 部门、 9: 组 */
65
+ type: string
66
+ /** 父级id */
67
+ parentId?: string
68
+ /** 父级名称 */
69
+ parentName?: string
70
+ /** 父级项目类型:1: 集团、 2:公司、3: 区域、4: 分公司、 5: 子公司、6: 管理中心、 7: 项目、8: 部门、 9: 组 */
71
+ parentType?: number
72
+ /** 租户id */
73
+ tenantId?: string
74
+ /** 是否父级节点 */
75
+ isParent?: boolean
76
+ /** 是否叶子节点 */
77
+ leaf?: boolean
78
+ /** 是否可用 */
79
+ optional?: boolean
80
+ }
81
+
82
+ export interface SubAppsInfo {
83
+ /** 所有应用信息 */
84
+ appcategorys?: any[]
85
+ /** 当前应用完整信息 */
86
+ currentSubApp?: any
87
+ /** 所有应用 */
88
+ flatSubAppList?: any[]
89
+ /** 当前应用code */
90
+ currentSubAppCode?: string
91
+ /** 当前打开的应用 */
92
+ subAppList?: any[]
93
+ /** 当前菜单折叠的应用key集合 */
94
+ menuCollapses?: any[]
95
+ }
96
+
97
+ interface TabItem {
98
+ /** 当前应用url */
99
+ currentApplication: string
100
+ /** 当前加载的应用 */
101
+ applicationPath: string
102
+ applicationCode: string
103
+ menuId: string
104
+ name: string
105
+ path: string
106
+ code: string
107
+ query?: any
108
+ }
109
+ export interface TabInfo {
110
+ /** 当前tabs key */
111
+ currentCode?: string
112
+ /** 当前tabs */
113
+ currentTab?: TabItem
114
+ /** 用于记录该应用上次开启的tab */
115
+ preTab?: Record<string, TabItem>
116
+ /** 当前打开的tabs(微前端环境会存入) */
117
+ tabMap?: Record<string, TabItem[]>
118
+ }
119
+
120
+ export type permissionBtnInfo = { code?: string; name?: string }[]
@@ -0,0 +1,33 @@
1
+ declare const _default: {
2
+ 参数校验错误: {
3
+ 'zh-CN': string;
4
+ en: string;
5
+ _appCode: string;
6
+ };
7
+ 接口地址未找到: {
8
+ 'zh-CN': string;
9
+ en: string;
10
+ _appCode: string;
11
+ };
12
+ 服务器内部错误: {
13
+ 'zh-CN': string;
14
+ en: string;
15
+ _appCode: string;
16
+ };
17
+ 解析错误: {
18
+ 'zh-CN': string;
19
+ en: string;
20
+ _appCode: string;
21
+ };
22
+ 请求配置异常: {
23
+ 'zh-CN': string;
24
+ en: string;
25
+ _appCode: string;
26
+ };
27
+ '\u7F51\u7EDC\u5F02\u5E38\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u60C5\u51B5': {
28
+ 'zh-CN': string;
29
+ en: string;
30
+ _appCode: string;
31
+ };
32
+ };
33
+ export default _default;
@@ -0,0 +1,15 @@
1
+ const r = {
2
+ 参数校验错误: { "zh-CN": "参数校验错误", en: "Parameter Validation Error", _appCode: "framework" },
3
+ 接口地址未找到: { "zh-CN": "接口地址未找到", en: "Api endpoint not found", _appCode: "framework" },
4
+ 服务器内部错误: { "zh-CN": "服务器内部错误", en: "Internal Server Error", _appCode: "framework" },
5
+ 解析错误: { "zh-CN": "解析错误", en: "Parsing Error", _appCode: "framework" },
6
+ 请求配置异常: { "zh-CN": "请求配置异常", en: "Request Configuration Error", _appCode: "framework" },
7
+ "网络异常,请检查您的网络情况": {
8
+ "zh-CN": "网络异常,请检查您的网络情况",
9
+ en: "Network error, please check your network status",
10
+ _appCode: "framework"
11
+ }
12
+ };
13
+ export {
14
+ r as default
15
+ };