@pubinfo-pr/core 0.231.1 → 0.233.1
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/dist/{AppSetting-ipWat3GI.js → AppSetting-6MGS4YPK.js} +4 -4
- package/dist/{HCheckList-DGq85k9z.js → HCheckList-BrnjaDkr.js} +1 -1
- package/dist/{PreferencesContent-qg_ZQftO.js → PreferencesContent-rJ9y4hog.js} +1 -1
- package/dist/{SettingBreadcrumb-GUJWKm3l.js → SettingBreadcrumb-r--jPQkb.js} +1 -1
- package/dist/{SettingMenu-CI1VE_2k.js → SettingMenu-EXak1lUo.js} +1 -1
- package/dist/{SettingTabbar-BsRVzcwN.js → SettingTabbar-DGM4a0Jj.js} +1 -1
- package/dist/{SettingTopbar-rsafB5tv.js → SettingTopbar-YTAQFcaE.js} +1 -1
- package/dist/{change-organization-BjgmB5xc.js → change-organization-Vl-hf_eS.js} +1 -1
- package/dist/{change-password-0VLMfQB_.js → change-password-BV3YkrI2.js} +1 -1
- package/dist/{components-B6fZinoE.js → components-CKYu3evU.js} +141 -128
- package/dist/features/components/PubinfoIcon/parser.d.ts +6 -0
- package/dist/index.js +5 -5
- package/package.json +7 -7
- package/src/features/components/PubinfoIcon/index.vue +2 -43
- package/src/features/components/PubinfoIcon/parser.ts +42 -0
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { A as T, B as re, C as ie, D as ae, E as oe, F as se, M as ce, N as le,
|
|
|
4
4
|
import { s as Re, t as ze } from "./watchDiff-Dofh9yLN.js";
|
|
5
5
|
import { a as Be, c as Ve, d as He, f as Ue, i as We, l as Ge, n as Ke, o as qe, r as Je, u as Ye } from "./dist-HLiWAOC7.js";
|
|
6
6
|
import { z as Xe } from "./tree-select-DS-DUpQw.js";
|
|
7
|
-
import { a as Ze, c as Qe, d as $e, i as et, l as tt, n as nt, o as rt, r as it, s as at, t as ot, u as st } from "./components-
|
|
7
|
+
import { a as Ze, c as Qe, d as $e, i as et, l as tt, n as nt, o as rt, r as it, s as at, t as ot, u as st } from "./components-CKYu3evU.js";
|
|
8
8
|
import { t as ct } from "./_plugin-vue_export-helper-CsLplWgU.js";
|
|
9
9
|
import { n as D, t as lt } from "./useContext-Dlqfap_7.js";
|
|
10
10
|
import { t as ut } from "./HButton-pEqyd918.js";
|
|
@@ -112,7 +112,7 @@ function Rn(e = {}) {
|
|
|
112
112
|
var zn = [{
|
|
113
113
|
path: "/change-password/:changePassWordToken",
|
|
114
114
|
name: "ChangePassword",
|
|
115
|
-
component: () => import("./change-password-
|
|
115
|
+
component: () => import("./change-password-BV3YkrI2.js"),
|
|
116
116
|
beforeEnter: (e) => ue(e.params.changePassWordToken) ? { name: "Login" } : !0,
|
|
117
117
|
meta: {
|
|
118
118
|
whiteList: !0,
|
|
@@ -121,7 +121,7 @@ var zn = [{
|
|
|
121
121
|
}, {
|
|
122
122
|
path: "/change-organization/:orgId",
|
|
123
123
|
name: "ChangeOrganization",
|
|
124
|
-
component: () => import("./change-organization-
|
|
124
|
+
component: () => import("./change-organization-Vl-hf_eS.js"),
|
|
125
125
|
beforeEnter: (e) => {
|
|
126
126
|
let t = ve();
|
|
127
127
|
return ue(e.params.orgId) || e.params.orgId !== t.user.orgId ? { name: "Login" } : !0;
|
|
@@ -1723,7 +1723,7 @@ var la = /* @__PURE__ */ I({
|
|
|
1723
1723
|
name: "Preferences",
|
|
1724
1724
|
__name: "index",
|
|
1725
1725
|
setup(e, { expose: t }) {
|
|
1726
|
-
let n = Ut(() => import("./PreferencesContent-
|
|
1726
|
+
let n = Ut(() => import("./PreferencesContent-rJ9y4hog.js")), [r, i] = Ue(!1);
|
|
1727
1727
|
return t({ open: () => i() }), (e, t) => {
|
|
1728
1728
|
let i = At;
|
|
1729
1729
|
return z(), A(i, {
|
|
@@ -3519,7 +3519,7 @@ var Rs = L({
|
|
|
3519
3519
|
name: "SettingBar",
|
|
3520
3520
|
__name: "index",
|
|
3521
3521
|
setup(e) {
|
|
3522
|
-
let t = Ut(() => import("./AppSetting-
|
|
3522
|
+
let t = Ut(() => import("./AppSetting-6MGS4YPK.js")), { settingsStore: n, isDev: r } = D();
|
|
3523
3523
|
function i() {
|
|
3524
3524
|
window.open("http://124.223.184.245:10000/docs/");
|
|
3525
3525
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubinfo-pr/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.233.1",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"node": "^20.19.0 || >=22.12.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@pubinfo-pr/config": "0.
|
|
31
|
-
"@pubinfo-pr/devtools": "0.
|
|
32
|
-
"@pubinfo-pr/vite": "0.
|
|
30
|
+
"@pubinfo-pr/config": "0.233.1",
|
|
31
|
+
"@pubinfo-pr/devtools": "0.233.1",
|
|
32
|
+
"@pubinfo-pr/vite": "0.233.1",
|
|
33
33
|
"alova": "^3.5.0",
|
|
34
34
|
"pinia": "^3.0.4",
|
|
35
35
|
"vue": "^3.5.28",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@headlessui/vue": "^1.7.23",
|
|
43
43
|
"@imengyu/vue3-context-menu": "^1.5.4",
|
|
44
44
|
"@pubinfo/pro-components": "^1.8.2",
|
|
45
|
-
"@pubinfo-pr/shared": "0.
|
|
45
|
+
"@pubinfo-pr/shared": "0.233.1",
|
|
46
46
|
"@unocss/reset": "^66.6.0",
|
|
47
47
|
"@vueuse/core": "^14.2.1",
|
|
48
48
|
"@vueuse/integrations": "^14.2.1",
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
"@alova/mock": "^2.0.18",
|
|
70
70
|
"@iconify/json": "^2.2.437",
|
|
71
71
|
"@iconify/vue": "^5.0.0",
|
|
72
|
-
"@pubinfo-pr/config": "0.
|
|
72
|
+
"@pubinfo-pr/config": "0.233.1",
|
|
73
73
|
"@pubinfo/openapi": "^0.9.1",
|
|
74
74
|
"@pubinfo/preset-openapi": "^0.9.1",
|
|
75
|
-
"@pubinfo-pr/vite": "0.
|
|
75
|
+
"@pubinfo-pr/vite": "0.233.1",
|
|
76
76
|
"@types/lodash-es": "^4.17.12",
|
|
77
77
|
"@types/md5": "^2.3.6",
|
|
78
78
|
"@types/nprogress": "^0.2.3",
|
|
@@ -5,6 +5,7 @@ import { Icon } from '@iconify/vue';
|
|
|
5
5
|
import { shallowRef, watch } from 'vue';
|
|
6
6
|
import { getCachedIcon, setCachedIcon, setupIcon } from '@/core';
|
|
7
7
|
import { useProvider } from '../PubinfoProvider';
|
|
8
|
+
import { parseCustomIconName } from './parser';
|
|
8
9
|
import PrismBox from './PrismBox.vue';
|
|
9
10
|
import SquareBox from './SquareBox.vue';
|
|
10
11
|
|
|
@@ -74,7 +75,7 @@ const element = computed(() => {
|
|
|
74
75
|
const icon = shallowRef<string | undefined>(undefined);
|
|
75
76
|
|
|
76
77
|
function getIconLookupMeta(rawName: string) {
|
|
77
|
-
const parsed =
|
|
78
|
+
const parsed = parseCustomIconName(rawName);
|
|
78
79
|
const fileName = `${parsed.name}${parsed.ext || '.svg'}`;
|
|
79
80
|
const moduleId = parsed.prefix || undefined;
|
|
80
81
|
return { fileName, moduleId } as const;
|
|
@@ -159,48 +160,6 @@ watch(
|
|
|
159
160
|
{ immediate: true, flush: 'sync' },
|
|
160
161
|
);
|
|
161
162
|
|
|
162
|
-
interface Parsed {
|
|
163
|
-
prefix: string
|
|
164
|
-
name: string
|
|
165
|
-
ext: string
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function parseString(str: string): Parsed {
|
|
169
|
-
let prefix = '';
|
|
170
|
-
let name = '';
|
|
171
|
-
let ext = '';
|
|
172
|
-
|
|
173
|
-
// 匹配 RBAC-[org.svg] 或 RBAC-[org]
|
|
174
|
-
const match = str.match(/^([^-\s]+)-\[(.+)\]$/);
|
|
175
|
-
|
|
176
|
-
if (match) {
|
|
177
|
-
prefix = match[1];
|
|
178
|
-
const inner = match[2];
|
|
179
|
-
|
|
180
|
-
const dotIdx = inner.lastIndexOf('.');
|
|
181
|
-
if (dotIdx !== -1) {
|
|
182
|
-
name = inner.slice(0, dotIdx);
|
|
183
|
-
ext = inner.slice(dotIdx);
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
name = inner;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
// 如果没有前缀格式,就当普通文件处理
|
|
191
|
-
const dotIdx = str.lastIndexOf('.');
|
|
192
|
-
if (dotIdx !== -1) {
|
|
193
|
-
name = str.slice(0, dotIdx);
|
|
194
|
-
ext = str.slice(dotIdx);
|
|
195
|
-
}
|
|
196
|
-
else {
|
|
197
|
-
name = str;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
return { prefix, name, ext };
|
|
202
|
-
}
|
|
203
|
-
|
|
204
163
|
const style = computed(() => {
|
|
205
164
|
const transform: string[] = [];
|
|
206
165
|
if (props.flip) {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface ParsedIconName {
|
|
2
|
+
prefix: string
|
|
3
|
+
name: string
|
|
4
|
+
ext: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function splitNameExt(value: string) {
|
|
8
|
+
const dotIdx = value.lastIndexOf('.');
|
|
9
|
+
if (dotIdx !== -1) {
|
|
10
|
+
return {
|
|
11
|
+
name: value.slice(0, dotIdx),
|
|
12
|
+
ext: value.slice(dotIdx),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
name: value,
|
|
18
|
+
ext: '',
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function parseCustomIconName(str: string): ParsedIconName {
|
|
23
|
+
const markerIdx = str.lastIndexOf('-[');
|
|
24
|
+
const hasScopedSyntax = markerIdx > 0 && str.endsWith(']');
|
|
25
|
+
|
|
26
|
+
if (hasScopedSyntax) {
|
|
27
|
+
const prefix = str.slice(0, markerIdx);
|
|
28
|
+
const inner = str.slice(markerIdx + 2, -1);
|
|
29
|
+
|
|
30
|
+
if (prefix && inner) {
|
|
31
|
+
return {
|
|
32
|
+
prefix,
|
|
33
|
+
...splitNameExt(inner),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
prefix: '',
|
|
40
|
+
...splitNameExt(str),
|
|
41
|
+
};
|
|
42
|
+
}
|