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", "name": "@lingdocs/pashto-inflector",
"version": "2.0.7", "version": "2.0.8",
"author": "lingdocs.com", "author": "lingdocs.com",
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations", "description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
"homepage": "https://verbs.lingdocs.com", "homepage": "https://verbs.lingdocs.com",

View File

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

View File

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

View File

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

View File

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