@das-fed/utils 7.0.6 → 7.0.7-dev.1

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 (37) hide show
  1. package/api-services/modules/authentication/index.js +725 -743
  2. package/api-services/modules/authentication/index.js.gz +0 -0
  3. package/api-services/modules/contract/index.js +743 -725
  4. package/api-services/modules/contract/index.js.gz +0 -0
  5. package/api-services/modules/duty-manage/index.js +741 -723
  6. package/api-services/modules/duty-manage/index.js.gz +0 -0
  7. package/api-services/modules/file/index.js +748 -766
  8. package/api-services/modules/file/index.js.gz +0 -0
  9. package/api-services/modules/index.js +871 -857
  10. package/api-services/modules/index.js.gz +0 -0
  11. package/api-services/modules/iot/index.js +984 -1002
  12. package/api-services/modules/iot/index.js.gz +0 -0
  13. package/api-services/modules/justauth/index.js +744 -726
  14. package/api-services/modules/justauth/index.js.gz +0 -0
  15. package/api-services/modules/permission/index.js +646 -650
  16. package/api-services/modules/permission/index.js.gz +0 -0
  17. package/api-services/modules/portal/index.js +725 -743
  18. package/api-services/modules/portal/index.js.gz +0 -0
  19. package/api-services/modules/space-manage/index.js +725 -743
  20. package/api-services/modules/space-manage/index.js.gz +0 -0
  21. package/api-services/modules/super-admin/index.js +727 -745
  22. package/api-services/modules/super-admin/index.js.gz +0 -0
  23. package/api-services/modules/supplier/index.js +745 -727
  24. package/api-services/modules/supplier/index.js.gz +0 -0
  25. package/api-services/modules/supplychain-manage/index.js +725 -743
  26. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  27. package/api-services/modules/tool/index.js +725 -743
  28. package/api-services/modules/tool/index.js.gz +0 -0
  29. package/common-info/index.js +13 -12
  30. package/common-info/index.js.gz +0 -0
  31. package/common-info/type.d.ts +2 -0
  32. package/common-tools/platform-tools/index.d.ts +1 -1
  33. package/common-tools/platform-tools/index.js +22 -15
  34. package/create-api-service/sso/index.d.ts +2 -2
  35. package/create-api-service/sso/index.js +300 -300
  36. package/create-api-service/sso/index.js.gz +0 -0
  37. package/package.json +4 -4
@@ -2,7 +2,7 @@ import { getConfig as u } from "@das-fed/utils/config";
2
2
  import { getUrlParams as d } from "@das-fed/utils/common-tools";
3
3
  import { getAccessToken as I } from "@das-fed/utils/token-tools";
4
4
  import { getTokenFromQuery as S, getProjectInfoFromQuery as y } from "@das-fed/utils/common-info/getInfoFromUrl";
5
- const N = I, A = () => {
5
+ const N = I, T = () => {
6
6
  var r;
7
7
  let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
8
8
  return {
@@ -60,7 +60,7 @@ const N = I, A = () => {
60
60
  leaf: (e == null ? void 0 : e.leaf) ?? !1,
61
61
  optional: (e == null ? void 0 : e.leaf) ?? !0
62
62
  };
63
- }, v = () => {
63
+ }, f = () => {
64
64
  let e = JSON.parse(sessionStorage.getItem("project-message") || "{}");
65
65
  return {
66
66
  id: (e == null ? void 0 : e.id) ?? 0,
@@ -85,7 +85,7 @@ const N = I, A = () => {
85
85
  autoTimezone: (e == null ? void 0 : e.autoTimezone) ?? !1,
86
86
  currency: (e == null ? void 0 : e.currency) ?? {}
87
87
  };
88
- }, f = () => {
88
+ }, v = () => {
89
89
  const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
90
90
  return {
91
91
  applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
@@ -118,6 +118,7 @@ const N = I, A = () => {
118
118
  currentSubApp: e.currentSubApp ?? {},
119
119
  currentSubAppCode: e.currentSubAppCode ?? "",
120
120
  subAppList: e.subAppList ?? [],
121
+ fixedApps: e.fixedApps ?? [],
121
122
  menuCollapses: e.menuCollapses ?? []
122
123
  };
123
124
  }, U = (e, t = !1) => {
@@ -133,7 +134,7 @@ const N = I, A = () => {
133
134
  s[n.code] = n.menus ?? [];
134
135
  }), s;
135
136
  }
136
- }, E = () => {
137
+ }, x = () => {
137
138
  const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
138
139
  return {
139
140
  currentCode: e.currentCode ?? "",
@@ -141,10 +142,10 @@ const N = I, A = () => {
141
142
  tabMap: e.tabMap ?? {},
142
143
  preTab: e.preTab ?? {}
143
144
  };
144
- }, z = () => {
145
+ }, E = () => {
145
146
  const e = u(), t = sessionStorage.getItem("minioAddress");
146
147
  return t || (e.baseURL ? e.baseURL : location.origin);
147
- }, x = () => ({
148
+ }, z = () => ({
148
149
  instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
149
150
  }), F = () => localStorage.getItem("fav-icon") || "./logo.svg";
150
151
  N() || S();
@@ -152,20 +153,20 @@ var i;
152
153
  (i = C()) != null && i.id || y();
153
154
  export {
154
155
  F as getFavIcon,
155
- f as getHomeInfo,
156
- x as getInstanceInfo,
156
+ v as getHomeInfo,
157
+ z as getInstanceInfo,
157
158
  M as getLanguages,
158
159
  U as getMenus,
159
- z as getMinioAddress,
160
+ E as getMinioAddress,
160
161
  j as getPageAuth,
161
162
  D as getPageAuthBtn,
162
163
  k as getPersonalConfig,
163
164
  J as getPersonalInfo,
164
165
  C as getProjectInfo,
165
- v as getProjectMessage,
166
+ f as getProjectMessage,
166
167
  m as getSubApps,
167
- E as getTabInfo,
168
+ x as getTabInfo,
168
169
  O as getTenantInfo,
169
170
  N as getToken,
170
- A as getUserInfo
171
+ T as getUserInfo
171
172
  };
Binary file
@@ -188,6 +188,8 @@ export interface SubAppsInfo {
188
188
  currentSubAppCode: string
189
189
  /** 当前打开的应用 */
190
190
  subAppList: any[]
191
+ /** 常用应用 */
192
+ fixedApps: any[]
191
193
  /** 当前菜单折叠的应用key集合 */
192
194
  menuCollapses: any[]
193
195
  }
@@ -9,7 +9,7 @@ export declare const isRelativeOrSameDomain: (url: string) => boolean;
9
9
  * @param url
10
10
  * @returns
11
11
  */
12
- export declare const setShowLayout: (url: string) => string;
12
+ export declare const setShowLayout: (url: string) => any;
13
13
  export declare const setShowWatermark: (url: string) => string;
14
14
  /**
15
15
  * url携带token
@@ -1,19 +1,26 @@
1
- import { getToken as s } from "@das-fed/utils/common-info";
2
- const o = (e) => !!(!e.startsWith("http") || e.startsWith(location.origin)), n = (e) => {
3
- if (!e) return "";
4
- let t = e;
5
- return o(e) && !e.includes("showLayout=false") && (t = e.indexOf("?") !== -1 ? e + "&showLayout=false" : e + "?showLayout=false"), t;
6
- }, i = (e) => {
7
- if (!e) return "";
8
- let t = "";
9
- return o(e) && !e.includes("showWatermark=false") ? t = e.indexOf("?") !== -1 ? e + "&showWatermark=false" : e + "?showWatermark=false" : t = e, t;
10
- }, r = (e) => {
11
- const t = s();
12
- return e.includes("?") ? `${e}&token=${t}` : `${e}?token=${t}`;
1
+ import { getToken as n } from "@das-fed/utils/common-info";
2
+ const o = (t) => {
3
+ try {
4
+ return new URL(t, location.origin).origin === location.origin;
5
+ } catch {
6
+ return !0;
7
+ }
8
+ }, r = (t) => {
9
+ if (!t) return "";
10
+ if (!o(t)) return t;
11
+ const e = new URL(t, location.origin);
12
+ return e.searchParams.has("showLayout") || e.searchParams.set("showLayout", "false"), e.toString();
13
+ }, s = (t) => {
14
+ if (!t) return "";
15
+ let e = "";
16
+ return o(t) && !t.includes("showWatermark=false") ? e = t.indexOf("?") !== -1 ? t + "&showWatermark=false" : t + "?showWatermark=false" : e = t, e;
17
+ }, i = (t) => {
18
+ const e = n();
19
+ return t.includes("?") ? `${t}&token=${e}` : `${t}?token=${e}`;
13
20
  };
14
21
  export {
15
22
  o as isRelativeOrSameDomain,
16
- n as setShowLayout,
17
- i as setShowWatermark,
18
- r as withToken
23
+ r as setShowLayout,
24
+ s as setShowWatermark,
25
+ i as withToken
19
26
  };
@@ -1,9 +1,9 @@
1
1
  declare const getQuery: (name: any) => any;
2
- declare const real_uri: any;
2
+ declare const real_uri: string;
3
3
  declare const getTokenParams: any;
4
4
  declare const getTokenFromCode: () => unknown;
5
5
  declare const getToken: (config: any) => unknown;
6
- declare const login: (params: any) => any;
6
+ declare const login: (_params: any) => any;
7
7
  declare const tokenStorage: () => {
8
8
  getData: () => {
9
9
  accessToken: any;