@wexio/messenger-widget-angular 1.6.1 → 1.7.1

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @wexio/messenger-widget-angular
2
2
 
3
+ ## 1.7.1
4
+
5
+ ## 1.7.0
6
+
7
+ ### Minor Changes
8
+
9
+ - 386ab4f: Launcher message and message threads. A MESSAGE slot is now the unread bubble over the closed launcher: the slot with the most specific matching variant (page, then origin, then visitor kind, then the operator's order) shows while it is unread, re-picks on SPA navigation without jumping, and goes away for good once the visitor clicks it, opens the panel over it or dismisses it with X / Esc (until the operator edits it, or `reappearAfterDays` after a dismiss). Each slot has its own thread (`message:<slotId>`), created by the first message and titled with the slot text in the thread list; with Messages as the default tab the launcher (and the Messages tab) opens the thread of the slot that matches the current page, else the last active thread, else a new chat; any other default tab opens as before. Contract 074 stage 2: several variants and `paths` per slot, `reappearAfterDays` on MESSAGE slots. A config without a MESSAGE slot behaves as before.
10
+ - 386ab4f: Targeted content for welcome messages, and Home blocks (BE contract v1). Each slot can carry several variants with an audience rule (`visitors`, `origins`, `paths`); the first match wins, the BE renders the variables and the widget never sees `{{`. Session-dependent content comes from `GET /api/web/config/:pk/session` after every handshake, restore, pre-chat submit, profile save and re-auth; a 404, 401, 5xx, network error or 3 s timeout keeps the public projection, and the welcome waits behind the typing dots so it never flashes. Welcome buttons are plain quick replies that send their label. New public React prop `onMessageAction`, the matching `wexio:message-action` event (web component and script tag), and `wexio:host-viewport:v1` from the loader. Config without `contentVersion` renders exactly as before. Private-only: the `audienceOverride` prop.
11
+
12
+ ### Patch Changes
13
+
14
+ - 386ab4f: Fix: guard errors from the BE are recognised by their stable `WEB_*` codes (REST `code`, GraphQL `extensions.code` and `extensions.http.status`) instead of message text, so a translated message can no longer break the "widget off" and wrong-integration recovery. The client-generated welcome no longer counts as an unread message on the launcher badge (only a real operator or flow message does). The script-tag embed now reliably gets the host viewport ("Expand" stays hidden on a phone-wide host), the loader clamps the details it relays for `wexio:message-action`, and a few small robustness fixes (preview-token cache eviction, linear path matching). Dark theme `--wx-fg-subtle` is now #94949e (>= 4.5:1 on every dark surface). Quick-reply chips (welcome, unread peek, operator / flow messages) get a 44px invisible touch target without changing their look, clamp long labels to two lines (the full label stays the accessible name) and sit in a labelled "Quick replies" group. In the launcher peek the chip stack and chip text follow the launcher side in RTL too; the touch hit area applies to touch devices only. A host-page `pushState` / `replaceState` no longer notifies the widget synchronously (fixes "useInsertionEffect must not schedule updates" in Next hosts).
15
+ - 386ab4f: Fix: a host `offset` (React prop, `offset-x` / `offset-y`, `wexioSettings.offset`) now wins PER AXIS over the integration's `theme.launcherOffset` in the React and web-component embeds too (a host that sets only `x` keeps the configured `y`), as the loader already did. `defaultOpen` / `open` go through the same auth guard as a launcher tap and a host open that meets a failed handshake shows the retry popup. The script-tag "Expand" control is hidden on a phone-wide host (the loader reports `width` in `wexio:host-viewport:v1`). Light theme `--wx-fg-muted`, `--wx-fg-subtle` and `--wx-danger` now reach WCAG AA 4.5:1.
16
+ - 386ab4f: BE preview token (dashboard playground, BE 062). Private `previewToken` prop and `onPreviewTokenExpired(reason)` callback on the React embed; the `preview-token` attribute and `wexio:preview-token-request` event on `<wexio-widget>`; `wexioSettings.previewToken`, `Wexio("previewToken", token)` and `wexio:preview-token:v1` / `wexio:preview-token:request` on the iframe loader (the frame URL gets only the flag `pv=1`). The token is sent as `x-web-preview-token` on the config, handshake, GraphQL and session calls, never on SSE and never in a URL. It forces isolated in-memory storage, ignores `user`, and the sign-in gate shows demo mocks. A rejected token pauses the outbox and asks the host for a new one once per token value; a new token re-handshakes on the previous visitor id. Not part of the public packages. The public bundles carry the same runtime (the loader, the attribute) but expose no public type or documented option for it.
17
+
3
18
  ## 1.6.1
4
19
 
5
20
  ## 1.6.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wexio/messenger-widget-angular",
3
- "version": "1.6.1",
3
+ "version": "1.7.1",
4
4
  "description": "Angular standalone component embed for the Wexio web messenger. Thin wrapper around the <wexio-widget> custom element — same WidgetShell runtime, same Shadow-DOM isolation.",
5
5
  "license": "MIT",
6
6
  "private": false,