@das-fed/utils 6.4.0-hot.6 → 6.4.0-hot.60

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 (111) 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 +2140 -1632
  5. package/api-services/index.js.gz +0 -0
  6. package/api-services/modules/app-manage/index.js +2314 -1818
  7. package/api-services/modules/app-manage/index.js.gz +0 -0
  8. package/api-services/modules/authentication/index.js +2314 -1818
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/index.js +2317 -1821
  11. package/api-services/modules/bems/index.js.gz +0 -0
  12. package/api-services/modules/contract/index.js +2314 -1818
  13. package/api-services/modules/contract/index.js.gz +0 -0
  14. package/api-services/modules/duty-manage/index.js +2305 -1809
  15. package/api-services/modules/duty-manage/index.js.gz +0 -0
  16. package/api-services/modules/enterpriseright/index.js +2314 -1818
  17. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  18. package/api-services/modules/file/index.d.ts +1 -0
  19. package/api-services/modules/file/index.js +3446 -158
  20. package/api-services/modules/file/index.js.gz +0 -0
  21. package/api-services/modules/gateway-edge/index.js +2314 -1818
  22. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  23. package/api-services/modules/index.js +2164 -1663
  24. package/api-services/modules/index.js.gz +0 -0
  25. package/api-services/modules/iot/index.d.ts +1 -0
  26. package/api-services/modules/iot/index.js +2287 -1790
  27. package/api-services/modules/iot/index.js.gz +0 -0
  28. package/api-services/modules/justauth/index.js +2302 -1806
  29. package/api-services/modules/justauth/index.js.gz +0 -0
  30. package/api-services/modules/knowledge/index.js +2314 -1818
  31. package/api-services/modules/knowledge/index.js.gz +0 -0
  32. package/api-services/modules/link/index.js +2314 -1818
  33. package/api-services/modules/link/index.js.gz +0 -0
  34. package/api-services/modules/permission/index.js +2314 -1818
  35. package/api-services/modules/permission/index.js.gz +0 -0
  36. package/api-services/modules/platformManage/index.js +2321 -1825
  37. package/api-services/modules/platformManage/index.js.gz +0 -0
  38. package/api-services/modules/portal/index.js +2349 -1871
  39. package/api-services/modules/portal/index.js.gz +0 -0
  40. package/api-services/modules/space-manage/index.js +2314 -1818
  41. package/api-services/modules/space-manage/index.js.gz +0 -0
  42. package/api-services/modules/super-admin/index.js +2304 -1808
  43. package/api-services/modules/super-admin/index.js.gz +0 -0
  44. package/api-services/modules/supplier/index.js +2303 -1807
  45. package/api-services/modules/supplier/index.js.gz +0 -0
  46. package/api-services/modules/supplychain-manage/index.js +2349 -1871
  47. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  48. package/api-services/modules/systemConfiguration/index.js +2295 -1817
  49. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  50. package/api-services/modules/tool/index.js +2314 -1818
  51. package/api-services/modules/tool/index.js.gz +0 -0
  52. package/api-services/src/create-service/index.js +2300 -1804
  53. package/api-services/src/create-service/index.js.gz +0 -0
  54. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  55. package/common-info/index.d.ts +11 -3
  56. package/common-info/index.js +112 -56
  57. package/common-info/index.js.gz +0 -0
  58. package/common-info/set-personal-info/index.js +893 -604
  59. package/common-info/set-personal-info/index.js.gz +0 -0
  60. package/common-info/type.d.ts +218 -104
  61. package/common-tools/calc-text-width/index.d.ts +1 -0
  62. package/common-tools/calc-text-width/index.js +10 -0
  63. package/common-tools/extract-file-name/index.d.ts +1 -0
  64. package/common-tools/extract-file-name/index.js +1731 -0
  65. package/common-tools/extract-file-name/index.js.gz +0 -0
  66. package/common-tools/get-file-extension/index.d.ts +6 -0
  67. package/common-tools/get-file-extension/index.js +7 -0
  68. package/common-tools/get-url-params/index.d.ts +1 -1
  69. package/common-tools/get-url-params/index.js.gz +0 -0
  70. package/common-tools/index.d.ts +4 -0
  71. package/common-tools/index.js +4 -0
  72. package/common-tools/nest-tree-format/index.d.ts +1 -1
  73. package/common-tools/nest-tree-format/index.js +15 -15
  74. package/common-tools/setHtmlMinWH/index.js +4 -8
  75. package/common-tools/update-browser-title/index.d.ts +1 -0
  76. package/common-tools/update-browser-title/index.js +12 -0
  77. package/create-api-service/i18n/index.d.ts +33 -0
  78. package/create-api-service/i18n/index.js +15 -0
  79. package/create-api-service/index.d.ts +3 -1
  80. package/create-api-service/index.js +2349 -1871
  81. package/create-api-service/index.js.gz +0 -0
  82. package/create-api-service/sso/index.d.ts +0 -2
  83. package/create-api-service/sso/index.js +1243 -854
  84. package/create-api-service/sso/index.js.gz +0 -0
  85. package/curring-http/index.js +1436 -1153
  86. package/curring-http/index.js.gz +0 -0
  87. package/curring-http/type.d.ts +87 -87
  88. package/directive/auth/index.js.gz +0 -0
  89. package/directive/hoverInside/index.d.ts +1 -1
  90. package/dom-check-in/index.js +2 -2
  91. package/dom-watcher/index.d.ts +1 -1
  92. package/esm-map.json +9 -2
  93. package/hooks/use-get-auth/index.d.ts +1 -1
  94. package/hooks/use-get-auth/index.js +30 -30
  95. package/hooks/use-get-auth/index.js.gz +0 -0
  96. package/nextTiken/index.js.gz +0 -0
  97. package/package.json +4 -3
  98. package/pinyin-first-character/index.js +19804 -20879
  99. package/pinyin-first-character/index.js.gz +0 -0
  100. package/style/index.js +4 -2
  101. package/style/index.js.gz +0 -0
  102. package/style/math.d.ts +4 -4
  103. package/token-tools/index.d.ts +6 -6
  104. package/token-tools/index.js +8 -84
  105. package/use-low-code/index.js +13 -13
  106. package/use-low-code/index.js.gz +0 -0
  107. package/use-low-code/style.css +1 -1
  108. package/vue/hooks/use-model-value/index.d.ts +5 -1
  109. package/webSocket-service/index.js.gz +0 -0
  110. package/webSocket-service/type.d.ts +28 -28
  111. package/token-tools/index.js.gz +0 -0
@@ -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;
@@ -8,20 +8,28 @@ export declare const getUserInfo: () => UserInfo;
8
8
  export declare const getPersonalInfo: () => PersonalInfo;
9
9
  /** 获取当前租户详情 */
10
10
  export declare const getTenantInfo: () => TenantInfo;
11
+ /** 获取当前租户设置了多少个语言类型 */
12
+ export declare const getLanguages: () => any;
11
13
  /**
12
14
  * 获取项目信息
13
15
  * @returns 项目信息
14
16
  */
15
17
  export declare const getProjectInfo: () => ProjectInfo;
18
+ /**
19
+ * 获取项目信息
20
+ * @returns 项目信息
21
+ */
22
+ export declare const getProjectMessage: () => ProjectMessage;
16
23
  /** 获取首页信息 */
17
24
  export declare const getHomeInfo: () => HomeInfo;
25
+ export declare const getPersonalConfig: () => PersonalConfigInfo;
18
26
  /**
19
27
  * 可用于判断菜单或者按钮权限
20
28
  * @param menuCode 菜单编码
21
29
  * @param applicationCode 应用编码
22
- * @returns undefined(无菜单权限);空数组(无按钮权限)
30
+ * @returns 无菜单权限返回undefined,有菜单权限但是没有任何按钮权限返回空数组
23
31
  */
24
- export declare const getPageAuth: (menuCode?: string, applicationCode?: string) => any;
32
+ export declare const getPageAuth: (menuCode?: string, applicationCode?: string) => undefined | any[];
25
33
  /**
26
34
  * 获取指定菜单的按钮权限数据
27
35
  * @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, C = () => {
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
+ }, M = () => sessionStorage.getItem("languages"), 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
62
+ };
63
+ }, v = () => {
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) ?? {}
44
87
  };
45
- }, M = () => {
88
+ }, f = () => {
46
89
  const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
47
90
  return {
48
91
  applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
@@ -50,37 +93,47 @@ const S = I, C = () => {
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
+ }, k = () => {
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
+ }, D = (e, t) => j(e, t) ?? [], m = () => {
63
115
  const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
64
116
  return {
65
117
  appcategorys: e.appcategorys ?? [],
66
118
  currentSubApp: e.currentSubApp ?? {},
67
119
  currentSubAppCode: e.currentSubAppCode ?? "",
68
- subAppList: e.subAppList ?? []
120
+ subAppList: e.subAppList ?? [],
121
+ menuCollapses: e.menuCollapses ?? []
69
122
  };
70
- }, j = (e, t = !1) => {
71
- var s, a;
72
- const n = f().subAppList;
123
+ }, U = (e, t = !1) => {
124
+ var a, o;
125
+ const r = m().subAppList;
73
126
  if (e)
74
- 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) ?? [];
75
128
  {
76
- let o = {};
77
- return t ? n == null || n.forEach((r) => {
78
- o[r.code] = r.originalMenus ?? [];
79
- }) : n == null || n.forEach((r) => {
80
- o[r.code] = r.menus ?? [];
81
- }), 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;
82
135
  }
83
- }, v = () => {
136
+ }, E = () => {
84
137
  const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
85
138
  return {
86
139
  currentCode: e.currentCode ?? "",
@@ -88,28 +141,31 @@ const S = I, C = () => {
88
141
  tabMap: e.tabMap ?? {},
89
142
  preTab: e.preTab ?? {}
90
143
  };
91
- }, U = () => {
92
- const e = i(), t = sessionStorage.getItem("minioAddress");
144
+ }, z = () => {
145
+ const e = u(), t = sessionStorage.getItem("minioAddress");
93
146
  return t || (e.baseURL ? e.baseURL : location.origin);
94
- }, k = () => ({
147
+ }, x = () => ({
95
148
  instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
96
- }), E = () => localStorage.getItem("fav-icon") || "";
97
- S() || m();
98
- var l;
99
- (l = b()) != null && l.id || d();
149
+ }), F = () => localStorage.getItem("fav-icon") || "./logo.svg";
150
+ N() || S();
151
+ var i;
152
+ (i = C()) != null && i.id || y();
100
153
  export {
101
- E as getFavIcon,
102
- M as getHomeInfo,
103
- k as getInstanceInfo,
104
- j as getMenus,
105
- U as getMinioAddress,
106
- h as getPageAuth,
107
- T as getPageAuthBtn,
108
- P as getPersonalInfo,
109
- b as getProjectInfo,
110
- f as getSubApps,
111
- v as getTabInfo,
112
- y as getTenantInfo,
113
- S as getToken,
114
- C as getUserInfo
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,
168
+ O as getTenantInfo,
169
+ N as getToken,
170
+ A as getUserInfo
115
171
  };
Binary file