@das-fed/utils 6.4.0-test.3.2 → 6.4.0-test.31

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 +1390 -1226
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/index.js +1393 -1229
  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 +1349 -1203
  15. package/api-services/modules/duty-manage/index.js.gz +0 -0
  16. package/api-services/modules/enterpriseright/index.js +1390 -1226
  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 +1408 -1244
  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 +1390 -1226
  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 +1354 -1208
  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 +1392 -1228
  44. package/api-services/modules/supplier/index.js.gz +0 -0
  45. package/api-services/modules/supplychain-manage/index.js +1390 -1226
  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 +100 -53
  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 +99 -5
  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,41 +1,52 @@
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
- var n;
1
+ import { getConfig as u } from "@das-fed/utils/config";
2
+ import { getUrlParams as d } from "@das-fed/utils/common-tools";
3
+ import { getAccessToken as I } from "@das-fed/utils/token-tools";
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
- }, O = () => {
14
+ }, J = () => {
15
15
  let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
16
- const t = p();
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
- }, P = () => {
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 = p();
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
52
  code: (e == null ? void 0 : e.code) ?? 0,
@@ -49,7 +60,32 @@ const S = m, J = () => {
49
60
  leaf: (e == null ? void 0 : e.leaf) ?? !1,
50
61
  optional: (e == null ? void 0 : e.leaf) ?? !0
51
62
  };
52
- }, T = () => {
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 = () => {
53
89
  const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
54
90
  return {
55
91
  applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
@@ -57,16 +93,25 @@ const S = m, J = () => {
57
93
  enable: (e == null ? void 0 : e.enable) ?? !1,
58
94
  originalCode: (e == null ? void 0 : e.originalCode) ?? "",
59
95
  routeUrl: (e == null ? void 0 : e.routeUrl) ?? "",
96
+ displayPosition: (e == null ? void 0 : e.displayPosition) ?? 1,
60
97
  type: (e == null ? void 0 : e.type) ?? null
61
98
  };
62
- }, h = (e, t) => {
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) || "{}");
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) || "{}");
66
110
  if (!c || JSON.stringify(c) === "{}") return;
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 = () => {
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 = () => {
70
115
  const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
71
116
  return {
72
117
  appcategorys: e.appcategorys ?? [],
@@ -75,20 +120,20 @@ const S = m, J = () => {
75
120
  subAppList: e.subAppList ?? [],
76
121
  menuCollapses: e.menuCollapses ?? []
77
122
  };
78
- }, j = (e, t = !1) => {
79
- var s, a;
80
- const n = I().subAppList;
123
+ }, D = (e, t = !1) => {
124
+ var a, o;
125
+ const r = m().subAppList;
81
126
  if (e)
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) ?? [];
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) ?? [];
83
128
  {
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;
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;
90
135
  }
91
- }, v = () => {
136
+ }, U = () => {
92
137
  const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
93
138
  return {
94
139
  currentCode: e.currentCode ?? "",
@@ -96,28 +141,30 @@ const S = m, J = () => {
96
141
  tabMap: e.tabMap ?? {},
97
142
  preTab: e.preTab ?? {}
98
143
  };
99
- }, U = () => {
100
- const e = p(), t = sessionStorage.getItem("minioAddress");
144
+ }, E = () => {
145
+ const e = u(), t = sessionStorage.getItem("minioAddress");
101
146
  return t || (e.baseURL ? e.baseURL : location.origin);
102
- }, k = () => ({
147
+ }, z = () => ({
103
148
  instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
104
- }), E = () => localStorage.getItem("fav-icon") || "./logo.svg";
105
- S() || f();
149
+ }), x = () => localStorage.getItem("fav-icon") || "./logo.svg";
150
+ N() || S();
106
151
  var i;
107
- (i = b()) != null && i.id || d();
152
+ (i = C()) != null && i.id || y();
108
153
  export {
109
- E as getFavIcon,
110
- T as getHomeInfo,
111
- k as getInstanceInfo,
112
- j as getMenus,
113
- U as getMinioAddress,
114
- h as getPageAuth,
115
- M as getPageAuthBtn,
116
- O as getPersonalInfo,
117
- b as getProjectInfo,
118
- I as getSubApps,
119
- v as getTabInfo,
120
- P as getTenantInfo,
121
- S as getToken,
122
- J 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
123
170
  };
Binary file