@rxdrag/website-lib-core 0.0.129 → 0.0.131
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxdrag/website-lib-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.131",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.ts"
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"eslint": "^9.39.2",
|
|
25
25
|
"typescript": "^5",
|
|
26
26
|
"@rxdrag/eslint-config-custom": "0.2.13",
|
|
27
|
-
"@rxdrag/
|
|
28
|
-
"@rxdrag/
|
|
27
|
+
"@rxdrag/tiptap-preview": "0.0.3",
|
|
28
|
+
"@rxdrag/tsconfig": "0.2.1"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@iconify/utils": "^3.0.2",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"hls.js": "^1.6.13",
|
|
35
35
|
"lodash-es": "^4.17.21",
|
|
36
36
|
"@rxdrag/entify-lib": "0.0.24",
|
|
37
|
-
"@rxdrag/rxcms-models": "0.3.
|
|
37
|
+
"@rxdrag/rxcms-models": "0.3.111"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"astro": "^5.16.6",
|
package/src/entify/Entify.ts
CHANGED
|
@@ -103,6 +103,15 @@ export class Entify implements IEntify {
|
|
|
103
103
|
return this.ensureLangAbbr();
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
/**
|
|
107
|
+
* 获取当前语言对象(包含 dir 等完整信息)
|
|
108
|
+
*/
|
|
109
|
+
public async getCurrentLang() {
|
|
110
|
+
const langAbbr = this.ensureLangAbbr();
|
|
111
|
+
const langs = await this.getLangs();
|
|
112
|
+
return langs?.find((l) => l.abbr === langAbbr);
|
|
113
|
+
}
|
|
114
|
+
|
|
106
115
|
/**
|
|
107
116
|
* 获取当前语言,如果未设置则抛出异常
|
|
108
117
|
*/
|
package/src/entify/IEntify.ts
CHANGED
|
@@ -71,6 +71,11 @@ export interface IEntify {
|
|
|
71
71
|
*/
|
|
72
72
|
getLang(): string;
|
|
73
73
|
|
|
74
|
+
/**
|
|
75
|
+
* 获取当前语言对象(包含 dir 等完整信息)
|
|
76
|
+
*/
|
|
77
|
+
getCurrentLang(): Promise<Lang | undefined>;
|
|
78
|
+
|
|
74
79
|
getBaseLang(): Promise<Lang | undefined>;
|
|
75
80
|
|
|
76
81
|
getMedia(ref: string | undefined | null, fileField?: FileFieldType, resize?: ImageResize): Promise<Media | undefined>;
|
|
@@ -112,7 +117,7 @@ export interface IEntify {
|
|
|
112
117
|
getProducts(
|
|
113
118
|
conditions: ListConditions,
|
|
114
119
|
imageSize: ImageSize | undefined,
|
|
115
|
-
addonFields
|
|
120
|
+
addonFields?: (keyof Product)[] | undefined
|
|
116
121
|
): Promise<TProduct[] | undefined>;
|
|
117
122
|
|
|
118
123
|
getProductListPaths(options: {
|