@das-fed/upf-utils 6.4.0-dev.175 → 6.4.0-dev.176
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 +114 -75
- package/api-services/i18n/es5.js +6 -1
- package/api-services/modules/app-manage/es5.js +1008 -994
- package/api-services/modules/app-manage/index.js +804 -786
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +41 -39
- package/api-services/modules/bems/es5.js +1012 -1022
- package/api-services/modules/bems/index.js +800 -818
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +41 -39
- package/api-services/modules/duty-manage/es5.js +1008 -1018
- package/api-services/modules/duty-manage/index.js +799 -817
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +41 -39
- package/api-services/modules/es5.js +113 -75
- package/api-services/modules/file/es5.js +1159 -1144
- package/api-services/modules/file/index.js +900 -882
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +41 -39
- package/api-services/modules/iot/es5.js +46 -39
- package/api-services/modules/justauth/es5.js +999 -1005
- package/api-services/modules/justauth/index.js +789 -803
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +832 -827
- package/api-services/modules/knowledge/index.js +621 -617
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +41 -39
- package/api-services/modules/permission/es5.js +996 -1006
- package/api-services/modules/permission/index.js +786 -804
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +988 -994
- package/api-services/modules/platformManage/index.js +777 -795
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +1008 -994
- package/api-services/modules/portal/index.js +804 -786
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +1008 -994
- package/api-services/modules/space-manage/index.js +804 -786
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +44 -39
- package/api-services/modules/supplier/es5.js +43 -39
- package/api-services/modules/supplychain-manage/es5.js +1008 -994
- package/api-services/modules/supplychain-manage/index.js +804 -786
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +996 -1006
- package/api-services/modules/systemConfiguration/index.js +786 -804
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +41 -39
- package/api-services/src/create-service/es5.js +41 -39
- package/atob/es5.js +4 -1
- package/common-info/es5.js +31 -13
- package/common-info/getIframeUrl/es5.js +5 -3
- package/common-info/getInfoFromUrl/es5.js +5 -2
- package/common-info/set-personal-info/es5.js +9 -7
- package/common-tools/arr-tools/es5.js +4 -1
- package/common-tools/calc-text-width/es5.js +3 -1
- package/common-tools/date-format/es5.js +3 -1
- package/common-tools/es5.js +128 -14
- package/common-tools/extract-file-name/es5.js +5 -3
- package/common-tools/get-file-extension/es5.js +3 -1
- package/common-tools/get-url-params/es5.js +9 -1
- package/common-tools/handle-data/es5.js +71 -46
- package/common-tools/handle-data/index.js +37 -36
- package/common-tools/handle-data/index.js.gz +0 -0
- package/common-tools/nest-tree-format/es5.js +6 -1
- package/common-tools/obj-tools/es5.js +3 -1
- package/common-tools/platform-tools/es5.js +8 -3
- package/common-tools/queue-promise/es5.js +3 -1
- package/common-tools/setHtmlMinWH/es5.js +3 -1
- package/common-tools/update-browser-title/es5.js +5 -3
- package/common-tools/update-fav-icon/es5.js +10 -7
- package/config/es5.js +3 -1
- package/create-api-service/check-token/es5.js +6 -4
- package/create-api-service/es5.js +994 -1004
- package/create-api-service/i18n/es5.js +6 -1
- package/create-api-service/index.js +785 -803
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/proxy-sso/es5.js +5 -3
- package/create-api-service/sso/es5.js +50 -42
- package/curring-http/es5.js +9 -7
- package/dimple-canvas/es5.js +15 -1
- package/directive/auth/es5.js +15 -13
- package/directive/clickOutside/es5.js +6 -4
- package/directive/es5.js +23 -3
- package/directive/hoverInside/es5.js +6 -4
- package/directive/utils/es5.js +3 -1
- package/dom-check-in/es5.js +3 -1
- package/dom-watcher/es5.js +3 -1
- package/hooks/popup-manager/use-zindex/es5.js +3 -1
- package/hooks/use-get-auth/es5.js +15 -13
- package/load-js/es5.js +8 -6
- package/nextTiken/es5.js +14 -8
- package/oss/es5.js +8 -5
- package/package.json +4 -4
- package/pinyin-first-character/es5.js +3 -1
- package/process-engine-info/es5.js +6 -1
- package/pure-image-src/es5.js +3 -1
- package/size-watcher/es5.js +8 -5
- package/style/es5.js +15 -6
- package/token-tools/es5.js +6 -1
- package/use-low-code/es5.js +11 -9
- package/vue/es5.js +9 -1
- package/vue/hooks/use-model-value/es5.js +6 -4
- package/webSocket-service/es5.js +9 -7
- package/with-install/es5.js +3 -1
|
Binary file
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
1
3
|
var _Gt$sso, _Gt$i18n, _Gt$noRedireLogin;
|
|
2
4
|
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); }
|
|
3
5
|
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); }); }; }
|
|
@@ -33,16 +35,16 @@ function _asyncGeneratorDelegate(t) { var e = {}, n = !1; function pump(e, r) {
|
|
|
33
35
|
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
34
36
|
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"); }
|
|
35
37
|
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); }
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
var index = require('@das-fed/upf-web/packages/i18n/index');
|
|
39
|
+
var curringHttp = require('@das-fed/upf-utils/curring-http/es5');
|
|
40
|
+
var sso = require('@das-fed/upf-utils/create-api-service/sso/es5');
|
|
41
|
+
var It = require('dayjs');
|
|
42
|
+
var Gn = require('dayjs/plugin/utc');
|
|
43
|
+
var Jn = require('dayjs/plugin/timezone');
|
|
44
|
+
var commonInfo = require('@das-fed/upf-utils/common-info/es5');
|
|
45
|
+
var tokenTools = require('@das-fed/upf-utils/token-tools/es5');
|
|
46
|
+
var config = require('@das-fed/upf-utils/config/es5');
|
|
47
|
+
var checkToken = require('@das-fed/upf-utils/create-api-service/check-token/es5');
|
|
46
48
|
function Mr(t, e) {
|
|
47
49
|
return function () {
|
|
48
50
|
return t.apply(e, arguments);
|
|
@@ -3748,10 +3750,10 @@ var Nl = {
|
|
|
3748
3750
|
_appCode: "framework"
|
|
3749
3751
|
}
|
|
3750
3752
|
};
|
|
3751
|
-
setI18nRule(Nl);
|
|
3753
|
+
index.setI18nRule(Nl);
|
|
3752
3754
|
It.extend(Gn);
|
|
3753
3755
|
It.extend(Jn);
|
|
3754
|
-
var Gt = getConfig(),
|
|
3756
|
+
var Gt = config.getConfig(),
|
|
3755
3757
|
In = (_Gt$sso = Gt.sso) !== null && _Gt$sso !== void 0 ? _Gt$sso : true,
|
|
3756
3758
|
Fl = (_Gt$i18n = Gt.i18n) !== null && _Gt$i18n !== void 0 ? _Gt$i18n : true,
|
|
3757
3759
|
Bn = (_Gt$noRedireLogin = Gt.noRedireLogin) !== null && _Gt$noRedireLogin !== void 0 ? _Gt$noRedireLogin : false;
|
|
@@ -3780,29 +3782,29 @@ var Dl = 1e3,
|
|
|
3780
3782
|
};
|
|
3781
3783
|
}(),
|
|
3782
3784
|
Il = /*#__PURE__*/function () {
|
|
3783
|
-
var _ref22 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(t
|
|
3785
|
+
var _ref22 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(t, e) {
|
|
3784
3786
|
var d, p, v, y, m, n, r, o, a, i, _ref23, _ref25, h, _ref24, b, u, l, c, _t10;
|
|
3785
3787
|
return _regenerator().w(function (_context1) {
|
|
3786
3788
|
while (1) switch (_context1.n) {
|
|
3787
3789
|
case 0:
|
|
3788
|
-
n = ((d = t
|
|
3790
|
+
n = ((d = t.response) == null ? undefined : d.status) || 500, r = (p = t.response) == null ? undefined : p.message, o = {};
|
|
3789
3791
|
a = {
|
|
3790
|
-
400: t("参数校验错误"),
|
|
3791
|
-
404: t("接口地址未找到"),
|
|
3792
|
-
500: t("服务器内部错误")
|
|
3792
|
+
400: index.t("参数校验错误"),
|
|
3793
|
+
404: index.t("接口地址未找到"),
|
|
3794
|
+
500: index.t("服务器内部错误")
|
|
3793
3795
|
};
|
|
3794
|
-
i = ((v = t
|
|
3795
|
-
if (!(!(getQuery("code") || "") && !Bn && (n === 401 || (i == null ? undefined : i.code) === 401))) {
|
|
3796
|
+
i = ((v = t == null ? undefined : t.response) == null ? undefined : v.data) || {};
|
|
3797
|
+
if (!(!(sso.getQuery("code") || "") && !Bn && (n === 401 || (i == null ? undefined : i.code) === 401))) {
|
|
3796
3798
|
_context1.n = 1;
|
|
3797
3799
|
break;
|
|
3798
3800
|
}
|
|
3799
|
-
In ? login(_objectSpread(_objectSpread({}, getTokenParams), {}, {
|
|
3800
|
-
redirect_uri: real_uri
|
|
3801
|
-
})) : Un(), o = i, r = a[n || (i == null ? undefined : i.code)] || (i == null ? undefined : i.msg) || (t
|
|
3801
|
+
In ? sso.login(_objectSpread(_objectSpread({}, sso.getTokenParams), {}, {
|
|
3802
|
+
redirect_uri: sso.real_uri
|
|
3803
|
+
})) : Un(), o = i, r = a[n || (i == null ? undefined : i.code)] || (i == null ? undefined : i.msg) || (t == null ? undefined : t.message);
|
|
3802
3804
|
_context1.n = 6;
|
|
3803
3805
|
break;
|
|
3804
3806
|
case 1:
|
|
3805
|
-
if (!t
|
|
3807
|
+
if (!t.response) {
|
|
3806
3808
|
_context1.n = 5;
|
|
3807
3809
|
break;
|
|
3808
3810
|
}
|
|
@@ -3820,7 +3822,7 @@ var Dl = 1e3,
|
|
|
3820
3822
|
} catch (_unused20) {
|
|
3821
3823
|
h({
|
|
3822
3824
|
code: 400,
|
|
3823
|
-
msg: t("blob解析错误")
|
|
3825
|
+
msg: index.t("blob解析错误")
|
|
3824
3826
|
});
|
|
3825
3827
|
}
|
|
3826
3828
|
};
|
|
@@ -3836,17 +3838,17 @@ var Dl = 1e3,
|
|
|
3836
3838
|
h = (_ref23 = e == null ? undefined : e.i18n) !== null && _ref23 !== void 0 ? _ref23 : true;
|
|
3837
3839
|
if (Fl && h) {
|
|
3838
3840
|
b = (_ref24 = i == null ? undefined : i.status) !== null && _ref24 !== void 0 ? _ref24 : "";
|
|
3839
|
-
r = !(i != null && i.data) || !i.data.length ? t(b) : t.apply(
|
|
3841
|
+
r = !(i != null && i.data) || !i.data.length ? index.t(b) : index.t.apply(index, [b].concat(_toConsumableArray(i.data)));
|
|
3840
3842
|
} else r = (_ref25 = i == null ? undefined : i.msg) !== null && _ref25 !== void 0 ? _ref25 : "";
|
|
3841
3843
|
o = i;
|
|
3842
3844
|
case 4:
|
|
3843
|
-
r || (r = a[t
|
|
3845
|
+
r || (r = a[t.response.status] || t.message);
|
|
3844
3846
|
_context1.n = 6;
|
|
3845
3847
|
break;
|
|
3846
3848
|
case 5:
|
|
3847
|
-
t
|
|
3849
|
+
t.request ? t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = index.t("网络异常,请检查您的网络情况") : t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = index.t("请求配置异常");
|
|
3848
3850
|
case 6:
|
|
3849
|
-
e != null && e.customErrorMessage && (r = e == null ? undefined : e.customErrorMessage(r, t
|
|
3851
|
+
e != null && e.customErrorMessage && (r = e == null ? undefined : e.customErrorMessage(r, t));
|
|
3850
3852
|
u = Date.now(), l = r === Br, c = u - Ur < Dl;
|
|
3851
3853
|
return _context1.a(2, (!(e != null && e.ignoreErrorMessage) && r && (!l || !c) && ((m = (y = window.DasMessage) == null ? undefined : y.error) == null || m.call(y, {
|
|
3852
3854
|
message: r,
|
|
@@ -3854,7 +3856,7 @@ var Dl = 1e3,
|
|
|
3854
3856
|
}), Br = r, Ur = u), _objectSpread(_objectSpread({}, o), {}, {
|
|
3855
3857
|
code: n,
|
|
3856
3858
|
msg: r,
|
|
3857
|
-
error: t
|
|
3859
|
+
error: t
|
|
3858
3860
|
})));
|
|
3859
3861
|
}
|
|
3860
3862
|
}, _callee0);
|
|
@@ -3865,14 +3867,14 @@ var Dl = 1e3,
|
|
|
3865
3867
|
}(),
|
|
3866
3868
|
Bl = function Bl(t, e) {
|
|
3867
3869
|
var n = R.create();
|
|
3868
|
-
return curringHttp(n, /*#__PURE__*/function () {
|
|
3870
|
+
return curringHttp.curringHttp(n, /*#__PURE__*/function () {
|
|
3869
3871
|
var _ref26 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(r) {
|
|
3870
3872
|
var _r$csrf;
|
|
3871
|
-
var o, l, c, _c, s,
|
|
3873
|
+
var o, l, c, _c, s, _commonInfo$getProjec, _l3, _c2, _commonInfo$getInstan, _l4, _t11;
|
|
3872
3874
|
return _regenerator().w(function (_context10) {
|
|
3873
3875
|
while (1) switch (_context10.n) {
|
|
3874
3876
|
case 0:
|
|
3875
|
-
o = getConfig();
|
|
3877
|
+
o = config.getConfig();
|
|
3876
3878
|
if (!(r.headers || (r.headers = {}), !(r != null && r["public"]))) {
|
|
3877
3879
|
_context10.n = 7;
|
|
3878
3880
|
break;
|
|
@@ -3892,21 +3894,21 @@ var Dl = 1e3,
|
|
|
3892
3894
|
break;
|
|
3893
3895
|
}
|
|
3894
3896
|
_context10.n = 1;
|
|
3895
|
-
return getToken(r);
|
|
3897
|
+
return sso.getToken(r);
|
|
3896
3898
|
case 1:
|
|
3897
3899
|
l = _context10.v;
|
|
3898
3900
|
case 2:
|
|
3899
3901
|
_context10.n = 6;
|
|
3900
3902
|
break;
|
|
3901
3903
|
case 3:
|
|
3902
|
-
l || (l = getAccessToken());
|
|
3904
|
+
l || (l = tokenTools.getAccessToken());
|
|
3903
3905
|
_c = JSON.parse(window.localStorage.getItem("tokenInfo") || "{}");
|
|
3904
3906
|
if (!l) {
|
|
3905
3907
|
_context10.n = 5;
|
|
3906
3908
|
break;
|
|
3907
3909
|
}
|
|
3908
3910
|
_context10.n = 4;
|
|
3909
|
-
return getValidAccessToken(_c, function (p) {
|
|
3911
|
+
return checkToken.getValidAccessToken(_c, function (p) {
|
|
3910
3912
|
window.localStorage.setItem("tokenInfo", JSON.stringify(p));
|
|
3911
3913
|
});
|
|
3912
3914
|
case 4:
|
|
@@ -3929,13 +3931,13 @@ var Dl = 1e3,
|
|
|
3929
3931
|
if (s.project === undefined) {
|
|
3930
3932
|
_l3 = 0;
|
|
3931
3933
|
_c2 = new URL(location.href).searchParams;
|
|
3932
|
-
_l3 = _c2.get("project") || _c2.get("projectId") || 0, _l3 || (_l3 = (
|
|
3934
|
+
_l3 = _c2.get("project") || _c2.get("projectId") || 0, _l3 || (_l3 = (_commonInfo$getProjec = commonInfo.getProjectInfo().id) !== null && _commonInfo$getProjec !== void 0 ? _commonInfo$getProjec : 0), (_l3 || _l3 === 0) && (s.project = _l3);
|
|
3933
3935
|
}
|
|
3934
3936
|
if (new URL(location.href).pathname.startsWith("/iot/iot") || new URL(location.href).searchParams.get("app") === "iot") {
|
|
3935
|
-
|
|
3937
|
+
_commonInfo$getInstan = commonInfo.getInstanceInfo(), _l4 = _commonInfo$getInstan.instanceInfo;
|
|
3936
3938
|
_l4 != null && _l4.instanceId && (s.instance = _l4.instanceId);
|
|
3937
3939
|
}
|
|
3938
|
-
return _context10.a(2, (r.params = s, r.headers.Timezone = It.tz.guess(), r.headers["X-Origin"] = location.origin, r.headers["Accept-Language"] = currentLang.value, Ir.set("uiCulture", currentLang.value), r));
|
|
3940
|
+
return _context10.a(2, (r.params = s, r.headers.Timezone = It.tz.guess(), r.headers["X-Origin"] = location.origin, r.headers["Accept-Language"] = index.currentLang.value, Ir.set("uiCulture", index.currentLang.value), r));
|
|
3939
3941
|
}
|
|
3940
3942
|
}, _callee1);
|
|
3941
3943
|
}));
|
|
@@ -3946,4 +3948,4 @@ var Dl = 1e3,
|
|
|
3946
3948
|
},
|
|
3947
3949
|
Ul = "v1",
|
|
3948
3950
|
Vl = Bl("/api/custom-datasource/custom/".concat(Ul));
|
|
3949
|
-
|
|
3951
|
+
exports.daslink = Vl;
|