@das-fed/utils 6.4.0-hot.45 → 6.4.0-hot.47

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 (78) hide show
  1. package/api-services/i18n/index.js.gz +0 -0
  2. package/api-services/index.js +1820 -1504
  3. package/api-services/index.js.gz +0 -0
  4. package/api-services/modules/app-manage/index.js +1663 -1329
  5. package/api-services/modules/app-manage/index.js.gz +0 -0
  6. package/api-services/modules/authentication/index.js +1626 -1328
  7. package/api-services/modules/authentication/index.js.gz +0 -0
  8. package/api-services/modules/bems/index.js +1637 -1321
  9. package/api-services/modules/bems/index.js.gz +0 -0
  10. package/api-services/modules/contract/index.js +1662 -1332
  11. package/api-services/modules/contract/index.js.gz +0 -0
  12. package/api-services/modules/duty-manage/index.js +1673 -1339
  13. package/api-services/modules/duty-manage/index.js.gz +0 -0
  14. package/api-services/modules/enterpriseright/index.js +1634 -1318
  15. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  16. package/api-services/modules/file/index.js +1752 -1418
  17. package/api-services/modules/file/index.js.gz +0 -0
  18. package/api-services/modules/gateway-edge/index.js +1626 -1328
  19. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  20. package/api-services/modules/index.js +1852 -1536
  21. package/api-services/modules/index.js.gz +0 -0
  22. package/api-services/modules/iot/index.js +1674 -1358
  23. package/api-services/modules/iot/index.js.gz +0 -0
  24. package/api-services/modules/justauth/index.js +1630 -1332
  25. package/api-services/modules/justauth/index.js.gz +0 -0
  26. package/api-services/modules/knowledge/index.js +1655 -1339
  27. package/api-services/modules/knowledge/index.js.gz +0 -0
  28. package/api-services/modules/link/index.js +1634 -1318
  29. package/api-services/modules/link/index.js.gz +0 -0
  30. package/api-services/modules/permission/index.js +1634 -1318
  31. package/api-services/modules/permission/index.js.gz +0 -0
  32. package/api-services/modules/platformManage/index.js +1633 -1335
  33. package/api-services/modules/platformManage/index.js.gz +0 -0
  34. package/api-services/modules/portal/index.js +1634 -1318
  35. package/api-services/modules/portal/index.js.gz +0 -0
  36. package/api-services/modules/space-manage/index.js +1634 -1318
  37. package/api-services/modules/space-manage/index.js.gz +0 -0
  38. package/api-services/modules/super-admin/index.js +1642 -1326
  39. package/api-services/modules/super-admin/index.js.gz +0 -0
  40. package/api-services/modules/supplier/index.js +1649 -1347
  41. package/api-services/modules/supplier/index.js.gz +0 -0
  42. package/api-services/modules/supplychain-manage/index.js +1634 -1318
  43. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  44. package/api-services/modules/systemConfiguration/index.js +1623 -1325
  45. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  46. package/api-services/modules/tool/index.js +1647 -1349
  47. package/api-services/modules/tool/index.js.gz +0 -0
  48. package/api-services/src/create-service/index.js +1646 -1348
  49. package/api-services/src/create-service/index.js.gz +0 -0
  50. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  51. package/common-info/index.d.ts +1 -5
  52. package/common-info/index.js +58 -84
  53. package/common-info/index.js.gz +0 -0
  54. package/common-info/set-personal-info/index.js +842 -593
  55. package/common-info/set-personal-info/index.js.gz +0 -0
  56. package/common-info/type.d.ts +0 -14
  57. package/common-tools/extract-file-name/index.js +1034 -785
  58. package/common-tools/extract-file-name/index.js.gz +0 -0
  59. package/common-tools/get-url-params/index.js.gz +0 -0
  60. package/create-api-service/index.js +1646 -1348
  61. package/create-api-service/index.js.gz +0 -0
  62. package/create-api-service/sso/index.js +976 -727
  63. package/create-api-service/sso/index.js.gz +0 -0
  64. package/curring-http/index.js +1354 -1105
  65. package/curring-http/index.js.gz +0 -0
  66. package/directive/auth/index.js +48 -41
  67. package/directive/auth/index.js.gz +0 -0
  68. package/esm-map.json +1 -3
  69. package/hooks/use-get-auth/index.js.gz +0 -0
  70. package/nextTiken/index.js.gz +0 -0
  71. package/package.json +4 -4
  72. package/pinyin-first-character/index.js +19799 -20879
  73. package/pinyin-first-character/index.js.gz +0 -0
  74. package/style/index.js +4 -2
  75. package/style/index.js.gz +0 -0
  76. package/use-low-code/index.js.gz +0 -0
  77. package/vue/hooks/use-model-value/index.d.ts +1 -5
  78. package/webSocket-service/index.js.gz +0 -0
@@ -1,9 +1,5 @@
1
- import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, PersonalConfigInfo, ProjectInfo, ProjectMessage, SubAppsInfo, TabInfo, permissionBtnInfo, menuItemTs } from './type';
1
+ import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, PersonalConfigInfo, ProjectInfo, ProjectMessage, SubAppsInfo, TabInfo, permissionBtnInfo } from './type';
2
2
 
3
- /** 获取当前应用详情 */
4
- export declare const getMenuItemInfo: (val?: any) => menuItemTs;
5
- /** 获取所有权限code详情 */
6
- export declare const getAuthobj: () => any;
7
3
  /** 获取token */
8
4
  export declare const getToken: any;
9
5
  /** 获取账户详情 */
@@ -1,52 +1,19 @@
1
- import { getConfig as p } from "@das-fed/utils/config";
2
- import { getAccessToken as g } from "@das-fed/utils/token-tools";
3
- import { getTokenFromQuery as d, getProjectInfoFromQuery as i } from "@das-fed/utils/common-info/getInfoFromUrl";
4
- const P = (e) => {
5
- let t = e || JSON.parse(sessionStorage.getItem("menuItem") || "{}");
6
- return {
7
- authCodes: t.rightFuncCodes ?? [],
8
- routeUrl: t.routeUrl ?? "",
9
- parentId: t.parentId ?? "",
10
- id: t.id ?? "",
11
- appId: t.appId ?? "",
12
- menuAppearance: t.menuAppearance ?? "",
13
- name: t.name ?? "",
14
- type: (t == null ? void 0 : t.type) ?? ""
15
- };
16
- }, m = () => {
17
- const e = JSON.parse(sessionStorage.getItem("menuList") || "[]"), t = {};
18
- return e.forEach((s) => {
19
- s.routeUrl && (s.rightFuncCodes && s.rightFuncCodes.forEach((r) => t[r] = []), s.children && s.children.forEach((r) => {
20
- if (r.rightFuncCodes && r.rightFuncCodes[0] && !r.children) {
21
- const o = r.rightFuncCodes[0].lastIndexOf("."), n = r.rightFuncCodes[0].slice(0, o);
22
- t[n] = [], r.rightFuncCodes.forEach((a) => {
23
- const c = a.lastIndexOf(".");
24
- t[n].push({ code: a.slice(c + 1) });
25
- });
26
- }
27
- r.children && r.children.forEach((o) => {
28
- if (o.rightFuncCodes) {
29
- const n = o.rightFuncCodes[0].lastIndexOf("."), a = o.rightFuncCodes[0].slice(0, n);
30
- t[a] = [], o.rightFuncCodes.forEach((c) => {
31
- const l = c.lastIndexOf(".");
32
- t[a].push({ code: c.slice(l + 1) });
33
- });
34
- }
35
- });
36
- }));
37
- }), t;
38
- }, I = g, b = () => {
39
- var s;
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;
40
7
  let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
41
8
  return {
42
9
  id: e.id ?? "",
43
10
  name: e.userName ?? "",
44
11
  flag: e.flag ?? null,
45
- tenantId: ((s = e == null ? void 0 : e.tenant) == null ? void 0 : s.id) ?? ""
12
+ tenantId: ((r = e == null ? void 0 : e.tenant) == null ? void 0 : r.id) ?? ""
46
13
  };
47
- }, f = () => {
14
+ }, J = () => {
48
15
  let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
49
- const t = p();
16
+ const t = u();
50
17
  return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
51
18
  id: e.id ?? "",
52
19
  name: e.name ?? "",
@@ -77,9 +44,9 @@ const P = (e) => {
77
44
  address: e.address ?? "",
78
45
  description: e.description ?? ""
79
46
  };
80
- }, T = () => sessionStorage.getItem("languages"), y = () => {
47
+ }, M = () => sessionStorage.getItem("languages"), C = () => {
81
48
  let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
82
- const t = p();
49
+ const t = u();
83
50
  return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
84
51
  id: (e == null ? void 0 : e.id) ?? 0,
85
52
  code: (e == null ? void 0 : e.code) ?? 0,
@@ -93,7 +60,7 @@ const P = (e) => {
93
60
  leaf: (e == null ? void 0 : e.leaf) ?? !1,
94
61
  optional: (e == null ? void 0 : e.leaf) ?? !0
95
62
  };
96
- }, F = () => {
63
+ }, v = () => {
97
64
  let e = JSON.parse(sessionStorage.getItem("project-message") || "{}");
98
65
  return {
99
66
  id: (e == null ? void 0 : e.id) ?? 0,
@@ -118,7 +85,7 @@ const P = (e) => {
118
85
  autoTimezone: (e == null ? void 0 : e.autoTimezone) ?? !1,
119
86
  currency: (e == null ? void 0 : e.currency) ?? {}
120
87
  };
121
- }, J = () => {
88
+ }, f = () => {
122
89
  const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
123
90
  return {
124
91
  applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
@@ -129,13 +96,22 @@ const P = (e) => {
129
96
  displayPosition: (e == null ? void 0 : e.displayPosition) ?? 1,
130
97
  type: (e == null ? void 0 : e.type) ?? null
131
98
  };
132
- }, A = () => {
99
+ }, k = () => {
133
100
  const e = JSON.parse(sessionStorage.getItem("personal-config") || "{}");
134
101
  return {
135
102
  style: (e == null ? void 0 : e.style) ?? "",
136
103
  skinStyle: (e == null ? void 0 : e.skinStyle) ?? ""
137
104
  };
138
- }, C = (e, t) => e ? m()[e] : void 0, x = (e, t) => C(e) ?? [], h = () => {
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) || "{}");
110
+ if (!c || JSON.stringify(c) === "{}") return;
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
+ }, D = (e, t) => j(e, t) ?? [], m = () => {
139
115
  const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
140
116
  return {
141
117
  appcategorys: e.appcategorys ?? [],
@@ -144,20 +120,20 @@ const P = (e) => {
144
120
  subAppList: e.subAppList ?? [],
145
121
  menuCollapses: e.menuCollapses ?? []
146
122
  };
147
- }, E = (e, t = !1) => {
148
- var r, o;
149
- const s = h().subAppList;
123
+ }, U = (e, t = !1) => {
124
+ var a, o;
125
+ const r = m().subAppList;
150
126
  if (e)
151
- return t ? ((r = s == null ? void 0 : s.find((n) => n.code === e)) == null ? void 0 : r.originalMenus) ?? [] : ((o = s == null ? void 0 : s.find((n) => n.code === e)) == null ? void 0 : o.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) ?? [];
152
128
  {
153
- let n = {};
154
- return t ? s == null || s.forEach((a) => {
155
- n[a.code] = a.originalMenus ?? [];
156
- }) : s == null || s.forEach((a) => {
157
- n[a.code] = a.menus ?? [];
158
- }), n;
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;
159
135
  }
160
- }, M = () => {
136
+ }, E = () => {
161
137
  const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
162
138
  return {
163
139
  currentCode: e.currentCode ?? "",
@@ -165,33 +141,31 @@ const P = (e) => {
165
141
  tabMap: e.tabMap ?? {},
166
142
  preTab: e.preTab ?? {}
167
143
  };
168
- }, k = () => {
169
- const e = p(), t = sessionStorage.getItem("minioAddress");
144
+ }, z = () => {
145
+ const e = u(), t = sessionStorage.getItem("minioAddress");
170
146
  return t || (e.baseURL ? e.baseURL : location.origin);
171
- }, U = () => ({
147
+ }, x = () => ({
172
148
  instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
173
- }), v = () => localStorage.getItem("fav-icon") || "./logo.svg";
174
- I() || d();
175
- var u;
176
- (u = y()) != null && u.id || i();
149
+ }), F = () => localStorage.getItem("fav-icon") || "./logo.svg";
150
+ N() || S();
151
+ var i;
152
+ (i = C()) != null && i.id || y();
177
153
  export {
178
- m as getAuthobj,
179
- v as getFavIcon,
180
- J as getHomeInfo,
181
- U as getInstanceInfo,
182
- T as getLanguages,
183
- P as getMenuItemInfo,
184
- E as getMenus,
185
- k as getMinioAddress,
186
- C as getPageAuth,
187
- x as getPageAuthBtn,
188
- A as getPersonalConfig,
189
- f as getPersonalInfo,
190
- y as getProjectInfo,
191
- F as getProjectMessage,
192
- h as getSubApps,
193
- M as getTabInfo,
154
+ F as getFavIcon,
155
+ f as getHomeInfo,
156
+ x as getInstanceInfo,
157
+ M as getLanguages,
158
+ U as getMenus,
159
+ z as getMinioAddress,
160
+ j as getPageAuth,
161
+ D as getPageAuthBtn,
162
+ k as getPersonalConfig,
163
+ J as getPersonalInfo,
164
+ C as getProjectInfo,
165
+ v as getProjectMessage,
166
+ m as getSubApps,
167
+ E as getTabInfo,
194
168
  O as getTenantInfo,
195
- I as getToken,
196
- b as getUserInfo
169
+ N as getToken,
170
+ A as getUserInfo
197
171
  };
Binary file