@das-fed/utils 6.3.0-beta.10 → 6.3.0-beta.12
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.
- package/api-services/index.js +2 -2
- package/api-services/modules/app-manage/index.js +1 -1
- package/api-services/modules/authentication/index.js +1 -1
- package/api-services/modules/bems/index.js +1 -1
- package/api-services/modules/contract/index.js +1 -1
- package/api-services/modules/duty-manage/index.js +1 -1
- package/api-services/modules/enterpriseright/index.js +1 -1
- package/api-services/modules/file/index.d.ts +1 -1
- package/api-services/modules/file/index.js +255 -246
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +1 -1
- package/api-services/modules/index.js +21 -21
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +1 -1
- package/api-services/modules/justauth/index.js +1 -1
- package/api-services/modules/knowledge/index.js +1 -1
- package/api-services/modules/link/index.js +1 -1
- package/api-services/modules/permission/index.js +1 -1
- package/api-services/modules/platformManage/index.js +1 -1
- package/api-services/modules/portal/index.js +1 -1
- package/api-services/modules/space-manage/index.js +1 -1
- package/api-services/modules/super-admin/index.js +1 -1
- package/api-services/modules/supplier/index.js +1 -1
- package/api-services/modules/supplychain-manage/index.js +1 -1
- package/api-services/modules/systemConfiguration/index.js +1 -1
- package/api-services/modules/tool/index.js +1 -1
- package/api-services/src/create-service/index.js +1 -1
- package/common-info/getIframeUrl/index.js +1 -1
- package/common-info/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/index.js +4 -4
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.js +591 -565
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-info/type.d.ts +104 -104
- package/common-tools/date-format/index.js +2 -1
- package/common-tools/get-url-params/index.d.ts +1 -1
- package/common-tools/get-url-params/index.js +49 -46
- package/common-tools/get-url-params/index.js.gz +0 -0
- package/common-tools/index.js +10 -10
- package/common-tools/platform-tools/index.js +1 -1
- package/common-tools/update-fav-icon/index.js +3 -3
- package/create-api-service/index.js +1405 -1371
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +739 -714
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +856 -830
- package/curring-http/index.js.gz +0 -0
- package/curring-http/type.d.ts +87 -87
- package/dimple-canvas/index.js +1 -1
- package/directive/auth/index.js +3 -3
- package/directive/auth/index.js.gz +0 -0
- package/directive/clickOutside/index.js +1 -1
- package/directive/hoverInside/index.js +1 -1
- package/directive/index.js +3 -3
- package/hooks/use-get-auth/index.js +4 -4
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/index.js +2 -2
- package/load-js/index.js +1 -1
- package/nextTiken/index.js +1 -1
- package/nextTiken/index.js.gz +0 -0
- package/oss/index.js +1 -1
- package/package.json +5 -3
- package/pinyin-first-character/index.js +142 -132
- package/pinyin-first-character/index.js.gz +0 -0
- package/style/index.js +1 -1
- package/style/index.js.gz +0 -0
- package/token-tools/index.js.gz +0 -0
- package/use-low-code/index.js +12 -12
- package/use-low-code/index.js.gz +0 -0
- package/use-low-code/style.css +1 -1
- package/vue/index.js +1 -1
- package/webSocket-service/index.js +3 -3
- package/webSocket-service/index.js.gz +0 -0
- package/webSocket-service/type.d.ts +28 -28
|
Binary file
|
package/common-info/type.d.ts
CHANGED
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
export interface UserInfo {
|
|
2
|
-
/** 用户id */
|
|
3
|
-
id: string
|
|
4
|
-
/** 用户名称 */
|
|
5
|
-
name: string
|
|
6
|
-
/** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
|
|
7
|
-
flag: number
|
|
8
|
-
/** 租户id */
|
|
9
|
-
tenantId: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface PersonalInfo {
|
|
13
|
-
/** id */
|
|
14
|
-
id: string
|
|
15
|
-
/** 名称 */
|
|
16
|
-
name: string
|
|
17
|
-
/** 手机号 */
|
|
18
|
-
phone: string
|
|
19
|
-
/** 用户名称 */
|
|
20
|
-
userName: string
|
|
21
|
-
/** 邮箱 */
|
|
22
|
-
email: string
|
|
23
|
-
/** 头像 */
|
|
24
|
-
headPicture: string
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface TenantInfo {
|
|
28
|
-
/** 用户ID */
|
|
29
|
-
userId: string
|
|
30
|
-
/** 用户名 */
|
|
31
|
-
userName: string
|
|
32
|
-
name: string
|
|
33
|
-
/** 租户信息 */
|
|
34
|
-
tenant: {
|
|
35
|
-
id: string
|
|
36
|
-
name: string
|
|
37
|
-
adminUserId: string
|
|
38
|
-
description: string
|
|
39
|
-
domain: string
|
|
40
|
-
}
|
|
41
|
-
/** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
|
|
42
|
-
flag: number
|
|
43
|
-
areaCode: string
|
|
44
|
-
/** 手机号 */
|
|
45
|
-
phone: string
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface HomeInfo {
|
|
49
|
-
applicationCode: string
|
|
50
|
-
applicationPath: string
|
|
51
|
-
enable: boolean
|
|
52
|
-
originalCode: string
|
|
53
|
-
routeUrl: string
|
|
54
|
-
type: number | null
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface ProjectInfo {
|
|
58
|
-
/** 项目id */
|
|
59
|
-
id: string | number
|
|
60
|
-
/** 父级id */
|
|
61
|
-
parentId?: string
|
|
62
|
-
/** 项目名称 */
|
|
63
|
-
name: string
|
|
64
|
-
/** 租户id */
|
|
65
|
-
tenantId?: string
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface SubAppsInfo {
|
|
69
|
-
/** 所有应用信息 */
|
|
70
|
-
appcategorys?: any[]
|
|
71
|
-
/** 当前应用完整信息 */
|
|
72
|
-
currentSubApp?: any
|
|
73
|
-
/** 所有应用 */
|
|
74
|
-
flatSubAppList?: any[]
|
|
75
|
-
/** 当前应用code */
|
|
76
|
-
currentSubAppCode?: string
|
|
77
|
-
/** 当前打开的应用 */
|
|
78
|
-
subAppList?: any[]
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
interface TabItem {
|
|
82
|
-
/** 当前应用url */
|
|
83
|
-
currentApplication: string
|
|
84
|
-
/** 当前加载的应用 */
|
|
85
|
-
applicationPath: string
|
|
86
|
-
applicationCode: string
|
|
87
|
-
menuId: string
|
|
88
|
-
name: string
|
|
89
|
-
path: string
|
|
90
|
-
code: string
|
|
91
|
-
query?: any
|
|
92
|
-
}
|
|
93
|
-
export interface TabInfo {
|
|
94
|
-
/** 当前tabs key */
|
|
95
|
-
currentCode?: string
|
|
96
|
-
/** 当前tabs */
|
|
97
|
-
currentTab?: TabItem
|
|
98
|
-
/** 用于记录该应用上次开启的tab */
|
|
99
|
-
preTab?: Record<string, TabItem>
|
|
100
|
-
/** 当前打开的tabs(微前端环境会存入) */
|
|
101
|
-
tabMap?: Record<string, TabItem[]>
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export type permissionBtnInfo = { code?: string; name?: string }[]
|
|
1
|
+
export interface UserInfo {
|
|
2
|
+
/** 用户id */
|
|
3
|
+
id: string
|
|
4
|
+
/** 用户名称 */
|
|
5
|
+
name: string
|
|
6
|
+
/** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
|
|
7
|
+
flag: number
|
|
8
|
+
/** 租户id */
|
|
9
|
+
tenantId: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface PersonalInfo {
|
|
13
|
+
/** id */
|
|
14
|
+
id: string
|
|
15
|
+
/** 名称 */
|
|
16
|
+
name: string
|
|
17
|
+
/** 手机号 */
|
|
18
|
+
phone: string
|
|
19
|
+
/** 用户名称 */
|
|
20
|
+
userName: string
|
|
21
|
+
/** 邮箱 */
|
|
22
|
+
email: string
|
|
23
|
+
/** 头像 */
|
|
24
|
+
headPicture: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface TenantInfo {
|
|
28
|
+
/** 用户ID */
|
|
29
|
+
userId: string
|
|
30
|
+
/** 用户名 */
|
|
31
|
+
userName: string
|
|
32
|
+
name: string
|
|
33
|
+
/** 租户信息 */
|
|
34
|
+
tenant: {
|
|
35
|
+
id: string
|
|
36
|
+
name: string
|
|
37
|
+
adminUserId: string
|
|
38
|
+
description: string
|
|
39
|
+
domain: string
|
|
40
|
+
}
|
|
41
|
+
/** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
|
|
42
|
+
flag: number
|
|
43
|
+
areaCode: string
|
|
44
|
+
/** 手机号 */
|
|
45
|
+
phone: string
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface HomeInfo {
|
|
49
|
+
applicationCode: string
|
|
50
|
+
applicationPath: string
|
|
51
|
+
enable: boolean
|
|
52
|
+
originalCode: string
|
|
53
|
+
routeUrl: string
|
|
54
|
+
type: number | null
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface ProjectInfo {
|
|
58
|
+
/** 项目id */
|
|
59
|
+
id: string | number
|
|
60
|
+
/** 父级id */
|
|
61
|
+
parentId?: string
|
|
62
|
+
/** 项目名称 */
|
|
63
|
+
name: string
|
|
64
|
+
/** 租户id */
|
|
65
|
+
tenantId?: string
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface SubAppsInfo {
|
|
69
|
+
/** 所有应用信息 */
|
|
70
|
+
appcategorys?: any[]
|
|
71
|
+
/** 当前应用完整信息 */
|
|
72
|
+
currentSubApp?: any
|
|
73
|
+
/** 所有应用 */
|
|
74
|
+
flatSubAppList?: any[]
|
|
75
|
+
/** 当前应用code */
|
|
76
|
+
currentSubAppCode?: string
|
|
77
|
+
/** 当前打开的应用 */
|
|
78
|
+
subAppList?: any[]
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface TabItem {
|
|
82
|
+
/** 当前应用url */
|
|
83
|
+
currentApplication: string
|
|
84
|
+
/** 当前加载的应用 */
|
|
85
|
+
applicationPath: string
|
|
86
|
+
applicationCode: string
|
|
87
|
+
menuId: string
|
|
88
|
+
name: string
|
|
89
|
+
path: string
|
|
90
|
+
code: string
|
|
91
|
+
query?: any
|
|
92
|
+
}
|
|
93
|
+
export interface TabInfo {
|
|
94
|
+
/** 当前tabs key */
|
|
95
|
+
currentCode?: string
|
|
96
|
+
/** 当前tabs */
|
|
97
|
+
currentTab?: TabItem
|
|
98
|
+
/** 用于记录该应用上次开启的tab */
|
|
99
|
+
preTab?: Record<string, TabItem>
|
|
100
|
+
/** 当前打开的tabs(微前端环境会存入) */
|
|
101
|
+
tabMap?: Record<string, TabItem[]>
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type permissionBtnInfo = { code?: string; name?: string }[]
|
|
@@ -10,7 +10,8 @@ const a = (s, t = "yyyy-MM-dd HH:mm:ss") => {
|
|
|
10
10
|
S: e.getMilliseconds()
|
|
11
11
|
}, g = e.getFullYear().toString();
|
|
12
12
|
g = g.length >= 4 ? g : "0000".substr(0, 4 - g.length) + g, /(y+)/.test(t) && (t = t.replace(RegExp.$1, (g + "").substr(4 - RegExp.$1.length)));
|
|
13
|
-
for (var n in r)
|
|
13
|
+
for (var n in r)
|
|
14
|
+
new RegExp("(" + n + ")").test(t) && (t = t.replace(RegExp.$1, RegExp.$1.length === 1 ? r[n] : ("00" + r[n]).substr(("" + r[n]).length)));
|
|
14
15
|
return t;
|
|
15
16
|
};
|
|
16
17
|
export {
|
|
@@ -37,7 +37,7 @@ export declare const objectToUrlparams: (params: any) => string;
|
|
|
37
37
|
* @param pathParams 参数,数组格式
|
|
38
38
|
* @returns
|
|
39
39
|
*/
|
|
40
|
-
export declare const addPathParamsToUrl: (url: string, pathParams:
|
|
40
|
+
export declare const addPathParamsToUrl: (url: string, pathParams: string[]) => any;
|
|
41
41
|
/**
|
|
42
42
|
* 从URL中获取origin
|
|
43
43
|
* @param url url
|
|
@@ -1,60 +1,63 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = (n, s) => {
|
|
2
2
|
let e = window.location.search || "";
|
|
3
|
-
if (
|
|
4
|
-
const
|
|
5
|
-
|
|
3
|
+
if (n && n !== location.href) {
|
|
4
|
+
const t = n.indexOf("?");
|
|
5
|
+
t !== -1 ? e = n.slice(t) : e = "";
|
|
6
6
|
}
|
|
7
|
-
const
|
|
8
|
-
if (
|
|
9
|
-
return
|
|
7
|
+
const r = new URLSearchParams(e);
|
|
8
|
+
if (s)
|
|
9
|
+
return r.get(s);
|
|
10
10
|
{
|
|
11
|
-
let
|
|
12
|
-
for (let [
|
|
13
|
-
|
|
14
|
-
return
|
|
11
|
+
let t = {};
|
|
12
|
+
for (let [o, l] of r.entries())
|
|
13
|
+
t[o] = l;
|
|
14
|
+
return t;
|
|
15
15
|
}
|
|
16
|
-
}, f = (
|
|
17
|
-
let e = "",
|
|
18
|
-
const
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
}),
|
|
22
|
-
}, h = (
|
|
23
|
-
const e =
|
|
24
|
-
if (!
|
|
25
|
-
let
|
|
26
|
-
if (!
|
|
27
|
-
let
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
}), e.includes("?") ? e.split("?")[0] + `?${
|
|
31
|
-
}, u = (
|
|
32
|
-
const
|
|
33
|
-
for (const [
|
|
34
|
-
e.hasOwnProperty(
|
|
16
|
+
}, f = (n, s = {}) => {
|
|
17
|
+
let e = "", r = "";
|
|
18
|
+
const t = Object.keys(s);
|
|
19
|
+
return t && t.length && t.forEach((o, l) => {
|
|
20
|
+
l === t.length - 1 ? r += `${o}=${s[o]}` : r += `${o}=${s[o]}&`;
|
|
21
|
+
}), r ? e = location.origin + n + `?${r}` : e = location.origin + n, e;
|
|
22
|
+
}, h = (n, s) => {
|
|
23
|
+
const e = s || location.href, r = i(e), t = Object.keys(r) || [];
|
|
24
|
+
if (!t || !t.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
|
|
25
|
+
let o = t.filter((a) => !n.includes(a));
|
|
26
|
+
if (!o || !o.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
|
|
27
|
+
let l = "";
|
|
28
|
+
return o.forEach((a, c) => {
|
|
29
|
+
c === t.length - 1 ? l += `${a}=${r[a]}` : l += `${a}=${r[a]}&`;
|
|
30
|
+
}), e.includes("?") ? e.split("?")[0] + `?${l}` : e.split("&")[0] + `?${l}`;
|
|
31
|
+
}, u = (n) => {
|
|
32
|
+
const s = new URLSearchParams(n.split("?")[1]), e = {};
|
|
33
|
+
for (const [r, t] of s)
|
|
34
|
+
e.hasOwnProperty(r) ? Array.isArray(e[r]) ? e[r].push(t) : e[r] = [e[r], t] : e[r] = t;
|
|
35
35
|
return e;
|
|
36
|
-
},
|
|
37
|
-
let
|
|
38
|
-
const e = Object.keys(
|
|
39
|
-
return e && e.length && e.forEach((
|
|
40
|
-
|
|
41
|
-
}),
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
}, g = (n) => {
|
|
37
|
+
let s = "";
|
|
38
|
+
const e = Object.keys(n);
|
|
39
|
+
return e && e.length && e.forEach((r, t) => {
|
|
40
|
+
t === e.length - 1 ? s += `${r}=${n[r]}` : s += `${r}=${n[r]}&`;
|
|
41
|
+
}), s;
|
|
42
|
+
}, p = (n, s) => {
|
|
43
|
+
const e = new URL(n, location.origin);
|
|
44
|
+
let { origin: r, pathname: t } = e;
|
|
45
|
+
t === "/" && (t = ""), s.map((l) => t += `/${l}`);
|
|
46
|
+
const o = new URL(`${r}${t}`);
|
|
47
|
+
return e.searchParams.forEach((l, a) => {
|
|
48
|
+
o.searchParams.append(a, l);
|
|
49
|
+
}), o.toString();
|
|
47
50
|
};
|
|
48
|
-
function $(
|
|
49
|
-
const
|
|
51
|
+
function $(n) {
|
|
52
|
+
const s = /^(https?:\/\/[^/]+)/, e = n.match(s);
|
|
50
53
|
return e && e.length > 1 ? e[1] : null;
|
|
51
54
|
}
|
|
52
55
|
export {
|
|
53
|
-
|
|
56
|
+
p as addPathParamsToUrl,
|
|
54
57
|
h as funcUrlDel,
|
|
55
58
|
f as getFullPath,
|
|
56
59
|
$ as getOriginFromUrl,
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
i as getUrlParams,
|
|
61
|
+
g as objectToUrlparams,
|
|
59
62
|
u as urlParamsToObject
|
|
60
63
|
};
|
|
Binary file
|
package/common-tools/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from "@das-fed/utils/common-tools/date-format";
|
|
2
|
-
export * from "@das-fed/utils/common-tools/get-url-params";
|
|
3
|
-
export * from "@das-fed/utils/common-tools/nest-tree-format";
|
|
4
|
-
export * from "@das-fed/utils/common-tools/obj-tools";
|
|
5
|
-
export * from "@das-fed/utils/common-tools/arr-tools";
|
|
6
|
-
export * from "@das-fed/utils/common-tools/handle-data";
|
|
7
|
-
export * from "@das-fed/utils/common-tools/setHtmlMinWH";
|
|
8
|
-
export * from "@das-fed/utils/common-tools/queue-promise";
|
|
9
|
-
export * from "@das-fed/utils/common-tools/platform-tools";
|
|
10
|
-
export * from "@das-fed/utils/common-tools/update-fav-icon";
|
|
1
|
+
export * from "@das-fed/utils/common-tools/date-format/index.js";
|
|
2
|
+
export * from "@das-fed/utils/common-tools/get-url-params/index.js";
|
|
3
|
+
export * from "@das-fed/utils/common-tools/nest-tree-format/index.js";
|
|
4
|
+
export * from "@das-fed/utils/common-tools/obj-tools/index.js";
|
|
5
|
+
export * from "@das-fed/utils/common-tools/arr-tools/index.js";
|
|
6
|
+
export * from "@das-fed/utils/common-tools/handle-data/index.js";
|
|
7
|
+
export * from "@das-fed/utils/common-tools/setHtmlMinWH/index.js";
|
|
8
|
+
export * from "@das-fed/utils/common-tools/queue-promise/index.js";
|
|
9
|
+
export * from "@das-fed/utils/common-tools/platform-tools/index.js";
|
|
10
|
+
export * from "@das-fed/utils/common-tools/update-fav-icon/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getFavIcon as s } from "@das-fed/utils/common-info";
|
|
2
|
-
import { pureImageSrc as l } from "@das-fed/utils/pure-image-src";
|
|
3
|
-
import { systemConfiguration as m } from "@das-fed/utils/api-services/modules";
|
|
1
|
+
import { getFavIcon as s } from "@das-fed/utils/common-info/index.js";
|
|
2
|
+
import { pureImageSrc as l } from "@das-fed/utils/pure-image-src/index.js";
|
|
3
|
+
import { systemConfiguration as m } from "@das-fed/utils/api-services/modules/index.js";
|
|
4
4
|
const c = m.get("/visitor/appearance/with-default", (t) => (t.public = !0, t)), i = (t, o = "./logo.svg") => {
|
|
5
5
|
const r = t || o;
|
|
6
6
|
let e = document.querySelector('link[rel*="icon"]');
|