From fc8142b56e598b2aae93fd8510dcd708093c4e7b Mon Sep 17 00:00:00 2001 From: adueck Date: Fri, 17 Feb 2023 13:34:16 +0500 Subject: [PATCH] removed document ref breaking SSR --- package-lock.json | 4 ++-- package.json | 2 +- src/components/README.md | 4 ++-- src/components/package.json | 2 +- src/components/src/ep-explorer/EquativePicker.tsx | 9 +++------ src/components/src/vp-explorer/VPExplorer.tsx | 9 +++++++++ src/lib/README.md | 4 ++-- src/lib/package.json | 2 +- src/lib/src/pashto-inflector.ts | 2 -- 9 files changed, 21 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index ac62f75..60f0113 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pashto-inflector", - "version": "5.7.15", + "version": "5.7.16", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "pashto-inflector", - "version": "5.7.15", + "version": "5.7.16", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 568576c..9c9f72f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pashto-inflector", - "version": "5.7.15", + "version": "5.7.16", "author": "lingdocs.com", "description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations", "homepage": "https://verbs.lingdocs.com", diff --git a/src/components/README.md b/src/components/README.md index 78abad5..2f42e87 100644 --- a/src/components/README.md +++ b/src/components/README.md @@ -1,6 +1,6 @@ -# @lingdocs/inflect +# @lingdocs/ps-react -The core inflection engine with grammatical information and tools for processing LingDocs dictionary entries and Pashto text. +The core inflection engine with grammatical information and tools for processing LingDocs dictionary entries and Pashto text (@lingdocs/inflect) plus react components for displaying Pashto text, and phrase engine UI etc. ### Peer depencies required diff --git a/src/components/package.json b/src/components/package.json index a35dfe1..c90fc4c 100644 --- a/src/components/package.json +++ b/src/components/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/ps-react", - "version": "5.7.15", + "version": "5.7.16", "description": "Pashto inflector library module with React components", "main": "dist/components/library.js", "module": "dist/components/library.js", diff --git a/src/components/src/ep-explorer/EquativePicker.tsx b/src/components/src/ep-explorer/EquativePicker.tsx index 726a211..80c076e 100644 --- a/src/components/src/ep-explorer/EquativePicker.tsx +++ b/src/components/src/ep-explorer/EquativePicker.tsx @@ -2,11 +2,7 @@ import * as T from "../../../types" import Select from "react-select"; import ButtonSelect from "../ButtonSelect"; import { epTenseOptions as options } from "./epTenseOptions"; - -const zIndexProps = { - menuPortalTarget: document.body, - styles: { menuPortal: (base: any) => ({ ...base, zIndex: 9999 }) }, -}; +import { customStyles } from "../EntrySelect"; function EquativePicker({ equative, onChange, hideNegative }: { equative: { tense: T.EquativeTense, negative: boolean }, @@ -53,10 +49,11 @@ function EquativePicker({ equative, onChange, hideNegative }: { isSearchable={false} // for some reason can't use tOptions with find here; value={options.find(o => o.value === equative.tense)} + // @ts-ignore onChange={onTenseSelect} className="mb-2" options={options} - {...zIndexProps} + styles={customStyles} /> {
diff --git a/src/components/src/vp-explorer/VPExplorer.tsx b/src/components/src/vp-explorer/VPExplorer.tsx index f17aaad..91deb66 100644 --- a/src/components/src/vp-explorer/VPExplorer.tsx +++ b/src/components/src/vp-explorer/VPExplorer.tsx @@ -72,6 +72,15 @@ function VPExplorer(props: { }); // eslint-disable-next-line }, [props.verb]); + useEffect(() => { + if (props.loaded) { + adjustVps({ + type: "load vps", + payload: props.loaded, + }); + } + // eslint-disable-next-line + }, [props.loaded]); useEffect(() => { const VPSFromUrl = getVPSFromUrl(); if (VPSFromUrl) { diff --git a/src/lib/README.md b/src/lib/README.md index eaa21a1..01e69bf 100644 --- a/src/lib/README.md +++ b/src/lib/README.md @@ -1,3 +1,3 @@ -# @lingdocs/ps-react +# @lingdocs/inflect -The core inflection engine with grammatical information and tools for processing LingDocs dictionary entries and Pashto text (@lingdocs/inflect) plus react components for displaying Pashto text, and phrase engine UI etc. \ No newline at end of file +The core inflection engine with grammatical information and tools for processing LingDocs dictionary entries and Pashto text. \ No newline at end of file diff --git a/src/lib/package.json b/src/lib/package.json index e4fc13d..0b6c51e 100644 --- a/src/lib/package.json +++ b/src/lib/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/inflect", - "version": "5.7.15", + "version": "5.7.16", "description": "Pashto inflector library", "main": "dist/index.js", "types": "dist/lib/library.d.ts", diff --git a/src/lib/src/pashto-inflector.ts b/src/lib/src/pashto-inflector.ts index f4b9519..844a8c2 100644 --- a/src/lib/src/pashto-inflector.ts +++ b/src/lib/src/pashto-inflector.ts @@ -30,8 +30,6 @@ import { splitUpSyllables, } from "./accent-helpers"; import * as T from "../../types"; -import { splitFIntoPhonemes } from "./phonetics-to-diacritics"; -import { splitPsString } from "./splitPsString"; const endingInSingleARegex = /[^a]'?’?[aá]'?’?$/; const endingInHeyOrAynRegex = /[^ا][هع]$/;