@das-fed/upf-utils 6.4.0-dev.238 → 6.4.0-dev.239
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/es5.d.ts +2 -0
- package/api-services/es5.js +823 -820
- package/api-services/i18n/es5.d.ts +63 -0
- package/api-services/index.js +642 -644
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.d.ts +2 -0
- package/api-services/modules/app-manage/es5.js +25 -19
- package/api-services/modules/app-manage/index.js +17 -15
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.d.ts +2 -0
- package/api-services/modules/authentication/es5.js +1100 -1082
- package/api-services/modules/authentication/index.js +911 -891
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.d.ts +6 -0
- package/api-services/modules/bems/es5.js +96 -90
- package/api-services/modules/bems/index.js +75 -73
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.d.ts +2 -0
- package/api-services/modules/contract/es5.js +1343 -1325
- package/api-services/modules/contract/index.js +1140 -1120
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.d.ts +7 -0
- package/api-services/modules/duty-manage/es5.js +1338 -1344
- package/api-services/modules/duty-manage/index.js +1122 -1138
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.d.ts +2 -0
- package/api-services/modules/enterpriseright/es5.js +1086 -1071
- package/api-services/modules/enterpriseright/index.js +892 -876
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.d.ts +21 -0
- package/api-services/modules/es5.js +1351 -1357
- package/api-services/modules/file/es5.d.ts +37 -0
- package/api-services/modules/file/es5.js +131 -125
- package/api-services/modules/file/index.js +108 -106
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.d.ts +2 -0
- package/api-services/modules/gateway-edge/es5.js +1343 -1325
- package/api-services/modules/gateway-edge/index.js +1140 -1120
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1060 -1076
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.d.ts +16 -0
- package/api-services/modules/iot/es5.js +33 -27
- package/api-services/modules/iot/index.js +23 -21
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.d.ts +3 -0
- package/api-services/modules/justauth/es5.js +25 -19
- package/api-services/modules/justauth/index.js +17 -15
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.d.ts +2 -0
- package/api-services/modules/knowledge/es5.js +1337 -1321
- package/api-services/modules/knowledge/index.js +1124 -1108
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.d.ts +2 -0
- package/api-services/modules/link/es5.js +1343 -1325
- package/api-services/modules/link/index.js +1140 -1120
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.d.ts +2 -0
- package/api-services/modules/permission/es5.js +1100 -1106
- package/api-services/modules/permission/index.js +897 -913
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.d.ts +14 -0
- package/api-services/modules/platformManage/es5.js +104 -98
- package/api-services/modules/platformManage/index.js +83 -81
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.d.ts +2 -0
- package/api-services/modules/portal/es5.js +1343 -1349
- package/api-services/modules/portal/index.js +1126 -1142
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.d.ts +2 -0
- package/api-services/modules/space-manage/es5.js +1343 -1349
- package/api-services/modules/space-manage/index.js +1126 -1142
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.d.ts +8 -0
- package/api-services/modules/super-admin/es5.js +1081 -1084
- package/api-services/modules/super-admin/index.js +880 -892
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.d.ts +6 -0
- package/api-services/modules/supplier/es5.js +1081 -1084
- package/api-services/modules/supplier/index.js +880 -892
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.d.ts +2 -0
- package/api-services/modules/supplychain-manage/es5.js +1343 -1325
- package/api-services/modules/supplychain-manage/index.js +1140 -1120
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.d.ts +2 -0
- package/api-services/modules/systemConfiguration/es5.js +1100 -1106
- package/api-services/modules/systemConfiguration/index.js +897 -913
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.d.ts +2 -0
- package/api-services/modules/tool/es5.js +845 -836
- package/api-services/modules/tool/index.js +660 -654
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.d.ts +1 -0
- package/api-services/src/create-service/es5.js +1326 -1332
- package/api-services/src/create-service/index.js +1110 -1126
- package/api-services/src/create-service/index.js.gz +0 -0
- package/atob/es5.d.ts +2 -0
- package/common-info/es5.d.ts +48 -0
- package/common-info/es5.js +1269 -1331
- package/common-info/getIframeUrl/es5.d.ts +9 -0
- package/common-info/getInfoFromUrl/es5.d.ts +8 -0
- package/common-info/getPermissionMethod/es5.d.ts +77 -0
- package/common-info/getPermissionMethod/es5.js +1371 -1355
- package/common-info/getPermissionMethod/index.d.ts +27 -9
- package/common-info/getPermissionMethod/index.js +1141 -1125
- package/common-info/getPermissionMethod/index.js.gz +0 -0
- package/common-info/index.d.ts +1 -29
- package/common-info/index.js +1046 -1096
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/es5.d.ts +5 -0
- package/common-info/type.d.ts +2 -2
- package/common-tools/arr-tools/es5.d.ts +15 -0
- package/common-tools/calc-text-width/es5.d.ts +1 -0
- package/common-tools/date-format/es5.d.ts +7 -0
- package/common-tools/es5.d.ts +15 -0
- package/common-tools/es5.js +9 -0
- package/common-tools/extract-file-name/es5.d.ts +1 -0
- package/common-tools/get-file-extension/es5.d.ts +6 -0
- package/common-tools/get-url-params/es5.d.ts +46 -0
- package/common-tools/handle-data/es5.d.ts +34 -0
- package/common-tools/handle-data/es5.js +44 -6
- package/common-tools/handle-data/index.d.ts +16 -1
- package/common-tools/handle-data/index.js +1 -1
- package/common-tools/handle-data/index.js.gz +0 -0
- package/common-tools/index.d.ts +1 -0
- package/common-tools/index.js +1 -0
- package/common-tools/nest-tree-format/es5.d.ts +30 -0
- package/common-tools/obj-tools/es5.d.ts +7 -0
- package/common-tools/platform-tools/es5.d.ts +19 -0
- package/common-tools/queue-promise/es5.d.ts +6 -0
- package/common-tools/setHtmlMinWH/es5.d.ts +5 -0
- package/common-tools/timezone-format/es5.d.ts +28 -0
- package/common-tools/timezone-format/es5.js +140 -0
- package/common-tools/timezone-format/index.d.ts +28 -0
- package/common-tools/timezone-format/index.js +81 -0
- package/common-tools/timezone-format/index.js.gz +0 -0
- package/common-tools/update-browser-title/es5.d.ts +1 -0
- package/common-tools/update-fav-icon/es5.d.ts +11 -0
- package/config/es5.d.ts +2 -0
- package/create-api-service/access-token-auto-refresh/es5.d.ts +20 -0
- package/create-api-service/access-token-auto-refresh/es5.js +27 -26
- package/create-api-service/access-token-auto-refresh/index.js +27 -26
- package/create-api-service/access-token-auto-refresh/index.js.gz +0 -0
- package/create-api-service/check-token/es5.d.ts +12 -0
- package/create-api-service/es5.d.ts +8 -0
- package/create-api-service/es5.js +24 -18
- package/create-api-service/i18n/es5.d.ts +39 -0
- package/create-api-service/index.js +17 -15
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/proxy-sso/es5.d.ts +3 -0
- package/create-api-service/sso/es5.d.ts +21 -0
- package/create-api-service/token-refresh-shared/es5.d.ts +30 -0
- package/curring-http/es5.d.ts +12 -0
- package/dimple-canvas/es5.d.ts +3 -0
- package/directive/auth/es5.d.ts +8 -0
- package/directive/clickOutside/es5.d.ts +6 -0
- package/directive/es5.d.ts +3 -0
- package/directive/hoverInside/es5.d.ts +6 -0
- package/directive/utils/es5.d.ts +7 -0
- package/dom-check-in/es5.d.ts +6 -0
- package/dom-watcher/es5.d.ts +25 -0
- package/esm-map.json +32 -7
- package/hooks/popup-manager/use-zindex/es5.d.ts +3 -0
- package/i18n-bridge/es5.d.ts +10 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/load-js/es5.d.ts +3 -0
- package/nextTiken/es5.d.ts +12 -0
- package/oss/es5.d.ts +2 -0
- package/package.json +4 -3
- package/pinyin-first-character/es5.d.ts +2 -0
- package/process-engine-info/es5.d.ts +13 -0
- package/pure-image-src/es5.d.ts +2 -0
- package/size-watcher/es5.d.ts +6 -0
- package/style/es5.d.ts +2 -0
- package/theme/es5.d.ts +92 -0
- package/theme/es5.js +1365 -0
- package/theme/index.d.ts +92 -0
- package/theme/index.js +871 -0
- package/theme/index.js.gz +0 -0
- package/token-tools/es5.d.ts +21 -0
- package/use-low-code/es5.d.ts +1 -0
- package/vue/es5.d.ts +1 -0
- package/vue/hooks/use-model-value/es5.d.ts +9 -0
- package/webSocket-service/es5.d.ts +41 -0
- package/with-install/es5.d.ts +11 -0
- package/hooks/use-get-auth/es5.js +0 -67
- package/hooks/use-get-auth/index.d.ts +0 -4
- package/hooks/use-get-auth/index.js +0 -19
|
@@ -3218,9 +3218,9 @@ function Bt(t, e) {
|
|
|
3218
3218
|
var jr = Bt(Bl, { path: "/" });
|
|
3219
3219
|
Mt.extend(eo);
|
|
3220
3220
|
Mt.extend(to);
|
|
3221
|
-
const Xt = Vr(), zn = Xt.sso ?? !0, Hr = Xt.i18n ?? !0, Wn = Xt.noRedireLogin ?? !1;
|
|
3221
|
+
const Ml = "UTC", kl = () => Mt.tz.guess() || Ml, Xt = Vr(), zn = Xt.sso ?? !0, Hr = Xt.i18n ?? !0, Wn = Xt.noRedireLogin ?? !1;
|
|
3222
3222
|
let zr = "", Wr = 0;
|
|
3223
|
-
const
|
|
3223
|
+
const ql = 1e3, Gr = async (t, e, r = []) => {
|
|
3224
3224
|
const n = Date.now(), o = 1200, a = 60;
|
|
3225
3225
|
for (; Date.now() - n < o; ) {
|
|
3226
3226
|
const i = t(e, ...r);
|
|
@@ -3230,17 +3230,19 @@ const Ml = 1e3, Gr = async (t, e, r = []) => {
|
|
|
3230
3230
|
return t(e, ...r);
|
|
3231
3231
|
};
|
|
3232
3232
|
let Tt = !1;
|
|
3233
|
-
const
|
|
3233
|
+
const jl = 5e3, Gn = () => Tt ? !1 : (Tt = !0, setTimeout(() => {
|
|
3234
3234
|
Tt = !1;
|
|
3235
|
-
},
|
|
3236
|
-
var e, r;
|
|
3235
|
+
}, jl), !0), Jn = () => {
|
|
3237
3236
|
if (Wn) return;
|
|
3238
3237
|
const t = "/login";
|
|
3239
|
-
location.pathname
|
|
3240
|
-
|
|
3238
|
+
if (location.pathname === t) return;
|
|
3239
|
+
window.sessionStorage.clear(), window.localStorage.clear(), window.__isAutoCloseApp = !1;
|
|
3240
|
+
const e = window.top;
|
|
3241
|
+
e != null && e.vueRouter ? e.vueRouter.replace(t) : window.location.replace(`/#${t}`);
|
|
3242
|
+
}, Hl = () => Kn("code") || "" || Wn ? !1 : Gn() ? (zn ? Qn({ ...Xn, redirect_uri: Zn }) : Jn(), !0) : !1, zl = async (t) => {
|
|
3241
3243
|
var r;
|
|
3242
3244
|
return ((r = t.config) == null ? void 0 : r.responseType) === "blob" ? t : t.data ?? t;
|
|
3243
|
-
},
|
|
3245
|
+
}, Wl = async (t, e) => {
|
|
3244
3246
|
var d, m, h, S;
|
|
3245
3247
|
const { t: r } = Jr();
|
|
3246
3248
|
let n, o, a = {};
|
|
@@ -3248,7 +3250,7 @@ const kl = 5e3, Gn = () => Tt ? !1 : (Tt = !0, setTimeout(() => {
|
|
|
3248
3250
|
let s = ((d = t == null ? void 0 : t.response) == null ? void 0 : d.data) || {};
|
|
3249
3251
|
const c = s == null ? void 0 : s.code, u = (m = t.response) == null ? void 0 : m.status;
|
|
3250
3252
|
if (c === 401 || u === 401) {
|
|
3251
|
-
|
|
3253
|
+
Hl(), n = c || u, a = s;
|
|
3252
3254
|
const O = (e == null ? void 0 : e.i18n) ?? !0;
|
|
3253
3255
|
if (Hr && O && (s != null && s.status)) {
|
|
3254
3256
|
const g = !(s != null && s.data) || !s.data.length ? [] : s.data, E = r(s.status, ...g);
|
|
@@ -3278,10 +3280,10 @@ const kl = 5e3, Gn = () => Tt ? !1 : (Tt = !0, setTimeout(() => {
|
|
|
3278
3280
|
o || (o = i[t.response.status] || t.message);
|
|
3279
3281
|
} else t.request ? (n = 500, t.code === "ERR_CANCELED" ? o = t.abortReason || "" : o = r("网络异常,请检查您的网络情况")) : (n = 500, t.code === "ERR_CANCELED" ? o = t.abortReason || "" : o = r("请求配置异常"));
|
|
3280
3282
|
e != null && e.customErrorMessage && (o = e == null ? void 0 : e.customErrorMessage(o, t));
|
|
3281
|
-
const p = Date.now(), y = o === zr, v = p - Wr <
|
|
3283
|
+
const p = Date.now(), y = o === zr, v = p - Wr < ql;
|
|
3282
3284
|
return !(e != null && e.ignoreErrorMessage) && o && (!y || !v) && ((S = (h = window.DasMessage) == null ? void 0 : h.error) == null || S.call(h, { message: o, showClose: !0 }), zr = o, Wr = p), { ...a, code: n, msg: o, error: t };
|
|
3283
3285
|
};
|
|
3284
|
-
function
|
|
3286
|
+
function nc(t, e) {
|
|
3285
3287
|
const r = R.create();
|
|
3286
3288
|
return Vn(r, async (n) => {
|
|
3287
3289
|
const { currentLang: o } = Jr(), a = Vr();
|
|
@@ -3302,7 +3304,7 @@ function tc(t, e) {
|
|
|
3302
3304
|
}
|
|
3303
3305
|
p && !n.headers.Authorization && (n.headers.Authorization = `Bearer ${p}`);
|
|
3304
3306
|
}
|
|
3305
|
-
n.baseURL || (n.baseURL = a.baseURL || ""), n.urlPrefix || (n.urlPrefix = t), n.paramsSerializer || (n.paramsSerializer = { serialize: (p) => Ll.stringify(p, { indices: !1 }) }), n.onSuccess || (n.onSuccess =
|
|
3307
|
+
n.baseURL || (n.baseURL = a.baseURL || ""), n.urlPrefix || (n.urlPrefix = t), n.paramsSerializer || (n.paramsSerializer = { serialize: (p) => Ll.stringify(p, { indices: !1 }) }), n.onSuccess || (n.onSuccess = zl), n.onError || (n.onError = Wl), (n.csrf ?? !1) && (n.headers["csrf-token"] = jr.get("csrf-token"));
|
|
3306
3308
|
const c = n.params || {};
|
|
3307
3309
|
if (c.project === void 0) {
|
|
3308
3310
|
let p = 0;
|
|
@@ -3313,12 +3315,12 @@ function tc(t, e) {
|
|
|
3313
3315
|
const { instanceInfo: p } = no();
|
|
3314
3316
|
p != null && p.instanceId && (c.instance = p.instanceId);
|
|
3315
3317
|
}
|
|
3316
|
-
n.params = c, n.headers.Timezone =
|
|
3318
|
+
n.params = c, n.headers.Timezone = kl(), n.headers["X-Origin"] = location.origin;
|
|
3317
3319
|
const l = (o == null ? void 0 : o.value) ?? "";
|
|
3318
3320
|
return l && (n.headers["Accept-Language"] = l), l && jr.set("locale", l), (e == null ? void 0 : e(n)) || n;
|
|
3319
3321
|
});
|
|
3320
3322
|
}
|
|
3321
3323
|
export {
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
+
nc as createService,
|
|
3325
|
+
Hl as handleUnauthorized
|
|
3324
3326
|
};
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const getQuery: (name: any) => any;
|
|
2
|
+
declare const real_uri: any;
|
|
3
|
+
declare const getTokenParams: any;
|
|
4
|
+
declare const getTokenFromCode: () => unknown;
|
|
5
|
+
declare const getToken: (config: any) => unknown;
|
|
6
|
+
declare const login: (params: any) => any;
|
|
7
|
+
declare const tokenStorage: () => {
|
|
8
|
+
getData: () => {
|
|
9
|
+
accessToken: any;
|
|
10
|
+
accessTokenExpiredAt: any;
|
|
11
|
+
refreshToken: any;
|
|
12
|
+
};
|
|
13
|
+
save: (data: {
|
|
14
|
+
accessToken?: string | null;
|
|
15
|
+
accessTokenExpiredAt?: string | number | null;
|
|
16
|
+
refreshToken?: string | null;
|
|
17
|
+
info?: any;
|
|
18
|
+
}) => void;
|
|
19
|
+
remove: () => void;
|
|
20
|
+
};
|
|
21
|
+
export { getTokenParams, getTokenFromCode, real_uri, getQuery, getToken, tokenStorage, login };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface RefreshDataType {
|
|
2
|
+
accessToken: string;
|
|
3
|
+
refreshToken: string;
|
|
4
|
+
accessExp: number;
|
|
5
|
+
refreshExp?: number;
|
|
6
|
+
accessTokenExpiredAt?: number;
|
|
7
|
+
sub?: string;
|
|
8
|
+
tenant?: string;
|
|
9
|
+
}
|
|
10
|
+
export type TokenLifecycleData = {
|
|
11
|
+
accessToken?: string;
|
|
12
|
+
refreshToken?: string;
|
|
13
|
+
accessExp?: number | string;
|
|
14
|
+
refreshExp?: number | string;
|
|
15
|
+
accessTokenExpiredAt?: number | string;
|
|
16
|
+
};
|
|
17
|
+
export type RefreshPrecheckResult = 'access_valid' | 'need_refresh' | 'refresh_expired';
|
|
18
|
+
export declare const CHECK_BUFFER_TIME: number;
|
|
19
|
+
export declare const MAX_RETRIES = 1;
|
|
20
|
+
export declare const RETRY_DELAY = 1000;
|
|
21
|
+
export declare const DEFAULT_REFRESH_SCOPE = "basic-application-access-token-refresh";
|
|
22
|
+
export declare const toTimestamp: (value: any) => any;
|
|
23
|
+
export declare const normalizeRefreshData: (data: any) => RefreshDataType;
|
|
24
|
+
export declare const getRefreshPrecheckResult: (tokenData: TokenLifecycleData, bufferTime?: number) => RefreshPrecheckResult;
|
|
25
|
+
export declare const startRefreshPending: (scope?: string) => boolean;
|
|
26
|
+
export declare const waitRefreshResult: (scope?: string) => any;
|
|
27
|
+
export declare const resolveRefreshResult: (data: RefreshDataType, scope?: string) => void;
|
|
28
|
+
export declare const rejectRefreshResult: (reason?: any, scope?: string) => void;
|
|
29
|
+
export declare const clearRefreshState: (scope?: string, reason?: any) => void;
|
|
30
|
+
export declare function refreshTokenWithRetry(refreshToken: string, maxRetries?: number, delay?: number, retryCount?: number): Promise<RefreshDataType>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Ref, ComputedRef } from 'vue';
|
|
2
|
+
import { CurringConfigFun, CurringConfig, CurringRes } from './type';
|
|
3
|
+
|
|
4
|
+
/** 第一层(接入层):接收封装后的axios实例,第二个参数是全局请求配置,配置项参考AxiosRequestConfig */
|
|
5
|
+
declare const curringHttp: (axiosInstance: any, globalConfig?: CurringConfigFun) => {
|
|
6
|
+
get: (url: string | Ref | ComputedRef, urlConfig?: CurringConfigFun) => (payload?: any, payloadConfig?: CurringConfig) => CurringRes;
|
|
7
|
+
post: (url: string | Ref | ComputedRef, urlConfig?: CurringConfigFun) => (payload?: any, payloadConfig?: CurringConfig) => CurringRes;
|
|
8
|
+
put: (url: string | Ref | ComputedRef, urlConfig?: CurringConfigFun) => (payload?: any, payloadConfig?: CurringConfig) => CurringRes;
|
|
9
|
+
patch: (url: string | Ref | ComputedRef, urlConfig?: CurringConfigFun) => (payload?: any, payloadConfig?: CurringConfig) => CurringRes;
|
|
10
|
+
delete: (url: string | Ref | ComputedRef, urlConfig?: CurringConfigFun) => (payload?: any, payloadConfig?: CurringConfig) => CurringRes;
|
|
11
|
+
};
|
|
12
|
+
export { curringHttp };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface Config {
|
|
2
|
+
/** 观察目标节点的子节点的新增和删除;*/
|
|
3
|
+
childList?: boolean;
|
|
4
|
+
/** 观察目标节点的属性节点(新增或删除了某个属性,以及某个属性的属性值发生了变化); */
|
|
5
|
+
attributes?: boolean;
|
|
6
|
+
/** 要监视的特定属性名称的数组,如果未包含此属性,则对所有属性的更改都会触发变动通知; */
|
|
7
|
+
attributeFilter?: any[];
|
|
8
|
+
/** 在attributes属性已经设为true的前提下, 将发生变化的属性节点之前的属性值记录下来(记录在MutationRecord对象的oldValue属性中); */
|
|
9
|
+
attributeOldValue?: boolean;
|
|
10
|
+
/** 在characterData属性已经设为true的前提下,将发生变化characterData节点之前的文本内容记录下来(记录在MutationRecord对象的oldValue属性中); */
|
|
11
|
+
characterDataOldValue?: boolean;
|
|
12
|
+
/** 如果目标节点为characterData节点(一种抽象接口,具体可以为文本节点、注释节点,以及处理指令节点)时,也要观察该节点的文本内容是否发生变化; */
|
|
13
|
+
characterData?: boolean;
|
|
14
|
+
/** 观察目标节点的所有后代节点(观察目标节点所包含的整棵DOM树上的上述三种节点变化); */
|
|
15
|
+
subtree?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* dom监听器
|
|
19
|
+
* @param cb 回调函数
|
|
20
|
+
* @param dom 目标dom
|
|
21
|
+
* @param config 配置
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
declare const DomWatcher: (cb: (list: MutationRecord[]) => void, dom: HTMLElement, config?: Config) => any;
|
|
25
|
+
export { DomWatcher };
|
package/esm-map.json
CHANGED
|
@@ -46,15 +46,36 @@
|
|
|
46
46
|
"getTenantInfo": "/common-info/index",
|
|
47
47
|
"getProjectInfo": "/common-info/index",
|
|
48
48
|
"getHomeInfo": "/common-info/index",
|
|
49
|
-
"getPageAuth": "/common-info/index",
|
|
50
|
-
"getPageAuthBtn": "/common-info/index",
|
|
51
|
-
"getSubApps": "/common-info/index",
|
|
52
|
-
"getMenus": "/common-info/index",
|
|
53
|
-
"getTabInfo": "/common-info/index",
|
|
54
49
|
"getMinioAddress": "/common-info/index",
|
|
55
50
|
"getInstanceInfo": "/common-info/index",
|
|
56
51
|
"getFavIcon": "/common-info/index",
|
|
57
52
|
"dateFormat": "/common-tools/date-format/index",
|
|
53
|
+
"getClientTimeZone": "/common-tools/timezone-format/index",
|
|
54
|
+
"normalizeLocaleCode": "/common-tools/timezone-format/index",
|
|
55
|
+
"isDaylightSavingTime": "/common-tools/timezone-format/index",
|
|
56
|
+
"getTimeZoneDisplayInfo": "/common-tools/timezone-format/index",
|
|
57
|
+
"mixHexColor": "/theme/index",
|
|
58
|
+
"toRgbaColor": "/theme/index",
|
|
59
|
+
"resolveThemeBridgeVariables": "/theme/index",
|
|
60
|
+
"toLegacyThemeVariables": "/theme/index",
|
|
61
|
+
"toElementThemeVariables": "/theme/index",
|
|
62
|
+
"toDasUiColorOverrides": "/theme/index",
|
|
63
|
+
"toUpfComponentThemeVariables": "/theme/index",
|
|
64
|
+
"buildRuntimeThemeVariables": "/theme/index",
|
|
65
|
+
"applyThemeVariablesToDocument": "/theme/index",
|
|
66
|
+
"applyThemeEventToDocument": "/theme/index",
|
|
67
|
+
"getThemeAPI": "/theme/index",
|
|
68
|
+
"getCurrentTheme": "/theme/index",
|
|
69
|
+
"getThemeVariables": "/theme/index",
|
|
70
|
+
"changeTheme": "/theme/index",
|
|
71
|
+
"syncThemeFromHost": "/theme/index",
|
|
72
|
+
"syncHostThemeRoot": "/theme/index",
|
|
73
|
+
"initSubAppThemeSync": "/theme/index",
|
|
74
|
+
"initHostThemeRootSync": "/theme/index",
|
|
75
|
+
"getThemeVariable": "/theme/index",
|
|
76
|
+
"getVar": "/theme/index",
|
|
77
|
+
"getVarValue": "/theme/index",
|
|
78
|
+
"useSubAppTheme": "/theme/vue",
|
|
58
79
|
"getOriginFromUrl": "/common-tools/get-url-params/index",
|
|
59
80
|
"getUrlParams": "/common-tools/get-url-params/index",
|
|
60
81
|
"getFullPath": "/common-tools/get-url-params/index",
|
|
@@ -126,7 +147,6 @@
|
|
|
126
147
|
"getQuery": "/create-api-service/sso/index",
|
|
127
148
|
"tokenStorage": "/create-api-service/sso/index",
|
|
128
149
|
"login": "/create-api-service/sso/index",
|
|
129
|
-
"useGetAuth": "/hooks/use-get-auth/index",
|
|
130
150
|
"getPinyinFirstCharacter": "/pinyin-first-character/index",
|
|
131
151
|
"useZIndex": "/hooks/popup-manager/use-zindex/index",
|
|
132
152
|
"Graph": "/dimple-canvas/use-dimple-canvas/core/antv-x6/index",
|
|
@@ -176,5 +196,10 @@
|
|
|
176
196
|
"resolveRefreshResult": "/create-api-service/token-refresh-shared/index",
|
|
177
197
|
"rejectRefreshResult": "/create-api-service/token-refresh-shared/index",
|
|
178
198
|
"clearRefreshState": "/create-api-service/token-refresh-shared/index",
|
|
179
|
-
"refreshTokenWithRetry": "/create-api-service/token-refresh-shared/index"
|
|
199
|
+
"refreshTokenWithRetry": "/create-api-service/token-refresh-shared/index",
|
|
200
|
+
"LEGACY_THEME_BRIDGE_ITEMS": "/theme/index",
|
|
201
|
+
"ELEMENT_THEME_BRIDGE_ITEMS": "/theme/index",
|
|
202
|
+
"DAS_UI_THEME_BRIDGE_ITEMS": "/theme/index",
|
|
203
|
+
"UPF_COMPONENT_THEME_BRIDGE_ITEMS": "/theme/index",
|
|
204
|
+
"getHostThemeSnapshotFromWindowName": "/theme/index"
|
|
180
205
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type I18nBridgeLangRef = {
|
|
2
|
+
value: string;
|
|
3
|
+
};
|
|
4
|
+
export type I18nBridgeT = (key: string, ...args: any[]) => string;
|
|
5
|
+
export type I18nBridgeState = {
|
|
6
|
+
t: I18nBridgeT;
|
|
7
|
+
currentLang: I18nBridgeLangRef;
|
|
8
|
+
};
|
|
9
|
+
export declare const setI18nBridge: (next: Partial<I18nBridgeState>) => void;
|
|
10
|
+
export declare const getI18nBridge: () => I18nBridgeState;
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/load-js/es5.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PersonalInfo, TenantInfo } from '@das-fed/upf-utils/common-info/type';
|
|
2
|
+
|
|
3
|
+
/** 等待获取到token */
|
|
4
|
+
export declare const tokenNextTick_1: () => Promise<string>;
|
|
5
|
+
/** 等待获取到projectId */
|
|
6
|
+
export declare const projectNextTick: () => Promise<string | number>;
|
|
7
|
+
/** 等待获取到token和projectId */
|
|
8
|
+
export declare const tokenNextTick: () => Promise<boolean>;
|
|
9
|
+
/** 等待获取到userInfo */
|
|
10
|
+
export declare const userInfoNextTick: () => Promise<PersonalInfo>;
|
|
11
|
+
/** 等待获取到租户信息 */
|
|
12
|
+
export declare const tenantInfoNextTick: () => Promise<TenantInfo>;
|
package/oss/es5.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/upf-utils",
|
|
3
|
-
"version": "6.4.0-dev.
|
|
3
|
+
"version": "6.4.0-dev.239",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@antv/x6": "^2.18.1",
|
|
12
|
+
"@das-fed/mframe": "^0.0.0",
|
|
12
13
|
"@vue/shared": "^3.4.21",
|
|
13
14
|
"@vueuse/core": "^9.6.0",
|
|
14
15
|
"axios": "^1.6.7",
|
|
@@ -21,8 +22,8 @@
|
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"@babel/preset-env": "7.26.0",
|
|
24
|
-
"@das-fed/upf-cli": "6.4.0-dev.
|
|
25
|
-
"@das-fed/upf-web": "6.4.0-dev.
|
|
25
|
+
"@das-fed/upf-cli": "6.4.0-dev.239",
|
|
26
|
+
"@das-fed/upf-web": "6.4.0-dev.239",
|
|
26
27
|
"@rollup/plugin-babel": "6.0.4",
|
|
27
28
|
"@types/js-cookie": "^3.0.6",
|
|
28
29
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 子应用存储流程引擎需要的token信息
|
|
3
|
+
* @param data token信息
|
|
4
|
+
*/
|
|
5
|
+
export declare const setProcessEngineToken: (data: Record<any, any>) => void;
|
|
6
|
+
/** 移除流程引擎token */
|
|
7
|
+
export declare const removeProcessEngineToken: () => void;
|
|
8
|
+
/**
|
|
9
|
+
* 子应用存储流程引擎需要的项目信息
|
|
10
|
+
* @param projectId 项目id
|
|
11
|
+
*/
|
|
12
|
+
export declare const setProcessEngineProject: (projectId: string) => void;
|
|
13
|
+
export declare const removeProcessEngineProject: () => void;
|
package/style/es5.d.ts
ADDED
package/theme/es5.d.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export type ThemeVariables = Record<string, string>;
|
|
2
|
+
type ThemeVariableSource = Record<string, string | undefined>;
|
|
3
|
+
export interface ThemeConfig {
|
|
4
|
+
name?: string;
|
|
5
|
+
basePresetName?: string;
|
|
6
|
+
variables?: ThemeVariableSource;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface ThemeChangeEvent<TThemeName extends string = string, TVariables extends object = ThemeVariables> {
|
|
10
|
+
themeName: TThemeName;
|
|
11
|
+
config?: ThemeConfig | null;
|
|
12
|
+
variables: TVariables;
|
|
13
|
+
source?: 'change' | 'mountSync';
|
|
14
|
+
timestamp: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ThemeBridgeAPI<TThemeName extends string = string, TVariables extends object = ThemeVariables> {
|
|
17
|
+
getCurrentTheme: () => ThemeChangeEvent<TThemeName, TVariables> | null;
|
|
18
|
+
getVariables?: () => TVariables | null;
|
|
19
|
+
changeTheme?: (themeName: TThemeName) => void;
|
|
20
|
+
onThemeChange?: (callback: (event: ThemeChangeEvent<TThemeName, TVariables>) => void) => () => void;
|
|
21
|
+
}
|
|
22
|
+
export interface ThemeBridgeResolveContext<TVariables extends object = ThemeVariables> {
|
|
23
|
+
variables: TVariables;
|
|
24
|
+
result: Record<string, string>;
|
|
25
|
+
}
|
|
26
|
+
export interface ThemeBridgeVariableItem<TVariables extends object = ThemeVariables> {
|
|
27
|
+
target: string;
|
|
28
|
+
from?: keyof TVariables | string;
|
|
29
|
+
value?: string;
|
|
30
|
+
resolve?: (context: ThemeBridgeResolveContext<TVariables> & {
|
|
31
|
+
mixHexColor: typeof mixHexColor;
|
|
32
|
+
toRgbaColor: typeof toRgbaColor;
|
|
33
|
+
}) => string;
|
|
34
|
+
}
|
|
35
|
+
export interface ApplyThemeVariablesOptions {
|
|
36
|
+
/** 写入目标节点;默认当前文档 html。 */
|
|
37
|
+
root?: HTMLElement | null;
|
|
38
|
+
/** 是否生成运行时桥接变量;false 时仅写入源变量。 */
|
|
39
|
+
includeBridges?: boolean;
|
|
40
|
+
/** 是否写入 Element Plus 与 das-ui/das 历史兼容变量;默认 true。 */
|
|
41
|
+
includeElementAndDasUiBridges?: boolean;
|
|
42
|
+
/** 写入 data-theme 的主题名。 */
|
|
43
|
+
themeName?: string;
|
|
44
|
+
/** 写入 data-skin 的皮肤名;传 null 时移除。 */
|
|
45
|
+
skinName?: string | null;
|
|
46
|
+
}
|
|
47
|
+
export interface ThemePullOptions extends ApplyThemeVariablesOptions {
|
|
48
|
+
/** 是否输出主题同步警告日志。 */
|
|
49
|
+
debug?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface SubAppThemeSyncOptions extends ThemePullOptions {
|
|
52
|
+
/** 初始化时是否立即从宿主拉取当前主题。 */
|
|
53
|
+
syncOnInit?: boolean;
|
|
54
|
+
/** 是否优先使用 window.__THEME_API__ 订阅。 */
|
|
55
|
+
preferWindowSubscription?: boolean;
|
|
56
|
+
/** 后续真实主题切换后的回调,不包含 mountSync。 */
|
|
57
|
+
onThemeChange?: (event: ThemeChangeEvent) => void;
|
|
58
|
+
}
|
|
59
|
+
export type HostThemeRootSyncOptions = SubAppThemeSyncOptions;
|
|
60
|
+
export interface RuntimeThemeVariableBuildOptions {
|
|
61
|
+
/** 是否写入 Element Plus 与 das-ui/das 历史兼容变量;默认 true。 */
|
|
62
|
+
includeElementAndDasUiBridges?: boolean;
|
|
63
|
+
}
|
|
64
|
+
export declare const mixHexColor: (foreground: string, background: string, foregroundWeight: number, fallback: string) => string;
|
|
65
|
+
export declare const toRgbaColor: (color: string, alpha: number, fallback: string) => string;
|
|
66
|
+
export declare const resolveThemeBridgeVariables: <TVariables extends object = ThemeVariables>(variables: TVariables, items: readonly ThemeBridgeVariableItem<TVariables>[]) => any;
|
|
67
|
+
export declare const LEGACY_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
|
|
68
|
+
export declare const ELEMENT_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
|
|
69
|
+
export declare const DAS_UI_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
|
|
70
|
+
export declare const UPF_COMPONENT_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
|
|
71
|
+
export declare const toLegacyThemeVariables: (variables: object) => any;
|
|
72
|
+
export declare const toElementThemeVariables: (variables: object) => any;
|
|
73
|
+
export declare const toDasUiColorOverrides: (variables: object) => any;
|
|
74
|
+
export declare const toUpfComponentThemeVariables: (variables: object) => any;
|
|
75
|
+
export declare const buildRuntimeThemeVariables: (variables: object, options?: RuntimeThemeVariableBuildOptions) => Record<string, string>;
|
|
76
|
+
export declare const getHostThemeSnapshotFromWindowName: (debug?: boolean) => ThemeChangeEvent | null;
|
|
77
|
+
export declare const applyThemeVariablesToDocument: (variables: object, options?: ApplyThemeVariablesOptions) => any;
|
|
78
|
+
export declare const applyThemeEventToDocument: (event: ThemeChangeEvent, options?: ApplyThemeVariablesOptions) => any;
|
|
79
|
+
export declare const getThemeAPI: (debug?: boolean) => ThemeBridgeAPI | null;
|
|
80
|
+
export declare const getCurrentTheme: (options?: ThemePullOptions) => ThemeChangeEvent<string, Record<string, string>>;
|
|
81
|
+
export declare const getThemeVariables: (options?: ThemePullOptions) => any;
|
|
82
|
+
export declare const changeTheme: (themeName: string, debug?: boolean) => boolean;
|
|
83
|
+
export declare const syncThemeFromHost: (options?: ThemePullOptions) => ThemeChangeEvent<string, Record<string, string>>;
|
|
84
|
+
export declare const syncHostThemeRoot: (options?: ThemePullOptions) => ThemeChangeEvent | null;
|
|
85
|
+
export declare const initSubAppThemeSync: (options?: SubAppThemeSyncOptions) => () => void;
|
|
86
|
+
export declare const initHostThemeRootSync: (options?: HostThemeRootSyncOptions) => () => void;
|
|
87
|
+
export declare const getThemeVariable: (varName: string, root?: HTMLElement | null) => any;
|
|
88
|
+
export declare const getVar: (key?: string) => string;
|
|
89
|
+
export declare const getVarValue: (key?: string, root?: HTMLElement | null) => {
|
|
90
|
+
value: any;
|
|
91
|
+
};
|
|
92
|
+
export {};
|