@medusajs/dashboard 3.0.0-snapshot-20251215162333 → 3.0.0-snapshot-20251216103925
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 -8
- package/dist/app.js +59 -49
- package/dist/app.mjs +1 -1
- package/dist/{chunk-YTYDWNYA.mjs → chunk-O7WJSSQR.mjs} +14 -8
- package/dist/en.json +3 -0
- package/dist/{product-attributes-TKCE2M63.mjs → product-attributes-QD3BWV5V.mjs} +1 -1
- package/dist/{product-create-OLDZPMLW.mjs → product-create-E2GZYQX4.mjs} +1 -1
- package/dist/{product-detail-O6QWJIKR.mjs → product-detail-QBGGKRZ2.mjs} +1 -1
- package/dist/{product-edit-56XDGDUN.mjs → product-edit-YP4KOQ4T.mjs} +1 -1
- package/dist/{product-organization-PNKWRNHC.mjs → product-organization-H557PLLB.mjs} +1 -1
- package/dist/{translation-list-AFK5MGSH.mjs → translation-list-IAKEB7MY.mjs} +19 -18
- package/dist/{translations-edit-EN47PWTO.mjs → translations-edit-QKLE4L5B.mjs} +3 -0
- package/package.json +9 -9
- package/src/i18n/translations/$schema.json +12 -3
- package/src/i18n/translations/en.json +3 -0
- package/src/i18n/translations/es.json +3 -0
- package/src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx +7 -2
- package/src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx +6 -6
- package/src/routes/translations/translation-list/translation-list.tsx +18 -13
- package/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx +3 -0
package/dist/app.css
CHANGED
|
@@ -2652,10 +2652,6 @@ video {
|
|
|
2652
2652
|
border-bottom-right-radius: 0.75rem;
|
|
2653
2653
|
border-bottom-left-radius: 0.75rem;
|
|
2654
2654
|
}
|
|
2655
|
-
.rounded-l-full {
|
|
2656
|
-
border-top-left-radius: 9999px;
|
|
2657
|
-
border-bottom-left-radius: 9999px;
|
|
2658
|
-
}
|
|
2659
2655
|
.rounded-r {
|
|
2660
2656
|
border-top-right-radius: 0.25rem;
|
|
2661
2657
|
border-bottom-right-radius: 0.25rem;
|
|
@@ -2664,10 +2660,6 @@ video {
|
|
|
2664
2660
|
border-top-right-radius: 1rem;
|
|
2665
2661
|
border-bottom-right-radius: 1rem;
|
|
2666
2662
|
}
|
|
2667
|
-
.rounded-r-full {
|
|
2668
|
-
border-top-right-radius: 9999px;
|
|
2669
|
-
border-bottom-right-radius: 9999px;
|
|
2670
|
-
}
|
|
2671
2663
|
.rounded-t-lg {
|
|
2672
2664
|
border-top-left-radius: 0.5rem;
|
|
2673
2665
|
border-top-right-radius: 0.5rem;
|
package/dist/app.js
CHANGED
|
@@ -11887,6 +11887,9 @@ var init_en = __esm({
|
|
|
11887
11887
|
},
|
|
11888
11888
|
title: "Translation domains",
|
|
11889
11889
|
subtitle: "Manage translations of your data in Medusa",
|
|
11890
|
+
list: {
|
|
11891
|
+
metrics: "{{translated}} of {{total}} fields translated"
|
|
11892
|
+
},
|
|
11890
11893
|
bulk: {
|
|
11891
11894
|
header: "Translations Bulk Editor",
|
|
11892
11895
|
mainColumn: "Locale"
|
|
@@ -15098,6 +15101,9 @@ var init_es = __esm({
|
|
|
15098
15101
|
},
|
|
15099
15102
|
translations: {
|
|
15100
15103
|
domain: "Traducciones",
|
|
15104
|
+
list: {
|
|
15105
|
+
metrics: "{{translated}} de {{total}} textos traducidos"
|
|
15106
|
+
},
|
|
15101
15107
|
actions: {
|
|
15102
15108
|
manage: "Gestionar traducciones",
|
|
15103
15109
|
manageLocales: "Gestionar idiomas"
|
|
@@ -187294,30 +187300,29 @@ var init_active_locales_section = __esm({
|
|
|
187294
187300
|
});
|
|
187295
187301
|
|
|
187296
187302
|
// src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx
|
|
187297
|
-
var import_ui450, import_react_router_dom246, import_jsx_runtime686, TranslationListSection;
|
|
187303
|
+
var import_ui450, import_react_router_dom246, import_react_i18next484, import_jsx_runtime686, TranslationListSection;
|
|
187298
187304
|
var init_translation_list_section = __esm({
|
|
187299
187305
|
"src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx"() {
|
|
187300
187306
|
"use strict";
|
|
187301
187307
|
import_ui450 = require("@medusajs/ui");
|
|
187302
187308
|
import_react_router_dom246 = require("react-router-dom");
|
|
187309
|
+
import_react_i18next484 = require("react-i18next");
|
|
187303
187310
|
import_jsx_runtime686 = require("react/jsx-runtime");
|
|
187304
187311
|
TranslationListSection = ({
|
|
187305
187312
|
entities,
|
|
187306
187313
|
hasLocales = false
|
|
187307
187314
|
}) => {
|
|
187315
|
+
const { t: t5 } = (0, import_react_i18next484.useTranslation)();
|
|
187308
187316
|
return /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.Container, { className: "divide-y p-0", children: entities.map((entity) => /* @__PURE__ */ (0, import_jsx_runtime686.jsxs)(
|
|
187309
187317
|
"div",
|
|
187310
187318
|
{
|
|
187311
187319
|
className: "grid grid-cols-[250px_1fr_auto] items-center gap-x-4 px-6 py-4",
|
|
187312
187320
|
children: [
|
|
187313
187321
|
/* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.Text, { size: "small", weight: "plus", children: entity.label }),
|
|
187314
|
-
/* @__PURE__ */ (0, import_jsx_runtime686.
|
|
187315
|
-
(entity.translatedCount ?? 0).toLocaleString(),
|
|
187316
|
-
|
|
187317
|
-
|
|
187318
|
-
(entity.totalCount ?? 0).toLocaleString(),
|
|
187319
|
-
" fields translated"
|
|
187320
|
-
] }),
|
|
187322
|
+
/* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.Text, { size: "small", className: "text-ui-fg-subtle", children: t5("translations.list.metrics", {
|
|
187323
|
+
translated: (entity.translatedCount ?? 0).toLocaleString(),
|
|
187324
|
+
total: (entity.totalCount ?? 0).toLocaleString()
|
|
187325
|
+
}) }),
|
|
187321
187326
|
/* @__PURE__ */ (0, import_jsx_runtime686.jsx)(
|
|
187322
187327
|
import_react_router_dom246.Link,
|
|
187323
187328
|
{
|
|
@@ -187334,17 +187339,17 @@ var init_translation_list_section = __esm({
|
|
|
187334
187339
|
});
|
|
187335
187340
|
|
|
187336
187341
|
// src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx
|
|
187337
|
-
var import_ui451,
|
|
187342
|
+
var import_ui451, import_react_i18next485, import_jsx_runtime687, TranslationsCompletionSection;
|
|
187338
187343
|
var init_translations_completion_section = __esm({
|
|
187339
187344
|
"src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx"() {
|
|
187340
187345
|
"use strict";
|
|
187341
187346
|
import_ui451 = require("@medusajs/ui");
|
|
187342
|
-
|
|
187347
|
+
import_react_i18next485 = require("react-i18next");
|
|
187343
187348
|
import_jsx_runtime687 = require("react/jsx-runtime");
|
|
187344
187349
|
TranslationsCompletionSection = ({
|
|
187345
187350
|
statistics
|
|
187346
187351
|
}) => {
|
|
187347
|
-
const { t: t5 } = (0,
|
|
187352
|
+
const { t: t5 } = (0, import_react_i18next485.useTranslation)();
|
|
187348
187353
|
const { translatedCount, totalCount } = Object.values(statistics).reduce(
|
|
187349
187354
|
(acc, curr) => ({
|
|
187350
187355
|
translatedCount: acc.translatedCount + curr.translated,
|
|
@@ -187357,7 +187362,7 @@ var init_translations_completion_section = __esm({
|
|
|
187357
187362
|
return /* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Container, { className: "flex flex-col gap-y-3 px-6 py-4", children: [
|
|
187358
187363
|
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
187359
187364
|
/* @__PURE__ */ (0, import_jsx_runtime687.jsx)(import_ui451.Heading, { children: t5("translations.completion.heading") }),
|
|
187360
|
-
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Text, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
187365
|
+
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
|
|
187361
187366
|
translatedCount.toLocaleString(),
|
|
187362
187367
|
" ",
|
|
187363
187368
|
t5("general.of"),
|
|
@@ -187365,11 +187370,11 @@ var init_translations_completion_section = __esm({
|
|
|
187365
187370
|
totalCount.toLocaleString()
|
|
187366
187371
|
] })
|
|
187367
187372
|
] }),
|
|
187368
|
-
/* @__PURE__ */ (0, import_jsx_runtime687.jsx)("div", { className: "flex h-
|
|
187373
|
+
/* @__PURE__ */ (0, import_jsx_runtime687.jsx)("div", { className: "flex h-3 w-full overflow-hidden", children: percentage > 0 ? /* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_jsx_runtime687.Fragment, { children: [
|
|
187369
187374
|
/* @__PURE__ */ (0, import_jsx_runtime687.jsx)(
|
|
187370
187375
|
"div",
|
|
187371
187376
|
{
|
|
187372
|
-
className: "mr-0.5 h-full rounded-
|
|
187377
|
+
className: "mr-0.5 h-full rounded-sm transition-all",
|
|
187373
187378
|
style: {
|
|
187374
187379
|
width: `${percentage}%`,
|
|
187375
187380
|
backgroundColor: "var(--bg-interactive)"
|
|
@@ -187379,7 +187384,7 @@ var init_translations_completion_section = __esm({
|
|
|
187379
187384
|
/* @__PURE__ */ (0, import_jsx_runtime687.jsx)(
|
|
187380
187385
|
"div",
|
|
187381
187386
|
{
|
|
187382
|
-
className: "h-full flex-1 rounded-
|
|
187387
|
+
className: "h-full flex-1 rounded-sm",
|
|
187383
187388
|
style: {
|
|
187384
187389
|
backgroundColor: "var(--bg-interactive)",
|
|
187385
187390
|
opacity: 0.3
|
|
@@ -187397,11 +187402,11 @@ var init_translations_completion_section = __esm({
|
|
|
187397
187402
|
}
|
|
187398
187403
|
) }),
|
|
187399
187404
|
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
187400
|
-
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Text, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
187405
|
+
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
|
|
187401
187406
|
percentage.toFixed(1),
|
|
187402
187407
|
"%"
|
|
187403
187408
|
] }),
|
|
187404
|
-
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Text, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
187409
|
+
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
|
|
187405
187410
|
remaining.toLocaleString(),
|
|
187406
187411
|
" ",
|
|
187407
187412
|
t5("general.remaining").toLowerCase()
|
|
@@ -187413,13 +187418,13 @@ var init_translations_completion_section = __esm({
|
|
|
187413
187418
|
});
|
|
187414
187419
|
|
|
187415
187420
|
// src/routes/translations/translation-list/translation-list.tsx
|
|
187416
|
-
var import_ui452,
|
|
187421
|
+
var import_ui452, import_react_i18next486, import_react304, import_jsx_runtime688, TranslationList;
|
|
187417
187422
|
var init_translation_list = __esm({
|
|
187418
187423
|
"src/routes/translations/translation-list/translation-list.tsx"() {
|
|
187419
187424
|
"use strict";
|
|
187420
187425
|
import_ui452 = require("@medusajs/ui");
|
|
187421
187426
|
init_pages();
|
|
187422
|
-
|
|
187427
|
+
import_react_i18next486 = require("react-i18next");
|
|
187423
187428
|
init_api();
|
|
187424
187429
|
init_active_locales_section();
|
|
187425
187430
|
init_translation_list_section();
|
|
@@ -187428,7 +187433,7 @@ var init_translation_list = __esm({
|
|
|
187428
187433
|
import_react304 = require("react");
|
|
187429
187434
|
import_jsx_runtime688 = require("react/jsx-runtime");
|
|
187430
187435
|
TranslationList = () => {
|
|
187431
|
-
const { t: t5 } = (0,
|
|
187436
|
+
const { t: t5 } = (0, import_react_i18next486.useTranslation)();
|
|
187432
187437
|
const { store, isPending, isError, error } = useStore();
|
|
187433
187438
|
const {
|
|
187434
187439
|
translatable_fields,
|
|
@@ -187460,7 +187465,9 @@ var init_translation_list = __esm({
|
|
|
187460
187465
|
if (!translatable_fields || !statistics) {
|
|
187461
187466
|
return [];
|
|
187462
187467
|
}
|
|
187463
|
-
return Object.entries(translatable_fields).
|
|
187468
|
+
return Object.entries(translatable_fields).filter(
|
|
187469
|
+
([entity]) => !["product_option", "product_option_value"].includes(entity)
|
|
187470
|
+
).map(([entity, fields]) => {
|
|
187464
187471
|
const entityStatistics = statistics[entity];
|
|
187465
187472
|
return {
|
|
187466
187473
|
label: entity.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" "),
|
|
@@ -187619,7 +187626,7 @@ function useTranslationsGridColumns({
|
|
|
187619
187626
|
availableLocales,
|
|
187620
187627
|
modalFields = []
|
|
187621
187628
|
}) {
|
|
187622
|
-
const { t: t5 } = (0,
|
|
187629
|
+
const { t: t5 } = (0, import_react_i18next487.useTranslation)();
|
|
187623
187630
|
const columns = (0, import_react305.useMemo)(() => {
|
|
187624
187631
|
return [
|
|
187625
187632
|
columnHelper93.column({
|
|
@@ -187640,7 +187647,9 @@ function useTranslationsGridColumns({
|
|
|
187640
187647
|
columnHelper93.column({
|
|
187641
187648
|
id: "original",
|
|
187642
187649
|
name: "original",
|
|
187650
|
+
size: 300,
|
|
187643
187651
|
header: t5("general.original"),
|
|
187652
|
+
disableHiding: true,
|
|
187644
187653
|
cell: (context) => {
|
|
187645
187654
|
const row = context.row.original;
|
|
187646
187655
|
if (isEntityRow(row)) {
|
|
@@ -187659,6 +187668,7 @@ function useTranslationsGridColumns({
|
|
|
187659
187668
|
return columnHelper93.column({
|
|
187660
187669
|
id: locale.locale_code,
|
|
187661
187670
|
name: locale.locale.name,
|
|
187671
|
+
size: 300,
|
|
187662
187672
|
header: () => locale.locale.name,
|
|
187663
187673
|
cell: (context) => {
|
|
187664
187674
|
const row = context.row.original;
|
|
@@ -187696,7 +187706,7 @@ function useTranslationsGridColumns({
|
|
|
187696
187706
|
}, [t5, translatableFields, availableLocales, modalFields]);
|
|
187697
187707
|
return columns;
|
|
187698
187708
|
}
|
|
187699
|
-
var import_zod166, import_ui453, import_react305, import_react_hook_form144,
|
|
187709
|
+
var import_zod166, import_ui453, import_react305, import_react_hook_form144, import_react_i18next487, import_zod167, import_jsx_runtime689, LocaleTranslationSchema, EntityTranslationsSchema, TranslationsFormSchema, columnHelper93, TranslationsEditForm;
|
|
187700
187710
|
var init_translations_edit_form = __esm({
|
|
187701
187711
|
"src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx"() {
|
|
187702
187712
|
"use strict";
|
|
@@ -187704,7 +187714,7 @@ var init_translations_edit_form = __esm({
|
|
|
187704
187714
|
import_ui453 = require("@medusajs/ui");
|
|
187705
187715
|
import_react305 = require("react");
|
|
187706
187716
|
import_react_hook_form144 = require("react-hook-form");
|
|
187707
|
-
|
|
187717
|
+
import_react_i18next487 = require("react-i18next");
|
|
187708
187718
|
import_zod167 = require("zod");
|
|
187709
187719
|
init_data_grid2();
|
|
187710
187720
|
init_modals();
|
|
@@ -187736,7 +187746,7 @@ var init_translations_edit_form = __esm({
|
|
|
187736
187746
|
isFetchingNextPage,
|
|
187737
187747
|
referenceCount
|
|
187738
187748
|
}) => {
|
|
187739
|
-
const { t: t5 } = (0,
|
|
187749
|
+
const { t: t5 } = (0, import_react_i18next487.useTranslation)();
|
|
187740
187750
|
const { handleSuccess, setCloseOnEscape } = useRouteModal();
|
|
187741
187751
|
const direction = useDocumentDirection();
|
|
187742
187752
|
const entities = (0, import_react305.useMemo)(() => references, [references]);
|
|
@@ -188078,14 +188088,14 @@ var init_avatar_box = __esm({
|
|
|
188078
188088
|
});
|
|
188079
188089
|
|
|
188080
188090
|
// src/routes/login/login.tsx
|
|
188081
|
-
var import_zod168, import_ui454, import_react_hook_form145,
|
|
188091
|
+
var import_zod168, import_ui454, import_react_hook_form145, import_react_i18next488, import_react_router_dom248, z64, import_jsx_runtime692, LoginSchema, Login;
|
|
188082
188092
|
var init_login = __esm({
|
|
188083
188093
|
"src/routes/login/login.tsx"() {
|
|
188084
188094
|
"use strict";
|
|
188085
188095
|
import_zod168 = require("@hookform/resolvers/zod");
|
|
188086
188096
|
import_ui454 = require("@medusajs/ui");
|
|
188087
188097
|
import_react_hook_form145 = require("react-hook-form");
|
|
188088
|
-
|
|
188098
|
+
import_react_i18next488 = require("react-i18next");
|
|
188089
188099
|
import_react_router_dom248 = require("react-router-dom");
|
|
188090
188100
|
z64 = __toESM(require("zod"));
|
|
188091
188101
|
init_form2();
|
|
@@ -188099,7 +188109,7 @@ var init_login = __esm({
|
|
|
188099
188109
|
password: z64.string()
|
|
188100
188110
|
});
|
|
188101
188111
|
Login = () => {
|
|
188102
|
-
const { t: t5 } = (0,
|
|
188112
|
+
const { t: t5 } = (0, import_react_i18next488.useTranslation)();
|
|
188103
188113
|
const location = (0, import_react_router_dom248.useLocation)();
|
|
188104
188114
|
const navigate = (0, import_react_router_dom248.useNavigate)();
|
|
188105
188115
|
const { getWidgets } = useExtension();
|
|
@@ -188219,7 +188229,7 @@ var init_login = __esm({
|
|
|
188219
188229
|
})
|
|
188220
188230
|
] }),
|
|
188221
188231
|
/* @__PURE__ */ (0, import_jsx_runtime692.jsx)("span", { className: "text-ui-fg-muted txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime692.jsx)(
|
|
188222
|
-
|
|
188232
|
+
import_react_i18next488.Trans,
|
|
188223
188233
|
{
|
|
188224
188234
|
i18nKey: "login.forgotPassword",
|
|
188225
188235
|
components: [
|
|
@@ -188348,14 +188358,14 @@ var init_logo_box2 = __esm({
|
|
|
188348
188358
|
});
|
|
188349
188359
|
|
|
188350
188360
|
// src/routes/reset-password/reset-password.tsx
|
|
188351
|
-
var import_zod169, import_ui456, import_react_hook_form146,
|
|
188361
|
+
var import_zod169, import_ui456, import_react_hook_form146, import_react_i18next489, import_react_router_dom249, z65, import_react309, import_react_jwt, import_jsx_runtime694, ResetPasswordInstructionsSchema, ResetPasswordSchema, ResetPasswordTokenSchema, validateDecodedResetPasswordToken, InvalidResetToken, ChooseNewPassword, ResetPassword;
|
|
188352
188362
|
var init_reset_password = __esm({
|
|
188353
188363
|
"src/routes/reset-password/reset-password.tsx"() {
|
|
188354
188364
|
"use strict";
|
|
188355
188365
|
import_zod169 = require("@hookform/resolvers/zod");
|
|
188356
188366
|
import_ui456 = require("@medusajs/ui");
|
|
188357
188367
|
import_react_hook_form146 = require("react-hook-form");
|
|
188358
|
-
|
|
188368
|
+
import_react_i18next489 = require("react-i18next");
|
|
188359
188369
|
import_react_router_dom249 = require("react-router-dom");
|
|
188360
188370
|
z65 = __toESM(require("zod"));
|
|
188361
188371
|
import_react309 = require("react");
|
|
@@ -188390,7 +188400,7 @@ var init_reset_password = __esm({
|
|
|
188390
188400
|
return ResetPasswordTokenSchema.safeParse(decoded).success;
|
|
188391
188401
|
};
|
|
188392
188402
|
InvalidResetToken = () => {
|
|
188393
|
-
const { t: t5 } = (0,
|
|
188403
|
+
const { t: t5 } = (0, import_react_i18next489.useTranslation)();
|
|
188394
188404
|
const navigate = (0, import_react_router_dom249.useNavigate)();
|
|
188395
188405
|
return /* @__PURE__ */ (0, import_jsx_runtime694.jsx)("div", { className: "bg-ui-bg-base flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime694.jsxs)("div", { className: "m-4 flex w-full max-w-[300px] flex-col items-center", children: [
|
|
188396
188406
|
/* @__PURE__ */ (0, import_jsx_runtime694.jsx)(LogoBox, { className: "mb-4" }),
|
|
@@ -188408,7 +188418,7 @@ var init_reset_password = __esm({
|
|
|
188408
188418
|
}
|
|
188409
188419
|
) }),
|
|
188410
188420
|
/* @__PURE__ */ (0, import_jsx_runtime694.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
|
|
188411
|
-
|
|
188421
|
+
import_react_i18next489.Trans,
|
|
188412
188422
|
{
|
|
188413
188423
|
i18nKey: "resetPassword.backToLogin",
|
|
188414
188424
|
components: [
|
|
@@ -188426,7 +188436,7 @@ var init_reset_password = __esm({
|
|
|
188426
188436
|
] }) });
|
|
188427
188437
|
};
|
|
188428
188438
|
ChooseNewPassword = ({ token }) => {
|
|
188429
|
-
const { t: t5 } = (0,
|
|
188439
|
+
const { t: t5 } = (0, import_react_i18next489.useTranslation)();
|
|
188430
188440
|
const [showAlert, setShowAlert] = (0, import_react309.useState)(false);
|
|
188431
188441
|
const invite = token ? (0, import_react_jwt.decodeToken)(token) : null;
|
|
188432
188442
|
const isValidResetPasswordToken = invite && validateDecodedResetPasswordToken(invite);
|
|
@@ -188527,7 +188537,7 @@ var init_reset_password = __esm({
|
|
|
188527
188537
|
}
|
|
188528
188538
|
) }) }),
|
|
188529
188539
|
/* @__PURE__ */ (0, import_jsx_runtime694.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
|
|
188530
|
-
|
|
188540
|
+
import_react_i18next489.Trans,
|
|
188531
188541
|
{
|
|
188532
188542
|
i18nKey: "resetPassword.backToLogin",
|
|
188533
188543
|
components: [
|
|
@@ -188545,7 +188555,7 @@ var init_reset_password = __esm({
|
|
|
188545
188555
|
] }) });
|
|
188546
188556
|
};
|
|
188547
188557
|
ResetPassword = () => {
|
|
188548
|
-
const { t: t5 } = (0,
|
|
188558
|
+
const { t: t5 } = (0, import_react_i18next489.useTranslation)();
|
|
188549
188559
|
const [searchParams] = (0, import_react_router_dom249.useSearchParams)();
|
|
188550
188560
|
const [showAlert, setShowAlert] = (0, import_react309.useState)(false);
|
|
188551
188561
|
const token = searchParams.get("token");
|
|
@@ -188616,7 +188626,7 @@ var init_reset_password = __esm({
|
|
|
188616
188626
|
}
|
|
188617
188627
|
) }) }),
|
|
188618
188628
|
/* @__PURE__ */ (0, import_jsx_runtime694.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
|
|
188619
|
-
|
|
188629
|
+
import_react_i18next489.Trans,
|
|
188620
188630
|
{
|
|
188621
188631
|
i18nKey: "resetPassword.backToLogin",
|
|
188622
188632
|
components: [
|
|
@@ -188649,7 +188659,7 @@ var init_reset_password2 = __esm({
|
|
|
188649
188659
|
});
|
|
188650
188660
|
|
|
188651
188661
|
// src/routes/invite/invite.tsx
|
|
188652
|
-
var import_zod170, import_ui457, import_i18next8, import_react310, import_react311, import_react_hook_form147,
|
|
188662
|
+
var import_zod170, import_ui457, import_i18next8, import_react310, import_react311, import_react_hook_form147, import_react_i18next490, import_react_jwt2, import_react_router_dom250, z66, import_jsx_runtime695, CreateAccountSchema, Invite, LoginLink, InvalidView, CreateView, SuccessView, InviteSchema, validateDecodedInvite;
|
|
188653
188663
|
var init_invite = __esm({
|
|
188654
188664
|
"src/routes/invite/invite.tsx"() {
|
|
188655
188665
|
"use strict";
|
|
@@ -188659,7 +188669,7 @@ var init_invite = __esm({
|
|
|
188659
188669
|
import_react310 = require("motion/react");
|
|
188660
188670
|
import_react311 = require("react");
|
|
188661
188671
|
import_react_hook_form147 = require("react-hook-form");
|
|
188662
|
-
|
|
188672
|
+
import_react_i18next490 = require("react-i18next");
|
|
188663
188673
|
import_react_jwt2 = require("react-jwt");
|
|
188664
188674
|
import_react_router_dom250 = require("react-router-dom");
|
|
188665
188675
|
z66 = __toESM(require("zod"));
|
|
@@ -188764,7 +188774,7 @@ var init_invite = __esm({
|
|
|
188764
188774
|
] }) });
|
|
188765
188775
|
};
|
|
188766
188776
|
LoginLink = () => {
|
|
188767
|
-
const { t: t5 } = (0,
|
|
188777
|
+
const { t: t5 } = (0, import_react_i18next490.useTranslation)();
|
|
188768
188778
|
return /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex w-full flex-col items-center", children: [
|
|
188769
188779
|
/* @__PURE__ */ (0, import_jsx_runtime695.jsx)("div", { className: "my-6 h-px w-full border-b border-dotted" }),
|
|
188770
188780
|
/* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
|
|
@@ -188779,7 +188789,7 @@ var init_invite = __esm({
|
|
|
188779
188789
|
] });
|
|
188780
188790
|
};
|
|
188781
188791
|
InvalidView = () => {
|
|
188782
|
-
const { t: t5 } = (0,
|
|
188792
|
+
const { t: t5 } = (0, import_react_i18next490.useTranslation)();
|
|
188783
188793
|
return /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
188784
188794
|
/* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex flex-col items-center gap-y-1", children: [
|
|
188785
188795
|
/* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Heading, { children: t5("invite.invalidTokenTitle") }),
|
|
@@ -188793,7 +188803,7 @@ var init_invite = __esm({
|
|
|
188793
188803
|
token,
|
|
188794
188804
|
invite
|
|
188795
188805
|
}) => {
|
|
188796
|
-
const { t: t5 } = (0,
|
|
188806
|
+
const { t: t5 } = (0, import_react_i18next490.useTranslation)();
|
|
188797
188807
|
const [invalid, setInvalid] = (0, import_react311.useState)(false);
|
|
188798
188808
|
const [params2] = (0, import_react_router_dom250.useSearchParams)();
|
|
188799
188809
|
const isFirstRun = params2.get("first_run") === "true";
|
|
@@ -188968,7 +188978,7 @@ var init_invite = __esm({
|
|
|
188968
188978
|
] });
|
|
188969
188979
|
};
|
|
188970
188980
|
SuccessView = () => {
|
|
188971
|
-
const { t: t5 } = (0,
|
|
188981
|
+
const { t: t5 } = (0, import_react_i18next490.useTranslation)();
|
|
188972
188982
|
return /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex w-full flex-col items-center gap-y-6", children: [
|
|
188973
188983
|
/* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex flex-col items-center gap-y-1", children: [
|
|
188974
188984
|
/* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Heading, { className: "text-center", children: t5("invite.successTitle") }),
|
|
@@ -189011,17 +189021,17 @@ var init_invite2 = __esm({
|
|
|
189011
189021
|
});
|
|
189012
189022
|
|
|
189013
189023
|
// src/routes/no-match/no-match.tsx
|
|
189014
|
-
var import_icons175, import_ui458,
|
|
189024
|
+
var import_icons175, import_ui458, import_react_i18next491, import_react_router_dom251, import_jsx_runtime696, NoMatch;
|
|
189015
189025
|
var init_no_match = __esm({
|
|
189016
189026
|
"src/routes/no-match/no-match.tsx"() {
|
|
189017
189027
|
"use strict";
|
|
189018
189028
|
import_icons175 = require("@medusajs/icons");
|
|
189019
189029
|
import_ui458 = require("@medusajs/ui");
|
|
189020
|
-
|
|
189030
|
+
import_react_i18next491 = require("react-i18next");
|
|
189021
189031
|
import_react_router_dom251 = require("react-router-dom");
|
|
189022
189032
|
import_jsx_runtime696 = require("react/jsx-runtime");
|
|
189023
189033
|
NoMatch = () => {
|
|
189024
|
-
const { t: t5 } = (0,
|
|
189034
|
+
const { t: t5 } = (0, import_react_i18next491.useTranslation)();
|
|
189025
189035
|
const title = t5("errorBoundary.notFoundTitle");
|
|
189026
189036
|
const message = t5("errorBoundary.noMatchMessage");
|
|
189027
189037
|
return /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("div", { className: "flex size-full min-h-screen items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex flex-col items-center gap-y-6", children: [
|
|
@@ -191068,12 +191078,12 @@ function getFieldLabel(field) {
|
|
|
191068
191078
|
}
|
|
191069
191079
|
return field.name.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
191070
191080
|
}
|
|
191071
|
-
var import_ui459,
|
|
191081
|
+
var import_ui459, import_react_i18next492, import_jsx_runtime699, FormExtensionZone, FormExtensionField, FormExtensionFieldComponent;
|
|
191072
191082
|
var init_form_extension_zone = __esm({
|
|
191073
191083
|
"src/dashboard-app/forms/form-extension-zone/form-extension-zone.tsx"() {
|
|
191074
191084
|
"use strict";
|
|
191075
191085
|
import_ui459 = require("@medusajs/ui");
|
|
191076
|
-
|
|
191086
|
+
import_react_i18next492 = require("react-i18next");
|
|
191077
191087
|
init_form2();
|
|
191078
191088
|
init_utils15();
|
|
191079
191089
|
import_jsx_runtime699 = require("react/jsx-runtime");
|
|
@@ -191117,7 +191127,7 @@ var init_form_extension_zone = __esm({
|
|
|
191117
191127
|
component,
|
|
191118
191128
|
placeholder
|
|
191119
191129
|
}) => {
|
|
191120
|
-
const { t: t5 } = (0,
|
|
191130
|
+
const { t: t5 } = (0, import_react_i18next492.useTranslation)();
|
|
191121
191131
|
if (component) {
|
|
191122
191132
|
const Component5 = component;
|
|
191123
191133
|
return /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Component5, { ...field, placeholder });
|
package/dist/app.mjs
CHANGED
|
@@ -11493,6 +11493,9 @@ var en_default = {
|
|
|
11493
11493
|
},
|
|
11494
11494
|
title: "Translation domains",
|
|
11495
11495
|
subtitle: "Manage translations of your data in Medusa",
|
|
11496
|
+
list: {
|
|
11497
|
+
metrics: "{{translated}} of {{total}} fields translated"
|
|
11498
|
+
},
|
|
11496
11499
|
bulk: {
|
|
11497
11500
|
header: "Translations Bulk Editor",
|
|
11498
11501
|
mainColumn: "Locale"
|
|
@@ -14699,6 +14702,9 @@ var es_default = {
|
|
|
14699
14702
|
},
|
|
14700
14703
|
translations: {
|
|
14701
14704
|
domain: "Traducciones",
|
|
14705
|
+
list: {
|
|
14706
|
+
metrics: "{{translated}} de {{total}} textos traducidos"
|
|
14707
|
+
},
|
|
14702
14708
|
actions: {
|
|
14703
14709
|
manage: "Gestionar traducciones",
|
|
14704
14710
|
manageLocales: "Gestionar idiomas"
|
|
@@ -92605,7 +92611,7 @@ function getRouteMap({
|
|
|
92605
92611
|
children: [
|
|
92606
92612
|
{
|
|
92607
92613
|
path: "create",
|
|
92608
|
-
lazy: () => import("./product-create-
|
|
92614
|
+
lazy: () => import("./product-create-E2GZYQX4.mjs")
|
|
92609
92615
|
},
|
|
92610
92616
|
{
|
|
92611
92617
|
path: "import",
|
|
@@ -92621,7 +92627,7 @@ function getRouteMap({
|
|
|
92621
92627
|
path: ":id",
|
|
92622
92628
|
errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
|
|
92623
92629
|
lazy: async () => {
|
|
92624
|
-
const { Breadcrumb, loader } = await import("./product-detail-
|
|
92630
|
+
const { Breadcrumb, loader } = await import("./product-detail-QBGGKRZ2.mjs");
|
|
92625
92631
|
return {
|
|
92626
92632
|
Component: Outlet4,
|
|
92627
92633
|
loader,
|
|
@@ -92633,11 +92639,11 @@ function getRouteMap({
|
|
|
92633
92639
|
children: [
|
|
92634
92640
|
{
|
|
92635
92641
|
path: "",
|
|
92636
|
-
lazy: () => import("./product-detail-
|
|
92642
|
+
lazy: () => import("./product-detail-QBGGKRZ2.mjs"),
|
|
92637
92643
|
children: [
|
|
92638
92644
|
{
|
|
92639
92645
|
path: "edit",
|
|
92640
|
-
lazy: () => import("./product-edit-
|
|
92646
|
+
lazy: () => import("./product-edit-YP4KOQ4T.mjs")
|
|
92641
92647
|
},
|
|
92642
92648
|
{
|
|
92643
92649
|
path: "edit-variant",
|
|
@@ -92649,11 +92655,11 @@ function getRouteMap({
|
|
|
92649
92655
|
},
|
|
92650
92656
|
{
|
|
92651
92657
|
path: "attributes",
|
|
92652
|
-
lazy: () => import("./product-attributes-
|
|
92658
|
+
lazy: () => import("./product-attributes-QD3BWV5V.mjs")
|
|
92653
92659
|
},
|
|
92654
92660
|
{
|
|
92655
92661
|
path: "organization",
|
|
92656
|
-
lazy: () => import("./product-organization-
|
|
92662
|
+
lazy: () => import("./product-organization-H557PLLB.mjs")
|
|
92657
92663
|
},
|
|
92658
92664
|
{
|
|
92659
92665
|
path: "shipping-profile",
|
|
@@ -93994,11 +94000,11 @@ function getRouteMap({
|
|
|
93994
94000
|
children: [
|
|
93995
94001
|
{
|
|
93996
94002
|
path: "",
|
|
93997
|
-
lazy: () => import("./translation-list-
|
|
94003
|
+
lazy: () => import("./translation-list-IAKEB7MY.mjs")
|
|
93998
94004
|
},
|
|
93999
94005
|
{
|
|
94000
94006
|
path: "edit",
|
|
94001
|
-
lazy: () => import("./translations-edit-
|
|
94007
|
+
lazy: () => import("./translations-edit-QKLE4L5B.mjs")
|
|
94002
94008
|
}
|
|
94003
94009
|
]
|
|
94004
94010
|
},
|
package/dist/en.json
CHANGED
|
@@ -2514,6 +2514,9 @@
|
|
|
2514
2514
|
},
|
|
2515
2515
|
"title": "Translation domains",
|
|
2516
2516
|
"subtitle": "Manage translations of your data in Medusa",
|
|
2517
|
+
"list": {
|
|
2518
|
+
"metrics": "{{translated}} of {{total}} fields translated"
|
|
2519
|
+
},
|
|
2517
2520
|
"bulk": {
|
|
2518
2521
|
"header": "Translations Bulk Editor",
|
|
2519
2522
|
"mainColumn": "Locale"
|
|
@@ -47,7 +47,7 @@ import "./chunk-QZ7TP4HQ.mjs";
|
|
|
47
47
|
|
|
48
48
|
// src/routes/translations/translation-list/translation-list.tsx
|
|
49
49
|
import { Container as Container4, Heading as Heading3, Text as Text4 } from "@medusajs/ui";
|
|
50
|
-
import { useTranslation as
|
|
50
|
+
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";
|
|
@@ -90,24 +90,23 @@ var ActiveLocalesSection = ({
|
|
|
90
90
|
// src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx
|
|
91
91
|
import { Button, Container as Container2, Text as Text2 } from "@medusajs/ui";
|
|
92
92
|
import { Link } from "react-router-dom";
|
|
93
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
93
94
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
94
95
|
var TranslationListSection = ({
|
|
95
96
|
entities,
|
|
96
97
|
hasLocales = false
|
|
97
98
|
}) => {
|
|
99
|
+
const { t } = useTranslation2();
|
|
98
100
|
return /* @__PURE__ */ jsx2(Container2, { className: "divide-y p-0", children: entities.map((entity) => /* @__PURE__ */ jsxs2(
|
|
99
101
|
"div",
|
|
100
102
|
{
|
|
101
103
|
className: "grid grid-cols-[250px_1fr_auto] items-center gap-x-4 px-6 py-4",
|
|
102
104
|
children: [
|
|
103
105
|
/* @__PURE__ */ jsx2(Text2, { size: "small", weight: "plus", children: entity.label }),
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
(entity.translatedCount ?? 0).toLocaleString(),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
(entity.totalCount ?? 0).toLocaleString(),
|
|
109
|
-
" fields translated"
|
|
110
|
-
] }),
|
|
106
|
+
/* @__PURE__ */ jsx2(Text2, { size: "small", className: "text-ui-fg-subtle", children: t("translations.list.metrics", {
|
|
107
|
+
translated: (entity.translatedCount ?? 0).toLocaleString(),
|
|
108
|
+
total: (entity.totalCount ?? 0).toLocaleString()
|
|
109
|
+
}) }),
|
|
111
110
|
/* @__PURE__ */ jsx2(
|
|
112
111
|
Link,
|
|
113
112
|
{
|
|
@@ -123,12 +122,12 @@ var TranslationListSection = ({
|
|
|
123
122
|
|
|
124
123
|
// src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx
|
|
125
124
|
import { Container as Container3, Heading as Heading2, Text as Text3 } from "@medusajs/ui";
|
|
126
|
-
import { useTranslation as
|
|
125
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
127
126
|
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
128
127
|
var TranslationsCompletionSection = ({
|
|
129
128
|
statistics
|
|
130
129
|
}) => {
|
|
131
|
-
const { t } =
|
|
130
|
+
const { t } = useTranslation3();
|
|
132
131
|
const { translatedCount, totalCount } = Object.values(statistics).reduce(
|
|
133
132
|
(acc, curr) => ({
|
|
134
133
|
translatedCount: acc.translatedCount + curr.translated,
|
|
@@ -141,7 +140,7 @@ var TranslationsCompletionSection = ({
|
|
|
141
140
|
return /* @__PURE__ */ jsxs3(Container3, { className: "flex flex-col gap-y-3 px-6 py-4", children: [
|
|
142
141
|
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between", children: [
|
|
143
142
|
/* @__PURE__ */ jsx3(Heading2, { children: t("translations.completion.heading") }),
|
|
144
|
-
/* @__PURE__ */ jsxs3(Text3, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
143
|
+
/* @__PURE__ */ jsxs3(Text3, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
|
|
145
144
|
translatedCount.toLocaleString(),
|
|
146
145
|
" ",
|
|
147
146
|
t("general.of"),
|
|
@@ -149,11 +148,11 @@ var TranslationsCompletionSection = ({
|
|
|
149
148
|
totalCount.toLocaleString()
|
|
150
149
|
] })
|
|
151
150
|
] }),
|
|
152
|
-
/* @__PURE__ */ jsx3("div", { className: "flex h-
|
|
151
|
+
/* @__PURE__ */ jsx3("div", { className: "flex h-3 w-full overflow-hidden", children: percentage > 0 ? /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
153
152
|
/* @__PURE__ */ jsx3(
|
|
154
153
|
"div",
|
|
155
154
|
{
|
|
156
|
-
className: "mr-0.5 h-full rounded-
|
|
155
|
+
className: "mr-0.5 h-full rounded-sm transition-all",
|
|
157
156
|
style: {
|
|
158
157
|
width: `${percentage}%`,
|
|
159
158
|
backgroundColor: "var(--bg-interactive)"
|
|
@@ -163,7 +162,7 @@ var TranslationsCompletionSection = ({
|
|
|
163
162
|
/* @__PURE__ */ jsx3(
|
|
164
163
|
"div",
|
|
165
164
|
{
|
|
166
|
-
className: "h-full flex-1 rounded-
|
|
165
|
+
className: "h-full flex-1 rounded-sm",
|
|
167
166
|
style: {
|
|
168
167
|
backgroundColor: "var(--bg-interactive)",
|
|
169
168
|
opacity: 0.3
|
|
@@ -181,11 +180,11 @@ var TranslationsCompletionSection = ({
|
|
|
181
180
|
}
|
|
182
181
|
) }),
|
|
183
182
|
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between", children: [
|
|
184
|
-
/* @__PURE__ */ jsxs3(Text3, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
183
|
+
/* @__PURE__ */ jsxs3(Text3, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
|
|
185
184
|
percentage.toFixed(1),
|
|
186
185
|
"%"
|
|
187
186
|
] }),
|
|
188
|
-
/* @__PURE__ */ jsxs3(Text3, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
187
|
+
/* @__PURE__ */ jsxs3(Text3, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
|
|
189
188
|
remaining.toLocaleString(),
|
|
190
189
|
" ",
|
|
191
190
|
t("general.remaining").toLowerCase()
|
|
@@ -198,7 +197,7 @@ var TranslationsCompletionSection = ({
|
|
|
198
197
|
import { useMemo } from "react";
|
|
199
198
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
200
199
|
var TranslationList = () => {
|
|
201
|
-
const { t } =
|
|
200
|
+
const { t } = useTranslation4();
|
|
202
201
|
const { store, isPending, isError, error } = useStore();
|
|
203
202
|
const {
|
|
204
203
|
translatable_fields,
|
|
@@ -230,7 +229,9 @@ var TranslationList = () => {
|
|
|
230
229
|
if (!translatable_fields || !statistics) {
|
|
231
230
|
return [];
|
|
232
231
|
}
|
|
233
|
-
return Object.entries(translatable_fields).
|
|
232
|
+
return Object.entries(translatable_fields).filter(
|
|
233
|
+
([entity]) => !["product_option", "product_option_value"].includes(entity)
|
|
234
|
+
).map(([entity, fields]) => {
|
|
234
235
|
const entityStatistics = statistics[entity];
|
|
235
236
|
return {
|
|
236
237
|
label: entity.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" "),
|
|
@@ -191,7 +191,9 @@ function useTranslationsGridColumns({
|
|
|
191
191
|
columnHelper.column({
|
|
192
192
|
id: "original",
|
|
193
193
|
name: "original",
|
|
194
|
+
size: 300,
|
|
194
195
|
header: t("general.original"),
|
|
196
|
+
disableHiding: true,
|
|
195
197
|
cell: (context) => {
|
|
196
198
|
const row = context.row.original;
|
|
197
199
|
if (isEntityRow(row)) {
|
|
@@ -210,6 +212,7 @@ function useTranslationsGridColumns({
|
|
|
210
212
|
return columnHelper.column({
|
|
211
213
|
id: locale.locale_code,
|
|
212
214
|
name: locale.locale.name,
|
|
215
|
+
size: 300,
|
|
213
216
|
header: () => locale.locale.name,
|
|
214
217
|
cell: (context) => {
|
|
215
218
|
const row = context.row.original;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/dashboard",
|
|
3
|
-
"version": "3.0.0-snapshot-
|
|
3
|
+
"version": "3.0.0-snapshot-20251216103925",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"generate:static": "node ./scripts/generate-currencies.js && prettier --write ./src/lib/currencies.ts",
|
|
6
6
|
"dev": "../../../node_modules/.bin/vite",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"@dnd-kit/utilities": "^3.2.2",
|
|
47
47
|
"@hookform/error-message": "^2.0.1",
|
|
48
48
|
"@hookform/resolvers": "3.4.2",
|
|
49
|
-
"@medusajs/admin-shared": "3.0.0-snapshot-
|
|
50
|
-
"@medusajs/icons": "3.0.0-snapshot-
|
|
51
|
-
"@medusajs/js-sdk": "3.0.0-snapshot-
|
|
52
|
-
"@medusajs/ui": "4.0.31-snapshot-
|
|
49
|
+
"@medusajs/admin-shared": "3.0.0-snapshot-20251216103925",
|
|
50
|
+
"@medusajs/icons": "3.0.0-snapshot-20251216103925",
|
|
51
|
+
"@medusajs/js-sdk": "3.0.0-snapshot-20251216103925",
|
|
52
|
+
"@medusajs/ui": "4.0.31-snapshot-20251216103925",
|
|
53
53
|
"@radix-ui/react-dialog": "1.1.4",
|
|
54
54
|
"@radix-ui/react-dismissable-layer": "1.1.4",
|
|
55
55
|
"@tanstack/react-query": "5.64.2",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"zod": "3.25.76"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@medusajs/admin-shared": "3.0.0-snapshot-
|
|
84
|
-
"@medusajs/admin-vite-plugin": "3.0.0-snapshot-
|
|
85
|
-
"@medusajs/types": "3.0.0-snapshot-
|
|
86
|
-
"@medusajs/ui-preset": "3.0.0-snapshot-
|
|
83
|
+
"@medusajs/admin-shared": "3.0.0-snapshot-20251216103925",
|
|
84
|
+
"@medusajs/admin-vite-plugin": "3.0.0-snapshot-20251216103925",
|
|
85
|
+
"@medusajs/types": "3.0.0-snapshot-20251216103925",
|
|
86
|
+
"@medusajs/ui-preset": "3.0.0-snapshot-20251216103925"
|
|
87
87
|
},
|
|
88
88
|
"packageManager": "yarn@3.2.1"
|
|
89
89
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"type": "string"
|
|
40
40
|
},
|
|
41
41
|
"original": {
|
|
42
|
-
|
|
42
|
+
"type": "string"
|
|
43
43
|
},
|
|
44
44
|
"of": {
|
|
45
45
|
"type": "string"
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"type": "string"
|
|
109
109
|
},
|
|
110
110
|
"remaining": {
|
|
111
|
-
|
|
111
|
+
"type": "string"
|
|
112
112
|
},
|
|
113
113
|
"admin": {
|
|
114
114
|
"type": "string"
|
|
@@ -9345,6 +9345,15 @@
|
|
|
9345
9345
|
"subtitle": {
|
|
9346
9346
|
"type": "string"
|
|
9347
9347
|
},
|
|
9348
|
+
"list": {
|
|
9349
|
+
"type": "object",
|
|
9350
|
+
"properties": {
|
|
9351
|
+
"metrics": {
|
|
9352
|
+
"type": "string"
|
|
9353
|
+
}
|
|
9354
|
+
},
|
|
9355
|
+
"required": ["metrics"]
|
|
9356
|
+
},
|
|
9348
9357
|
"actions": {
|
|
9349
9358
|
"type": "object",
|
|
9350
9359
|
"properties": {
|
|
@@ -9392,7 +9401,7 @@
|
|
|
9392
9401
|
}
|
|
9393
9402
|
},
|
|
9394
9403
|
"required": ["heading"]
|
|
9395
|
-
}
|
|
9404
|
+
}
|
|
9396
9405
|
},
|
|
9397
9406
|
"required": ["domain", "actions", "subtitle", "bulk", "completion"]
|
|
9398
9407
|
},
|
|
@@ -2514,6 +2514,9 @@
|
|
|
2514
2514
|
},
|
|
2515
2515
|
"title": "Translation domains",
|
|
2516
2516
|
"subtitle": "Manage translations of your data in Medusa",
|
|
2517
|
+
"list": {
|
|
2518
|
+
"metrics": "{{translated}} of {{total}} fields translated"
|
|
2519
|
+
},
|
|
2517
2520
|
"bulk": {
|
|
2518
2521
|
"header": "Translations Bulk Editor",
|
|
2519
2522
|
"mainColumn": "Locale"
|
|
@@ -2447,6 +2447,9 @@
|
|
|
2447
2447
|
},
|
|
2448
2448
|
"translations": {
|
|
2449
2449
|
"domain": "Traducciones",
|
|
2450
|
+
"list": {
|
|
2451
|
+
"metrics": "{{translated}} de {{total}} textos traducidos"
|
|
2452
|
+
},
|
|
2450
2453
|
"actions": {
|
|
2451
2454
|
"manage": "Gestionar traducciones",
|
|
2452
2455
|
"manageLocales": "Gestionar idiomas"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Button, Container, Text } from "@medusajs/ui"
|
|
2
2
|
import { Link } from "react-router-dom"
|
|
3
3
|
import { TranslatableEntity } from "../../translation-list"
|
|
4
|
+
import { useTranslation } from "react-i18next"
|
|
4
5
|
|
|
5
6
|
type TranslationListSectionProps = {
|
|
6
7
|
entities: TranslatableEntity[]
|
|
@@ -11,6 +12,8 @@ export const TranslationListSection = ({
|
|
|
11
12
|
entities,
|
|
12
13
|
hasLocales = false,
|
|
13
14
|
}: TranslationListSectionProps) => {
|
|
15
|
+
const { t } = useTranslation()
|
|
16
|
+
|
|
14
17
|
return (
|
|
15
18
|
<Container className="divide-y p-0">
|
|
16
19
|
{entities.map((entity) => (
|
|
@@ -22,8 +25,10 @@ export const TranslationListSection = ({
|
|
|
22
25
|
{entity.label}
|
|
23
26
|
</Text>
|
|
24
27
|
<Text size="small" className="text-ui-fg-subtle">
|
|
25
|
-
{(
|
|
26
|
-
|
|
28
|
+
{t("translations.list.metrics", {
|
|
29
|
+
translated: (entity.translatedCount ?? 0).toLocaleString(),
|
|
30
|
+
total: (entity.totalCount ?? 0).toLocaleString(),
|
|
31
|
+
})}
|
|
27
32
|
</Text>
|
|
28
33
|
<Link
|
|
29
34
|
to={`/settings/translations/edit?reference=${entity.reference}`}
|
|
@@ -25,24 +25,24 @@ export const TranslationsCompletionSection = ({
|
|
|
25
25
|
<Container className="flex flex-col gap-y-3 px-6 py-4">
|
|
26
26
|
<div className="flex items-center justify-between">
|
|
27
27
|
<Heading>{t("translations.completion.heading")}</Heading>
|
|
28
|
-
<Text size="small" className="text-ui-fg-subtle">
|
|
28
|
+
<Text size="small" weight="plus" className="text-ui-fg-subtle">
|
|
29
29
|
{translatedCount.toLocaleString()} {t("general.of")}{" "}
|
|
30
30
|
{totalCount.toLocaleString()}
|
|
31
31
|
</Text>
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
|
-
<div className="flex h-
|
|
34
|
+
<div className="flex h-3 w-full overflow-hidden">
|
|
35
35
|
{percentage > 0 ? (
|
|
36
36
|
<>
|
|
37
37
|
<div
|
|
38
|
-
className="mr-0.5 h-full rounded-
|
|
38
|
+
className="mr-0.5 h-full rounded-sm transition-all"
|
|
39
39
|
style={{
|
|
40
40
|
width: `${percentage}%`,
|
|
41
41
|
backgroundColor: "var(--bg-interactive)",
|
|
42
42
|
}}
|
|
43
43
|
/>
|
|
44
44
|
<div
|
|
45
|
-
className="h-full flex-1 rounded-
|
|
45
|
+
className="h-full flex-1 rounded-sm"
|
|
46
46
|
style={{
|
|
47
47
|
backgroundColor: "var(--bg-interactive)",
|
|
48
48
|
opacity: 0.3,
|
|
@@ -61,10 +61,10 @@ export const TranslationsCompletionSection = ({
|
|
|
61
61
|
</div>
|
|
62
62
|
|
|
63
63
|
<div className="flex items-center justify-between">
|
|
64
|
-
<Text size="small" className="text-ui-fg-subtle">
|
|
64
|
+
<Text size="small" weight="plus" className="text-ui-fg-subtle">
|
|
65
65
|
{percentage.toFixed(1)}%
|
|
66
66
|
</Text>
|
|
67
|
-
<Text size="small" className="text-ui-fg-subtle">
|
|
67
|
+
<Text size="small" weight="plus" className="text-ui-fg-subtle">
|
|
68
68
|
{remaining.toLocaleString()} {t("general.remaining").toLowerCase()}
|
|
69
69
|
</Text>
|
|
70
70
|
</div>
|
|
@@ -60,20 +60,25 @@ export const TranslationList = () => {
|
|
|
60
60
|
return []
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
return Object.entries(translatable_fields)
|
|
64
|
-
|
|
63
|
+
return Object.entries(translatable_fields)
|
|
64
|
+
.filter(
|
|
65
|
+
([entity]) =>
|
|
66
|
+
!["product_option", "product_option_value"].includes(entity)
|
|
67
|
+
)
|
|
68
|
+
.map(([entity, fields]) => {
|
|
69
|
+
const entityStatistics = statistics[entity]
|
|
65
70
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
return {
|
|
72
|
+
label: entity
|
|
73
|
+
.split("_")
|
|
74
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
75
|
+
.join(" "),
|
|
76
|
+
reference: entity,
|
|
77
|
+
translatableFields: fields,
|
|
78
|
+
translatedCount: entityStatistics.translated,
|
|
79
|
+
totalCount: entityStatistics.expected,
|
|
80
|
+
}
|
|
81
|
+
})
|
|
77
82
|
}, [translatable_fields, statistics])
|
|
78
83
|
|
|
79
84
|
const isReady =
|
|
@@ -233,7 +233,9 @@ function useTranslationsGridColumns({
|
|
|
233
233
|
columnHelper.column({
|
|
234
234
|
id: "original",
|
|
235
235
|
name: "original",
|
|
236
|
+
size: 300,
|
|
236
237
|
header: t("general.original"),
|
|
238
|
+
disableHiding: true,
|
|
237
239
|
cell: (context) => {
|
|
238
240
|
const row = context.row.original
|
|
239
241
|
|
|
@@ -261,6 +263,7 @@ function useTranslationsGridColumns({
|
|
|
261
263
|
return columnHelper.column({
|
|
262
264
|
id: locale.locale_code,
|
|
263
265
|
name: locale.locale.name,
|
|
266
|
+
size: 300,
|
|
264
267
|
header: () => locale.locale.name,
|
|
265
268
|
cell: (context) => {
|
|
266
269
|
const row = context.row.original
|