@parhelia/localization 0.1.12601 → 0.1.12602

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.
Files changed (28) hide show
  1. package/dist/LocalizeItemDialog.d.ts.map +1 -1
  2. package/dist/LocalizeItemDialog.js +17 -13
  3. package/dist/api/discovery.d.ts +4 -1
  4. package/dist/api/discovery.d.ts.map +1 -1
  5. package/dist/api/discovery.js +4 -3
  6. package/dist/hooks/useTranslationWizard.d.ts.map +1 -1
  7. package/dist/hooks/useTranslationWizard.js +2 -3
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +28 -13
  10. package/dist/services/translationService.d.ts +7 -48
  11. package/dist/services/translationService.d.ts.map +1 -1
  12. package/dist/services/translationService.js +0 -3
  13. package/dist/settings/TranslationServicesPanel.d.ts.map +1 -1
  14. package/dist/settings/TranslationServicesPanel.js +42 -111
  15. package/dist/setup/LocalizationSetupStep.d.ts.map +1 -1
  16. package/dist/setup/LocalizationSetupStep.js +7 -8
  17. package/dist/steps/ServiceLanguageSelectionStep.d.ts.map +1 -1
  18. package/dist/steps/ServiceLanguageSelectionStep.js +1 -18
  19. package/dist/steps/SubitemDiscoveryStep.d.ts.map +1 -1
  20. package/dist/steps/SubitemDiscoveryStep.js +181 -95
  21. package/dist/translation-center/BatchTranslationView.d.ts +1 -1
  22. package/dist/translation-center/BatchTranslationView.d.ts.map +1 -1
  23. package/dist/translation-center/BatchTranslationView.js +98 -356
  24. package/dist/translation-center/RecentTranslations.d.ts.map +1 -1
  25. package/dist/translation-center/RecentTranslations.js +13 -20
  26. package/dist/translation-center/TranslationManagement.d.ts.map +1 -1
  27. package/dist/translation-center/TranslationManagement.js +4 -2
  28. package/package.json +11 -10
@@ -1 +1 @@
1
- {"version":3,"file":"RecentTranslations.d.ts","sourceRoot":"","sources":["../../src/translation-center/RecentTranslations.tsx"],"names":[],"mappings":"AAwEA,wBAAgB,kBAAkB,4CAyhBjC"}
1
+ {"version":3,"file":"RecentTranslations.d.ts","sourceRoot":"","sources":["../../src/translation-center/RecentTranslations.tsx"],"names":[],"mappings":"AAiDA,wBAAgB,kBAAkB,4CAygBjC"}
@@ -1,16 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useEffect, useState, useMemo } from "react";
3
- import React from "react";
4
- import { Button, Select, useEditContext, usePathname, useRouter, useSearchParams, } from "@parhelia/core";
3
+ import { useRouter } from "next/navigation";
4
+ import { usePathname, useSearchParams } from "next/navigation";
5
+ import { Button, Select, useEditContext } from "@parhelia/core";
5
6
  import { listBatches, getTranslationProviders, } from "../services/translationService";
6
7
  import { useDebouncedCallback } from "use-debounce";
7
- import { RefreshCw, X, ChevronDown, Languages, Loader2 } from "lucide-react";
8
- // Wrappers for lucide-react icons to work with React 19
9
- const RefreshIcon = (props) => React.createElement(RefreshCw, props);
10
- const XIcon = (props) => React.createElement(X, props);
11
- const ChevronDownIcon = (props) => React.createElement(ChevronDown, props);
12
- const LanguagesIcon = (props) => React.createElement(Languages, props);
13
- const LoaderIcon = (props) => React.createElement(Loader2, props);
14
8
  const DATE_RANGE_OPTIONS = [
15
9
  { value: "lastHour", label: "Last Hour" },
16
10
  { value: "last24hours", label: "Last 24 Hours" },
@@ -259,13 +253,12 @@ export function RecentTranslations() {
259
253
  return dateGroups;
260
254
  }, [filteredBatches]);
261
255
  const navigateToBatch = (batchId) => {
262
- const current = new URLSearchParams(searchParams.toString());
256
+ const current = new URLSearchParams(Array.from(searchParams.entries()));
263
257
  current.set("batchId", batchId);
264
258
  router.push(`${pathname}?${current.toString()}`, { scroll: false });
265
259
  };
266
260
  const totalBatches = groupedBatches.reduce((sum, group) => sum + group.batches.length, 0);
267
- const isMobile = editContext?.isMobile ?? false;
268
- return (_jsxs("div", { className: "flex h-full flex-col min-h-0 bg-gray-5", "data-testid": "recent-translations", children: [_jsxs("div", { className: "shrink-0 border-b border-gray-3 bg-background p-4 md:p-6", children: [_jsxs("div", { className: "flex items-center justify-between mb-4", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-xl font-semibold text-(--color-dark)", children: "Recent Translations" }), _jsx("p", { className: "text-sm text-gray-2 mt-1", children: "View and monitor translation jobs across all items" })] }), _jsx("div", { className: "flex gap-2", children: _jsxs(Button, { size: "sm", variant: "outline", onClick: () => loadRecentBatches(0, false), disabled: isLoading, className: "md:w-auto w-8 h-8 md:h-8 p-0 md:px-3", children: [_jsx(RefreshIcon, { className: `h-4 w-4 ${isLoading ? 'animate-spin' : ''}` }), _jsx("span", { className: "hidden md:inline", children: "Refresh" })] }) })] }), _jsxs("div", { className: "flex flex-wrap gap-4 items-center", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-xs font-medium text-(--color-gray-1)", children: "Date Range:" }), _jsx(Select, { className: "w-40", options: DATE_RANGE_OPTIONS, value: filters.dateRange, onValueChange: (value) => setFilters((prev) => ({ ...prev, dateRange: value })), placeholder: "Select date range" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-xs font-medium text-(--color-gray-1)", children: "Status:" }), _jsx(Select, { className: "w-36", options: STATUS_OPTIONS, value: filters.status, onValueChange: (value) => setFilters((prev) => ({ ...prev, status: value })), placeholder: "Select status" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-xs font-medium text-(--color-gray-1)", children: "User:" }), _jsx(Select, { className: "w-44", options: [
261
+ return (_jsxs("div", { className: "flex h-full flex-col min-h-0 bg-[var(--color-gray-5)]", "data-testid": "recent-translations", children: [_jsxs("div", { className: "flex-shrink-0 border-b border-[var(--color-gray-3)] bg-background p-4 md:p-6", children: [_jsxs("div", { className: "flex items-center justify-between mb-4", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-xl font-semibold text-[var(--color-dark)]", children: "Recent Translations" }), _jsx("p", { className: "text-sm text-[var(--color-gray-2)] mt-1", children: "View and monitor translation jobs across all items" })] }), _jsx("div", { className: "flex gap-2", children: _jsxs(Button, { size: "sm", variant: "outline", onClick: () => loadRecentBatches(0, false), disabled: isLoading, children: [_jsx("i", { className: `pi pi-refresh ${isLoading ? 'pi-spin' : ''}` }), "Refresh"] }) })] }), _jsxs("div", { className: "flex flex-wrap gap-4 items-center", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-xs font-medium text-[var(--color-gray-1)]", children: "Date Range:" }), _jsx(Select, { className: "w-40", options: DATE_RANGE_OPTIONS, value: filters.dateRange, onValueChange: (value) => setFilters((prev) => ({ ...prev, dateRange: value })), placeholder: "Select date range" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-xs font-medium text-[var(--color-gray-1)]", children: "Status:" }), _jsx(Select, { className: "w-36", options: STATUS_OPTIONS, value: filters.status, onValueChange: (value) => setFilters((prev) => ({ ...prev, status: value })), placeholder: "Select status" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-xs font-medium text-[var(--color-gray-1)]", children: "User:" }), _jsx(Select, { className: "w-44", options: [
269
262
  { value: "all", label: "All Users" },
270
263
  ...(currentUserName !== "all"
271
264
  ? [{ value: currentUserName, label: `${currentUserName} (You)` }]
@@ -273,21 +266,21 @@ export function RecentTranslations() {
273
266
  ...uniqueUsers
274
267
  .filter((u) => u !== currentUserName)
275
268
  .map((u) => ({ value: u, label: u })),
276
- ], value: isLimitedPreviewUser ? currentUserName : filters.user, onValueChange: (value) => setFilters((prev) => ({ ...prev, user: value })), disabled: isLimitedPreviewUser, placeholder: "Select user" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-xs font-medium text-(--color-gray-1)", children: "Provider:" }), _jsx(Select, { className: "w-44", options: [
269
+ ], value: isLimitedPreviewUser ? currentUserName : filters.user, onValueChange: (value) => setFilters((prev) => ({ ...prev, user: value })), disabled: isLimitedPreviewUser, placeholder: "Select user" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-xs font-medium text-[var(--color-gray-1)]", children: "Provider:" }), _jsx(Select, { className: "w-44", options: [
277
270
  { value: "all", label: "All Providers" },
278
271
  ...providers.map((p) => ({
279
272
  value: p.name,
280
273
  label: p.displayName || p.name,
281
274
  })),
282
- ], value: filters.provider, onValueChange: (value) => setFilters((prev) => ({ ...prev, provider: value })), placeholder: "Select provider" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-xs font-medium text-(--color-gray-1)", children: "Target Language:" }), _jsx(Select, { className: "w-44", options: [
275
+ ], value: filters.provider, onValueChange: (value) => setFilters((prev) => ({ ...prev, provider: value })), placeholder: "Select provider" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-xs font-medium text-[var(--color-gray-1)]", children: "Target Language:" }), _jsx(Select, { className: "w-44", options: [
283
276
  { value: "all", label: "All Languages" },
284
277
  ...uniqueLanguages.map((lang) => ({
285
278
  value: lang,
286
279
  label: lang,
287
280
  })),
288
- ], value: filters.targetLanguage, onValueChange: (value) => setFilters((prev) => ({ ...prev, targetLanguage: value })), placeholder: "Select language" })] }), (filters.dateRange !== "last30days" || filters.status !== "all" || filters.user !== currentUserName || filters.provider !== "all" || filters.targetLanguage !== "all") && (_jsxs(Button, { size: "sm", variant: "ghost", onClick: () => setFilters({ dateRange: "last30days", status: "all", user: currentUserName, provider: "all", targetLanguage: "all" }), children: [_jsx("i", { className: "pi pi-times" }), "Clear Filters"] }))] }), _jsxs("div", { className: "mt-3 text-xs text-gray-2", children: ["Showing ", totalBatches, " batch", totalBatches !== 1 ? 'es' : '', batches.length !== totalBatches && (_jsxs("span", { children: [" (filtered from ", batches.length, " total batches)"] }))] })] }), _jsx("div", { className: "flex-1 overflow-auto p-4 md:p-6 min-h-0", children: isLoading && batches.length === 0 ? (_jsx("div", { className: "flex items-center justify-center h-32", children: _jsxs("div", { className: "flex items-center gap-2 text-gray-2", children: [_jsx(LoaderIcon, { className: "h-5 w-5 animate-spin text-theme-secondary" }), "Loading recent translations..."] }) })) : groupedBatches.length === 0 ? (_jsx("div", { className: "flex items-center justify-center h-32", children: _jsxs("div", { className: "text-center text-gray-2", children: [_jsx(LanguagesIcon, { className: "h-8 w-8 block mx-auto mb-2 text-gray-3" }), _jsx("p", { className: "font-medium text-(--color-gray-1)", children: "No translations found" }), _jsx("p", { className: "text-sm mt-1", children: filteredBatches.length !== batches.length
281
+ ], value: filters.targetLanguage, onValueChange: (value) => setFilters((prev) => ({ ...prev, targetLanguage: value })), placeholder: "Select language" })] }), (filters.dateRange !== "last30days" || filters.status !== "all" || filters.user !== currentUserName || filters.provider !== "all" || filters.targetLanguage !== "all") && (_jsxs(Button, { size: "sm", variant: "ghost", onClick: () => setFilters({ dateRange: "last30days", status: "all", user: currentUserName, provider: "all", targetLanguage: "all" }), children: [_jsx("i", { className: "pi pi-times" }), "Clear Filters"] }))] }), _jsxs("div", { className: "mt-3 text-xs text-[var(--color-gray-2)]", children: ["Showing ", totalBatches, " batch", totalBatches !== 1 ? 'es' : '', batches.length !== totalBatches && (_jsxs("span", { children: [" (filtered from ", batches.length, " total batches)"] }))] })] }), _jsx("div", { className: "flex-1 overflow-auto p-4 md:p-6 min-h-0", children: isLoading && batches.length === 0 ? (_jsx("div", { className: "flex items-center justify-center h-32", children: _jsxs("div", { className: "flex items-center gap-2 text-[var(--color-gray-2)]", children: [_jsx("i", { className: "pi pi-spin pi-spinner text-[#9650fb]" }), "Loading recent translations..."] }) })) : groupedBatches.length === 0 ? (_jsx("div", { className: "flex items-center justify-center h-32", children: _jsxs("div", { className: "text-center text-[var(--color-gray-2)]", children: [_jsx("i", { className: "pi pi-language text-2xl block mb-2 text-[var(--color-gray-3)]" }), _jsx("p", { className: "font-medium text-[var(--color-gray-1)]", children: "No translations found" }), _jsx("p", { className: "text-sm mt-1", children: filteredBatches.length !== batches.length
289
282
  ? "Try adjusting your filters or start a translation to see it appear here"
290
- : "Start a translation to see it appear here" })] }) })) : (_jsxs("div", { className: "space-y-6", children: [groupedBatches.map((dateGroup) => (_jsxs("div", { children: [_jsxs("h2", { className: "text-lg font-semibold text-(--color-dark) mb-3 border-b border-gray-3 pb-2", children: [dateGroup.label, _jsxs("span", { className: "ml-2 text-sm font-normal text-gray-2", children: ["(", dateGroup.batches.length, " batch", dateGroup.batches.length !== 1 ? 'es' : '', ")"] })] }), _jsx("div", { className: "space-y-3", children: dateGroup.batches.map((b) => {
283
+ : "Start a translation to see it appear here" })] }) })) : (_jsxs("div", { className: "space-y-6", children: [groupedBatches.map((dateGroup) => (_jsxs("div", { children: [_jsxs("h2", { className: "text-lg font-semibold text-[var(--color-dark)] mb-3 border-b border-[var(--color-gray-3)] pb-2", children: [dateGroup.label, _jsxs("span", { className: "ml-2 text-sm font-normal text-[var(--color-gray-2)]", children: ["(", dateGroup.batches.length, " batch", dateGroup.batches.length !== 1 ? 'es' : '', ")"] })] }), _jsx("div", { className: "space-y-3", children: dateGroup.batches.map((b) => {
291
284
  const batchDate = new Date(b.timestamp);
292
285
  const now = new Date();
293
286
  const isToday = batchDate.toDateString() === now.toDateString();
@@ -302,8 +295,8 @@ export function RecentTranslations() {
302
295
  const completedJobs = info?.completedJobs ?? 0;
303
296
  const anyError = (info?.errorJobs ?? 0) > 0;
304
297
  const anyInProgress = info?.status === "In Progress";
305
- return (_jsx("div", { className: "border border-gray-3 rounded-lg bg-background shadow-sm overflow-hidden transition-shadow hover:shadow-md", children: _jsx("button", { className: "w-full px-4 py-3 md:px-6 md:py-4 hover:bg-gray-5 transition-colors text-left", onClick: () => navigateToBatch(b.id), title: "View batch details", children: _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "text-left", children: [_jsx("div", { className: "font-medium text-(--color-dark)", children: `Translation Batch - ${timeDisplay}` }), _jsxs("div", { className: "text-sm text-gray-2 mt-1 flex flex-wrap items-center gap-x-2", children: [_jsxs("span", { className: "font-medium text-(--color-gray-1)", children: [totalJobs, " translations"] }), typeof itemsCount === 'number' && (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-gray-3", children: "\u2022" }), _jsxs("span", { children: [itemsCount, " items"] })] })), languages.length ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-gray-3", children: "\u2022" }), _jsx("span", { className: "truncate max-w-[200px]", title: languages.join(", "), children: languages.join(", ") })] })) : null, totalJobs > 0 && (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-gray-3", children: "\u2022" }), _jsxs("span", { className: "text-xs", children: [completedJobs, "/", totalJobs, " completed"] })] }))] }), _jsx("div", { className: "mt-2 block", children: _jsxs("span", { className: "inline-flex text-[10px] bg-gray-4 text-(--color-gray-1) px-2 py-0.5 rounded font-mono whitespace-nowrap overflow-hidden", children: ["ID: ", b.id] }) }), _jsxs("div", { className: "mt-2 flex flex-wrap gap-2 items-center text-xs", children: [info?.status && (_jsx("span", { className: `inline-flex items-center rounded-full px-2.5 py-1 font-medium ${info.status === 'Completed' ? 'bg-green-100 text-green-700' :
306
- info.status === 'In Progress' ? 'bg-theme-secondary-light text-theme-secondary' :
307
- info.status === 'Error' ? 'bg-red-100 text-red-600' : 'bg-gray-4 text-(--color-gray-1)'}`, children: info.status })), info?.provider && (_jsxs("span", { className: "text-(--color-gray-1)", children: ["Provider: ", _jsx("span", { className: "font-medium", children: info.provider })] })), info?.initiatedByUser && (_jsxs("span", { className: "text-(--color-gray-1)", children: ["By: ", _jsx("span", { className: "font-medium", children: info.initiatedByUser })] })), info?.lastUpdatedUtc && (_jsxs("span", { className: "text-gray-2", children: ["Updated: ", new Date(info.lastUpdatedUtc).toLocaleString()] }))] })] }), _jsxs("div", { className: "flex gap-2", children: [anyInProgress && (_jsx("span", { className: "rounded-full bg-theme-secondary-light px-3 py-1 text-xs font-medium text-theme-secondary", children: "In Progress" })), anyError && (_jsx("span", { className: "rounded-full bg-red-100 px-3 py-1 text-xs font-medium text-red-600", children: "Error" })), !anyInProgress && !anyError && (_jsx("span", { className: "rounded-full bg-green-100 px-3 py-1 text-xs font-medium text-green-700", children: "Completed" }))] })] }) }) }, b.id));
308
- }) })] }, dateGroup.label))), hasMore && (_jsx("div", { className: "flex justify-center pt-6", children: _jsx(Button, { variant: "outline", size: "sm", onClick: loadMore, disabled: isLoadingMore, children: isLoadingMore ? (_jsxs(_Fragment, { children: [_jsx(LoaderIcon, { className: "h-4 w-4 animate-spin text-theme-secondary" }), "Loading more..."] })) : (_jsxs(_Fragment, { children: [_jsx(ChevronDownIcon, { className: "h-4 w-4" }), "Load More Batches"] })) }) }))] })) })] }));
298
+ return (_jsx("div", { className: "border border-[var(--color-gray-3)] rounded-lg bg-background shadow-sm overflow-hidden transition-shadow hover:shadow-md", children: _jsx("button", { className: "w-full px-4 py-3 md:px-6 md:py-4 hover:bg-[var(--color-gray-5)] transition-colors text-left", onClick: () => navigateToBatch(b.id), title: "View batch details", children: _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "text-left", children: [_jsx("div", { className: "font-medium text-[var(--color-dark)]", children: `Translation Batch - ${timeDisplay}` }), _jsxs("div", { className: "text-sm text-[var(--color-gray-2)] mt-1", children: [totalJobs, " translations", typeof itemsCount === 'number' && (_jsxs("span", { children: [" \u2022 ", itemsCount, " items"] })), languages.length ? (_jsxs("span", { children: [" \u2022 ", languages.join(", ")] })) : null, _jsxs("span", { className: "ml-2 text-xs bg-[var(--color-gray-4)] text-[var(--color-gray-1)] px-2 py-0.5 rounded-full font-mono", children: ["ID: ", b.id] }), totalJobs > 0 && (_jsxs("span", { className: "ml-2 text-xs text-[var(--color-gray-2)]", children: ["(", completedJobs, "/", totalJobs, " completed", info?.errorJobs ? `, ${info.errorJobs} errors` : '', ")"] }))] }), _jsxs("div", { className: "mt-2 flex flex-wrap gap-2 items-center text-xs", children: [info?.status && (_jsx("span", { className: `inline-flex items-center rounded-full px-2.5 py-1 font-medium ${info.status === 'Completed' ? 'bg-green-100 text-green-700' :
299
+ info.status === 'In Progress' ? 'bg-[#f6eeff] text-[#9650fb]' :
300
+ info.status === 'Error' ? 'bg-red-100 text-red-600' : 'bg-[var(--color-gray-4)] text-[var(--color-gray-1)]'}`, children: info.status })), info?.provider && (_jsxs("span", { className: "text-[var(--color-gray-1)]", children: ["Provider: ", _jsx("span", { className: "font-medium", children: info.provider })] })), info?.initiatedByUser && (_jsxs("span", { className: "text-[var(--color-gray-1)]", children: ["By: ", _jsx("span", { className: "font-medium", children: info.initiatedByUser })] })), info?.lastUpdatedUtc && (_jsxs("span", { className: "text-[var(--color-gray-2)]", children: ["Updated: ", new Date(info.lastUpdatedUtc).toLocaleString()] }))] })] }), _jsxs("div", { className: "flex gap-2", children: [anyInProgress && (_jsx("span", { className: "rounded-full bg-[#f6eeff] px-3 py-1 text-xs font-medium text-[#9650fb]", children: "In Progress" })), anyError && (_jsx("span", { className: "rounded-full bg-red-100 px-3 py-1 text-xs font-medium text-red-600", children: "Error" })), !anyInProgress && !anyError && (_jsx("span", { className: "rounded-full bg-green-100 px-3 py-1 text-xs font-medium text-green-700", children: "Completed" }))] })] }) }) }, b.id));
301
+ }) })] }, dateGroup.label))), hasMore && (_jsx("div", { className: "flex justify-center pt-6", children: _jsx(Button, { variant: "outline", size: "sm", onClick: loadMore, disabled: isLoadingMore, children: isLoadingMore ? (_jsxs(_Fragment, { children: [_jsx("i", { className: "pi pi-spin pi-spinner text-[#9650fb]" }), "Loading more..."] })) : (_jsxs(_Fragment, { children: [_jsx("i", { className: "pi pi-chevron-down" }), "Load More Batches"] })) }) }))] })) })] }));
309
302
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TranslationManagement.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationManagement.tsx"],"names":[],"mappings":"AAQA,wBAAgB,qBAAqB,4CA+CpC"}
1
+ {"version":3,"file":"TranslationManagement.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationManagement.tsx"],"names":[],"mappings":"AAKA,wBAAgB,qBAAqB,4CA+CpC"}
@@ -1,5 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEditContext, usePathname, useRouter, useSearchParams, } from "@parhelia/core";
2
+ import { useRouter } from "next/navigation";
3
+ import { usePathname, useSearchParams } from "next/navigation";
4
+ import { useEditContext } from "@parhelia/core";
3
5
  import { BatchTranslationView } from "./BatchTranslationView";
4
6
  export function TranslationManagement() {
5
7
  const editContext = useEditContext();
@@ -16,7 +18,7 @@ export function TranslationManagement() {
16
18
  return (_jsx("div", { className: "flex h-full flex-col items-center justify-center bg-[var(--color-gray-5)]", children: _jsxs("div", { className: "flex items-center gap-2 text-[var(--color-gray-2)]", children: [_jsx("i", { className: "pi pi-spin pi-spinner text-[#9650fb]" }), "Loading..."] }) }));
17
19
  }
18
20
  return (_jsx("div", { className: "absolute inset-0 flex flex-col bg-[var(--color-gray-5)]", "data-testid": "translation-management", children: batchId ? (_jsx(BatchTranslationView, { batchId: batchId, onBack: () => {
19
- const current = new URLSearchParams(searchParams.toString());
21
+ const current = new URLSearchParams(Array.from(searchParams.entries()));
20
22
  current.delete("batchId");
21
23
  router.push(`${pathname}?${current.toString()}`, { scroll: false });
22
24
  } })) : recentTranslationsPanel ? (_jsx("div", { className: "flex-1 min-h-0", children: recentTranslationsPanel.content })) : (_jsxs("div", { className: "flex h-full flex-col items-center justify-center text-[var(--color-gray-2)]", children: [_jsx("i", { className: "pi pi-language mb-4 text-4xl text-[var(--color-gray-3)]" }), _jsx("p", { className: "font-medium text-[var(--color-gray-1)]", children: "Recent translations not available" })] })) }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parhelia/localization",
3
- "version": "0.1.12601",
3
+ "version": "0.1.12602",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,18 +24,18 @@
24
24
  ],
25
25
  "scripts": {
26
26
  "build": "tsc -p tsconfig.build.json",
27
- "build:native": "tsgo -p tsconfig.build.json",
28
27
  "lint": "eslint . --max-warnings 0",
29
- "check-types": "tsc --noEmit",
30
- "check-types:native": "tsgo --noEmit"
28
+ "generate:component": "turbo gen react-component",
29
+ "check-types": "tsc --noEmit"
31
30
  },
32
31
  "devDependencies": {
33
32
  "@repo/eslint-config": "*",
34
33
  "@repo/typescript-config": "*",
35
34
  "@tailwindcss/postcss": "^4.1.18",
35
+ "@turbo/gen": "^2.4.4",
36
36
  "@types/node": "^22.13.9",
37
- "@types/react": "19.2.14",
38
- "@types/react-dom": "19.2.3",
37
+ "@types/react": "19.2.2",
38
+ "@types/react-dom": "19.2.2",
39
39
  "eslint": "^9.22.0",
40
40
  "tailwindcss": "^4.1.18",
41
41
  "typescript": "5.8.2"
@@ -43,12 +43,13 @@
43
43
  "dependencies": {
44
44
  "@parhelia/core": "*",
45
45
  "lucide-react": "^0.486.0",
46
+ "next": "16.0.10",
46
47
  "postcss": "^8.5.3",
47
- "react": "19.2.4",
48
- "react-dom": "19.2.4"
48
+ "react": "19.2.3",
49
+ "react-dom": "19.2.3"
49
50
  },
50
51
  "overrides": {
51
- "@types/react": "19.2.14",
52
- "@types/react-dom": "19.2.3"
52
+ "@types/react": "19.2.2",
53
+ "@types/react-dom": "19.2.2"
53
54
  }
54
55
  }