@medusajs/dashboard 2.12.3-preview-20251217123836 → 2.12.3-snapshot-20251217081413
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/app.css +0 -10
- package/dist/app.js +373 -483
- package/dist/app.mjs +1 -1
- package/dist/{chunk-VFF5WB7C.mjs → chunk-FJR3D6EM.mjs} +10 -14
- package/dist/en.json +1 -1
- package/dist/{product-attributes-MXDPSOWM.mjs → product-attributes-S535VXSC.mjs} +1 -1
- package/dist/{product-create-3O34JJLS.mjs → product-create-DKBLOS3M.mjs} +1 -1
- package/dist/{product-detail-SYTLG5D3.mjs → product-detail-D2PJ64Q3.mjs} +1 -1
- package/dist/{product-edit-W72S22NM.mjs → product-edit-K6CAQD5H.mjs} +1 -1
- package/dist/{product-organization-SVXTCWIF.mjs → product-organization-IQFN54D2.mjs} +1 -1
- package/dist/{chunk-IKTGFXWR.mjs → store-add-locales-I4GX3KAY.mjs} +66 -1
- package/dist/{translation-list-FK7XYLHX.mjs → translation-list-KSM4QA3K.mjs} +109 -182
- package/package.json +9 -9
- package/src/dashboard-app/routes/get-route.map.tsx +0 -4
- package/src/i18n/translations/en.json +1 -1
- package/src/i18n/translations/es.json +1 -1
- package/src/routes/translations/translation-list/components/active-locales-section/active-locales-section.tsx +16 -41
- package/src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx +1 -5
- package/src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx +103 -144
- package/dist/add-locales-GGNZCABB.mjs +0 -81
- package/dist/store-add-locales-GWCGIXHU.mjs +0 -81
- package/src/routes/translations/add-locales/add-locales.tsx +0 -29
- package/src/routes/translations/add-locales/index.tsx +0 -1
package/dist/app.mjs
CHANGED
|
@@ -11517,7 +11517,7 @@ var en_default = {
|
|
|
11517
11517
|
completion: {
|
|
11518
11518
|
heading: "Translated fields",
|
|
11519
11519
|
translated: "Translated",
|
|
11520
|
-
toTranslate: "
|
|
11520
|
+
toTranslate: "To be translated",
|
|
11521
11521
|
footer: "Languages"
|
|
11522
11522
|
}
|
|
11523
11523
|
},
|
|
@@ -14744,7 +14744,7 @@ var es_default = {
|
|
|
14744
14744
|
completion: {
|
|
14745
14745
|
heading: "Textos traducidos",
|
|
14746
14746
|
translated: "Traducidos",
|
|
14747
|
-
toTranslate: "
|
|
14747
|
+
toTranslate: "Por traducir",
|
|
14748
14748
|
footer: "Idiomas"
|
|
14749
14749
|
}
|
|
14750
14750
|
},
|
|
@@ -95888,7 +95888,7 @@ function getRouteMap({
|
|
|
95888
95888
|
children: [
|
|
95889
95889
|
{
|
|
95890
95890
|
path: "create",
|
|
95891
|
-
lazy: () => import("./product-create-
|
|
95891
|
+
lazy: () => import("./product-create-DKBLOS3M.mjs")
|
|
95892
95892
|
},
|
|
95893
95893
|
{
|
|
95894
95894
|
path: "import",
|
|
@@ -95904,7 +95904,7 @@ function getRouteMap({
|
|
|
95904
95904
|
path: ":id",
|
|
95905
95905
|
errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
|
|
95906
95906
|
lazy: async () => {
|
|
95907
|
-
const { Breadcrumb, loader } = await import("./product-detail-
|
|
95907
|
+
const { Breadcrumb, loader } = await import("./product-detail-D2PJ64Q3.mjs");
|
|
95908
95908
|
return {
|
|
95909
95909
|
Component: Outlet4,
|
|
95910
95910
|
loader,
|
|
@@ -95916,11 +95916,11 @@ function getRouteMap({
|
|
|
95916
95916
|
children: [
|
|
95917
95917
|
{
|
|
95918
95918
|
path: "",
|
|
95919
|
-
lazy: () => import("./product-detail-
|
|
95919
|
+
lazy: () => import("./product-detail-D2PJ64Q3.mjs"),
|
|
95920
95920
|
children: [
|
|
95921
95921
|
{
|
|
95922
95922
|
path: "edit",
|
|
95923
|
-
lazy: () => import("./product-edit-
|
|
95923
|
+
lazy: () => import("./product-edit-K6CAQD5H.mjs")
|
|
95924
95924
|
},
|
|
95925
95925
|
{
|
|
95926
95926
|
path: "edit-variant",
|
|
@@ -95932,11 +95932,11 @@ function getRouteMap({
|
|
|
95932
95932
|
},
|
|
95933
95933
|
{
|
|
95934
95934
|
path: "attributes",
|
|
95935
|
-
lazy: () => import("./product-attributes-
|
|
95935
|
+
lazy: () => import("./product-attributes-S535VXSC.mjs")
|
|
95936
95936
|
},
|
|
95937
95937
|
{
|
|
95938
95938
|
path: "organization",
|
|
95939
|
-
lazy: () => import("./product-organization-
|
|
95939
|
+
lazy: () => import("./product-organization-IQFN54D2.mjs")
|
|
95940
95940
|
},
|
|
95941
95941
|
{
|
|
95942
95942
|
path: "shipping-profile",
|
|
@@ -96648,7 +96648,7 @@ function getRouteMap({
|
|
|
96648
96648
|
},
|
|
96649
96649
|
{
|
|
96650
96650
|
path: "locales",
|
|
96651
|
-
lazy: () => import("./store-add-locales-
|
|
96651
|
+
lazy: () => import("./store-add-locales-I4GX3KAY.mjs")
|
|
96652
96652
|
},
|
|
96653
96653
|
{
|
|
96654
96654
|
path: "metadata/edit",
|
|
@@ -97277,15 +97277,11 @@ function getRouteMap({
|
|
|
97277
97277
|
children: [
|
|
97278
97278
|
{
|
|
97279
97279
|
path: "",
|
|
97280
|
-
lazy: () => import("./translation-list-
|
|
97280
|
+
lazy: () => import("./translation-list-KSM4QA3K.mjs")
|
|
97281
97281
|
},
|
|
97282
97282
|
{
|
|
97283
97283
|
path: "edit",
|
|
97284
97284
|
lazy: () => import("./translations-edit-VRXZI5KW.mjs")
|
|
97285
|
-
},
|
|
97286
|
-
{
|
|
97287
|
-
path: "add-locales",
|
|
97288
|
-
lazy: () => import("./add-locales-GGNZCABB.mjs")
|
|
97289
97285
|
}
|
|
97290
97286
|
]
|
|
97291
97287
|
},
|
package/dist/en.json
CHANGED
|
@@ -2,10 +2,19 @@ import {
|
|
|
2
2
|
useLocalesTableColumns,
|
|
3
3
|
useLocalesTableQuery
|
|
4
4
|
} from "./chunk-XNIVMZHA.mjs";
|
|
5
|
+
import "./chunk-MSDRGCRR.mjs";
|
|
6
|
+
import "./chunk-P3UUX2T6.mjs";
|
|
7
|
+
import "./chunk-LQTHYS2Z.mjs";
|
|
5
8
|
import {
|
|
6
9
|
_DataTable,
|
|
7
10
|
useDataTable
|
|
8
11
|
} from "./chunk-DTZXEQXZ.mjs";
|
|
12
|
+
import "./chunk-HQKGZADC.mjs";
|
|
13
|
+
import "./chunk-EMIHDNB7.mjs";
|
|
14
|
+
import "./chunk-ZQJPHZKI.mjs";
|
|
15
|
+
import "./chunk-C76H5USB.mjs";
|
|
16
|
+
import "./chunk-DFFLVEZ5.mjs";
|
|
17
|
+
import "./chunk-IUCDCPJU.mjs";
|
|
9
18
|
import {
|
|
10
19
|
KeyboundForm
|
|
11
20
|
} from "./chunk-6HTZNHPT.mjs";
|
|
@@ -13,12 +22,51 @@ import {
|
|
|
13
22
|
RouteFocusModal,
|
|
14
23
|
useRouteModal
|
|
15
24
|
} from "./chunk-D6UW7URG.mjs";
|
|
25
|
+
import {
|
|
26
|
+
useFeatureFlag
|
|
27
|
+
} from "./chunk-G4BWCU5P.mjs";
|
|
28
|
+
import "./chunk-LPEUYMRK.mjs";
|
|
29
|
+
import "./chunk-OC7BQLYI.mjs";
|
|
30
|
+
import "./chunk-S4DMV3ZT.mjs";
|
|
31
|
+
import "./chunk-535OVBXR.mjs";
|
|
32
|
+
import "./chunk-OBQI23QM.mjs";
|
|
16
33
|
import {
|
|
17
34
|
useLocales
|
|
18
35
|
} from "./chunk-GLBHPDR4.mjs";
|
|
36
|
+
import "./chunk-I4OBEAOJ.mjs";
|
|
37
|
+
import "./chunk-HI6URQ7H.mjs";
|
|
38
|
+
import "./chunk-6CLQKVAU.mjs";
|
|
39
|
+
import "./chunk-KI7TOXBR.mjs";
|
|
40
|
+
import "./chunk-UJ2TMPV4.mjs";
|
|
41
|
+
import "./chunk-23GTCEOV.mjs";
|
|
42
|
+
import "./chunk-WAXMT4IY.mjs";
|
|
43
|
+
import "./chunk-DYDGGABK.mjs";
|
|
44
|
+
import "./chunk-LGNTHZ5Y.mjs";
|
|
45
|
+
import "./chunk-CN7JXSGW.mjs";
|
|
46
|
+
import "./chunk-5BQQRHQS.mjs";
|
|
47
|
+
import "./chunk-HTCYX4VD.mjs";
|
|
48
|
+
import "./chunk-5AFMB7XQ.mjs";
|
|
49
|
+
import "./chunk-UWY5ZV66.mjs";
|
|
50
|
+
import "./chunk-A63RZVX6.mjs";
|
|
51
|
+
import "./chunk-HBXV7ENS.mjs";
|
|
52
|
+
import "./chunk-CDORR33H.mjs";
|
|
53
|
+
import "./chunk-4JQR6QNW.mjs";
|
|
54
|
+
import "./chunk-FYWHE3W5.mjs";
|
|
55
|
+
import "./chunk-OSHH5GAS.mjs";
|
|
56
|
+
import "./chunk-2XTBDCGE.mjs";
|
|
57
|
+
import "./chunk-3BF5SC66.mjs";
|
|
19
58
|
import {
|
|
59
|
+
useStore,
|
|
20
60
|
useUpdateStore
|
|
21
61
|
} from "./chunk-VCSSQVPD.mjs";
|
|
62
|
+
import "./chunk-HP2JH45P.mjs";
|
|
63
|
+
import "./chunk-SQDIZZDW.mjs";
|
|
64
|
+
import "./chunk-Z6BFNHEO.mjs";
|
|
65
|
+
import "./chunk-HGRIOEAR.mjs";
|
|
66
|
+
import "./chunk-FXYH54JP.mjs";
|
|
67
|
+
import "./chunk-774WSTCC.mjs";
|
|
68
|
+
import "./chunk-NFEK63OE.mjs";
|
|
69
|
+
import "./chunk-QZ7TP4HQ.mjs";
|
|
22
70
|
|
|
23
71
|
// src/routes/store/store-add-locales/components/add-locales-form/add-locales-form.tsx
|
|
24
72
|
import { z } from "zod";
|
|
@@ -188,6 +236,23 @@ var useColumns = () => {
|
|
|
188
236
|
);
|
|
189
237
|
};
|
|
190
238
|
|
|
239
|
+
// src/routes/store/store-add-locales/store-add-locales.tsx
|
|
240
|
+
import { useNavigate } from "react-router-dom";
|
|
241
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
242
|
+
var StoreAddLocales = () => {
|
|
243
|
+
const isEnabled = useFeatureFlag("translation");
|
|
244
|
+
const navigate = useNavigate();
|
|
245
|
+
if (!isEnabled) {
|
|
246
|
+
navigate(-1);
|
|
247
|
+
return null;
|
|
248
|
+
}
|
|
249
|
+
const { store, isPending, isError, error } = useStore();
|
|
250
|
+
const ready = !!store && !isPending;
|
|
251
|
+
if (isError) {
|
|
252
|
+
throw error;
|
|
253
|
+
}
|
|
254
|
+
return /* @__PURE__ */ jsx2(RouteFocusModal, { children: ready && /* @__PURE__ */ jsx2(AddLocalesForm, { store }) });
|
|
255
|
+
};
|
|
191
256
|
export {
|
|
192
|
-
|
|
257
|
+
StoreAddLocales as Component
|
|
193
258
|
};
|
|
@@ -51,16 +51,9 @@ import { useTranslation as useTranslation4 } from "react-i18next";
|
|
|
51
51
|
|
|
52
52
|
// src/routes/translations/translation-list/components/active-locales-section/active-locales-section.tsx
|
|
53
53
|
import { PencilSquare, Language } from "@medusajs/icons";
|
|
54
|
-
import {
|
|
55
|
-
Container,
|
|
56
|
-
Heading,
|
|
57
|
-
IconButton,
|
|
58
|
-
InlineTip,
|
|
59
|
-
Text,
|
|
60
|
-
Tooltip
|
|
61
|
-
} from "@medusajs/ui";
|
|
54
|
+
import { Container, Heading, IconButton, InlineTip, Text } from "@medusajs/ui";
|
|
62
55
|
import { useTranslation } from "react-i18next";
|
|
63
|
-
import { useCallback
|
|
56
|
+
import { useCallback } from "react";
|
|
64
57
|
import { useNavigate } from "react-router-dom";
|
|
65
58
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
66
59
|
var ActiveLocalesSection = ({
|
|
@@ -68,9 +61,8 @@ var ActiveLocalesSection = ({
|
|
|
68
61
|
}) => {
|
|
69
62
|
const { t } = useTranslation();
|
|
70
63
|
const navigate = useNavigate();
|
|
71
|
-
const [isHovered, setIsHovered] = useState(false);
|
|
72
64
|
const handleManageLocales = useCallback(() => {
|
|
73
|
-
navigate("/settings/
|
|
65
|
+
navigate("/settings/store/locales");
|
|
74
66
|
}, [navigate]);
|
|
75
67
|
const renderLocales = useCallback(() => {
|
|
76
68
|
const maxLocalesToDetail = 2;
|
|
@@ -85,28 +77,13 @@ var ActiveLocalesSection = ({
|
|
|
85
77
|
/* @__PURE__ */ jsx(Heading, { level: "h2", children: t("translations.activeLocales.heading") }),
|
|
86
78
|
/* @__PURE__ */ jsx(IconButton, { variant: "transparent", onClick: handleManageLocales, children: /* @__PURE__ */ jsx(PencilSquare, {}) })
|
|
87
79
|
] }),
|
|
88
|
-
/* @__PURE__ */ jsx("div", { className: "px-1 pb-1", children: hasLocales ? /* @__PURE__ */
|
|
89
|
-
|
|
90
|
-
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
{
|
|
96
|
-
className: "bg-ui-bg-component border-r-1 flex items-center gap-x-4 px-[19px] py-2",
|
|
97
|
-
onMouseEnter: () => setIsHovered(true),
|
|
98
|
-
onMouseLeave: () => setIsHovered(false),
|
|
99
|
-
children: [
|
|
100
|
-
/* @__PURE__ */ jsx(IconAvatar, { className: "border-ui-border-base border", children: /* @__PURE__ */ jsx(Language, {}) }),
|
|
101
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
102
|
-
/* @__PURE__ */ jsx(Text, { size: "small", weight: "plus", children: t("translations.activeLocales.subtitle") }),
|
|
103
|
-
/* @__PURE__ */ jsx(Text, { className: "text-ui-fg-subtle", size: "small", children: renderLocales() })
|
|
104
|
-
] })
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
) : /* @__PURE__ */ jsx(InlineTip, { label: "Tip", children: t("translations.activeLocales.noLocalesTip") }) })
|
|
80
|
+
/* @__PURE__ */ jsx("div", { className: "px-1 pb-1", children: hasLocales ? /* @__PURE__ */ jsxs(Container, { className: "bg-ui-bg-component flex items-center gap-x-4 px-6 py-2", children: [
|
|
81
|
+
/* @__PURE__ */ jsx(IconAvatar, { children: /* @__PURE__ */ jsx(Language, {}) }),
|
|
82
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
83
|
+
/* @__PURE__ */ jsx(Text, { size: "small", weight: "plus", children: t("translations.activeLocales.subtitle") }),
|
|
84
|
+
/* @__PURE__ */ jsx(Text, { className: "text-ui-fg-subtle", size: "small", children: renderLocales() })
|
|
85
|
+
] })
|
|
86
|
+
] }) : /* @__PURE__ */ jsx(InlineTip, { label: "Tip", children: t("translations.activeLocales.noLocalesTip") }) })
|
|
110
87
|
] });
|
|
111
88
|
};
|
|
112
89
|
|
|
@@ -134,15 +111,7 @@ var TranslationListSection = ({
|
|
|
134
111
|
Link,
|
|
135
112
|
{
|
|
136
113
|
to: `/settings/translations/edit?reference=${entity.reference}`,
|
|
137
|
-
children: /* @__PURE__ */ jsx2(
|
|
138
|
-
Button,
|
|
139
|
-
{
|
|
140
|
-
variant: "secondary",
|
|
141
|
-
size: "small",
|
|
142
|
-
disabled: !hasLocales || !entity.totalCount,
|
|
143
|
-
children: "Edit"
|
|
144
|
-
}
|
|
145
|
-
)
|
|
114
|
+
children: /* @__PURE__ */ jsx2(Button, { variant: "secondary", size: "small", disabled: !hasLocales, children: "Edit" })
|
|
146
115
|
}
|
|
147
116
|
)
|
|
148
117
|
]
|
|
@@ -152,8 +121,8 @@ var TranslationListSection = ({
|
|
|
152
121
|
};
|
|
153
122
|
|
|
154
123
|
// src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx
|
|
155
|
-
import { Container as Container3,
|
|
156
|
-
import { useMemo, useState
|
|
124
|
+
import { Container as Container3, Heading as Heading2, Text as Text3, Tooltip } from "@medusajs/ui";
|
|
125
|
+
import { useMemo, useState } from "react";
|
|
157
126
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
158
127
|
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
159
128
|
var TranslationsCompletionSection = ({
|
|
@@ -161,7 +130,7 @@ var TranslationsCompletionSection = ({
|
|
|
161
130
|
locales
|
|
162
131
|
}) => {
|
|
163
132
|
const { t } = useTranslation3();
|
|
164
|
-
const [hoveredLocale, setHoveredLocale] =
|
|
133
|
+
const [hoveredLocale, setHoveredLocale] = useState(null);
|
|
165
134
|
const { translatedCount, totalCount } = Object.values(statistics).reduce(
|
|
166
135
|
(acc, curr) => ({
|
|
167
136
|
translatedCount: acc.translatedCount + curr.translated,
|
|
@@ -224,8 +193,7 @@ var TranslationsCompletionSection = ({
|
|
|
224
193
|
className: "mr-0.5 h-full rounded-sm transition-all",
|
|
225
194
|
style: {
|
|
226
195
|
width: `${percentage}%`,
|
|
227
|
-
backgroundColor: "var(--
|
|
228
|
-
boxShadow: "inset 0 0 0 0.5px var(--alpha-250)"
|
|
196
|
+
backgroundColor: "var(--bg-interactive)"
|
|
229
197
|
}
|
|
230
198
|
}
|
|
231
199
|
),
|
|
@@ -234,8 +202,8 @@ var TranslationsCompletionSection = ({
|
|
|
234
202
|
{
|
|
235
203
|
className: "h-full flex-1 rounded-sm",
|
|
236
204
|
style: {
|
|
237
|
-
backgroundColor: "var(--
|
|
238
|
-
|
|
205
|
+
backgroundColor: "var(--bg-interactive)",
|
|
206
|
+
opacity: 0.3
|
|
239
207
|
}
|
|
240
208
|
}
|
|
241
209
|
)
|
|
@@ -244,8 +212,8 @@ var TranslationsCompletionSection = ({
|
|
|
244
212
|
{
|
|
245
213
|
className: "h-full w-full rounded-sm",
|
|
246
214
|
style: {
|
|
247
|
-
backgroundColor: "var(--
|
|
248
|
-
|
|
215
|
+
backgroundColor: "var(--bg-interactive)",
|
|
216
|
+
opacity: 0.3
|
|
249
217
|
}
|
|
250
218
|
}
|
|
251
219
|
) }),
|
|
@@ -261,158 +229,117 @@ var TranslationsCompletionSection = ({
|
|
|
261
229
|
] })
|
|
262
230
|
] })
|
|
263
231
|
] }),
|
|
264
|
-
localeStats.length > 0 && /* @__PURE__ */ jsxs3(
|
|
265
|
-
/* @__PURE__ */ jsx3(
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
{
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between", children: [
|
|
277
|
-
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-x-2", children: [
|
|
278
|
-
/* @__PURE__ */ jsx3(
|
|
279
|
-
"div",
|
|
280
|
-
{
|
|
281
|
-
className: "h-2 w-2 rounded-full",
|
|
282
|
-
style: {
|
|
283
|
-
backgroundColor: "var(--tag-blue-icon)",
|
|
284
|
-
boxShadow: "inset 0 0 0 0.5px var(--alpha-250)"
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
),
|
|
288
|
-
/* @__PURE__ */ jsx3(
|
|
289
|
-
Text3,
|
|
290
|
-
{
|
|
291
|
-
size: "small",
|
|
292
|
-
weight: "plus",
|
|
293
|
-
className: "text-ui-fg-base",
|
|
294
|
-
children: t("translations.completion.translated")
|
|
295
|
-
}
|
|
296
|
-
)
|
|
297
|
-
] }),
|
|
232
|
+
localeStats.length > 0 && /* @__PURE__ */ jsxs3("div", { className: "border-ui-border-strong flex flex-col gap-y-3 border-t border-dashed px-6 pb-6 pt-4", children: [
|
|
233
|
+
/* @__PURE__ */ jsx3("div", { className: "flex h-32 w-full items-end gap-1", children: localeStats.map((locale) => {
|
|
234
|
+
const heightPercent = locale.total / maxTotal * 100;
|
|
235
|
+
const translatedPercent = locale.total > 0 ? locale.translated / locale.total * 100 : 0;
|
|
236
|
+
return /* @__PURE__ */ jsx3(
|
|
237
|
+
Tooltip,
|
|
238
|
+
{
|
|
239
|
+
open: hoveredLocale === locale.code,
|
|
240
|
+
content: /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-y-1 p-1", children: [
|
|
241
|
+
/* @__PURE__ */ jsx3(Text3, { size: "small", weight: "plus", children: locale.name }),
|
|
242
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between", children: [
|
|
243
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-x-2", children: [
|
|
298
244
|
/* @__PURE__ */ jsx3(
|
|
299
|
-
|
|
245
|
+
"div",
|
|
300
246
|
{
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
className: "text-ui-fg-base",
|
|
304
|
-
children: locale.translated
|
|
247
|
+
className: "h-2 w-2 rounded-full",
|
|
248
|
+
style: { backgroundColor: "var(--bg-interactive)" }
|
|
305
249
|
}
|
|
306
|
-
)
|
|
307
|
-
] }),
|
|
308
|
-
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between", children: [
|
|
309
|
-
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-x-2", children: [
|
|
310
|
-
/* @__PURE__ */ jsx3(
|
|
311
|
-
"div",
|
|
312
|
-
{
|
|
313
|
-
className: "h-2 w-2 rounded-full",
|
|
314
|
-
style: {
|
|
315
|
-
backgroundColor: "var(--tag-blue-border)",
|
|
316
|
-
boxShadow: "inset 0 0 0 0.5px var(--alpha-250)"
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
),
|
|
320
|
-
/* @__PURE__ */ jsx3(
|
|
321
|
-
Text3,
|
|
322
|
-
{
|
|
323
|
-
size: "small",
|
|
324
|
-
weight: "plus",
|
|
325
|
-
className: "text-ui-fg-base",
|
|
326
|
-
children: t("translations.completion.toTranslate")
|
|
327
|
-
}
|
|
328
|
-
)
|
|
329
|
-
] }),
|
|
250
|
+
),
|
|
330
251
|
/* @__PURE__ */ jsx3(
|
|
331
252
|
Text3,
|
|
332
253
|
{
|
|
333
254
|
size: "small",
|
|
334
255
|
weight: "plus",
|
|
335
|
-
className: "text-ui-fg-
|
|
336
|
-
children:
|
|
256
|
+
className: "text-ui-fg-subtle",
|
|
257
|
+
children: t("translations.completion.translated")
|
|
337
258
|
}
|
|
338
259
|
)
|
|
339
|
-
] })
|
|
260
|
+
] }),
|
|
261
|
+
/* @__PURE__ */ jsx3(Text3, { size: "small", weight: "plus", children: locale.translated })
|
|
340
262
|
] }),
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
263
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-x-2", children: [
|
|
264
|
+
/* @__PURE__ */ jsx3(
|
|
265
|
+
"div",
|
|
266
|
+
{
|
|
267
|
+
className: "h-2 w-2 rounded-full",
|
|
268
|
+
style: {
|
|
269
|
+
backgroundColor: "var(--bg-interactive)",
|
|
270
|
+
opacity: 0.3
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
),
|
|
274
|
+
/* @__PURE__ */ jsx3(
|
|
275
|
+
Text3,
|
|
276
|
+
{
|
|
277
|
+
size: "small",
|
|
278
|
+
weight: "plus",
|
|
279
|
+
className: "text-ui-fg-subtle",
|
|
280
|
+
children: t("translations.completion.toTranslate")
|
|
281
|
+
}
|
|
282
|
+
),
|
|
283
|
+
/* @__PURE__ */ jsx3(Text3, { size: "small", weight: "plus", children: locale.toTranslate })
|
|
284
|
+
] })
|
|
285
|
+
] }),
|
|
286
|
+
children: /* @__PURE__ */ jsxs3(
|
|
287
|
+
"div",
|
|
288
|
+
{
|
|
289
|
+
className: "flex min-w-2 flex-1 flex-col justify-end overflow-hidden rounded-t-sm transition-opacity",
|
|
290
|
+
style: { height: `${heightPercent}%` },
|
|
291
|
+
onMouseEnter: () => setHoveredLocale(locale.code),
|
|
292
|
+
onMouseLeave: () => setHoveredLocale(null),
|
|
293
|
+
children: [
|
|
294
|
+
/* @__PURE__ */ jsx3(
|
|
349
295
|
"div",
|
|
350
296
|
{
|
|
351
|
-
className: "w-full rounded-sm",
|
|
297
|
+
className: "w-full rounded-t-sm",
|
|
352
298
|
style: {
|
|
353
|
-
height:
|
|
354
|
-
backgroundColor: "var(--
|
|
355
|
-
|
|
299
|
+
height: `${100 - translatedPercent}%`,
|
|
300
|
+
backgroundColor: "var(--bg-interactive)",
|
|
301
|
+
opacity: 0.3,
|
|
302
|
+
minHeight: locale.toTranslate > 0 ? "2px" : "0"
|
|
356
303
|
}
|
|
357
304
|
}
|
|
358
|
-
)
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
minHeight: locale.toTranslate > 0 ? "2px" : "0"
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
),
|
|
371
|
-
translatedPercent > 0 && /* @__PURE__ */ jsx3(
|
|
372
|
-
"div",
|
|
373
|
-
{
|
|
374
|
-
className: "mt-0.5 w-full rounded-sm",
|
|
375
|
-
style: {
|
|
376
|
-
height: `${translatedPercent}%`,
|
|
377
|
-
backgroundColor: "var(--tag-blue-icon)",
|
|
378
|
-
boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
|
|
379
|
-
minHeight: locale.translated > 0 ? "2px" : "0"
|
|
380
|
-
}
|
|
305
|
+
),
|
|
306
|
+
translatedPercent > 0 && /* @__PURE__ */ jsx3(
|
|
307
|
+
"div",
|
|
308
|
+
{
|
|
309
|
+
className: "mt-0.5 w-full rounded-sm",
|
|
310
|
+
style: {
|
|
311
|
+
height: `${translatedPercent}%`,
|
|
312
|
+
backgroundColor: "var(--bg-interactive)",
|
|
313
|
+
minHeight: locale.translated > 0 ? "2px" : "0"
|
|
381
314
|
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
) })
|
|
386
|
-
},
|
|
387
|
-
locale.code
|
|
388
|
-
);
|
|
389
|
-
}) }),
|
|
390
|
-
localeStatsCount < 9 && /* @__PURE__ */ jsx3("div", { className: "flex w-full gap-1", children: localeStats.map((locale) => /* @__PURE__ */ jsx3(
|
|
391
|
-
"div",
|
|
392
|
-
{
|
|
393
|
-
className: "flex flex-1 items-center justify-center",
|
|
394
|
-
children: /* @__PURE__ */ jsx3(
|
|
395
|
-
Text3,
|
|
396
|
-
{
|
|
397
|
-
size: "xsmall",
|
|
398
|
-
weight: "plus",
|
|
399
|
-
className: "text-ui-fg-subtle min-w-2 whitespace-normal break-words text-center leading-tight",
|
|
400
|
-
children: localeStatsCount < 6 ? locale.name : locale.code
|
|
315
|
+
}
|
|
316
|
+
)
|
|
317
|
+
]
|
|
401
318
|
}
|
|
402
319
|
)
|
|
403
320
|
},
|
|
404
321
|
locale.code
|
|
405
|
-
)
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
322
|
+
);
|
|
323
|
+
}) }),
|
|
324
|
+
localeStatsCount < 9 && /* @__PURE__ */ jsx3("div", { className: "flex w-full gap-1", children: localeStats.map((locale) => /* @__PURE__ */ jsx3(
|
|
325
|
+
Text3,
|
|
326
|
+
{
|
|
327
|
+
size: "xsmall",
|
|
328
|
+
weight: "plus",
|
|
329
|
+
className: "text-ui-fg-subtle min-w-2 flex-1 whitespace-normal break-words text-center leading-tight",
|
|
330
|
+
children: localeStatsCount < 6 ? locale.name : locale.code
|
|
331
|
+
},
|
|
332
|
+
locale.code
|
|
333
|
+
)) }),
|
|
334
|
+
localeStatsCount > 9 && /* @__PURE__ */ jsx3(
|
|
335
|
+
Text3,
|
|
336
|
+
{
|
|
337
|
+
weight: "plus",
|
|
338
|
+
size: "xsmall",
|
|
339
|
+
className: "text-ui-fg-subtle text-center",
|
|
340
|
+
children: t("translations.completion.footer")
|
|
341
|
+
}
|
|
342
|
+
)
|
|
416
343
|
] })
|
|
417
344
|
] });
|
|
418
345
|
};
|