From fb374e60f8023e9518d3f401cd4563830c9fa631 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Fri, 1 Jul 2022 20:50:18 -0500 Subject: [PATCH] oops also on EPDisplay --- package.json | 2 +- src/components/CompiledPTextDisplay.tsx | 4 ++-- src/components/ep-explorer/EPDisplay.tsx | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0e193df..a6d0f8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "3.2.0", + "version": "3.2.1", "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/CompiledPTextDisplay.tsx b/src/components/CompiledPTextDisplay.tsx index ff23d68..72b094e 100644 --- a/src/components/CompiledPTextDisplay.tsx +++ b/src/components/CompiledPTextDisplay.tsx @@ -1,4 +1,4 @@ -import { getLength, getShort } from "../lib/p-text-helpers"; +import { getLength, getLong, getShort } from "../lib/p-text-helpers"; import * as T from "../types"; import Examples from "./Examples"; @@ -22,7 +22,7 @@ function CompiledPTextDisplay({ compiled, opts, justify, onlyOne, length }: { : compiled.ps; return
{onlyOne - ? + ? : "long" in ps ?
diff --git a/src/components/ep-explorer/EPDisplay.tsx b/src/components/ep-explorer/EPDisplay.tsx index 5b180ac..47eefaa 100644 --- a/src/components/ep-explorer/EPDisplay.tsx +++ b/src/components/ep-explorer/EPDisplay.tsx @@ -9,12 +9,13 @@ import EPBlocksDisplay from "../RenderedBlocksDisplay"; import ModeSelect, { Mode, ScriptSelect } from "../DisplayModeSelect"; import { useStickyState } from "../../library"; -function EPDisplay({ eps, opts, setOmitSubject, justify, onlyOne }: { +function EPDisplay({ eps, opts, setOmitSubject, justify, onlyOne, length }: { eps: T.EPSelectionState, opts: T.TextOptions, setOmitSubject: ((value: "true" | "false") => void) | false justify?: "left" | "right" | "center", onlyOne?: boolean | "concat", + length?: "long" | "short", }) { const [mode, setMode] = useState("text"); const [script, setScript] = useStickyState<"p" | "f">("f", "blockScriptChoice"); @@ -54,7 +55,7 @@ function EPDisplay({ eps, opts, setOmitSubject, justify, onlyOne }: {
{mode === "text" - ? + ? : } {result.e &&
{onlyOne === "concat"