@v-office/website-chat 1.2.0 → 1.3.0
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 +1 -0
- package/dist/{catalog-ClcCUjf7.js → catalog-Buxzskkg.js} +10 -4
- package/dist/catalog.d.ts +82 -2
- package/dist/catalog.js +2 -2
- package/dist/{icons-BK5Lk0cP.js → icons-B0_KM_uQ.js} +17 -1
- package/dist/index.d.ts +88 -3
- package/dist/index.js +484 -54
- package/dist/panel-B_wg4Wl0.js +2594 -0
- package/dist/{protocol-Bmb_uxVQ.d.ts → protocol-Dg1HZNWG.d.ts} +12 -1
- package/instructions/CHANGELOG.md +1 -0
- package/instructions/MIGRATION.md +1 -0
- package/instructions/versions/1.3.0/CHANGELOG.md +82 -0
- package/instructions/versions/1.3.0/MIGRATION.md +22 -0
- package/package.json +1 -1
- package/dist/panel-CfS3SuRX.js +0 -1396
|
@@ -22,10 +22,16 @@ interface ChatRequest {
|
|
|
22
22
|
readonly locale: ChatLocale;
|
|
23
23
|
/** The widget's package version: the service offers only components it can render. */
|
|
24
24
|
readonly clientVersion: string;
|
|
25
|
+
/** The stay the widget keeps in reach for the visitor (its dock bar), so "we'll take it" means that
|
|
26
|
+
* one; `null` or absent without one. An older service ignores it (1.3.0). */
|
|
27
|
+
readonly picked?: string | null;
|
|
25
28
|
}
|
|
26
29
|
/** Why the chat cannot answer: switched off, its budget spent, a reply still running, too many
|
|
27
30
|
* messages, or anything else. The widget shows its fallback (search and contact links). */
|
|
28
31
|
type ChatUnavailableReason = "off" | "budget" | "busy" | "limit" | "error";
|
|
32
|
+
/** What the service is doing while the visitor waits, for the widget's waiting line (1.3.0). A widget
|
|
33
|
+
* shows a step it does not know as plain waiting. */
|
|
34
|
+
type ChatStatusStep = "search" | "rental" | "availability" | "quote" | "reviews";
|
|
29
35
|
/** One server-sent event (`event: <type>`, `data: <json>`), in order. */
|
|
30
36
|
type ChatEvent = {
|
|
31
37
|
readonly type: "session";
|
|
@@ -36,6 +42,11 @@ type ChatEvent = {
|
|
|
36
42
|
} | {
|
|
37
43
|
readonly type: "ui";
|
|
38
44
|
readonly spec: Spec;
|
|
45
|
+
} |
|
|
46
|
+
/** Since 1.3.0; every earlier widget drops an event it does not know. */
|
|
47
|
+
{
|
|
48
|
+
readonly type: "status";
|
|
49
|
+
readonly step: ChatStatusStep;
|
|
39
50
|
} | {
|
|
40
51
|
readonly type: "done";
|
|
41
52
|
} | {
|
|
@@ -43,4 +54,4 @@ type ChatEvent = {
|
|
|
43
54
|
readonly reason: ChatUnavailableReason;
|
|
44
55
|
};
|
|
45
56
|
//#endregion
|
|
46
|
-
export { ChatLocale as a,
|
|
57
|
+
export { ChatLocale as a, ChatUnavailableReason as c, ChatEvent as i, MAX_MESSAGE_CHARS as l, CHAT_PATH as n, ChatRequest as o, ChatAvailability as r, ChatStatusStep as s, CHAT_LOCALES as t, SESSION_TTL_S as u };
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Release notes of `@v-office/website-chat`, newest first. Each version has its own directory.
|
|
6
6
|
|
|
7
|
+
- `versions/1.3.0/CHANGELOG.md`: release notes for 1.3.0
|
|
7
8
|
- `versions/1.2.0/CHANGELOG.md`: release notes for 1.2.0
|
|
8
9
|
- `versions/1.1.3/CHANGELOG.md`: release notes for 1.1.3
|
|
9
10
|
- `versions/1.1.2/CHANGELOG.md`: release notes for 1.1.2
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Migration guides of `@v-office/website-chat`, newest first. Apply them in order when skipping versions.
|
|
6
6
|
|
|
7
|
+
- `versions/1.3.0/MIGRATION.md`: Migration: 1.2.0 to 1.3.0
|
|
7
8
|
- `versions/1.2.0/MIGRATION.md`: Migration: 1.1.3 to 1.2.0
|
|
8
9
|
- `versions/1.1.3/MIGRATION.md`: Migration: 1.1.2 to 1.1.3
|
|
9
10
|
- `versions/1.1.2/MIGRATION.md`: Migration: 1.1.1 to 1.1.2
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Changelog: 1.3.0
|
|
2
|
+
|
|
3
|
+
Quotes say what the price covers, what the guest saves and until when the stay is free to cancel, all from
|
|
4
|
+
the booking system, and a quote shown when the guest has decided hands the stay over to the booking page.
|
|
5
|
+
Nothing to change on a site.
|
|
6
|
+
|
|
7
|
+
## Added
|
|
8
|
+
|
|
9
|
+
- Quotes (`StayQuote`) name the total ("Gesamtpreis für 7 Nächte"), show the agency's discount with what
|
|
10
|
+
the guest saves ("Frühbucher · Sie sparen 112,30 €"), the rate's own name and the free-cancellation date
|
|
11
|
+
from the booking system ("Kostenlos stornierbar bis 7. Jan. 2027", or "Nicht erstattbar"), and fold the
|
|
12
|
+
price lines into "Preisdetails". The dates carry their weekdays ("Sa 6. – Sa 13. Feb."), and a small
|
|
13
|
+
photo sits beside the name.
|
|
14
|
+
- A quote shown when the guest has decided (`handover`) becomes a hand-over card: arrival and departure
|
|
15
|
+
with weekdays, the party with the children's ages, the rate, the chosen extras, the total as the largest
|
|
16
|
+
figure, one full-width "Weiter zur Buchung" button, and, where the rental has a booking page, what that page asks
|
|
17
|
+
next.
|
|
18
|
+
- Cards and Compare label their total the same way and mark a discounted stay with the discount's name.
|
|
19
|
+
- A bar above the input keeps the stay being discussed in reach: its name, total, dates and guests and
|
|
20
|
+
a "Zur Buchung" button; a tap on its name brings the stay's card back into view. Before a stay is
|
|
21
|
+
priced it shows what the chat searched with (period, party, nights, wishes), the party marked
|
|
22
|
+
"angenommen" when the guest named none; a tap on a part puts the start of a correction into the input.
|
|
23
|
+
- The header keeps a "KI" mark beside the title. After the first message the AI notice shrinks to one
|
|
24
|
+
line ("Preise aus dem Buchungssystem"), with the full notice behind ⓘ.
|
|
25
|
+
- While the guest waits, the chat says what it is doing ("Prüfe den Preis im Buchungssystem …").
|
|
26
|
+
- A message the chat could not answer (busy, failed) can be sent again with "Erneut senden".
|
|
27
|
+
- Optional `privacyPath` prop: the step that starts the chat links the site's privacy policy.
|
|
28
|
+
- Links out of the chat (rental and booking pages, search, contact) carry `ref=chat`, a parameter
|
|
29
|
+
the site already treats as tracking: it changes no search and is not kept in share links.
|
|
30
|
+
- Calendars mark the days a stay can start on and each free day's price level (cheaper to dearer, never
|
|
31
|
+
an amount, and only where the levels differ); taken days are hatched, so the calendar reads without
|
|
32
|
+
colour. Tapping an arrival day fills it alone and shows "Anreise Di 9. Feb." with "Preis anzeigen",
|
|
33
|
+
which asks the chat for that stay.
|
|
34
|
+
- A stay the booking system refused lists the stay lengths it allows from that arrival ("4 Nächte bis
|
|
35
|
+
Di 18. Mai"); each asks for its price. "Anderen Anreisetag wählen" starts a new question.
|
|
36
|
+
- Cards from a flexible search switch between their rental's free periods in place: dates, total and
|
|
37
|
+
booking button change without a new reply, and the bar above the input follows. Periods in one month
|
|
38
|
+
name it once ("Freie Termine im Mai", pills "8.–15.", "13.–20.").
|
|
39
|
+
- Copy keys: `arrivalPossible`, `cheaper`, `dearer`, `showPrice`, `arrivalOn`, `possibleFrom`, `until`,
|
|
40
|
+
`otherArrival`, `otherArrivalStarter`, `freePeriods`, `freePeriodsIn`, `datesDiffer` and `otherDate`.
|
|
41
|
+
- Tapping a card's photo opens the rental's photos large inside the chat: uncropped, with the
|
|
42
|
+
booking system's captions, swiped or stepped through, with the stay's total and "Zur Buchung" kept in
|
|
43
|
+
the foot. Escape closes the photos first, then the chat. Copy keys `openPhotos`, `closePhotos`.
|
|
44
|
+
- Copy keys, with defaults in both languages: `totalForNights`, `priceDetails`, `dealFallback`, `youSave`,
|
|
45
|
+
`freeCancellation`, `nonRefundable`, `arrival`, `departure`, `continueToBooking`, `nothingBookedYet`,
|
|
46
|
+
`handoverSteps` (the three steps under the hand-over's button), `aiBadge`, `noticeShort`,
|
|
47
|
+
`noticeMore`, `status` (the waiting line per step), `retry`, `privacyLink`, `yourPick`, `yourTrip`,
|
|
48
|
+
`assumed`, `guests`, `adultsShort`, `weekend` and `tripStarters`.
|
|
49
|
+
- `./catalog`: the optional state the chat service writes for these (`ChatDiscount`, `ChatCancellation`,
|
|
50
|
+
`ChatTrip`, and optional fields on `ChatStay`, `ChatCalendar`, `ChatImage` and `ChatState`), the
|
|
51
|
+
`status` event (`ChatStatusStep`), the optional `picked` field of a request, and `versionAtLeast`. A
|
|
52
|
+
widget that does not draw a field yet ignores it.
|
|
53
|
+
|
|
54
|
+
## Changed
|
|
55
|
+
|
|
56
|
+
- The German `book` label reads "Zur Buchung" instead of "Buchen", as a stay link's button (`bookStay`) already did.
|
|
57
|
+
- Under a card's labelled total, the foot shows the dates without repeating the nights.
|
|
58
|
+
- The input reads "Ihre Reise beschreiben …" ("Describe your trip …") and stays one line on a phone; its
|
|
59
|
+
focus ring shows for keyboard focus only.
|
|
60
|
+
- Quick replies the guest has answered go quiet: only the chosen one stays, outlined and muted. The
|
|
61
|
+
current ones stay tinted pills, so they never look like the outlined links out of the chat.
|
|
62
|
+
- Buttons keep their full colour while a reply is still being written (they wait for it, as before).
|
|
63
|
+
- Other free periods (`AlternativeStays`) are rows with weekday dates, nights (with a discount's badge)
|
|
64
|
+
and total that choose a period for the booking button in the bar, instead of chips that left the chat
|
|
65
|
+
for the booking page. The choice is kept with the conversation and named in the next message.
|
|
66
|
+
- Calendars show free days plain and taken days hatched instead of tinting free days.
|
|
67
|
+
- Cards lead with a larger photo (4:3 for a single card on a phone, flatter in a carousel) with the place
|
|
68
|
+
and "★ 4,8 (23)" on it and a photo count instead of dots; a card without photos writes them the same
|
|
69
|
+
way above its name. Photos load in the size the screen needs
|
|
70
|
+
where the booking system offers several (`srcset`).
|
|
71
|
+
- In dark mode cards, comparisons and calendars rise a step above the conversation with a fine edge,
|
|
72
|
+
instead of sinking into it. Star ratings take a colour that reads on light and dark surfaces.
|
|
73
|
+
- A carousel card puts the total's label above the total and the button, so the price stays in view; a
|
|
74
|
+
discount's badge sits on the total's line, never on two. Compare's rows line up at every width, long
|
|
75
|
+
names cut at three lines.
|
|
76
|
+
- On touch screens a carousel shows dots instead of the arrows and count, fades at the end while more
|
|
77
|
+
cards follow, and says when its rentals' dates differ. Compare marks a stay on other dates than the first.
|
|
78
|
+
|
|
79
|
+
## Unchanged
|
|
80
|
+
|
|
81
|
+
- Props, themes and the existing copy keys keep their meaning. `PriceBreakdown` and `PriceCalendar` still
|
|
82
|
+
render, for conversations stored before this version.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Migration: 1.2.0 to 1.3.0
|
|
2
|
+
|
|
3
|
+
No changes required.
|
|
4
|
+
|
|
5
|
+
- A site whose `copy` sets `book` keeps its own label; the others now read "Zur Buchung" in German.
|
|
6
|
+
- A site that passes `copy` needs nothing for the new keys: their defaults apply. Override
|
|
7
|
+
`handoverSteps` when the site's booking page asks something else than contact details, payment and an
|
|
8
|
+
email confirmation (the hand-over lists them only for rentals with a booking page). Code that builds a
|
|
9
|
+
complete `ChatCopy` object adds the new keys.
|
|
10
|
+
- Pass `privacyPath` (for example `privacyPath="/datenschutz"`) to link the privacy policy where the
|
|
11
|
+
chat is started.
|
|
12
|
+
- A site that overrides `notice` also overrides `noticeShort`, which stands in for it after the first
|
|
13
|
+
message (the full `notice` stays behind ⓘ). A site that overrides `placeholder` keeps its own.
|
|
14
|
+
- Analytics may see `ref=chat` on rental, booking, search and contact URLs opened from the chat.
|
|
15
|
+
- Other free periods no longer link to the booking page themselves: a tapped row becomes the stay in
|
|
16
|
+
the bar above the input, whose "Zur Buchung" opens it.
|
|
17
|
+
|
|
18
|
+
## 1. Upgrade
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
pnpm add --save-exact @v-office/website-chat@1.3.0
|
|
22
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-office/website-chat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "The AI chat of v-office websites: a launcher and a lazily loaded chat panel in a Shadow DOM, talking to the AI Studio chat service, and the json-render catalog (./catalog) the service places its rental cards, stays and links from. Styled through CSS custom properties and curated template themes; consumers need no Tailwind",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|