yxuse 3.0.38 → 3.0.40
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/lib/api.cjs.js +1 -1
- package/lib/api.es.js +9 -9
- package/lib/app.cjs.js +1 -1
- package/lib/app.es.js +1 -1
- package/lib/components.cjs.js +1 -1
- package/lib/components.es.js +15 -17
- package/lib/directives.cjs.js +1 -1
- package/lib/directives.es.js +3 -3
- package/lib/hooks.cjs.js +1 -1
- package/lib/hooks.es.js +2 -2
- package/lib/index.cjs.js +1 -1
- package/lib/index.cjs10.js +1 -1
- package/lib/index.cjs11.js +1 -0
- package/lib/index.cjs11.js.gz +0 -0
- package/lib/index.cjs12.js +1 -0
- package/lib/index.cjs13.js +1 -0
- package/lib/index.cjs2.js +1 -42
- package/lib/index.cjs3.js +1 -1
- package/lib/index.cjs4.js +1 -1
- package/lib/index.cjs5.js +22 -1
- package/lib/index.cjs5.js.gz +0 -0
- package/lib/index.cjs6.js +1 -1
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.cjs7.js +1 -3
- package/lib/index.cjs8.js +1 -1
- package/lib/index.cjs9.js +1 -1
- package/lib/index.es.js +49 -20
- package/lib/index.es10.js +313 -9
- package/lib/index.es10.js.gz +0 -0
- package/lib/index.es11.js +2390 -0
- package/lib/index.es11.js.gz +0 -0
- package/lib/index.es12.js +202 -0
- package/lib/index.es13.js +22 -0
- package/lib/index.es2.js +14 -8230
- package/lib/index.es3.js +59 -131
- package/lib/index.es4.js +47 -42
- package/lib/index.es5.js +11117 -35
- package/lib/index.es5.js.gz +0 -0
- package/lib/index.es6.js +1098 -300
- package/lib/index.es6.js.gz +0 -0
- package/lib/index.es7.js +17 -1669
- package/lib/index.es8.js +4 -15
- package/lib/index.es9.js +9 -20
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +17 -20
- package/lib/translate.cjs.js +1 -1
- package/lib/translate.es.js +10 -13
- package/lib/utils.cjs.js +1 -1
- package/lib/utils.es.js +11 -11
- package/lib/yxIcon.cjs.js +1 -1
- package/lib/yxIcon.es.js +4 -4
- package/package.json +2 -1
- package/types/bc/index.d.ts +5 -0
- package/types/config/index.d.ts +3 -0
- package/types/index.d.ts +3 -2
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.cjs7.js.gz +0 -0
- package/lib/index.es2.js.gz +0 -0
- package/lib/index.es7.js.gz +0 -0
package/lib/index.es3.js
CHANGED
|
@@ -1,137 +1,65 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}, _ = (e) => {
|
|
21
|
-
const t = ((u) => {
|
|
22
|
-
let f = 0, C = 0, I = 0, m = 1;
|
|
23
|
-
if (u.startsWith("#"))
|
|
24
|
-
if (u = u.slice(1), u.length === 3)
|
|
25
|
-
f = parseInt(u[0] + u[0], 16), C = parseInt(u[1] + u[1], 16), I = parseInt(u[2] + u[2], 16);
|
|
26
|
-
else if (u.length === 6)
|
|
27
|
-
f = parseInt(u.slice(0, 2), 16), C = parseInt(u.slice(2, 4), 16), I = parseInt(u.slice(4, 6), 16);
|
|
28
|
-
else
|
|
29
|
-
return null;
|
|
30
|
-
else if (u.startsWith("rgb")) {
|
|
31
|
-
const h = u.match(/(\d+(\.\d+)?)/g);
|
|
32
|
-
if (h)
|
|
33
|
-
f = parseFloat(h[0]), C = parseFloat(h[1]), I = parseFloat(h[2]), h.length > 3 && (m = parseFloat(h[3]));
|
|
34
|
-
else
|
|
35
|
-
return null;
|
|
36
|
-
} else
|
|
37
|
-
return null;
|
|
38
|
-
return [f, C, I, m];
|
|
39
|
-
})(e);
|
|
40
|
-
if (!t)
|
|
41
|
-
return null;
|
|
42
|
-
const [i, a, r, p] = t, n = i / 255, b = a / 255, l = r / 255, c = Math.max(n, b, l), o = Math.min(n, b, l);
|
|
43
|
-
return (c + o) / 2 < 0.5;
|
|
44
|
-
}, x = (e, s, t = 100) => {
|
|
45
|
-
const i = (n) => {
|
|
46
|
-
let b, l, c, o = 1;
|
|
47
|
-
if (n.startsWith("#"))
|
|
48
|
-
if (n = n.slice(1), n.length === 3)
|
|
49
|
-
b = parseInt(n[0] + n[0], 16), l = parseInt(n[1] + n[1], 16), c = parseInt(n[2] + n[2], 16);
|
|
50
|
-
else if (n.length === 6)
|
|
51
|
-
b = parseInt(n.slice(0, 2), 16), l = parseInt(n.slice(2, 4), 16), c = parseInt(n.slice(4, 6), 16);
|
|
52
|
-
else
|
|
53
|
-
return null;
|
|
54
|
-
else if (n.startsWith("rgb")) {
|
|
55
|
-
const g = n.match(/(\d+(\.\d+)?)/g);
|
|
56
|
-
b = parseFloat(g[0]), l = parseFloat(g[1]), c = parseFloat(g[2]), g.length > 3 && (o = parseFloat(g[3]));
|
|
57
|
-
} else
|
|
58
|
-
return null;
|
|
59
|
-
return [b, l, c, o];
|
|
60
|
-
}, a = i(e), r = i(s);
|
|
61
|
-
if (!a || !r)
|
|
62
|
-
return !1;
|
|
63
|
-
const p = Math.sqrt(
|
|
64
|
-
Math.pow(a[0] - r[0], 2) + Math.pow(a[1] - r[1], 2) + Math.pow(a[2] - r[2], 2) + Math.pow(a[3] - r[3], 2)
|
|
65
|
-
);
|
|
66
|
-
return console.log(p), p <= t;
|
|
67
|
-
}, L = (e, s) => {
|
|
68
|
-
function t(r) {
|
|
69
|
-
if (r.toLowerCase().startsWith("rgba"))
|
|
70
|
-
return r.toLowerCase();
|
|
71
|
-
if (r.toLowerCase().startsWith("rgb"))
|
|
72
|
-
return r.replace("rgb", "rgba").replace(")", ", 1)");
|
|
73
|
-
if (r.length === 7) {
|
|
74
|
-
const p = parseInt(r.substring(1, 3), 16), n = parseInt(r.substring(3, 5), 16), b = parseInt(r.substring(5, 7), 16);
|
|
75
|
-
return `rgba(${p}, ${n}, ${b}, 1)`;
|
|
76
|
-
} else if (r.length === 9 && r.toLowerCase().startsWith("rrggbbaa")) {
|
|
77
|
-
const p = parseInt(r.substring(1, 3), 16), n = parseInt(r.substring(3, 5), 16), b = parseInt(r.substring(5, 7), 16), l = Math.round(parseInt(r.substring(7, 9), 16) / 255 * 100) / 100;
|
|
78
|
-
return `rgba(${p}, ${n}, ${b}, ${l})`;
|
|
79
|
-
} else
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
const i = t(M(e)), a = t(M(s));
|
|
83
|
-
return !i || !a ? !1 : i === a;
|
|
84
|
-
}, M = (e) => {
|
|
85
|
-
if (e.length === 4 && e[0] === "#") {
|
|
86
|
-
const s = e[1], t = e[2], i = e[3];
|
|
87
|
-
return `#${s}${s}${t}${t}${i}${i}`;
|
|
88
|
-
} else
|
|
89
|
-
return e;
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
90
20
|
};
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
21
|
+
import "./index.es11.js";
|
|
22
|
+
import "element-plus";
|
|
23
|
+
import { g as getGroupListApi, a as getResourceListApi } from "./index.es13.js";
|
|
24
|
+
const ICON_GROUP_NAME = "yxIcon";
|
|
25
|
+
const initYxIcon = () => {
|
|
26
|
+
getYxIconGroupUuid();
|
|
27
|
+
};
|
|
28
|
+
const getYxIconGroupUuid = () => __async(void 0, null, function* () {
|
|
29
|
+
var _a;
|
|
30
|
+
const { data } = yield getGroupListApi();
|
|
31
|
+
const groupUuid = (_a = data.find((item) => item.groupName === ICON_GROUP_NAME)) == null ? void 0 : _a.groupUuid;
|
|
32
|
+
getYxIconFileContent(groupUuid);
|
|
33
|
+
});
|
|
34
|
+
const getYxIconFileContent = (groupUuid) => __async(void 0, null, function* () {
|
|
35
|
+
const { data } = yield getResourceListApi(groupUuid, 1);
|
|
36
|
+
combineYxIconStr(data);
|
|
37
|
+
return data;
|
|
38
|
+
});
|
|
39
|
+
const combineYxIconStr = (data) => {
|
|
40
|
+
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
41
|
+
svg.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
42
|
+
svg.setAttribute("xmlns:xlin", "http://www.w3.org/1999/xlink");
|
|
43
|
+
let svgHtml = "";
|
|
44
|
+
data.forEach((svgElement) => {
|
|
45
|
+
svgHtml += svgElement.text.replace(/\\/g, "").trim().replace(/^"(.*)"$/, "$1");
|
|
46
|
+
});
|
|
47
|
+
svg.innerHTML = svgHtml;
|
|
48
|
+
svg.style.position = "absolute";
|
|
49
|
+
svg.style.width = "0";
|
|
50
|
+
svg.style.height = "0";
|
|
51
|
+
document.head.appendChild(svg);
|
|
52
|
+
};
|
|
53
|
+
const index = {
|
|
54
|
+
install: function(app) {
|
|
55
|
+
initYxIcon();
|
|
113
56
|
}
|
|
114
|
-
}
|
|
115
|
-
const
|
|
57
|
+
};
|
|
58
|
+
const yxIcon2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
116
59
|
__proto__: null,
|
|
117
|
-
|
|
118
|
-
enumToArray: W,
|
|
119
|
-
getSelectOptions: F,
|
|
120
|
-
http: y,
|
|
121
|
-
isColorEqual: L,
|
|
122
|
-
isDarkColor: _,
|
|
123
|
-
notifyMessageToSystems: S,
|
|
124
|
-
receiveMessage: B,
|
|
125
|
-
yxSubscribe: z
|
|
60
|
+
default: index
|
|
126
61
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
127
62
|
export {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
W as e,
|
|
131
|
-
F as g,
|
|
132
|
-
L as i,
|
|
133
|
-
S as n,
|
|
134
|
-
B as r,
|
|
135
|
-
T as u,
|
|
136
|
-
z as y
|
|
63
|
+
index as i,
|
|
64
|
+
yxIcon2 as y
|
|
137
65
|
};
|
package/lib/index.es4.js
CHANGED
|
@@ -1,47 +1,52 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { h as http, U as URL, i as index$1 } from "./index.es11.js";
|
|
22
|
+
import { i as index } from "./index.es13.js";
|
|
23
|
+
const getUserSelectSatelliteList = (systemName = "ttc") => __async(void 0, null, function* () {
|
|
24
|
+
const data = yield http.get(`${URL[systemName].INTEGRATED_BASE_URL}/basic/data/satellite/select`);
|
|
25
|
+
return data;
|
|
26
|
+
});
|
|
27
|
+
const getUserSelectAnteList = (systemName = "ttc") => __async(void 0, null, function* () {
|
|
28
|
+
const data = yield http.get(`${URL[systemName].INTEGRATED_BASE_URL}/basic/data/ante/select`);
|
|
29
|
+
return data;
|
|
30
|
+
});
|
|
31
|
+
const getUserThemeList = (systemName = "ttc") => __async(void 0, null, function* () {
|
|
32
|
+
return yield http.get(`${URL[systemName].INTEGRATED_BASE_URL}/theme/list`, {}, { headers: { noLoading: true } });
|
|
33
|
+
});
|
|
34
|
+
const getCommentUntreatedCount = (systemName = "ttc") => __async(void 0, null, function* () {
|
|
35
|
+
return yield http.get(`${URL[systemName].INTEGRATED_BASE_URL}/workorder/comment/untreated/count`);
|
|
16
36
|
});
|
|
17
|
-
|
|
18
|
-
import "element-plus";
|
|
19
|
-
import { g, a as u } from "./index.es8.js";
|
|
20
|
-
const d = "yxIcon", w = () => {
|
|
21
|
-
m();
|
|
22
|
-
}, m = () => r(void 0, null, function* () {
|
|
23
|
-
var e;
|
|
24
|
-
const { data: o } = yield g(), t = (e = o.find((s) => s.groupName === d)) == null ? void 0 : e.groupUuid;
|
|
25
|
-
x(t);
|
|
26
|
-
}), x = (o) => r(void 0, null, function* () {
|
|
27
|
-
const { data: t } = yield u(o, 1);
|
|
28
|
-
return y(t), t;
|
|
29
|
-
}), y = (o) => {
|
|
30
|
-
const t = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
31
|
-
t.setAttribute("xmlns", "http://www.w3.org/2000/svg"), t.setAttribute("xmlns:xlin", "http://www.w3.org/1999/xlink");
|
|
32
|
-
let e = "";
|
|
33
|
-
o.forEach((s) => {
|
|
34
|
-
e += s.text.replace(/\\/g, "").trim().replace(/^"(.*)"$/, "$1");
|
|
35
|
-
}), t.innerHTML = e, t.style.position = "absolute", t.style.width = "0", t.style.height = "0", document.head.appendChild(t);
|
|
36
|
-
}, h = {
|
|
37
|
-
install: function(o) {
|
|
38
|
-
w();
|
|
39
|
-
}
|
|
40
|
-
}, _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
37
|
+
const api2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
41
38
|
__proto__: null,
|
|
42
|
-
|
|
39
|
+
assets: index,
|
|
40
|
+
auth: index$1,
|
|
41
|
+
getCommentUntreatedCount,
|
|
42
|
+
getUserSelectAnteList,
|
|
43
|
+
getUserSelectSatelliteList,
|
|
44
|
+
getUserThemeList
|
|
43
45
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
44
46
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
api2 as a,
|
|
48
|
+
getUserThemeList as b,
|
|
49
|
+
getUserSelectSatelliteList as c,
|
|
50
|
+
getUserSelectAnteList as d,
|
|
51
|
+
getCommentUntreatedCount as g
|
|
47
52
|
};
|