@das-fed/upf-utils 6.4.0-dev.173 → 6.4.0-dev.175
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.js +825 -917
- package/api-services/i18n/es5.js +1 -6
- package/api-services/index.js +572 -597
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +39 -41
- package/api-services/modules/authentication/es5.js +39 -41
- package/api-services/modules/bems/es5.js +1022 -1012
- package/api-services/modules/bems/index.js +818 -800
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +39 -41
- package/api-services/modules/duty-manage/es5.js +1018 -1008
- package/api-services/modules/duty-manage/index.js +817 -799
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +39 -41
- package/api-services/modules/es5.js +1205 -1231
- package/api-services/modules/file/es5.js +75 -78
- package/api-services/modules/gateway-edge/es5.js +39 -41
- package/api-services/modules/index.js +946 -928
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +39 -46
- package/api-services/modules/justauth/es5.js +1007 -998
- package/api-services/modules/justauth/index.js +805 -787
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +39 -41
- package/api-services/modules/link/es5.js +994 -1008
- package/api-services/modules/link/index.js +786 -804
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +39 -41
- package/api-services/modules/platformManage/es5.js +994 -988
- package/api-services/modules/platformManage/index.js +795 -777
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +39 -41
- package/api-services/modules/space-manage/es5.js +994 -1008
- package/api-services/modules/space-manage/index.js +786 -804
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +1019 -1012
- package/api-services/modules/super-admin/index.js +817 -799
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +1014 -1030
- package/api-services/modules/supplier/index.js +804 -822
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +994 -1008
- package/api-services/modules/supplychain-manage/index.js +786 -804
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +1006 -996
- package/api-services/modules/systemConfiguration/index.js +804 -786
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +995 -1006
- package/api-services/modules/tool/index.js +788 -802
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +39 -41
- package/atob/es5.js +1 -4
- package/common-info/es5.js +13 -31
- package/common-info/getIframeUrl/es5.js +3 -5
- package/common-info/getInfoFromUrl/es5.js +2 -5
- package/common-info/set-personal-info/es5.js +7 -9
- package/common-tools/arr-tools/es5.js +1 -4
- package/common-tools/calc-text-width/es5.js +1 -3
- package/common-tools/date-format/es5.js +1 -3
- package/common-tools/es5.js +14 -128
- package/common-tools/extract-file-name/es5.js +3 -5
- package/common-tools/get-file-extension/es5.js +1 -3
- package/common-tools/get-url-params/es5.js +1 -9
- package/common-tools/handle-data/es5.js +6 -30
- package/common-tools/nest-tree-format/es5.js +1 -6
- package/common-tools/obj-tools/es5.js +1 -3
- package/common-tools/platform-tools/es5.js +3 -8
- package/common-tools/queue-promise/es5.js +1 -3
- package/common-tools/setHtmlMinWH/es5.js +1 -3
- package/common-tools/update-browser-title/es5.js +3 -5
- package/common-tools/update-fav-icon/es5.js +7 -10
- package/config/es5.js +1 -3
- package/create-api-service/check-token/es5.js +4 -6
- package/create-api-service/es5.js +1004 -994
- package/create-api-service/i18n/es5.js +1 -6
- package/create-api-service/index.js +803 -785
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/proxy-sso/es5.js +3 -5
- package/create-api-service/sso/es5.js +42 -50
- package/curring-http/es5.js +7 -9
- package/dimple-canvas/es5.js +1 -15
- package/directive/auth/es5.js +13 -15
- package/directive/clickOutside/es5.js +4 -6
- package/directive/es5.js +3 -23
- package/directive/hoverInside/es5.js +4 -6
- package/directive/utils/es5.js +1 -3
- package/dom-check-in/es5.js +1 -3
- package/dom-watcher/es5.js +1 -3
- package/hooks/popup-manager/use-zindex/es5.js +1 -3
- package/hooks/use-get-auth/es5.js +13 -15
- package/load-js/es5.js +6 -8
- package/nextTiken/es5.js +8 -14
- package/oss/es5.js +5 -8
- package/package.json +4 -4
- package/pinyin-first-character/es5.js +1 -3
- package/process-engine-info/es5.js +1 -6
- package/pure-image-src/es5.js +1 -3
- package/size-watcher/es5.js +5 -8
- package/style/es5.js +6 -15
- package/token-tools/es5.js +1 -6
- package/use-low-code/es5.js +9 -11
- package/vue/es5.js +1 -9
- package/vue/hooks/use-model-value/es5.js +4 -6
- package/webSocket-service/es5.js +7 -9
- package/with-install/es5.js +1 -3
|
Binary file
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
var _Kt$sso, _Kt$i18n, _Kt$noRedireLogin;
|
|
4
2
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
5
3
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
@@ -35,16 +33,16 @@ function _asyncGeneratorDelegate(t) { var e = {}, n = !1; function pump(e, r) {
|
|
|
35
33
|
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
36
34
|
function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
|
|
37
35
|
function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, "return": function _return(r) { var n = this.s["return"]; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, "throw": function _throw(r) { var n = this.s["return"]; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
import { setI18nRule, currentLang, t } from '@das-fed/upf-web/packages/i18n/index';
|
|
37
|
+
import { curringHttp } from '@das-fed/upf-utils/curring-http';
|
|
38
|
+
import { getToken, getQuery, login, getTokenParams, real_uri } from '@das-fed/upf-utils/create-api-service/sso';
|
|
39
|
+
import Lt from 'dayjs';
|
|
40
|
+
import Xn from 'dayjs/plugin/utc';
|
|
41
|
+
import Zn from 'dayjs/plugin/timezone';
|
|
42
|
+
import { getProjectInfo, getInstanceInfo } from '@das-fed/upf-utils/common-info';
|
|
43
|
+
import { getAccessToken } from '@das-fed/upf-utils/token-tools';
|
|
44
|
+
import { getConfig } from '@das-fed/upf-utils/config';
|
|
45
|
+
import { getValidAccessToken } from '@das-fed/upf-utils/create-api-service/check-token';
|
|
48
46
|
function Hr(t, e) {
|
|
49
47
|
return function () {
|
|
50
48
|
return t.apply(e, arguments);
|
|
@@ -3762,10 +3760,10 @@ var Cl = {
|
|
|
3762
3760
|
_appCode: "framework"
|
|
3763
3761
|
}
|
|
3764
3762
|
};
|
|
3765
|
-
|
|
3763
|
+
setI18nRule(Cl);
|
|
3766
3764
|
Lt.extend(Xn);
|
|
3767
3765
|
Lt.extend(Zn);
|
|
3768
|
-
var Kt =
|
|
3766
|
+
var Kt = getConfig(),
|
|
3769
3767
|
kn = (_Kt$sso = Kt.sso) !== null && _Kt$sso !== void 0 ? _Kt$sso : true,
|
|
3770
3768
|
_l = (_Kt$i18n = Kt.i18n) !== null && _Kt$i18n !== void 0 ? _Kt$i18n : true,
|
|
3771
3769
|
qn = (_Kt$noRedireLogin = Kt.noRedireLogin) !== null && _Kt$noRedireLogin !== void 0 ? _Kt$noRedireLogin : false;
|
|
@@ -3794,29 +3792,29 @@ var Nl = 1e3,
|
|
|
3794
3792
|
};
|
|
3795
3793
|
}(),
|
|
3796
3794
|
Dl = /*#__PURE__*/function () {
|
|
3797
|
-
var _ref22 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(t, e) {
|
|
3795
|
+
var _ref22 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(t$1, e) {
|
|
3798
3796
|
var p, d, v, y, m, n, r, o, a, i, _ref23, _ref25, h, _ref24, w, u, l, c, _t10;
|
|
3799
3797
|
return _regenerator().w(function (_context1) {
|
|
3800
3798
|
while (1) switch (_context1.n) {
|
|
3801
3799
|
case 0:
|
|
3802
|
-
n = ((p = t.response) == null ? undefined : p.status) || 500, r = (d = t.response) == null ? undefined : d.message, o = {};
|
|
3800
|
+
n = ((p = t$1.response) == null ? undefined : p.status) || 500, r = (d = t$1.response) == null ? undefined : d.message, o = {};
|
|
3803
3801
|
a = {
|
|
3804
|
-
400:
|
|
3805
|
-
404:
|
|
3806
|
-
500:
|
|
3802
|
+
400: t("参数校验错误"),
|
|
3803
|
+
404: t("接口地址未找到"),
|
|
3804
|
+
500: t("服务器内部错误")
|
|
3807
3805
|
};
|
|
3808
|
-
i = ((v = t == null ? undefined : t.response) == null ? undefined : v.data) || {};
|
|
3809
|
-
if (!(!(
|
|
3806
|
+
i = ((v = t$1 == null ? undefined : t$1.response) == null ? undefined : v.data) || {};
|
|
3807
|
+
if (!(!(getQuery("code") || "") && !qn && (n === 401 || (i == null ? undefined : i.code) === 401))) {
|
|
3810
3808
|
_context1.n = 1;
|
|
3811
3809
|
break;
|
|
3812
3810
|
}
|
|
3813
|
-
kn ?
|
|
3814
|
-
redirect_uri:
|
|
3815
|
-
})) : jn(), o = i, r = a[n || (i == null ? undefined : i.code)] || (i == null ? undefined : i.msg) || (t == null ? undefined : t.message);
|
|
3811
|
+
kn ? login(_objectSpread(_objectSpread({}, getTokenParams), {}, {
|
|
3812
|
+
redirect_uri: real_uri
|
|
3813
|
+
})) : jn(), o = i, r = a[n || (i == null ? undefined : i.code)] || (i == null ? undefined : i.msg) || (t$1 == null ? undefined : t$1.message);
|
|
3816
3814
|
_context1.n = 6;
|
|
3817
3815
|
break;
|
|
3818
3816
|
case 1:
|
|
3819
|
-
if (!t.response) {
|
|
3817
|
+
if (!t$1.response) {
|
|
3820
3818
|
_context1.n = 5;
|
|
3821
3819
|
break;
|
|
3822
3820
|
}
|
|
@@ -3834,7 +3832,7 @@ var Nl = 1e3,
|
|
|
3834
3832
|
} catch (_unused20) {
|
|
3835
3833
|
h({
|
|
3836
3834
|
code: 400,
|
|
3837
|
-
msg:
|
|
3835
|
+
msg: t("blob解析错误")
|
|
3838
3836
|
});
|
|
3839
3837
|
}
|
|
3840
3838
|
};
|
|
@@ -3850,17 +3848,17 @@ var Nl = 1e3,
|
|
|
3850
3848
|
h = (_ref23 = e == null ? undefined : e.i18n) !== null && _ref23 !== void 0 ? _ref23 : true;
|
|
3851
3849
|
if (_l && h) {
|
|
3852
3850
|
w = (_ref24 = i == null ? undefined : i.status) !== null && _ref24 !== void 0 ? _ref24 : "";
|
|
3853
|
-
r = !(i != null && i.data) || !i.data.length ?
|
|
3851
|
+
r = !(i != null && i.data) || !i.data.length ? t(w) : t.apply(void 0, [w].concat(_toConsumableArray(i.data)));
|
|
3854
3852
|
} else r = (_ref25 = i == null ? undefined : i.msg) !== null && _ref25 !== void 0 ? _ref25 : "";
|
|
3855
3853
|
o = i;
|
|
3856
3854
|
case 4:
|
|
3857
|
-
r || (r = a[t.response.status] || t.message);
|
|
3855
|
+
r || (r = a[t$1.response.status] || t$1.message);
|
|
3858
3856
|
_context1.n = 6;
|
|
3859
3857
|
break;
|
|
3860
3858
|
case 5:
|
|
3861
|
-
t.request ? t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r =
|
|
3859
|
+
t$1.request ? t$1.code === "ERR_CANCELED" ? t$1.abortReason && (r = t$1.abortReason) : r = t("网络异常,请检查您的网络情况") : t$1.code === "ERR_CANCELED" ? t$1.abortReason && (r = t$1.abortReason) : r = t("请求配置异常");
|
|
3862
3860
|
case 6:
|
|
3863
|
-
e != null && e.customErrorMessage && (r = e == null ? undefined : e.customErrorMessage(r, t));
|
|
3861
|
+
e != null && e.customErrorMessage && (r = e == null ? undefined : e.customErrorMessage(r, t$1));
|
|
3864
3862
|
u = Date.now(), l = r === qr, c = u - jr < Nl;
|
|
3865
3863
|
return _context1.a(2, (!(e != null && e.ignoreErrorMessage) && r && (!l || !c) && ((m = (y = window.DasMessage) == null ? undefined : y.error) == null || m.call(y, {
|
|
3866
3864
|
message: r,
|
|
@@ -3868,7 +3866,7 @@ var Nl = 1e3,
|
|
|
3868
3866
|
}), qr = r, jr = u), _objectSpread(_objectSpread({}, o), {}, {
|
|
3869
3867
|
code: n,
|
|
3870
3868
|
msg: r,
|
|
3871
|
-
error: t
|
|
3869
|
+
error: t$1
|
|
3872
3870
|
})));
|
|
3873
3871
|
}
|
|
3874
3872
|
}, _callee0);
|
|
@@ -3879,14 +3877,14 @@ var Nl = 1e3,
|
|
|
3879
3877
|
}(),
|
|
3880
3878
|
Il = function Il(t, e) {
|
|
3881
3879
|
var n = R.create();
|
|
3882
|
-
return curringHttp
|
|
3880
|
+
return curringHttp(n, /*#__PURE__*/function () {
|
|
3883
3881
|
var _ref26 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(r) {
|
|
3884
3882
|
var _r$csrf;
|
|
3885
|
-
var o, l, c, _c, s,
|
|
3883
|
+
var o, l, c, _c, s, _getProjectInfo$id, _l3, _c2, _getInstanceInfo, _l4, _t11;
|
|
3886
3884
|
return _regenerator().w(function (_context10) {
|
|
3887
3885
|
while (1) switch (_context10.n) {
|
|
3888
3886
|
case 0:
|
|
3889
|
-
o =
|
|
3887
|
+
o = getConfig();
|
|
3890
3888
|
if (!(r.headers || (r.headers = {}), !(r != null && r["public"]))) {
|
|
3891
3889
|
_context10.n = 7;
|
|
3892
3890
|
break;
|
|
@@ -3906,21 +3904,21 @@ var Nl = 1e3,
|
|
|
3906
3904
|
break;
|
|
3907
3905
|
}
|
|
3908
3906
|
_context10.n = 1;
|
|
3909
|
-
return
|
|
3907
|
+
return getToken(r);
|
|
3910
3908
|
case 1:
|
|
3911
3909
|
l = _context10.v;
|
|
3912
3910
|
case 2:
|
|
3913
3911
|
_context10.n = 6;
|
|
3914
3912
|
break;
|
|
3915
3913
|
case 3:
|
|
3916
|
-
l || (l =
|
|
3914
|
+
l || (l = getAccessToken());
|
|
3917
3915
|
_c = JSON.parse(window.localStorage.getItem("tokenInfo") || "{}");
|
|
3918
3916
|
if (!l) {
|
|
3919
3917
|
_context10.n = 5;
|
|
3920
3918
|
break;
|
|
3921
3919
|
}
|
|
3922
3920
|
_context10.n = 4;
|
|
3923
|
-
return
|
|
3921
|
+
return getValidAccessToken(_c, function (d) {
|
|
3924
3922
|
window.localStorage.setItem("tokenInfo", JSON.stringify(d));
|
|
3925
3923
|
});
|
|
3926
3924
|
case 4:
|
|
@@ -3943,13 +3941,13 @@ var Nl = 1e3,
|
|
|
3943
3941
|
if (s.project === undefined) {
|
|
3944
3942
|
_l3 = 0;
|
|
3945
3943
|
_c2 = new URL(location.href).searchParams;
|
|
3946
|
-
_l3 = _c2.get("project") || _c2.get("projectId") || 0, _l3 || (_l3 = (
|
|
3944
|
+
_l3 = _c2.get("project") || _c2.get("projectId") || 0, _l3 || (_l3 = (_getProjectInfo$id = getProjectInfo().id) !== null && _getProjectInfo$id !== void 0 ? _getProjectInfo$id : 0), (_l3 || _l3 === 0) && (s.project = _l3);
|
|
3947
3945
|
}
|
|
3948
3946
|
if (new URL(location.href).pathname.startsWith("/iot/iot") || new URL(location.href).searchParams.get("app") === "iot") {
|
|
3949
|
-
|
|
3947
|
+
_getInstanceInfo = getInstanceInfo(), _l4 = _getInstanceInfo.instanceInfo;
|
|
3950
3948
|
_l4 != null && _l4.instanceId && (s.instance = _l4.instanceId);
|
|
3951
3949
|
}
|
|
3952
|
-
return _context10.a(2, (r.params = s, r.headers.Timezone = Lt.tz.guess(), r.headers["X-Origin"] = location.origin, r.headers["Accept-Language"] =
|
|
3950
|
+
return _context10.a(2, (r.params = s, r.headers.Timezone = Lt.tz.guess(), r.headers["X-Origin"] = location.origin, r.headers["Accept-Language"] = currentLang.value, kr.set("uiCulture", currentLang.value), r));
|
|
3953
3951
|
}
|
|
3954
3952
|
}, _callee1);
|
|
3955
3953
|
}));
|
|
@@ -3960,4 +3958,4 @@ var Nl = 1e3,
|
|
|
3960
3958
|
},
|
|
3961
3959
|
$l = "v1",
|
|
3962
3960
|
Gl = Il("/api/permission/".concat($l));
|
|
3963
|
-
|
|
3961
|
+
export { Gl as permission };
|