fix(number-fields): избегаем потери точности длинных чисел

- number-поля теперь рендерятся как text + inputMode=numeric,
  чтобы браузер не округлял значения через input type=number
- пробелы при вставке в number-поля удаляются
- бэкенд нормализует значения number-полей в строку перед сохранением
- добавлен хелпер normalizeFieldValueForStorage

Closes: искажение расчётного счёта и других длинных числовых полей
This commit is contained in:
2026-07-07 21:03:40 +03:00
commit 1f5ecb6da4
1089 changed files with 237546 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import { lazy, Suspense } from "react";
import { Loader2 } from "lucide-react";
import type { EditorProps } from "@monaco-editor/react";
const MonacoEditor = lazy(() => import("@monaco-editor/react"));
function EditorFallback({ height }: { height?: string | number }) {
return (
<div
className="flex items-center justify-center bg-[#1e1e1e] rounded-md"
style={{ height: height ?? 300 }}
>
<Loader2 className="h-5 w-5 animate-spin text-muted-foreground" />
</div>
);
}
export default function LazyMonacoEditor(props: EditorProps) {
return (
<Suspense fallback={<EditorFallback height={props.height} />}>
<MonacoEditor {...props} />
</Suspense>
);
}