This commit is contained in:
lingdocs 2022-04-15 01:33:03 +05:00
parent 1d09ef4988
commit b1fa372a38
5 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/pashto-inflector",
"version": "2.0.7",
"version": "2.0.8",
"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",

View File

@ -259,7 +259,7 @@ function App() {
</div>
{v?.verb.entry && <div style={{ paddingBottom: "100px" }}>
<PhraseBuilder
handleLinkClick={0}
handleLinkClick="none"
verb={v.verb as T.VerbEntry}
nouns={nouns}
verbs={verbs}

View File

@ -29,7 +29,7 @@ function CompoundFormula({ a, b }: {
function CompoundDisplay({ info, opts, handleLinkClick }: {
info: T.NonComboVerbInfo,
opts: T.TextOptions,
handleLinkClick: ((ts: number) => void) | 0,
handleLinkClick: ((ts: number) => void) | "none",
}) {
const isComplement = ("complement" in info || "objComplement" in info);
if (!isComplement) {
@ -83,7 +83,7 @@ function CompoundDisplay({ info, opts, handleLinkClick }: {
</div>}
b={<div
className={classNames([{ clickable: handleLinkClick }])}
onClick={(handleLinkClick)
onClick={(handleLinkClick !== "none")
? () => handleLinkClick(info.entry.entry.ts)
: undefined}>
<div>

View File

@ -39,7 +39,7 @@ const servantIcon = <i className="mx-1 fas fa-male" />;
export function VPExplorer(props: {
verb: T.VerbEntry,
opts: T.TextOptions,
handleLinkClick: ((ts: number) => undefined) | 0,
handleLinkClick: ((ts: number) => void) | "none",
} & ({
nouns: T.NounEntry[],
verbs: T.VerbEntry[],

View File

@ -12,7 +12,7 @@ function VerbPicker(props: {
vps: T.VPSelection,
onChange: (p: T.VPSelection) => void,
opts: T.TextOptions,
handleLinkClick: ((ts: number) => void) | 0,
handleLinkClick: ((ts: number) => void) | "none",
}) {
const [showRootsAndStems, setShowRootsAndStems] = useStickyState<boolean>(false, "showRootsAndStems");
const infoRaw = props.vps.verb ? getVerbInfo(props.vps.verb.verb.entry, props.vps.verb.verb.complement) : undefined;