@bigbinary/neeto-assist-frontend 1.3.1 → 1.4.0-beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1032,8 +1032,9 @@ const TicketHeader = ({
1032
1032
  customer is sent it in. That is switched on in NeetoAssist, per workspace, and the engine hands a run to the pane
1033
1033
  as it came, so a host does nothing for it. Such a run carries up to five more fields. `suggestedReplyInEnglish`
1034
1034
  and `suggestedReplyInCustomerLanguage` are the reply both ways, and `suggestedReplyLanguage` is the BCP 47 tag of
1035
- the language the second one is in, such as `es` or `pt-BR`, never English. The three are there together or not at
1036
- all. The reply as written is what the customer is sent, unless it is English: a reply written in another language
1035
+ the language the second one is in, such as `es` or `pt-BR`. The three are there together, except for a reply in
1036
+ English to a customer who writes English, or too little to tell by: it has `suggestedReplyLanguage` alone, an
1037
+ English tag such as `en`, and `suggestedReply` is then its only reading. The reply as written is what the customer is sent, unless it is English: a reply written in another language
1037
1038
  is `suggestedReplyInCustomerLanguage`, word for word, and `suggestedReplyInEnglish` is its translation, while a
1038
1039
  reply written in English is `suggestedReplyInEnglish`, and `suggestedReplyInCustomerLanguage` is its translation
1039
1040
  into the customer's language. No reply is translated twice. `customerLanguage` is the tag of the language the
@@ -1042,34 +1043,35 @@ const TicketHeader = ({
1042
1043
  rep asked for the reply in one of their choosing. `questionInEnglish` is what the customer wrote, in English, on
1043
1044
  a reply suggestion only. `suggestedReply` and `question` stay what they always were. A run without the fields
1044
1045
  looks and works as it always did.
1045
- - The card of a reply that has `suggestedReplyLanguage` and both readings shows the English one. Under it, a muted
1046
- line says "The customer writes in Spanish." when `customerLanguage` names the same language as the reply's (the
1047
- first parts of the two tags match, so `pt-PT` beside `pt-BR` does), and "This reply is in French." when it names
1048
- another or is missing. The link beside it, "Show in Spanish", turns the card to the reading the customer is sent
1049
- and then reads "Show in English". The buttons are "Use in Spanish", which is the main one and keeps the test id
1050
- of "Use reply" (`neeto-assist-use-reply-button`), "Use in English" and "Copy". The link and the buttons name the
1051
- reply's language. `onUseReply(text, html)` gets the reading the rep picked, made into `text` and `html` as above,
1052
- whichever reading is showing, and "Copy" copies the one that is showing. Without `onUseReply` there is "Copy"
1053
- alone, and the link still turns the card. With one reading alone, or without `suggestedReplyLanguage`, the card
1054
- is the one it always was.
1046
+ - The card of a reply that has `suggestedReplyLanguage` and both readings shows them as tabs beside its heading,
1047
+ each named by its language: the reading the customer is sent first, and showing to begin with, then English. The
1048
+ first tab names the reply's language, which is another than `customerLanguage` when a rep asked for the reply in
1049
+ one of their choosing. "Use reply" (`neeto-assist-use-reply-button`) calls `onUseReply(text, html)` with the
1050
+ reading of the tab that is showing, made into `text` and `html` as above, and "Copy" copies it. A reply in English
1051
+ that has `suggestedReplyLanguage` alone shows its English tab alone. Without `onUseReply` there is "Copy" alone,
1052
+ and the tabs still turn. With one reading alone, or without `suggestedReplyLanguage`, the card is the one it always
1053
+ was. A language's name can be long in a narrow pane ("Brazilian Portuguese"): each tab is as wide as its name, the
1054
+ tabs go under the heading when the two do not fit side by side, and a name is cut short only when the pane is
1055
+ narrower still.
1055
1056
  - "Customer wrote" shows the customer's words in English when a reply suggestion has `questionInEnglish`, with
1056
1057
  "Translated from Spanish." under them and the link "Show original". The link turns them to the customer's own
1057
1058
  words, and the line then says "Original in Spanish." and the link "Show in English". The language is
1058
1059
  `customerLanguage` alone, whatever the reply is in, and without it the lines are "Translated." and "Original.".
1059
1060
  Both readings are plain text. A rep's own question is never translated.
1060
1061
  - A language's name comes from the browser (`Intl.DisplayNames`), in the language the pane is in, and English is
1061
- named the same way. Where the browser has no name for a tag, or throws at it, the sentences have a form without
1062
- a name ("The customer writes in another language.", "This reply is in another language.", "Use in their
1063
- language", "Show in their language", "Translated.", "Original."), and a tag is never shown to the rep.
1064
- - The block that shows a reading has `lang` (the tag, or `en`), so a screen reader picks the right voice, and reads
1065
- the other reading out when the rep turns it. Its direction comes from the language and its letters, not from
1062
+ named the same way. On a tab it starts with a capital, as the pane's language writes one ("Español" for
1063
+ "español"). Where the browser has no name for a tag, or throws at it, the words have a form without a name (the
1064
+ tabs "Customer's language" and "English", and "Translated." and "Original." under the customer's words), and a
1065
+ tag is never shown to the rep.
1066
+ - The block that shows a reading has `lang` (the tag, or `en`), so a screen reader picks the right voice. Under
1067
+ "Customer wrote" it reads the other words out when the rep turns them. Its direction comes from the language and its letters, not from
1066
1068
  the reading's first letter: `dir="rtl"` when the language is Arabic, Hebrew, Persian, Urdu, Pashto, Sindhi,
1067
1069
  Uyghur, Yiddish, Dhivehi or Sorani (`ar`, `he`, `fa`, `ur`, `ps`, `sd`, `ug`, `yi`, `dv` and `ckb`, by the first
1068
1070
  part of the tag) and the reading holds a letter of a right-to-left script, `dir="ltr"` for the English reading,
1069
1071
  and `dir="auto"` for any other. So an Arabic reply that opens with the name of a product still reads right to
1070
- left, and Urdu written in Latin letters is left to the text. The link is a button that keeps the keyboard
1071
- through a turn. Each card and each "Customer wrote" remembers its turn only while it is on screen: nothing is
1072
- stored.
1072
+ left, and Urdu written in Latin letters is left to the text. The reply's tabs move with the arrow keys, and the
1073
+ link under "Customer wrote" is a button that keeps the keyboard through a turn. Each card remembers its tab, and
1074
+ each "Customer wrote" its turn, only while it is on screen: nothing is stored.
1073
1075
  - The pane shows replies and notes with the same formatting, built as React elements around plain text. It
1074
1076
  shows a name in backticks as code, and a numbered list that carries on after bullets counts on from where it
1075
1077
  stopped. A fenced block (three backticks on a line, with or without a language word after them, and three
@@ -38,17 +38,12 @@
38
38
  "needsFollowUp": "This reply tells the customer the team will act on their request, so someone needs to follow up."
39
39
  },
40
40
  "languages": {
41
- "customerWritesIn": "The customer writes in {{language, anyCase}}.",
42
- "customerWritesInAnotherLanguage": "The customer writes in another language.",
43
- "replyIsIn": "This reply is in {{language, anyCase}}.",
44
- "replyIsInAnotherLanguage": "This reply is in another language.",
41
+ "replyLanguage": "Reply language",
42
+ "customerLanguage": "Customer's language",
43
+ "english": "English",
45
44
  "showIn": "Show in {{language, anyCase}}",
46
- "showInTheirLanguage": "Show in their language",
47
45
  "showInEnglish": "Show in English",
48
46
  "showOriginal": "Show original",
49
- "useIn": "Use in {{language, anyCase}}",
50
- "useInTheirLanguage": "Use in their language",
51
- "useInEnglish": "Use in English",
52
47
  "translatedFrom": "Translated from {{language, anyCase}}.",
53
48
  "translated": "Translated.",
54
49
  "originalIn": "Original in {{language, anyCase}}.",
package/dist/.ready CHANGED
@@ -1 +1 @@
1
- Built at 2026-11-16T04:42:07.460Z
1
+ Built at 2026-11-16T07:24:54.440Z