@das-fed/upf-utils 6.4.0-dev.185 → 6.4.0-dev.187
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 +943 -946
- package/api-services/index.js +700 -704
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +980 -968
- 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 +978 -969
- package/api-services/modules/authentication/index.js +802 -788
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +798 -796
- package/api-services/modules/bems/index.js +621 -617
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +980 -968
- package/api-services/modules/contract/index.js +804 -786
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +968 -980
- package/api-services/modules/enterpriseright/index.js +786 -804
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +1187 -1175
- package/api-services/modules/file/es5.js +1091 -1103
- package/api-services/modules/file/index.js +882 -900
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/index.js +946 -928
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +982 -970
- 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 +980 -968
- package/api-services/modules/knowledge/index.js +804 -786
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +980 -968
- package/api-services/modules/link/index.js +804 -786
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +978 -969
- package/api-services/modules/permission/index.js +802 -788
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +980 -968
- 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 +980 -968
- 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 +996 -984
- 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 +990 -1002
- package/api-services/modules/supplier/index.js +804 -822
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +968 -980
- 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 +801 -798
- package/api-services/modules/tool/index.js +621 -617
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +978 -966
- package/api-services/src/create-service/index.js +803 -785
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +147 -112
- package/common-info/index.d.ts +5 -1
- package/common-info/index.js +82 -56
- package/common-info/index.js.gz +0 -0
- package/common-info/type.d.ts +15 -0
- package/common-tools/handle-data/es5.js +156 -185
- package/common-tools/handle-data/index.js +106 -87
- package/common-tools/handle-data/index.js.gz +0 -0
- package/directive/auth/es5.js +47 -61
- package/directive/auth/index.js +41 -48
- package/directive/auth/index.js.gz +0 -0
- package/esm-map.json +3 -1
- package/package.json +4 -4
|
@@ -1,130 +1,149 @@
|
|
|
1
|
-
import { getConfig as
|
|
2
|
-
const
|
|
3
|
-
var
|
|
4
|
-
return (((
|
|
5
|
-
},
|
|
6
|
-
const
|
|
1
|
+
import { getConfig as _ } from "@das-fed/upf-utils/config";
|
|
2
|
+
const M = (f) => f === null || typeof f > "u" || f === "", z = (f) => {
|
|
3
|
+
var n;
|
|
4
|
+
return (((n = _()) == null ? void 0 : n.systemLangList) || ["zh-CN", "en-US", "zh-MO"]).includes(f);
|
|
5
|
+
}, A = async (f) => {
|
|
6
|
+
const x = f || {};
|
|
7
7
|
let {
|
|
8
|
-
currentLang:
|
|
9
|
-
baseUrl:
|
|
10
|
-
appName:
|
|
11
|
-
isPullFrontEnd:
|
|
8
|
+
currentLang: n = "zh-CN",
|
|
9
|
+
baseUrl: c = "/",
|
|
10
|
+
appName: h = "jc",
|
|
11
|
+
isPullFrontEnd: L = !0,
|
|
12
12
|
isPullBack: N = !1,
|
|
13
|
-
isDasUI:
|
|
14
|
-
fallbackBaseUrl:
|
|
15
|
-
} =
|
|
16
|
-
(typeof
|
|
17
|
-
let
|
|
18
|
-
Array.isArray(
|
|
19
|
-
const
|
|
13
|
+
isDasUI: O = !1,
|
|
14
|
+
fallbackBaseUrl: a = ""
|
|
15
|
+
} = x;
|
|
16
|
+
(typeof n != "string" || !n) && (n = "zh-CN");
|
|
17
|
+
let l = [];
|
|
18
|
+
Array.isArray(h) ? (l = h.filter((r) => typeof r == "string" && r), l.length === 0 && (l = ["jc"])) : typeof h == "string" && h ? l = [h] : l = ["jc"], typeof c != "string" && (c = "/"), c || (c = "/"), c.endsWith("/") || (c = c + "/"), typeof a != "string" && (a = ""), a && !a.endsWith("/") && (a = a + "/");
|
|
19
|
+
const y = {
|
|
20
20
|
frontEnd: null,
|
|
21
21
|
// 统一格式:{ appName1: data1, appName2: data2, ... }
|
|
22
22
|
dasUiEnd: null,
|
|
23
23
|
backMsg: null
|
|
24
24
|
// 统一格式:{ appName1: data1, appName2: data2, ... }
|
|
25
25
|
};
|
|
26
|
-
let
|
|
27
|
-
const
|
|
28
|
-
const u = async (
|
|
26
|
+
let m = !1;
|
|
27
|
+
const j = async (r, s, $ = "zh-CN", w = "资源") => {
|
|
28
|
+
const u = async (i) => {
|
|
29
29
|
try {
|
|
30
30
|
if (typeof window < "u" && typeof window.fetch == "function") {
|
|
31
|
-
const
|
|
32
|
-
return !
|
|
31
|
+
const o = await window.fetch(i, { cache: "no-cache" });
|
|
32
|
+
return !o || !o.ok ? null : await o.text();
|
|
33
33
|
} else
|
|
34
|
-
return await new Promise((
|
|
34
|
+
return await new Promise((o) => {
|
|
35
35
|
try {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
},
|
|
36
|
+
const t = new XMLHttpRequest();
|
|
37
|
+
t.open("GET", i, !0), t.onreadystatechange = function() {
|
|
38
|
+
t.readyState === 4 && o(t.status >= 200 && t.status < 300 ? t.responseText : null);
|
|
39
|
+
}, t.onerror = function() {
|
|
40
|
+
o(null);
|
|
41
|
+
}, t.send();
|
|
42
42
|
} catch {
|
|
43
|
-
|
|
43
|
+
o(null);
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
} catch {
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
49
|
-
},
|
|
50
|
-
|
|
49
|
+
}, F = (i) => {
|
|
50
|
+
if (!i || typeof i != "string")
|
|
51
|
+
return null;
|
|
52
|
+
const t = i.replace(/^\uFEFF/, "").trim();
|
|
53
|
+
if (t.startsWith("{"))
|
|
54
|
+
try {
|
|
55
|
+
const e = JSON.parse(t);
|
|
56
|
+
if (e && typeof e == "object")
|
|
57
|
+
return e;
|
|
58
|
+
} catch {
|
|
59
|
+
}
|
|
60
|
+
const b = t.match(/export\s+default\s*/);
|
|
61
|
+
if (!b || b.index === void 0)
|
|
62
|
+
return null;
|
|
51
63
|
try {
|
|
52
|
-
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
64
|
+
let e = t.substring(b.index);
|
|
65
|
+
if (e = e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|\n)\s*\/\/.*(?=\n|$)/g, "$1").trim(), e = e.replace(/^\s*export\s+default\s*/, "").replace(/;?\s*$/, "").trim(), !e)
|
|
66
|
+
return null;
|
|
67
|
+
try {
|
|
68
|
+
const d = new Function(`return ${e}`)();
|
|
69
|
+
if (d && typeof d == "object")
|
|
70
|
+
return d;
|
|
71
|
+
} catch {
|
|
72
|
+
}
|
|
73
|
+
try {
|
|
74
|
+
const g = e.indexOf("{"), d = e.lastIndexOf("}");
|
|
75
|
+
if (g === -1 || d === -1 || d <= g)
|
|
76
|
+
return null;
|
|
77
|
+
let p = e.slice(g, d + 1);
|
|
78
|
+
p = p.replace(
|
|
79
|
+
/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/g,
|
|
80
|
+
'$1"$2":'
|
|
81
|
+
), p = p.replace(/'([^'\\]*(\\.[^'\\]*)*)'/g, '"$1"'), p = p.replace(/,\s*([}\]])/g, "$1");
|
|
82
|
+
const E = JSON.parse(p);
|
|
83
|
+
if (E && typeof E == "object")
|
|
84
|
+
return E;
|
|
85
|
+
} catch {
|
|
58
86
|
}
|
|
87
|
+
return null;
|
|
59
88
|
} catch {
|
|
60
89
|
return null;
|
|
61
90
|
}
|
|
62
|
-
},
|
|
63
|
-
if (!
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
try {
|
|
77
|
-
return await p;
|
|
78
|
-
} finally {
|
|
79
|
-
m.delete(n);
|
|
80
|
-
}
|
|
81
|
-
}, j = await b(a);
|
|
82
|
-
if (j) return j;
|
|
83
|
-
if (s && O(h)) {
|
|
84
|
-
const l = await b(s);
|
|
85
|
-
if (l) return l;
|
|
91
|
+
}, U = async (i) => {
|
|
92
|
+
if (!i) return null;
|
|
93
|
+
const o = await u(i);
|
|
94
|
+
if (!o)
|
|
95
|
+
return null;
|
|
96
|
+
const t = F(o);
|
|
97
|
+
return t !== null && typeof t == "object" ? t : null;
|
|
98
|
+
}, k = await U(r);
|
|
99
|
+
if (k)
|
|
100
|
+
return k;
|
|
101
|
+
if (s && z($)) {
|
|
102
|
+
const i = await U(s);
|
|
103
|
+
if (i)
|
|
104
|
+
return i;
|
|
86
105
|
}
|
|
87
106
|
return null;
|
|
88
107
|
};
|
|
89
|
-
if (
|
|
90
|
-
const
|
|
91
|
-
for (const s of
|
|
92
|
-
const
|
|
93
|
-
h,
|
|
108
|
+
if (L) {
|
|
109
|
+
const r = {};
|
|
110
|
+
for (const s of l) {
|
|
111
|
+
const $ = `${c}front-end/i18n/front-end-page/${s}_${n}.js`, w = a ? `${a}front-end/i18n/front-end-page/${s}_${n}.js` : void 0, u = await j(
|
|
94
112
|
$,
|
|
95
|
-
|
|
113
|
+
w,
|
|
114
|
+
n,
|
|
96
115
|
`前端业务语言资源(${s})`
|
|
97
116
|
);
|
|
98
|
-
u && (
|
|
117
|
+
u && (r[s] = u, m = !0);
|
|
99
118
|
}
|
|
100
|
-
Object.keys(
|
|
119
|
+
Object.keys(r).length > 0 && (y.frontEnd = r);
|
|
101
120
|
}
|
|
102
121
|
if (N) {
|
|
103
|
-
const
|
|
104
|
-
for (const s of
|
|
105
|
-
const
|
|
106
|
-
h,
|
|
122
|
+
const r = {};
|
|
123
|
+
for (const s of l) {
|
|
124
|
+
const $ = `${c}front-end/i18n/return-msg/${s}_${n}.js`, w = a ? `${a}front-end/i18n/return-msg/${s}_${n}.js` : void 0, u = await j(
|
|
107
125
|
$,
|
|
108
|
-
|
|
126
|
+
w,
|
|
127
|
+
n,
|
|
109
128
|
`后端语言资源(${s})`
|
|
110
129
|
);
|
|
111
|
-
u && (
|
|
130
|
+
u && (r[s] = u, m = !0);
|
|
112
131
|
}
|
|
113
|
-
Object.keys(
|
|
132
|
+
Object.keys(r).length > 0 && (y.backMsg = r);
|
|
114
133
|
}
|
|
115
|
-
if (
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
134
|
+
if (O) {
|
|
135
|
+
const r = `${c}front-end/i18n/front-end-page/dasui_${n}.js`, s = a ? `${a}front-end/i18n/front-end-page/dasui_${n}.js` : void 0;
|
|
136
|
+
y.dasUiEnd = await j(
|
|
137
|
+
r,
|
|
119
138
|
s,
|
|
120
|
-
|
|
139
|
+
n,
|
|
121
140
|
"UI组件库语言资源"
|
|
122
|
-
),
|
|
141
|
+
), y.dasUiEnd && (m = !0);
|
|
123
142
|
}
|
|
124
|
-
return
|
|
143
|
+
return y;
|
|
125
144
|
};
|
|
126
145
|
export {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
146
|
+
A as handleI18nData,
|
|
147
|
+
z as isCurrentLangInSysLang,
|
|
148
|
+
M as isEmpty
|
|
130
149
|
};
|
|
Binary file
|
package/directive/auth/es5.js
CHANGED
|
@@ -3,25 +3,24 @@
|
|
|
3
3
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
4
4
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
5
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
|
-
var commonTools = require('@das-fed/upf-utils/common-tools/es5');
|
|
7
6
|
var commonInfo = require('@das-fed/upf-utils/common-info/es5');
|
|
8
7
|
var utils = require('@das-fed/upf-utils/directive/utils/es5');
|
|
9
|
-
var
|
|
10
|
-
if (!e || !
|
|
11
|
-
if (typeof
|
|
12
|
-
return s
|
|
8
|
+
var m = function m(e, s) {
|
|
9
|
+
if (!e || !s) return false;
|
|
10
|
+
if (typeof s == "string") return !!e.find(function (r) {
|
|
11
|
+
return r.endsWith(s);
|
|
13
12
|
});
|
|
14
13
|
{
|
|
15
|
-
var
|
|
16
|
-
var _iterator = _createForOfIteratorHelper(
|
|
14
|
+
var t = false;
|
|
15
|
+
var _iterator = _createForOfIteratorHelper(s),
|
|
17
16
|
_step;
|
|
18
17
|
try {
|
|
19
18
|
var _loop = function _loop() {
|
|
20
|
-
var
|
|
21
|
-
if (e.find(function (
|
|
22
|
-
return
|
|
19
|
+
var r = _step.value;
|
|
20
|
+
if (e.find(function (i) {
|
|
21
|
+
return i.endsWith(r);
|
|
23
22
|
})) {
|
|
24
|
-
|
|
23
|
+
t = true;
|
|
25
24
|
return 1; // break
|
|
26
25
|
}
|
|
27
26
|
};
|
|
@@ -33,64 +32,51 @@ var A = function A(e, t) {
|
|
|
33
32
|
} finally {
|
|
34
33
|
_iterator.f();
|
|
35
34
|
}
|
|
36
|
-
return
|
|
35
|
+
return t;
|
|
37
36
|
}
|
|
38
37
|
},
|
|
39
|
-
|
|
40
|
-
var _ref, _ref2
|
|
41
|
-
var
|
|
42
|
-
var t = (
|
|
43
|
-
r =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
});
|
|
53
|
-
if (d && d.length) {
|
|
54
|
-
var _ref6;
|
|
55
|
-
var f = d.find(function (u) {
|
|
56
|
-
return u != null && u.applicationPath ? r == null ? undefined : r.includes("/" + u.applicationPath + u.routeUrl) : r == null ? undefined : r.includes(u.routeUrl);
|
|
57
|
-
});
|
|
58
|
-
f && (l = (_ref6 = f == null ? undefined : f.code) !== null && _ref6 !== void 0 ? _ref6 : "");
|
|
59
|
-
}
|
|
38
|
+
n = function n(e) {
|
|
39
|
+
var _ref, _ref2;
|
|
40
|
+
var s = (_ref = e == null ? undefined : e.code) !== null && _ref !== void 0 ? _ref : "";
|
|
41
|
+
var t = (_ref2 = e == null ? undefined : e.menuCode) !== null && _ref2 !== void 0 ? _ref2 : "",
|
|
42
|
+
r = false;
|
|
43
|
+
if (s) {
|
|
44
|
+
var _commonInfo$getMenuIt;
|
|
45
|
+
var f = [];
|
|
46
|
+
if (!t) f = (_commonInfo$getMenuIt = commonInfo.getMenuItemInfo().authCodes) !== null && _commonInfo$getMenuIt !== void 0 ? _commonInfo$getMenuIt : [];else {
|
|
47
|
+
var i = commonInfo.getAuthobj()[t];
|
|
48
|
+
i && (r = i.some(function (l) {
|
|
49
|
+
return l.code === s;
|
|
50
|
+
}));
|
|
60
51
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
var _commonInfo$getPageAu;
|
|
65
|
-
var _c = (_commonInfo$getPageAu = commonInfo.getPageAuth(l, s)) !== null && _commonInfo$getPageAu !== void 0 ? _commonInfo$getPageAu : [];
|
|
66
|
-
a = A(_c, t);
|
|
67
|
-
} else a = !!commonInfo.getPageAuth(l, s);
|
|
68
|
-
return a;
|
|
52
|
+
r = m(f, s);
|
|
53
|
+
} else t && (r = !!commonInfo.getAuthobj()[t]);
|
|
54
|
+
return r;
|
|
69
55
|
},
|
|
70
|
-
|
|
71
|
-
|
|
56
|
+
c = function c(e, s) {
|
|
57
|
+
s === "hide" ? e.classList.add("is-hide") : (e.setAttribute("disabled", ""), e.classList.add("is-disabled"));
|
|
72
58
|
},
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
h = function h(e, s) {
|
|
60
|
+
s === "hide" ? e.classList.remove("is-hide") : (e.removeAttribute("disabled"), e.classList.remove("is-disabled"));
|
|
75
61
|
},
|
|
76
|
-
|
|
77
|
-
var
|
|
78
|
-
var
|
|
79
|
-
typeof
|
|
80
|
-
code:
|
|
62
|
+
A = function A(e, s) {
|
|
63
|
+
var _ref3;
|
|
64
|
+
var t = (e ? s.value : s) || {};
|
|
65
|
+
typeof t == "string" && (t = {
|
|
66
|
+
code: t
|
|
81
67
|
});
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
if (e) if (!
|
|
85
|
-
|
|
68
|
+
var r = (_ref3 = t == null ? undefined : t.type) !== null && _ref3 !== void 0 ? _ref3 : "hide",
|
|
69
|
+
f = n(t);
|
|
70
|
+
if (e) if (!s.oldValue) f || utils.getEl(e, t).then(function (i) {
|
|
71
|
+
c(i, r);
|
|
86
72
|
});else {
|
|
87
|
-
var
|
|
88
|
-
|
|
89
|
-
if (
|
|
90
|
-
utils.getEl(e,
|
|
91
|
-
|
|
73
|
+
var i = n(s.oldValue),
|
|
74
|
+
l = f;
|
|
75
|
+
if (i === l) return;
|
|
76
|
+
utils.getEl(e, t).then(function (a) {
|
|
77
|
+
l ? h(a, r) : c(a, r);
|
|
92
78
|
});
|
|
93
79
|
}
|
|
94
|
-
return
|
|
80
|
+
return f;
|
|
95
81
|
};
|
|
96
|
-
exports.vAuth =
|
|
82
|
+
exports.vAuth = A;
|
package/directive/auth/index.js
CHANGED
|
@@ -1,62 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (
|
|
6
|
-
|
|
7
|
-
return !!e.find((s) => s.code === t);
|
|
1
|
+
import { getMenuItemInfo as o, getAuthobj as d } from "@das-fed/upf-utils/common-info";
|
|
2
|
+
import { getEl as u } from "@das-fed/upf-utils/directive/utils";
|
|
3
|
+
const m = (e, s) => {
|
|
4
|
+
if (!e || !s) return !1;
|
|
5
|
+
if (typeof s == "string")
|
|
6
|
+
return !!e.find((r) => r.endsWith(s));
|
|
8
7
|
{
|
|
9
|
-
let
|
|
10
|
-
for (let
|
|
11
|
-
if (e.find((
|
|
12
|
-
|
|
8
|
+
let t = !1;
|
|
9
|
+
for (let r of s)
|
|
10
|
+
if (e.find((i) => i.endsWith(r))) {
|
|
11
|
+
t = !0;
|
|
13
12
|
break;
|
|
14
13
|
}
|
|
15
|
-
return
|
|
14
|
+
return t;
|
|
16
15
|
}
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
f && (l = (f == null ? void 0 : f.code) ?? "");
|
|
28
|
-
}
|
|
16
|
+
}, n = (e) => {
|
|
17
|
+
const s = (e == null ? void 0 : e.code) ?? "";
|
|
18
|
+
let t = (e == null ? void 0 : e.menuCode) ?? "", r = !1;
|
|
19
|
+
if (s) {
|
|
20
|
+
let f = [];
|
|
21
|
+
if (!t)
|
|
22
|
+
f = o().authCodes ?? [];
|
|
23
|
+
else {
|
|
24
|
+
const i = d()[t];
|
|
25
|
+
i && (r = i.some((l) => l.code === s));
|
|
29
26
|
}
|
|
30
|
-
|
|
31
|
-
let a = !1;
|
|
32
|
-
if (t) {
|
|
33
|
-
const c = o(l, s) ?? [];
|
|
34
|
-
a = A(c, t);
|
|
27
|
+
r = m(f, s);
|
|
35
28
|
} else
|
|
36
|
-
|
|
37
|
-
return
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
let
|
|
44
|
-
typeof
|
|
45
|
-
const
|
|
29
|
+
t && (r = !!d()[t]);
|
|
30
|
+
return r;
|
|
31
|
+
}, c = (e, s) => {
|
|
32
|
+
s === "hide" ? e.classList.add("is-hide") : (e.setAttribute("disabled", ""), e.classList.add("is-disabled"));
|
|
33
|
+
}, h = (e, s) => {
|
|
34
|
+
s === "hide" ? e.classList.remove("is-hide") : (e.removeAttribute("disabled"), e.classList.remove("is-disabled"));
|
|
35
|
+
}, A = (e, s) => {
|
|
36
|
+
let t = (e ? s.value : s) || {};
|
|
37
|
+
typeof t == "string" && (t = { code: t });
|
|
38
|
+
const r = (t == null ? void 0 : t.type) ?? "hide", f = n(t);
|
|
46
39
|
if (e)
|
|
47
|
-
if (!
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
if (!s.oldValue)
|
|
41
|
+
f || u(e, t).then((i) => {
|
|
42
|
+
c(i, r);
|
|
50
43
|
});
|
|
51
44
|
else {
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
const i = n(s.oldValue), l = f;
|
|
46
|
+
if (i === l) return;
|
|
47
|
+
u(e, t).then((a) => {
|
|
48
|
+
l ? h(a, r) : c(a, r);
|
|
56
49
|
});
|
|
57
50
|
}
|
|
58
|
-
return
|
|
51
|
+
return f;
|
|
59
52
|
};
|
|
60
53
|
export {
|
|
61
|
-
|
|
54
|
+
A as vAuth
|
|
62
55
|
};
|
|
Binary file
|
package/esm-map.json
CHANGED
|
@@ -145,5 +145,7 @@
|
|
|
145
145
|
"handleI18nData": "/common-tools/handle-data/index",
|
|
146
146
|
"getToken": "/create-api-service/sso/index",
|
|
147
147
|
"getValidAccessToken": "/create-api-service/check-token/index",
|
|
148
|
-
"isCurrentLangInSysLang": "/common-tools/handle-data/index"
|
|
148
|
+
"isCurrentLangInSysLang": "/common-tools/handle-data/index",
|
|
149
|
+
"getMenuItemInfo": "/common-info/index",
|
|
150
|
+
"getAuthobj": "/common-info/index"
|
|
149
151
|
}
|
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.187",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@antv/x6": "^2.18.1",
|
|
12
|
-
"@das-fed/upf-utils": "6.4.0-dev.
|
|
12
|
+
"@das-fed/upf-utils": "6.4.0-dev.187",
|
|
13
13
|
"@vue/shared": "^3.4.21",
|
|
14
14
|
"@vueuse/core": "^9.6.0",
|
|
15
15
|
"axios": "^1.6.7",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@babel/preset-env": "7.26.0",
|
|
25
|
-
"@das-fed/upf-cli": "6.4.0-dev.
|
|
26
|
-
"@das-fed/upf-web": "6.4.0-dev.
|
|
25
|
+
"@das-fed/upf-cli": "6.4.0-dev.187",
|
|
26
|
+
"@das-fed/upf-web": "6.4.0-dev.187",
|
|
27
27
|
"@rollup/plugin-babel": "6.0.4",
|
|
28
28
|
"@types/js-cookie": "^3.0.6",
|
|
29
29
|
"@types/lodash-es": "^4.17.12",
|