@parhelia/localization 0.1.12895 → 0.1.12900
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/steps/ServiceLanguageSelectionStep.d.ts.map +1 -1
- package/dist/steps/ServiceLanguageSelectionStep.js +2 -1
- package/dist/translation-center/TranslationBatches.d.ts.map +1 -1
- package/dist/translation-center/TranslationBatches.js +4 -4
- package/dist/translation-center/TranslationsTitlebar.d.ts +1 -2
- package/dist/translation-center/TranslationsTitlebar.d.ts.map +1 -1
- package/dist/translation-center/TranslationsTitlebar.js +6 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceLanguageSelectionStep.d.ts","sourceRoot":"","sources":["../../src/steps/ServiceLanguageSelectionStep.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ServiceLanguageSelectionStep.d.ts","sourceRoot":"","sources":["../../src/steps/ServiceLanguageSelectionStep.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAyB,MAAM,SAAS,CAAC;AAGtE;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,QAAe,EACf,IAAI,EACJ,OAAO,EACP,eAAe,EACf,WAAW,GACZ,EAAE,oBAAoB,2CA4OtB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { CountBadge } from "@parhelia/core";
|
|
3
4
|
import { WizardStepShell } from "./WizardStepShell";
|
|
4
5
|
/**
|
|
5
6
|
* Language-only step. Item selection lives in its own step
|
|
@@ -117,7 +118,7 @@ export function ServiceLanguageSelectionStep({ isActive = true, data, setData, o
|
|
|
117
118
|
return allLanguages.some((lang) => languageSelection[lang.code]);
|
|
118
119
|
}, [allLanguages, languageSelection]);
|
|
119
120
|
const selectedCount = data.targetLanguages.length;
|
|
120
|
-
return (_jsx(WizardStepShell, { fillHeight: true, testId: "language-selection-step", children: _jsxs("div", { className: "mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col overflow-hidden rounded-xl border border-border-default bg-white", children: [_jsxs("div", { className: "flex h-[37px] shrink-0 items-center justify-between gap-2 border-b border-border-default bg-neutral-grey-5/50 px-3", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium tracking-wider text-neutral-grey-50 ", children: "Target Languages" }), selectedCount > 0 && (_jsx(
|
|
121
|
+
return (_jsx(WizardStepShell, { fillHeight: true, testId: "language-selection-step", children: _jsxs("div", { className: "mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col overflow-hidden rounded-xl border border-border-default bg-white", children: [_jsxs("div", { className: "flex h-[37px] shrink-0 items-center justify-between gap-2 border-b border-border-default bg-neutral-grey-5/50 px-3", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium tracking-wider text-neutral-grey-50 ", children: "Target Languages" }), selectedCount > 0 && (_jsx(CountBadge, { children: selectedCount }))] }), allLanguages.length > 1 && (_jsxs("label", { className: "flex cursor-pointer items-center gap-1.5 text-[11px] font-medium text-neutral-grey-50 transition-colors hover:text-neutral-grey-100", children: [_jsx("input", { type: "checkbox", checked: areAllLanguagesSelected, ref: (input) => {
|
|
121
122
|
if (input) {
|
|
122
123
|
input.indeterminate =
|
|
123
124
|
areSomeLanguagesSelected && !areAllLanguagesSelected;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TranslationBatches.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationBatches.tsx"],"names":[],"mappings":"AAmPA,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"TranslationBatches.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationBatches.tsx"],"names":[],"mappings":"AAmPA,wBAAgB,kBAAkB,4CAgtCjC"}
|
|
@@ -230,10 +230,10 @@ export function TranslationBatches() {
|
|
|
230
230
|
const loadProviders = async () => {
|
|
231
231
|
try {
|
|
232
232
|
const res = await getTranslationProviders();
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
233
|
+
const maybeProviders = res?.data ?? res;
|
|
234
|
+
setProviders(Array.isArray(maybeProviders)
|
|
235
|
+
? maybeProviders
|
|
236
|
+
: []);
|
|
237
237
|
}
|
|
238
238
|
catch (error) {
|
|
239
239
|
console.error("Failed to load translation providers:", error);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TranslationsTitlebar - Titlebar content for the Translation Management workspace.
|
|
3
|
-
*
|
|
4
|
-
* with consistent left padding so it aligns across workspaces.
|
|
3
|
+
* Shows desktop actions for the Translation Management workspace.
|
|
5
4
|
*/
|
|
6
5
|
export declare function TranslationsTitlebar(): import("react/jsx-runtime").JSX.Element | null;
|
|
7
6
|
//# sourceMappingURL=TranslationsTitlebar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TranslationsTitlebar.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationsTitlebar.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"TranslationsTitlebar.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationsTitlebar.tsx"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,oBAAoB,mDAuBnC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import { SimpleIconButton, useEditContext
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SimpleIconButton, useEditContext } from "@parhelia/core";
|
|
3
3
|
import { SquarePen } from "lucide-react";
|
|
4
4
|
/**
|
|
5
5
|
* TranslationsTitlebar - Titlebar content for the Translation Management workspace.
|
|
6
|
-
*
|
|
7
|
-
* with consistent left padding so it aligns across workspaces.
|
|
6
|
+
* Shows desktop actions for the Translation Management workspace.
|
|
8
7
|
*/
|
|
9
8
|
export function TranslationsTitlebar() {
|
|
10
9
|
const editContext = useEditContext();
|
|
11
10
|
if (!editContext?.workspace)
|
|
12
11
|
return null;
|
|
13
|
-
|
|
12
|
+
if (editContext.isMobile)
|
|
13
|
+
return null;
|
|
14
14
|
const { showAgentsWorkspaceEditor, setShowAgentsWorkspaceEditor } = editContext;
|
|
15
|
-
return (
|
|
15
|
+
return (_jsx("div", { className: "flex w-full items-center justify-end pr-2", children: _jsx(SimpleIconButton, { icon: _jsx(SquarePen, { className: "h-5 w-5", strokeWidth: 1 }), label: showAgentsWorkspaceEditor ? "Hide Editor" : "Show Editor", size: "large", "data-testid": "translations-editor-panel-toggle", selected: showAgentsWorkspaceEditor, onClick: () => setShowAgentsWorkspaceEditor(!showAgentsWorkspaceEditor) }) }));
|
|
16
16
|
}
|