diff --git a/package-lock.json b/package-lock.json
index e76512b..5954cc8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "pashto-inflector",
- "version": "5.1.0",
+ "version": "5.1.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "pashto-inflector",
- "version": "5.1.0",
+ "version": "5.1.1",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
diff --git a/package.json b/package.json
index 2e9a85a..8ac3d97 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "pashto-inflector",
- "version": "5.1.0",
+ "version": "5.1.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/package.json b/src/components/package.json
index 2e3a03c..4fdbd2e 100644
--- a/src/components/package.json
+++ b/src/components/package.json
@@ -1,6 +1,6 @@
{
"name": "@lingdocs/ps-react",
- "version": "5.1.0",
+ "version": "5.1.1",
"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/EPExplorer.tsx b/src/components/src/ep-explorer/EPExplorer.tsx
index 7c405a1..0d75725 100644
--- a/src/components/src/ep-explorer/EPExplorer.tsx
+++ b/src/components/src/ep-explorer/EPExplorer.tsx
@@ -11,7 +11,6 @@ import {
} from "react";
import { completeEPSelection } from "../../../lib/src/phrase-building/render-ep";
import { makeEPSBlocks } from "../../../lib/src/phrase-building/blocks-utils";
-import EquativePicker from "./EquativePicker";
import autoAnimate from "@formkit/auto-animate";
// @ts-ignore
import LZString from "lz-string";
@@ -128,16 +127,9 @@ function EPExplorer(props: {
entryFeeder={props.entryFeeder}
eps={eps}
onChange={handleEpsChange}
- />}
- {mode === "charts" &&
-
Equative
-
adjustEps({ type: "set equative", payload })}
- hideNegative={false}
/>
- }
- {mode === "charts" && }
+ }
+ {mode === "charts" && }
{mode === "phrases" && ([], "EPTensesShowing");
+ const adjustShowing = (v: string) => {
+ if (showing.includes(v)) {
+ setShowing(os => os.filter(x => x !== v));
+ } else {
+ setShowing(os => [v, ...os]);
+ }
+ }
+ return
+ {options.map((tense) =>
+ adjustShowing(tense.value)}
+ hLevel={5}
+ >
+
+
+
)}
+
;
+}
+
+function EqChartDisplay({ tense, opts }: {
tense: T.EquativeTense,
opts: T.TextOptions,
}) {
diff --git a/src/components/src/ep-explorer/EquativePicker.tsx b/src/components/src/ep-explorer/EquativePicker.tsx
index 27f81ad..726a211 100644
--- a/src/components/src/ep-explorer/EquativePicker.tsx
+++ b/src/components/src/ep-explorer/EquativePicker.tsx
@@ -1,38 +1,13 @@
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 }) },
};
-const options: { label: string | JSX.Element, value: T.EquativeTense }[] = [{
- label: "Present",
- value: "present",
-}, {
- label: "Habitual",
- value: "habitual",
-}, {
- label: "Subjunctive",
- value: "subjunctive",
-}, {
- label: "Future",
- value: "future",
-}, {
- label: "Past",
- value: "past",
-}, {
- label: `"Would Be"`,
- value: "wouldBe",
-}, {
- label: "Past Subjunctive",
- value: "pastSubjunctive",
-}, {
- label: `"Would Have Been"`,
- value: "wouldHaveBeen",
-}];
-
function EquativePicker({ equative, onChange, hideNegative }: {
equative: { tense: T.EquativeTense, negative: boolean },
onChange: (e: { tense: T.EquativeTense, negative: boolean }) => void,
diff --git a/src/components/src/ep-explorer/epTenseOptions.tsx b/src/components/src/ep-explorer/epTenseOptions.tsx
new file mode 100644
index 0000000..420d73e
--- /dev/null
+++ b/src/components/src/ep-explorer/epTenseOptions.tsx
@@ -0,0 +1,27 @@
+import * as T from "../../../types";
+
+export const epTenseOptions: { label: string | JSX.Element, value: T.EquativeTense }[] = [{
+ label: "Present",
+ value: "present",
+}, {
+ label: "Habitual",
+ value: "habitual",
+}, {
+ label: "Subjunctive",
+ value: "subjunctive",
+}, {
+ label: "Future",
+ value: "future",
+}, {
+ label: "Past",
+ value: "past",
+}, {
+ label: `"Would Be"`,
+ value: "wouldBe",
+}, {
+ label: "Past Subjunctive",
+ value: "pastSubjunctive",
+}, {
+ label: `"Would Have Been"`,
+ value: "wouldHaveBeen",
+}];
\ No newline at end of file
diff --git a/src/components/src/vp-explorer/AllTensesDisplay.tsx b/src/components/src/vp-explorer/AllTensesDisplay.tsx
index c587641..57ae42f 100644
--- a/src/components/src/vp-explorer/AllTensesDisplay.tsx
+++ b/src/components/src/vp-explorer/AllTensesDisplay.tsx
@@ -6,7 +6,7 @@ import useStickyState from "../useStickyState";
import { isModalTense, isPerfectTense, isVerbTense } from "../../../lib/src/type-predicates";
function AllTensesDisplay({ VS, opts }: { VS: T.VerbSelection, opts: T.TextOptions }) {
- const [showing, setShowing] = useStickyState([], "tensesShowing");
+ const [showing, setShowing] = useStickyState([], "VPTensesShowing");
const [showFormulas, setShowFormulas] = useStickyState(false, "showFormulasWithCharts");
const adjustShowing = (v: string) => {
if (showing.includes(v)) {
@@ -24,7 +24,7 @@ function AllTensesDisplay({ VS, opts }: { VS: T.VerbSelection, opts: T.TextOptio
: imperativeTenseOptions;
return
setShowFormulas(x => !x)}>
- {!showFormulas ? "Show" : "Hide"} Formulas
+ 🧪 {!showFormulas ? "Show" : "Hide"} Formulas
{options.map((tense) =>
{showFormulas &&
- 🧪 {tense.formula}
+ {tense.formula}
}