onlyPhrases option on VPExplorer
This commit is contained in:
parent
eebce37411
commit
715744e9b4
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "pashto-inflector",
|
"name": "pashto-inflector",
|
||||||
"version": "5.7.14",
|
"version": "5.7.15",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "pashto-inflector",
|
"name": "pashto-inflector",
|
||||||
"version": "5.7.14",
|
"version": "5.7.15",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "pashto-inflector",
|
"name": "pashto-inflector",
|
||||||
"version": "5.7.14",
|
"version": "5.7.15",
|
||||||
"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",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lingdocs/ps-react",
|
"name": "@lingdocs/ps-react",
|
||||||
"version": "5.7.14",
|
"version": "5.7.15",
|
||||||
"description": "Pashto inflector library module with React components",
|
"description": "Pashto inflector library module with React components",
|
||||||
"main": "dist/components/library.js",
|
"main": "dist/components/library.js",
|
||||||
"module": "dist/components/library.js",
|
"module": "dist/components/library.js",
|
||||||
|
|
|
@ -33,6 +33,7 @@ function VPExplorer(props: {
|
||||||
opts: T.TextOptions,
|
opts: T.TextOptions,
|
||||||
handleLinkClick: ((ts: number) => void) | "none",
|
handleLinkClick: ((ts: number) => void) | "none",
|
||||||
entryFeeder: T.EntryFeeder,
|
entryFeeder: T.EntryFeeder,
|
||||||
|
onlyPhrases?: boolean,
|
||||||
}) {
|
}) {
|
||||||
const [vps, adjustVps] = useStickyReducer(
|
const [vps, adjustVps] = useStickyReducer(
|
||||||
vpsReducer,
|
vpsReducer,
|
||||||
|
@ -44,7 +45,7 @@ function VPExplorer(props: {
|
||||||
);
|
);
|
||||||
const [mode, setMode] = useStickyState<"charts" | "phrases" | "quiz">(
|
const [mode, setMode] = useStickyState<"charts" | "phrases" | "quiz">(
|
||||||
savedMode => {
|
savedMode => {
|
||||||
if (!savedMode) return "charts";
|
if (!savedMode) return props.onlyPhrases ? "phrases" : "charts";
|
||||||
if (savedMode === "quiz") return "phrases";
|
if (savedMode === "quiz") return "phrases";
|
||||||
return savedMode;
|
return savedMode;
|
||||||
},
|
},
|
||||||
|
@ -127,7 +128,7 @@ function VPExplorer(props: {
|
||||||
opts={props.opts}
|
opts={props.opts}
|
||||||
handleLinkClick={props.handleLinkClick}
|
handleLinkClick={props.handleLinkClick}
|
||||||
/>
|
/>
|
||||||
<div className="mt-2 mb-3 d-flex flex-row justify-content-between align-items-center">
|
{!props.onlyPhrases && <div className="mt-2 mb-3 d-flex flex-row justify-content-between align-items-center">
|
||||||
<div style={{ width: "1rem" }}>
|
<div style={{ width: "1rem" }}>
|
||||||
</div>
|
</div>
|
||||||
<ButtonSelect
|
<ButtonSelect
|
||||||
|
@ -155,7 +156,7 @@ function VPExplorer(props: {
|
||||||
{mode === "phrases" ? <i className="fas fa-share-alt" /> : ""}
|
{mode === "phrases" ? <i className="fas fa-share-alt" /> : ""}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>}
|
||||||
{(vps.verb && (typeof object === "object") && (vps.verb.isCompound !== "dynamic") && (vps.verb.tenseCategory !== "imperative") &&(mode === "phrases")) &&
|
{(vps.verb && (typeof object === "object") && (vps.verb.isCompound !== "dynamic") && (vps.verb.tenseCategory !== "imperative") &&(mode === "phrases")) &&
|
||||||
<div className="text-center my-2">
|
<div className="text-center my-2">
|
||||||
<button onClick={handleSubjObjSwap} className="btn btn-sm btn-light">
|
<button onClick={handleSubjObjSwap} className="btn btn-sm btn-light">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lingdocs/inflect",
|
"name": "@lingdocs/inflect",
|
||||||
"version": "5.7.14",
|
"version": "5.7.15",
|
||||||
"description": "Pashto inflector library",
|
"description": "Pashto inflector library",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/lib/library.d.ts",
|
"types": "dist/lib/library.d.ts",
|
||||||
|
|
Loading…
Reference in New Issue