@das-fed/utils 7.1.0-dev.9 → 7.1.0-hongfa.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 (72) hide show
  1. package/api-services/index.js +843 -825
  2. package/api-services/index.js.gz +0 -0
  3. package/api-services/modules/app-manage/index.js +544 -527
  4. package/api-services/modules/app-manage/index.js.gz +0 -0
  5. package/api-services/modules/authentication/index.js +844 -827
  6. package/api-services/modules/authentication/index.js.gz +0 -0
  7. package/api-services/modules/bems/index.js +843 -826
  8. package/api-services/modules/bems/index.js.gz +0 -0
  9. package/api-services/modules/contract/index.js +808 -773
  10. package/api-services/modules/contract/index.js.gz +0 -0
  11. package/api-services/modules/duty-manage/index.js +551 -534
  12. package/api-services/modules/duty-manage/index.js.gz +0 -0
  13. package/api-services/modules/enterpriseright/index.js +844 -827
  14. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  15. package/api-services/modules/file/index.js +674 -657
  16. package/api-services/modules/file/index.js.gz +0 -0
  17. package/api-services/modules/gateway-edge/index.js +544 -527
  18. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  19. package/api-services/modules/index.js +914 -896
  20. package/api-services/modules/index.js.gz +0 -0
  21. package/api-services/modules/iot/index.js +547 -530
  22. package/api-services/modules/iot/index.js.gz +0 -0
  23. package/api-services/modules/justauth/index.d.ts +1 -1
  24. package/api-services/modules/justauth/index.js +812 -776
  25. package/api-services/modules/justauth/index.js.gz +0 -0
  26. package/api-services/modules/knowledge/index.js +570 -553
  27. package/api-services/modules/knowledge/index.js.gz +0 -0
  28. package/api-services/modules/link/index.js +798 -799
  29. package/api-services/modules/link/index.js.gz +0 -0
  30. package/api-services/modules/permission/index.js +844 -827
  31. package/api-services/modules/permission/index.js.gz +0 -0
  32. package/api-services/modules/platformManage/index.js +592 -575
  33. package/api-services/modules/platformManage/index.js.gz +0 -0
  34. package/api-services/modules/portal/index.js +544 -527
  35. package/api-services/modules/portal/index.js.gz +0 -0
  36. package/api-services/modules/space-manage/index.js +808 -773
  37. package/api-services/modules/space-manage/index.js.gz +0 -0
  38. package/api-services/modules/super-admin/index.js +851 -834
  39. package/api-services/modules/super-admin/index.js.gz +0 -0
  40. package/api-services/modules/supplier/index.js +787 -788
  41. package/api-services/modules/supplier/index.js.gz +0 -0
  42. package/api-services/modules/supplychain-manage/index.js +1074 -1039
  43. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  44. package/api-services/modules/systemConfiguration/index.js +1074 -1039
  45. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  46. package/api-services/modules/tool/index.js +1074 -1039
  47. package/api-services/modules/tool/index.js.gz +0 -0
  48. package/api-services/src/create-service/index.js +783 -748
  49. package/api-services/src/create-service/index.js.gz +0 -0
  50. package/common-info/index.d.ts +1 -1
  51. package/common-tools/platform-tools/index.d.ts +7 -2
  52. package/common-tools/platform-tools/index.js +27 -15
  53. package/common-tools/platform-tools/index.js.gz +0 -0
  54. package/create-api-service/index.js +543 -526
  55. package/create-api-service/index.js.gz +0 -0
  56. package/create-api-service/sso/authorizer.d.ts +1 -1
  57. package/create-api-service/sso/index.d.ts +12 -17
  58. package/create-api-service/sso/index.js +883 -825
  59. package/create-api-service/sso/index.js.gz +0 -0
  60. package/create-api-service/sso/utils.d.ts +6 -0
  61. package/create-api-service/thirdLogout/index.js +1871 -0
  62. package/create-api-service/thirdLogout/index.js.gz +0 -0
  63. package/create-api-service/thirdLogout/sso/utils.d.ts +8 -0
  64. package/create-api-service/thirdLogout/thirdLogout/index.d.ts +25 -0
  65. package/create-api-service/unauthorized-recovery/index.d.ts +36 -0
  66. package/create-api-service/unauthorized-recovery/index.js +16 -0
  67. package/curring-http/type.d.ts +6 -0
  68. package/esm-map.json +13 -1
  69. package/package.json +4 -4
  70. package/token-tools/index.d.ts +37 -1
  71. package/token-tools/index.js +59 -25
  72. package/token-tools/index.js.gz +0 -0
@@ -1,7 +1,7 @@
1
1
  import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, PersonalConfigInfo, ProjectInfo, ProjectMessage, SubAppsInfo, TabInfo, permissionBtnInfo } from './type';
2
2
 
3
3
  /** 获取token */
4
- export declare const getToken: any;
4
+ export declare const getToken: () => string;
5
5
  /** 获取账户详情 */
6
6
  export declare const getUserInfo: () => UserInfo;
7
7
  /** 获取用户详情 */
@@ -5,12 +5,17 @@
5
5
  */
6
6
  export declare const isRelativeOrSameDomain: (url: string) => boolean;
7
7
  /**
8
- * 自动拼接上showLayout=false参数
8
+ * 自动拼接上showLayout=false 和 ignoreAuth = true
9
9
  * @param url
10
10
  * @returns
11
11
  */
12
12
  export declare const setShowLayout: (url: string) => any;
13
- export declare const setShowWatermark: (url: string) => string;
13
+ /**
14
+ * 设置水印显示参数
15
+ * @param url
16
+ * @returns
17
+ */
18
+ export declare const setShowWatermark: (url: string) => any;
14
19
  /**
15
20
  * url携带token
16
21
  * @param url
@@ -1,26 +1,38 @@
1
- import { getToken as n } from "@das-fed/utils/common-info";
2
- const o = (t) => {
1
+ import { getToken as r } from "@das-fed/utils/common-info";
2
+ const s = (t) => {
3
3
  try {
4
4
  return new URL(t, location.origin).origin === location.origin;
5
5
  } catch {
6
6
  return !0;
7
7
  }
8
- }, r = (t) => {
8
+ }, h = (t) => {
9
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) => {
10
+ if (!s(t)) return t;
11
+ try {
12
+ const e = new URL(t, location.origin);
13
+ return e.searchParams.has("showLayout") || e.searchParams.set("showLayout", "false"), e.searchParams.has("ignoreAuth") || e.searchParams.set("ignoreAuth", "true"), e.toString();
14
+ } catch {
15
+ const e = /([?&])showLayout=/.test(t), a = /([?&])ignoreAuth=/.test(t), o = [];
16
+ if (e || o.push("showLayout=false"), a || o.push("ignoreAuth=true"), o.length === 0) return t;
17
+ const n = t.includes("?") ? "&" : "?";
18
+ return t + n + o.join("&");
19
+ }
20
+ }, c = (t) => {
14
21
  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();
22
+ if (!s(t)) return t;
23
+ try {
24
+ const e = new URL(t, location.origin);
25
+ return e.searchParams.get("showWatermark") !== "false" && e.searchParams.set("showWatermark", "false"), e.toString();
26
+ } catch {
27
+ return t.includes("showWatermark=false") ? t : t.indexOf("?") !== -1 ? t + "&showWatermark=false" : t + "?showWatermark=false";
28
+ }
29
+ }, f = (t) => {
30
+ const e = r();
19
31
  return t.includes("?") ? `${t}&token=${e}` : `${t}?token=${e}`;
20
32
  };
21
33
  export {
22
- o as isRelativeOrSameDomain,
23
- r as setShowLayout,
24
- s as setShowWatermark,
25
- i as withToken
34
+ s as isRelativeOrSameDomain,
35
+ h as setShowLayout,
36
+ c as setShowWatermark,
37
+ f as withToken
26
38
  };