From 0f720e3be1232a419fd0f5679b604d7bf76fd7ed Mon Sep 17 00:00:00 2001
From: lingdocs <71590811+lingdocs@users.noreply.github.com>
Date: Sat, 4 Jun 2022 17:32:54 -0500
Subject: [PATCH] working - quiz is broken
---
package.json | 2 +-
src/components/blocks/Block.tsx | 306 ++++++++++++++++++
.../ep-explorer/EPBlocksDisplay.tsx | 18 ++
src/components/ep-explorer/EPDisplay.tsx | 46 +--
src/components/ep-explorer/EPExplorer.tsx | 2 +-
src/components/ep-explorer/EPTextDisplay.tsx | 28 ++
src/components/ep-explorer/eps-reducer.ts | 4 +-
src/components/vp-explorer/VPExplorerQuiz.tsx | 7 +
src/lib/accent-helpers.ts | 14 +
src/lib/misc-helpers.ts | 6 +
src/lib/p-text-helpers.ts | 11 +
src/lib/phrase-building/blocks-utils.ts | 44 +++
src/lib/phrase-building/compile.ts | 219 ++++++-------
src/lib/phrase-building/render-ep.ts | 173 ++++++++--
src/lib/phrase-building/segment.ts | 2 -
src/types.ts | 47 ++-
16 files changed, 748 insertions(+), 181 deletions(-)
create mode 100644 src/components/blocks/Block.tsx
create mode 100644 src/components/ep-explorer/EPBlocksDisplay.tsx
create mode 100644 src/components/ep-explorer/EPTextDisplay.tsx
diff --git a/package.json b/package.json
index 2410a99..0358b8e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@lingdocs/pashto-inflector",
- "version": "2.8.0",
+ "version": "2.8.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/blocks/Block.tsx b/src/components/blocks/Block.tsx
new file mode 100644
index 0000000..1b668d0
--- /dev/null
+++ b/src/components/blocks/Block.tsx
@@ -0,0 +1,306 @@
+import * as T from "../../types";
+import classNames from "classnames";
+import {
+ getEnglishFromRendered,
+} from "../../lib/phrase-building/np-tools";
+
+function Block({ opts, block }: {
+ opts: T.TextOptions,
+ block: T.Block,
+}) {
+ if ("equative" in block) {
+ return
⚠️ NOTE: This means that the subject {renderedSubject.selection.e ? `(${renderedSubject.selection.e})` : ""} is the action/idea of {` `} - "{rendered.predicate.selection.e ? rendered.predicate.selection.e : "the particple"}".
+ "{renderedPredicate.selection.e ? renderedPredicate.selection.e : "the particple"}".It does not mean that the subject is doing the action, which is what the transaltion sounds like in English.
It will be fixed in like a week or two... hopefully.
+