NPM update and fix CM tooltips issue

This commit is contained in:
IRBorisov 2023-09-28 17:04:06 +03:00
parent 50258ba6d8
commit 4eef460be1
7 changed files with 760 additions and 674 deletions

File diff suppressed because it is too large Load Diff

View File

@ -12,41 +12,41 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@lezer/lr": "^1.3.10", "@lezer/lr": "^1.3.12",
"@tanstack/react-table": "^8.9.7", "@tanstack/react-table": "^8.10.3",
"@uiw/codemirror-themes": "^4.21.13", "@uiw/codemirror-themes": "^4.21.18",
"@uiw/react-codemirror": "^4.21.13", "@uiw/react-codemirror": "^4.21.18",
"axios": "^1.5.0", "axios": "^1.5.1",
"js-file-download": "^0.4.12", "js-file-download": "^0.4.12",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-error-boundary": "^4.0.11", "react-error-boundary": "^4.0.11",
"react-intl": "^6.4.6", "react-intl": "^6.4.7",
"react-loader-spinner": "^5.4.5", "react-loader-spinner": "^5.4.5",
"react-router-dom": "^6.15.0", "react-router-dom": "^6.16.0",
"react-select": "^5.7.4", "react-select": "^5.7.5",
"react-tabs": "^6.0.2", "react-tabs": "^6.0.2",
"react-toastify": "^9.1.3", "react-toastify": "^9.1.3",
"react-tooltip": "^5.21.3", "react-tooltip": "^5.21.5",
"reagraph": "^4.13.0" "reagraph": "^4.14.1"
}, },
"devDependencies": { "devDependencies": {
"@lezer/generator": "^1.5.0", "@lezer/generator": "^1.5.1",
"@types/jest": "^29.5.4", "@types/jest": "^29.5.5",
"@types/node": "^20.6.0", "@types/node": "^20.7.1",
"@types/react": "^18.2.21", "@types/react": "^18.2.23",
"@types/react-dom": "^18.2.7", "@types/react-dom": "^18.2.8",
"@typescript-eslint/eslint-plugin": "^6.6.0", "@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.6.0", "@typescript-eslint/parser": "^6.7.3",
"@vitejs/plugin-react": "^4.0.4", "@vitejs/plugin-react": "^4.1.0",
"autoprefixer": "^10.4.15", "autoprefixer": "^10.4.16",
"eslint": "^8.49.0", "eslint": "^8.50.0",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3", "eslint-plugin-react-refresh": "^0.4.3",
"eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-tsdoc": "^0.2.17", "eslint-plugin-tsdoc": "^0.2.17",
"jest": "^29.6.4", "jest": "^29.7.0",
"postcss": "^8.4.29", "postcss": "^8.4.30",
"tailwindcss": "^3.3.3", "tailwindcss": "^3.3.3",
"ts-jest": "^29.1.1", "ts-jest": "^29.1.1",
"typescript": "^5.2.2", "typescript": "^5.2.2",

View File

@ -27,7 +27,7 @@ const editorSetup: BasicSetupOptions = {
lineNumbers: false, lineNumbers: false,
highlightActiveLineGutter: false, highlightActiveLineGutter: false,
foldGutter: false, foldGutter: false,
dropCursor: false, dropCursor: true,
allowMultipleSelections: false, allowMultipleSelections: false,
indentOnInput: false, indentOnInput: false,
bracketMatching: false, bracketMatching: false,
@ -169,7 +169,8 @@ function RefsInput({
onKeyDown={handleInput} onKeyDown={handleInput}
onFocus={handleFocusIn} onFocus={handleFocusIn}
onBlur={handleFocusOut} onBlur={handleFocusOut}
// spellCheck={true} // TODO: figure out while automatic spellcheck doesnt work or implement with extension spellCheck
// spellCheck= // TODO: figure out while automatic spellcheck doesnt work or implement with extension
{...props} {...props}
/> />
</div> </div>

View File

@ -33,7 +33,6 @@ export const globalsHoverTooltip = (items: IConstituenta[], colors: IColorTheme)
let masterText: string | undefined = undefined; let masterText: string | undefined = undefined;
if (ref.offset > 0) { if (ref.offset > 0) {
const entities = findContainedNodes(end, view.state.doc.length, syntaxTree(view.state), [RefEntity]); const entities = findContainedNodes(end, view.state.doc.length, syntaxTree(view.state), [RefEntity]);
console.log(end);
if (ref.offset <= entities.length) { if (ref.offset <= entities.length) {
const master = entities[ref.offset - 1]; const master = entities[ref.offset - 1];
masterText = view.state.doc.sliceString(master.from, master.to); masterText = view.state.doc.sliceString(master.from, master.to);

View File

@ -280,7 +280,7 @@
.cm-editor { .cm-editor {
resize: vertical; resize: vertical;
overflow: auto !important; overflow-y: auto;
border-color: var(--cl-bg-40); border-color: var(--cl-bg-40);
.dark & { .dark & {
border-color: var(--cd-bg-40); border-color: var(--cd-bg-40);

View File

@ -138,7 +138,6 @@ function EditorItems({ onOpenEdit, onCreateCst, onDeleteCst }: EditorItemsProps)
if (!isEditable) { if (!isEditable) {
return; return;
} }
console.log(1);
if (event.key === 'Delete' && selected.length > 0) { if (event.key === 'Delete' && selected.length > 0) {
event.preventDefault(); event.preventDefault();
handleDelete(); handleDelete();

View File

@ -313,7 +313,6 @@ function RSTabs() {
id: activeID, id: activeID,
term_forms: forms term_forms: forms
}; };
console.log(data);
cstUpdate(data, () => toast.success('Изменения сохранены')); cstUpdate(data, () => toast.success('Изменения сохранены'));
}, [cstUpdate, activeID]); }, [cstUpdate, activeID]);