@das-fed/utils 1.0.8 → 6.3.0-beta.0

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 (105) hide show
  1. package/api-services/index.d.ts +2 -1
  2. package/api-services/index.js +3 -2
  3. package/api-services/modules/app-manage.js +1 -1
  4. package/api-services/modules/authentication.js +1 -1
  5. package/api-services/modules/bems.js +1 -1
  6. package/api-services/modules/contract.js +1 -1
  7. package/api-services/modules/duty-manage.js +1 -1
  8. package/api-services/modules/enterpriseright.js +1 -1
  9. package/api-services/modules/file.d.ts +1 -1
  10. package/api-services/modules/file.js +355 -342
  11. package/api-services/modules/gateway-edge.js +1 -1
  12. package/api-services/modules/index.d.ts +21 -21
  13. package/api-services/modules/index.js +57 -558
  14. package/api-services/modules/iot.js +1 -1
  15. package/api-services/modules/justauth.js +1 -1
  16. package/api-services/modules/knowledge.js +1 -1
  17. package/api-services/modules/link.js +1 -1
  18. package/api-services/modules/permission.js +1 -1
  19. package/api-services/modules/platformManage.js +1 -1
  20. package/api-services/modules/portal.js +1 -1
  21. package/api-services/modules/space-manage.js +1 -1
  22. package/api-services/modules/super-admin.js +1 -1
  23. package/api-services/modules/supplier.js +1 -1
  24. package/api-services/modules/supplychain-manage.js +1 -1
  25. package/api-services/modules/systemConfiguration.js +1 -1
  26. package/api-services/modules/tool.js +1 -1
  27. package/api-services/src/create-service.d.ts +1 -1
  28. package/api-services/src/create-service.js +2 -3234
  29. package/common-info/{setInfoFromUrl.d.ts → getInfoFromUrl.d.ts} +1 -1
  30. package/common-info/{setInfoFromUrl.js → getInfoFromUrl.js} +26 -29
  31. package/common-info/index.d.ts +18 -7
  32. package/common-info/index.js +82 -143
  33. package/{api-services/src/sso.js → common-info/set-personal-info.js} +754 -667
  34. package/common-tools/get-url-params.d.ts +21 -8
  35. package/common-tools/get-url-params.js +26 -15
  36. package/common-tools/index.d.ts +3 -0
  37. package/common-tools/index.js +3 -0
  38. package/common-tools/obj-tools.d.ts +1 -1
  39. package/common-tools/platform-tools.d.ts +18 -0
  40. package/common-tools/platform-tools.js +15 -0
  41. package/common-tools/queue-promise.d.ts +6 -0
  42. package/common-tools/queue-promise.js +9 -0
  43. package/common-tools/setHtmlMinWH.js +8 -4
  44. package/common-tools/update-fav-icon.d.ts +10 -0
  45. package/common-tools/update-fav-icon.js +22 -0
  46. package/create-api-service/index.d.ts +1 -0
  47. package/create-api-service/index.js +3492 -0
  48. package/create-api-service/proxy-sso.d.ts +3 -0
  49. package/create-api-service/proxy-sso.js +21 -0
  50. package/create-api-service/sso.d.ts +23 -0
  51. package/create-api-service/sso.js +1969 -0
  52. package/curring-http/index.d.ts +3 -2
  53. package/curring-http/index.js +2872 -2662
  54. package/dimple-canvas/index.d.ts +1 -0
  55. package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.d.ts +1 -0
  56. package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.js +2244 -2265
  57. package/dimple-canvas/use-dimple-canvas/core/konva/index.d.ts +4 -3
  58. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.d.ts +2 -1
  59. package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.d.ts +2 -1
  60. package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.d.ts +2 -1
  61. package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.d.ts +2 -1
  62. package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.js +1079 -1051
  63. package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.d.ts +2 -1
  64. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.d.ts +3 -2
  65. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.d.ts +2 -1
  66. package/dimple-canvas/use-dimple-canvas/index.d.ts +2 -1
  67. package/directive/auth.js +21 -21
  68. package/directive/clickOutside.d.ts +3 -2
  69. package/directive/hoverInside.d.ts +2 -1
  70. package/dom-check-in/index.js +5 -5
  71. package/hooks/popup-manager/use-zindex.js +8 -8
  72. package/hooks/use-get-auth/apis.d.ts +4 -0
  73. package/hooks/use-get-auth/apis.js +8 -0
  74. package/hooks/use-get-auth/index.d.ts +9 -0
  75. package/hooks/use-get-auth/index.js +57 -0
  76. package/nextTiken/index.d.ts +3 -4
  77. package/nextTiken/index.js +34 -46
  78. package/package.json +5 -4
  79. package/pinyin-first-character/index.js +19792 -20877
  80. package/process-engine-info/index.d.ts +5 -2
  81. package/process-engine-info/index.js +11 -6
  82. package/style/index.js +1 -1
  83. package/style/style.d.ts +2 -1
  84. package/style/style.js +1 -1
  85. package/token-tools/index.d.ts +10 -7
  86. package/token-tools/index.js +44 -59
  87. package/use-low-code/index.d.ts +1 -0
  88. package/use-low-code/index.js +70 -0
  89. package/use-low-code/low-code-iframe.vue.d.ts +2 -0
  90. package/use-low-code/style.css +1 -0
  91. package/webSocket-service/index.d.ts +2 -1
  92. package/with-install/index.d.ts +2 -1
  93. package/api-services/src/sso.d.ts +0 -29
  94. package/api-services/src/util.d.ts +0 -1
  95. package/api-services/src/util.js +0 -1466
  96. package/common-tools/throttled.d.ts +0 -7
  97. package/common-tools/throttled.js +0 -10
  98. package/micro-app/globalData.d.ts +0 -3
  99. package/micro-app/globalData.js +0 -11
  100. package/micro-app/index.d.ts +0 -5
  101. package/micro-app/index.js +0 -3699
  102. package/panel/index.d.ts +0 -31
  103. package/panel/index.js +0 -37
  104. package/set-personal-info/index.js +0 -1468
  105. /package/{set-personal-info/index.d.ts → common-info/set-personal-info.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 从url获取token
3
3
  */
4
- export declare const getUrlToken: () => void;
4
+ export declare const getTokenFromQuery: () => void;
5
5
  /**
6
6
  * 从url上获取project
7
7
  */
@@ -1,13 +1,13 @@
1
1
  /*! js-cookie v3.0.5 | MIT */
2
- function a(e) {
2
+ function p(e) {
3
3
  for (var n = 1; n < arguments.length; n++) {
4
- var r = arguments[n];
5
- for (var i in r)
6
- e[i] = r[i];
4
+ var t = arguments[n];
5
+ for (var i in t)
6
+ e[i] = t[i];
7
7
  }
8
8
  return e;
9
9
  }
10
- var I = {
10
+ var u = {
11
11
  read: function(e) {
12
12
  return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
13
13
  },
@@ -19,47 +19,47 @@ var I = {
19
19
  }
20
20
  };
21
21
  function g(e, n) {
22
- function r(o, f, t) {
22
+ function t(o, f, r) {
23
23
  if (!(typeof document > "u")) {
24
- t = a({}, n, t), typeof t.expires == "number" && (t.expires = new Date(Date.now() + t.expires * 864e5)), t.expires && (t.expires = t.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
24
+ r = p({}, n, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
25
25
  var c = "";
26
- for (var s in t)
27
- t[s] && (c += "; " + s, t[s] !== !0 && (c += "=" + t[s].split(";")[0]));
26
+ for (var s in r)
27
+ r[s] && (c += "; " + s, r[s] !== !0 && (c += "=" + r[s].split(";")[0]));
28
28
  return document.cookie = o + "=" + e.write(f, o) + c;
29
29
  }
30
30
  }
31
31
  function i(o) {
32
32
  if (!(typeof document > "u" || arguments.length && !o)) {
33
- for (var f = document.cookie ? document.cookie.split("; ") : [], t = {}, c = 0; c < f.length; c++) {
34
- var s = f[c].split("="), u = s.slice(1).join("=");
33
+ for (var f = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < f.length; c++) {
34
+ var s = f[c].split("="), d = s.slice(1).join("=");
35
35
  try {
36
- var p = decodeURIComponent(s[0]);
37
- if (t[p] = e.read(u, p), o === p)
36
+ var a = decodeURIComponent(s[0]);
37
+ if (r[a] = e.read(d, a), o === a)
38
38
  break;
39
39
  } catch {
40
40
  }
41
41
  }
42
- return o ? t[o] : t;
42
+ return o ? r[o] : r;
43
43
  }
44
44
  }
45
45
  return Object.create(
46
46
  {
47
- set: r,
47
+ set: t,
48
48
  get: i,
49
49
  remove: function(o, f) {
50
- r(
50
+ t(
51
51
  o,
52
52
  "",
53
- a({}, f, {
53
+ p({}, f, {
54
54
  expires: -1
55
55
  })
56
56
  );
57
57
  },
58
58
  withAttributes: function(o) {
59
- return g(this.converter, a({}, this.attributes, o));
59
+ return g(this.converter, p({}, this.attributes, o));
60
60
  },
61
61
  withConverter: function(o) {
62
- return g(a({}, this.converter, o), this.attributes);
62
+ return g(p({}, this.converter, o), this.attributes);
63
63
  }
64
64
  },
65
65
  {
@@ -68,21 +68,18 @@ function g(e, n) {
68
68
  }
69
69
  );
70
70
  }
71
- var d = g(I, { path: "/" });
72
- const h = () => {
71
+ var l = g(u, { path: "/" });
72
+ const m = () => {
73
73
  const e = new URL(location.href).searchParams, n = e.get("token") || e.get("accessToken") || e.get("accesstoken") || "";
74
- if (n) {
75
- const r = JSON.stringify({ access_token: n });
76
- sessionStorage.setItem("accessToken", n), sessionStorage.setItem("tokenInfo", r), d.set("accessToken", n), d.set("accessTokenInfo", r);
77
- }
74
+ n && (console.log("从url上取token:", n), JSON.stringify({ access_token: n }), l.set("accessToken", n));
78
75
  }, v = () => {
79
- const e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}"), n = new URL(location.href).searchParams, r = n.get("project") || n.get("projectId") || "";
80
- if (!r)
76
+ const e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}"), n = new URL(location.href).searchParams, t = n.get("project") || n.get("projectId") || "";
77
+ if (!t)
81
78
  return;
82
79
  const i = n.get("projectParent") || n.get("projectParentId") || (e == null ? void 0 : e.parentId) || "", o = n.get("projectName") || (e == null ? void 0 : e.name) || "";
83
- sessionStorage.setItem("project", r), sessionStorage.setItem("projectInfo", JSON.stringify({ ...e, id: r, name: o, parentId: i }));
80
+ console.log("从url上取project:", t), sessionStorage.setItem("project", t), sessionStorage.setItem("projectInfo", JSON.stringify({ ...e, id: t, name: o, parentId: i }));
84
81
  };
85
82
  export {
86
83
  v as getProjectInfoFromQuery,
87
- h as getUrlToken
84
+ m as getTokenFromQuery
88
85
  };
@@ -1,7 +1,8 @@
1
- import type { UserInfo, PersonalInfo, TenantInfo, ProjectInfo, SubAppsInfo, TabInfo, permissionBtnInfo } from './type';
1
+ import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, ProjectInfo, SubAppsInfo, TabInfo, permissionBtnInfo } from './type';
2
+
2
3
  /** 获取token */
3
- export declare const getToken: () => string;
4
- /** 获取token详情 */
4
+ export declare const getToken: any;
5
+ /** 获取账户详情 */
5
6
  export declare const getUserInfo: () => UserInfo;
6
7
  /** 获取用户详情 */
7
8
  export declare const getPersonalInfo: () => PersonalInfo;
@@ -12,6 +13,8 @@ export declare const getTenantInfo: () => TenantInfo;
12
13
  * @returns 项目信息
13
14
  */
14
15
  export declare const getProjectInfo: () => ProjectInfo;
16
+ /** 获取首页信息 */
17
+ export declare const getHomeInfo: () => HomeInfo;
15
18
  /**
16
19
  * 可用于判断菜单或者按钮权限
17
20
  * @param menuCode 菜单编码
@@ -27,16 +30,24 @@ export declare const getPageAuth: (menuCode?: string, applicationCode?: string)
27
30
  */
28
31
  export declare const getPageAuthBtn: (menuCode?: string, applicationCode?: string) => permissionBtnInfo;
29
32
  /**
30
- * 获取应用信息(独立打开子应用不可用)
33
+ * 获取应用信息
31
34
  * @returns 应用信息
32
35
  */
33
36
  export declare const getSubApps: () => SubAppsInfo;
34
37
  /**
35
- * 获取菜单
38
+ * 获取指定应用的菜单数据;支持不传入appCode获取所有菜单
36
39
  * @param appCode 应用编码
40
+ * @param origin 是否获取原始菜单数据
41
+ * @returns
37
42
  */
38
- export declare const getMenus: (appCode?: string) => any;
39
- /** 获取tabs标签页信息 */
43
+ export declare const getMenus: (appCode?: string, origin?: boolean) => any;
44
+ /** 获取tabs标签页 */
40
45
  export declare const getTabInfo: () => TabInfo;
41
46
  /** 获取minio地址 */
42
47
  export declare const getMinioAddress: () => any;
48
+ /** 获取iot instanceinfo */
49
+ export declare const getInstanceInfo: () => {
50
+ instanceInfo: any;
51
+ };
52
+ /** 获取favIcon */
53
+ export declare const getFavIcon: () => string;
@@ -1,92 +1,20 @@
1
- import { tokenStorage as l } from "@das-fed/utils/api-services/src/sso";
2
- import { getConfig as f } from "@das-fed/utils/config";
3
- import { getUrlParams as d } from "@das-fed/utils/common-tools";
4
- import { getUrlToken as m, getProjectInfoFromQuery as S } from "@das-fed/utils/common-info/setInfoFromUrl";
5
- /*! js-cookie v3.0.5 | MIT */
6
- function g(e) {
7
- for (var n = 1; n < arguments.length; n++) {
8
- var r = arguments[n];
9
- for (var s in r)
10
- e[s] = r[s];
11
- }
12
- return e;
13
- }
14
- var b = {
15
- read: function(e) {
16
- return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
17
- },
18
- write: function(e) {
19
- return encodeURIComponent(e).replace(
20
- /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
21
- decodeURIComponent
22
- );
23
- }
24
- };
25
- function I(e, n) {
26
- function r(o, a, t) {
27
- if (!(typeof document > "u")) {
28
- t = g({}, n, t), typeof t.expires == "number" && (t.expires = new Date(Date.now() + t.expires * 864e5)), t.expires && (t.expires = t.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
29
- var i = "";
30
- for (var c in t)
31
- t[c] && (i += "; " + c, t[c] !== !0 && (i += "=" + t[c].split(";")[0]));
32
- return document.cookie = o + "=" + e.write(a, o) + i;
33
- }
34
- }
35
- function s(o) {
36
- if (!(typeof document > "u" || arguments.length && !o)) {
37
- for (var a = document.cookie ? document.cookie.split("; ") : [], t = {}, i = 0; i < a.length; i++) {
38
- var c = a[i].split("="), p = c.slice(1).join("=");
39
- try {
40
- var u = decodeURIComponent(c[0]);
41
- if (t[u] = e.read(p, u), o === u)
42
- break;
43
- } catch {
44
- }
45
- }
46
- return o ? t[o] : t;
47
- }
48
- }
49
- return Object.create(
50
- {
51
- set: r,
52
- get: s,
53
- remove: function(o, a) {
54
- r(
55
- o,
56
- "",
57
- g({}, a, {
58
- expires: -1
59
- })
60
- );
61
- },
62
- withAttributes: function(o) {
63
- return I(this.converter, g({}, this.attributes, o));
64
- },
65
- withConverter: function(o) {
66
- return I(g({}, this.converter, o), this.attributes);
67
- }
68
- },
69
- {
70
- attributes: { value: Object.freeze(n) },
71
- converter: { value: Object.freeze(e) }
72
- }
73
- );
74
- }
75
- var A = I(b, { path: "/" });
76
- const h = () => A.get("accessToken") ?? "", w = () => {
77
- var s;
78
- let e = (s = l().getData()) == null ? void 0 : s.info;
79
- const n = f();
80
- return JSON.stringify(e) === "{}" && n.userInfo && (e = n.userInfo), {
81
- id: e.sub ?? "",
82
- name: e.name ?? "",
83
- flag: e.flag,
84
- tenantId: (e == null ? void 0 : e.tenant) ?? (e == null ? void 0 : e.tenantId) ?? ""
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, C = () => {
6
+ var n;
7
+ let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
8
+ return {
9
+ id: e.id ?? "",
10
+ name: e.userName ?? "",
11
+ flag: e.flag ?? null,
12
+ tenantId: ((n = e == null ? void 0 : e.tenant) == null ? void 0 : n.id) ?? ""
85
13
  };
86
- }, J = () => {
14
+ }, P = () => {
87
15
  let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
88
- const n = f();
89
- return JSON.stringify(e) === "{}" && n.personalInfo && (e = n.personalInfo), {
16
+ const t = i();
17
+ return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
90
18
  id: e.id ?? "",
91
19
  name: e.name ?? "",
92
20
  phone: e.phone ?? "",
@@ -94,7 +22,7 @@ const h = () => A.get("accessToken") ?? "", w = () => {
94
22
  email: e.email ?? "",
95
23
  headPicture: e.headPicture ?? ""
96
24
  };
97
- }, j = () => {
25
+ }, y = () => {
98
26
  let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
99
27
  return {
100
28
  userId: e.id ?? "",
@@ -105,74 +33,85 @@ const h = () => A.get("accessToken") ?? "", w = () => {
105
33
  flag: e.flag ?? null,
106
34
  tenant: e.tenant ?? {}
107
35
  };
108
- }, R = () => {
36
+ }, b = () => {
109
37
  let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
110
- const n = f();
111
- return JSON.stringify(e) === "{}" && n.projectInfo && (e = n.projectInfo), {
112
- id: (e == null ? void 0 : e.id) ?? "",
38
+ const t = i();
39
+ return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
40
+ id: (e == null ? void 0 : e.id) ?? 0,
113
41
  parentId: (e == null ? void 0 : e.parentId) ?? "",
114
42
  name: (e == null ? void 0 : e.name) ?? "",
115
43
  tenantId: (e == null ? void 0 : e.tenant) ?? ""
116
44
  };
117
- }, _ = (e, n) => {
118
- const r = "permission-btn", s = f(), o = v(), a = d(location.href, "app") || "", t = n || a || (window.__IN_MICRO_APP__ ? o.currentSubAppCode : s.title);
119
- if (!t)
45
+ }, M = () => {
46
+ const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
47
+ return {
48
+ applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
49
+ applicationPath: (e == null ? void 0 : e.applicationPath) ?? "",
50
+ enable: (e == null ? void 0 : e.enable) ?? !1,
51
+ originalCode: (e == null ? void 0 : e.originalCode) ?? "",
52
+ routeUrl: (e == null ? void 0 : e.routeUrl) ?? "",
53
+ type: (e == null ? void 0 : e.type) ?? null
54
+ };
55
+ }, h = (e, t) => {
56
+ const n = "permission-btn", s = f(), a = p(location.href, "app") || "", o = t || a || s.currentSubAppCode;
57
+ if (!o)
120
58
  return;
121
- const i = d(location.href, "menu") || "", c = e || i || (window.__IN_MICRO_APP__ ? o.currentSubApp.currentMenuCode : JSON.parse(sessionStorage.getItem(`${s.title}-tabs`) || "{}").currentTab.code), p = JSON.parse(sessionStorage.getItem(r) || "{}");
122
- if (!p || JSON.stringify(p) === "{}")
59
+ const r = p(location.href, "menu") || "", g = e || r || s.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(n) || "{}");
60
+ if (!c || JSON.stringify(c) === "{}")
123
61
  return;
124
- const u = p[t][c];
125
- return u && u.length ? u : p[t]["origin-auth"] ? p[t]["origin-auth"][c] ?? [] : [];
126
- }, U = (e, n) => _(e, n) ?? [], v = () => {
127
- var s;
128
- if (!window.__IN_MICRO_APP__)
129
- return {};
130
- const e = JSON.parse(sessionStorage.getItem("subApps") || "{}"), n = ((s = e.appcategorys) == null ? void 0 : s.map((o) => o.apps).flat()) ?? [];
62
+ const u = c[o][g];
63
+ return u && u.length ? u : c[o]["origin-auth"] ? c[o]["origin-auth"][g] ?? [] : [];
64
+ }, T = (e, t) => h(e, t) ?? [], f = () => {
65
+ const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
131
66
  return {
132
67
  appcategorys: e.appcategorys ?? [],
133
68
  currentSubApp: e.currentSubApp ?? {},
134
69
  currentSubAppCode: e.currentSubAppCode ?? "",
135
- flatSubAppList: n,
136
70
  subAppList: e.subAppList ?? []
137
71
  };
138
- }, M = (e) => {
139
- const n = JSON.parse(sessionStorage.getItem("menus") || "{}");
140
- return e ? n[e] ?? [] : n;
141
- }, T = () => {
142
- const e = f();
143
- let n = {};
144
- if (window.__IN_MICRO_APP__) {
145
- const r = JSON.parse(sessionStorage.getItem("tabs") || "{}");
146
- n = {
147
- activeKey: r.activeKey ?? "",
148
- currentTab: r.currentTab ?? {},
149
- tabMap: r.tabMap ?? {}
150
- };
151
- } else {
152
- const r = JSON.parse(sessionStorage.getItem(`${e.title}-tabs`) || "{}");
153
- n = {
154
- activeKey: r.activeKey ?? "",
155
- currentTab: r.currentTab ?? {},
156
- tabList: r.tabList ?? []
157
- };
72
+ }, j = (e, t = !1) => {
73
+ var s, a;
74
+ const n = f().subAppList;
75
+ if (e)
76
+ 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) ?? [];
77
+ {
78
+ let o = {};
79
+ return t ? n == null || n.forEach((r) => {
80
+ o[r.code] = r.originalMenus ?? [];
81
+ }) : n == null || n.forEach((r) => {
82
+ o[r.code] = r.menus ?? [];
83
+ }), o;
158
84
  }
159
- return n;
160
- }, k = () => {
161
- const e = f(), n = sessionStorage.getItem("minioAddress");
162
- return n || (e.baseURL ? e.baseURL : location.origin);
163
- };
164
- h() || m();
165
- S();
85
+ }, v = () => {
86
+ const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
87
+ return {
88
+ currentCode: e.currentCode ?? "",
89
+ currentTab: e.currentTab ?? {},
90
+ tabMap: e.tabMap ?? {},
91
+ preTab: e.preTab ?? {}
92
+ };
93
+ }, U = () => {
94
+ const e = i(), t = sessionStorage.getItem("minioAddress");
95
+ return t || (e.baseURL ? e.baseURL : location.origin);
96
+ }, k = () => ({
97
+ instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
98
+ }), E = () => localStorage.getItem("fav-icon") || "";
99
+ S() || m();
100
+ var l;
101
+ (l = b()) != null && l.id || d();
166
102
  export {
167
- M as getMenus,
168
- k as getMinioAddress,
169
- _ as getPageAuth,
170
- U as getPageAuthBtn,
171
- J as getPersonalInfo,
172
- R as getProjectInfo,
173
- v as getSubApps,
174
- T as getTabInfo,
175
- j as getTenantInfo,
176
- h as getToken,
177
- w as getUserInfo
103
+ E as getFavIcon,
104
+ M as getHomeInfo,
105
+ k as getInstanceInfo,
106
+ j as getMenus,
107
+ U as getMinioAddress,
108
+ h as getPageAuth,
109
+ T as getPageAuthBtn,
110
+ P as getPersonalInfo,
111
+ b as getProjectInfo,
112
+ f as getSubApps,
113
+ v as getTabInfo,
114
+ y as getTenantInfo,
115
+ S as getToken,
116
+ C as getUserInfo
178
117
  };