@das-fed/utils 6.4.0-test.3.1 → 6.4.0-test.30

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 (93) 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 +1589 -1395
  5. package/api-services/index.js.gz +0 -0
  6. package/api-services/modules/app-manage/index.js +1390 -1226
  7. package/api-services/modules/app-manage/index.js.gz +0 -0
  8. package/api-services/modules/authentication/index.js +1340 -1190
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/index.js +1347 -1201
  11. package/api-services/modules/bems/index.js.gz +0 -0
  12. package/api-services/modules/contract/index.js +1390 -1226
  13. package/api-services/modules/contract/index.js.gz +0 -0
  14. package/api-services/modules/duty-manage/index.js +1395 -1231
  15. package/api-services/modules/duty-manage/index.js.gz +0 -0
  16. package/api-services/modules/enterpriseright/index.js +1384 -1224
  17. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  18. package/api-services/modules/file/index.js +1526 -1357
  19. package/api-services/modules/file/index.js.gz +0 -0
  20. package/api-services/modules/gateway-edge/index.js +1390 -1226
  21. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  22. package/api-services/modules/index.js +1526 -1357
  23. package/api-services/modules/index.js.gz +0 -0
  24. package/api-services/modules/iot/index.d.ts +1 -0
  25. package/api-services/modules/iot/index.js +1422 -1257
  26. package/api-services/modules/iot/index.js.gz +0 -0
  27. package/api-services/modules/justauth/index.js +1364 -1218
  28. package/api-services/modules/justauth/index.js.gz +0 -0
  29. package/api-services/modules/knowledge/index.js +1401 -1237
  30. package/api-services/modules/knowledge/index.js.gz +0 -0
  31. package/api-services/modules/link/index.js +1343 -1197
  32. package/api-services/modules/link/index.js.gz +0 -0
  33. package/api-services/modules/permission/index.js +1390 -1226
  34. package/api-services/modules/permission/index.js.gz +0 -0
  35. package/api-services/modules/platformManage/index.js +1400 -1236
  36. package/api-services/modules/platformManage/index.js.gz +0 -0
  37. package/api-services/modules/portal/index.js +1390 -1226
  38. package/api-services/modules/portal/index.js.gz +0 -0
  39. package/api-services/modules/space-manage/index.js +1390 -1226
  40. package/api-services/modules/space-manage/index.js.gz +0 -0
  41. package/api-services/modules/super-admin/index.js +1381 -1217
  42. package/api-services/modules/super-admin/index.js.gz +0 -0
  43. package/api-services/modules/supplier/index.js +1346 -1200
  44. package/api-services/modules/supplier/index.js.gz +0 -0
  45. package/api-services/modules/supplychain-manage/index.js +1343 -1197
  46. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  47. package/api-services/modules/systemConfiguration/index.js +1390 -1226
  48. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  49. package/api-services/modules/tool/index.js +1390 -1226
  50. package/api-services/modules/tool/index.js.gz +0 -0
  51. package/api-services/src/create-service/index.js +1390 -1226
  52. package/api-services/src/create-service/index.js.gz +0 -0
  53. package/common-info/index.d.ts +9 -3
  54. package/common-info/index.js +108 -54
  55. package/common-info/index.js.gz +0 -0
  56. package/common-info/set-personal-info/index.js +446 -440
  57. package/common-info/set-personal-info/index.js.gz +0 -0
  58. package/common-info/type.d.ts +114 -6
  59. package/common-tools/calc-text-width/index.d.ts +1 -0
  60. package/common-tools/calc-text-width/index.js +10 -0
  61. package/common-tools/extract-file-name/index.js +737 -738
  62. package/common-tools/extract-file-name/index.js.gz +0 -0
  63. package/common-tools/get-file-extension/index.d.ts +6 -0
  64. package/common-tools/get-file-extension/index.js +7 -0
  65. package/common-tools/index.d.ts +2 -0
  66. package/common-tools/index.js +2 -0
  67. package/common-tools/nest-tree-format/index.d.ts +1 -1
  68. package/common-tools/nest-tree-format/index.js +15 -15
  69. package/create-api-service/i18n/index.d.ts +33 -0
  70. package/create-api-service/i18n/index.js +15 -0
  71. package/create-api-service/index.js +1390 -1226
  72. package/create-api-service/index.js.gz +0 -0
  73. package/create-api-service/sso/index.d.ts +0 -2
  74. package/create-api-service/sso/index.js +482 -479
  75. package/create-api-service/sso/index.js.gz +0 -0
  76. package/curring-http/index.js +575 -575
  77. package/curring-http/index.js.gz +0 -0
  78. package/directive/hoverInside/index.d.ts +1 -1
  79. package/dom-check-in/index.js +2 -2
  80. package/dom-watcher/index.d.ts +1 -1
  81. package/esm-map.json +6 -1
  82. package/package.json +4 -4
  83. package/pinyin-first-character/index.js +22 -22
  84. package/pinyin-first-character/index.js.gz +0 -0
  85. package/style/index.js +1 -1
  86. package/style/index.js.gz +0 -0
  87. package/style/math.d.ts +4 -4
  88. package/token-tools/index.d.ts +6 -1
  89. package/token-tools/index.js +6 -6
  90. package/use-low-code/index.js +2 -2
  91. package/use-low-code/index.js.gz +0 -0
  92. package/i18n-collection/en.js +0 -21
  93. package/i18n-collection/zh-CN.js +0 -21
@@ -1,4 +1,4 @@
1
- import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, ProjectInfo, SubAppsInfo, TabInfo, permissionBtnInfo } from './type';
1
+ import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, PersonalConfigInfo, ProjectInfo, ProjectMessage, SubAppsInfo, TabInfo, permissionBtnInfo } from './type';
2
2
 
3
3
  /** 获取token */
4
4
  export declare const getToken: any;
@@ -13,15 +13,21 @@ export declare const getTenantInfo: () => TenantInfo;
13
13
  * @returns 项目信息
14
14
  */
15
15
  export declare const getProjectInfo: () => ProjectInfo;
16
+ /**
17
+ * 获取项目信息
18
+ * @returns 项目信息
19
+ */
20
+ export declare const getProjectMessage: () => ProjectMessage;
16
21
  /** 获取首页信息 */
17
22
  export declare const getHomeInfo: () => HomeInfo;
23
+ export declare const getPersonalConfig: () => PersonalConfigInfo;
18
24
  /**
19
25
  * 可用于判断菜单或者按钮权限
20
26
  * @param menuCode 菜单编码
21
27
  * @param applicationCode 应用编码
22
- * @returns undefined(无菜单权限);空数组(无按钮权限)
28
+ * @returns 无菜单权限返回undefined,有菜单权限但是没有任何按钮权限返回空数组
23
29
  */
24
- export declare const getPageAuth: (menuCode?: string, applicationCode?: string) => any;
30
+ export declare const getPageAuth: (menuCode?: string, applicationCode?: string) => undefined | any[];
25
31
  /**
26
32
  * 获取指定菜单的按钮权限数据
27
33
  * @param menuCode 菜单编码
@@ -1,48 +1,91 @@
1
- import { getConfig as i } from "@das-fed/utils/config";
2
- import { getUrlParams as p } from "@das-fed/utils/common-tools";
1
+ import { getConfig as u } from "@das-fed/utils/config";
2
+ import { getUrlParams as d } from "@das-fed/utils/common-tools";
3
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 = () => {
6
- var n;
4
+ import { getTokenFromQuery as S, getProjectInfoFromQuery as y } from "@das-fed/utils/common-info/getInfoFromUrl";
5
+ const N = I, A = () => {
6
+ var r;
7
7
  let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
8
8
  return {
9
9
  id: e.id ?? "",
10
10
  name: e.userName ?? "",
11
11
  flag: e.flag ?? null,
12
- tenantId: ((n = e == null ? void 0 : e.tenant) == null ? void 0 : n.id) ?? ""
12
+ tenantId: ((r = e == null ? void 0 : e.tenant) == null ? void 0 : r.id) ?? ""
13
13
  };
14
- }, P = () => {
14
+ }, J = () => {
15
15
  let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
16
- const t = i();
16
+ const t = u();
17
17
  return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
18
18
  id: e.id ?? "",
19
19
  name: e.name ?? "",
20
- phone: e.phone ?? "",
21
20
  userName: e.userName ?? "",
21
+ phone: e.phone ?? "",
22
22
  email: e.email ?? "",
23
23
  headPicture: e.headPicture ?? ""
24
24
  };
25
- }, y = () => {
25
+ }, O = () => {
26
26
  let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
27
27
  return {
28
28
  userId: e.id ?? "",
29
29
  userName: e.userName ?? "",
30
30
  name: e.name ?? "",
31
31
  areaCode: e.areaCode ?? "",
32
+ region: e.region ?? "",
32
33
  phone: e.phone ?? "",
34
+ email: e.email ?? "",
33
35
  flag: e.flag ?? null,
34
- tenant: e.tenant ?? {}
36
+ tenant: e.tenant ?? {},
37
+ headPicture: e.headPicture ?? "",
38
+ nickName: e.nickName ?? "",
39
+ gender: e.gender ?? null,
40
+ status: e.status ?? null,
41
+ statusName: e.statusName ?? null,
42
+ tags: e.tags ?? [],
43
+ type: e.type ?? null,
44
+ address: e.address ?? "",
45
+ description: e.description ?? ""
35
46
  };
36
- }, b = () => {
47
+ }, C = () => {
37
48
  let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
38
- const t = i();
49
+ const t = u();
39
50
  return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
40
51
  id: (e == null ? void 0 : e.id) ?? 0,
41
- parentId: (e == null ? void 0 : e.parentId) ?? "",
52
+ code: (e == null ? void 0 : e.code) ?? 0,
42
53
  name: (e == null ? void 0 : e.name) ?? "",
43
- tenantId: (e == null ? void 0 : e.tenant) ?? ""
54
+ type: (e == null ? void 0 : e.type) ?? null,
55
+ parentId: (e == null ? void 0 : e.parentId) ?? "",
56
+ parentName: (e == null ? void 0 : e.parentName) ?? "",
57
+ parentType: (e == null ? void 0 : e.parentType) ?? null,
58
+ tenantId: (e == null ? void 0 : e.tenant) ?? "",
59
+ isParent: (e == null ? void 0 : e.isParent) ?? !1,
60
+ leaf: (e == null ? void 0 : e.leaf) ?? !1,
61
+ optional: (e == null ? void 0 : e.leaf) ?? !0
44
62
  };
45
63
  }, M = () => {
64
+ let e = JSON.parse(sessionStorage.getItem("project-message") || "{}");
65
+ return {
66
+ id: (e == null ? void 0 : e.id) ?? 0,
67
+ projectName: (e == null ? void 0 : e.projectName) ?? "",
68
+ provinceCode: (e == null ? void 0 : e.provinceCode) ?? "",
69
+ cityCode: (e == null ? void 0 : e.cityCode) ?? "",
70
+ areaCode: (e == null ? void 0 : e.areaCode) ?? "",
71
+ address: (e == null ? void 0 : e.address) ?? "",
72
+ projectDesc: (e == null ? void 0 : e.projectDesc) ?? "",
73
+ logoPath: (e == null ? void 0 : e.logoPath) ?? "",
74
+ projectType: (e == null ? void 0 : e.projectType) ?? "",
75
+ projectTypeCode: (e == null ? void 0 : e.projectTypeCode) ?? "",
76
+ longitude: (e == null ? void 0 : e.longitude) ?? "",
77
+ latitude: (e == null ? void 0 : e.latitude) ?? "",
78
+ projectStartDate: (e == null ? void 0 : e.projectStartDate) ?? "",
79
+ projectExpiryDate: (e == null ? void 0 : e.projectExpiryDate) ?? "",
80
+ projectCode: (e == null ? void 0 : e.projectCode) ?? "",
81
+ mapConfiguration: (e == null ? void 0 : e.mapConfiguration) ?? !1,
82
+ cityName: (e == null ? void 0 : e.cityName) ?? "",
83
+ cityNamePinyin: (e == null ? void 0 : e.cityNamePinyin) ?? "",
84
+ timezone: (e == null ? void 0 : e.timezone) ?? "",
85
+ autoTimezone: (e == null ? void 0 : e.autoTimezone) ?? !1,
86
+ currency: (e == null ? void 0 : e.currency) ?? {}
87
+ };
88
+ }, v = () => {
46
89
  const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
47
90
  return {
48
91
  applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
@@ -50,16 +93,25 @@ const S = I, O = () => {
50
93
  enable: (e == null ? void 0 : e.enable) ?? !1,
51
94
  originalCode: (e == null ? void 0 : e.originalCode) ?? "",
52
95
  routeUrl: (e == null ? void 0 : e.routeUrl) ?? "",
96
+ displayPosition: (e == null ? void 0 : e.displayPosition) ?? 1,
53
97
  type: (e == null ? void 0 : e.type) ?? null
54
98
  };
55
- }, 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) || "{}");
99
+ }, f = () => {
100
+ const e = JSON.parse(sessionStorage.getItem("personal-config") || "{}");
101
+ return {
102
+ style: (e == null ? void 0 : e.style) ?? "",
103
+ skinStyle: (e == null ? void 0 : e.skinStyle) ?? ""
104
+ };
105
+ }, j = (e, t) => {
106
+ var g;
107
+ const r = "permission-btn", a = m(), o = d(location.href, "app") || "", s = t || o || a.currentSubAppCode;
108
+ if (!s) return;
109
+ const n = d(location.href, "menu") || "", l = e || n || a.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(r) || "{}");
59
110
  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 = () => {
111
+ const p = (g = c[s]) == null ? void 0 : g[l];
112
+ if (p)
113
+ return p.length ? p : c[s]["origin-auth"] ? c[s]["origin-auth"][l] ?? [] : [];
114
+ }, k = (e, t) => j(e, t) ?? [], m = () => {
63
115
  const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
64
116
  return {
65
117
  appcategorys: e.appcategorys ?? [],
@@ -68,20 +120,20 @@ const S = I, O = () => {
68
120
  subAppList: e.subAppList ?? [],
69
121
  menuCollapses: e.menuCollapses ?? []
70
122
  };
71
- }, j = (e, t = !1) => {
72
- var s, a;
73
- const n = f().subAppList;
123
+ }, D = (e, t = !1) => {
124
+ var a, o;
125
+ const r = m().subAppList;
74
126
  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) ?? [];
127
+ return t ? ((a = r == null ? void 0 : r.find((s) => s.code === e)) == null ? void 0 : a.originalMenus) ?? [] : ((o = r == null ? void 0 : r.find((s) => s.code === e)) == null ? void 0 : o.menus) ?? [];
76
128
  {
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;
129
+ let s = {};
130
+ return t ? r == null || r.forEach((n) => {
131
+ s[n.code] = n.originalMenus ?? [];
132
+ }) : r == null || r.forEach((n) => {
133
+ s[n.code] = n.menus ?? [];
134
+ }), s;
83
135
  }
84
- }, v = () => {
136
+ }, U = () => {
85
137
  const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
86
138
  return {
87
139
  currentCode: e.currentCode ?? "",
@@ -89,28 +141,30 @@ const S = I, O = () => {
89
141
  tabMap: e.tabMap ?? {},
90
142
  preTab: e.preTab ?? {}
91
143
  };
92
- }, U = () => {
93
- const e = i(), t = sessionStorage.getItem("minioAddress");
144
+ }, E = () => {
145
+ const e = u(), t = sessionStorage.getItem("minioAddress");
94
146
  return t || (e.baseURL ? e.baseURL : location.origin);
95
- }, k = () => ({
147
+ }, z = () => ({
96
148
  instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
97
- }), E = () => localStorage.getItem("fav-icon") || "./logo.svg";
98
- S() || m();
99
- var l;
100
- (l = b()) != null && l.id || d();
149
+ }), x = () => localStorage.getItem("fav-icon") || "./logo.svg";
150
+ N() || S();
151
+ var i;
152
+ (i = C()) != null && i.id || y();
101
153
  export {
102
- E as getFavIcon,
103
- M as getHomeInfo,
104
- k as getInstanceInfo,
105
- j as getMenus,
106
- U as getMinioAddress,
107
- h as getPageAuth,
108
- T as getPageAuthBtn,
109
- P as getPersonalInfo,
110
- b as getProjectInfo,
111
- f as getSubApps,
112
- v as getTabInfo,
113
- y as getTenantInfo,
114
- S as getToken,
115
- O as getUserInfo
154
+ x as getFavIcon,
155
+ v as getHomeInfo,
156
+ z as getInstanceInfo,
157
+ D as getMenus,
158
+ E as getMinioAddress,
159
+ j as getPageAuth,
160
+ k as getPageAuthBtn,
161
+ f as getPersonalConfig,
162
+ J as getPersonalInfo,
163
+ C as getProjectInfo,
164
+ M as getProjectMessage,
165
+ m as getSubApps,
166
+ U as getTabInfo,
167
+ O as getTenantInfo,
168
+ N as getToken,
169
+ A as getUserInfo
116
170
  };
Binary file