@gengage/assistant-fe 0.6.44 → 0.6.46
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/dist/chat/components/productMentionLinker.d.ts +5 -5
- package/dist/chat/runtime.d.ts +3 -0
- package/dist/chat/types.d.ts +6 -0
- package/dist/chat-runtime.js +1 -1
- package/dist/chat.iife.js +26 -26
- package/dist/chat.js +1 -1
- package/dist/common/transport.d.ts +1 -0
- package/dist/common/types.d.ts +1 -0
- package/dist/{common-B_QhTwRK.js → common-BYaIofv0.js} +1 -1
- package/dist/common.js +5 -5
- package/dist/{connection-warning-DjGsAS1h.js → connection-warning-BWCgMHwN.js} +1 -1
- package/dist/{fastIntent-DOgXE46i.js → fastIntent-BfYLNhFF.js} +1 -1
- package/dist/index.js +10 -10
- package/dist/native.iife.js +8 -8
- package/dist/qna-runtime.js +1 -1
- package/dist/qna.iife.js +10 -10
- package/dist/qna.js +1 -1
- package/dist/request-response-cache-DxtNGhlh.js +1491 -0
- package/dist/{runtime-BJiDilHj.js → runtime-B9k46n2p.js} +3 -3
- package/dist/{runtime-D39A30T-.js → runtime-DBmJg9TG.js} +613 -579
- package/dist/{runtime-Cr3f6wjm.js → runtime-IlZ-GH68.js} +3 -3
- package/dist/{simbut-C-2-g2V1.js → simbut-CobYs9jE.js} +1 -1
- package/dist/simbut.iife.js +1 -1
- package/dist/simbut.js +1 -1
- package/dist/{simrel-BaahIAgs.js → simrel-BEyFl3Ec.js} +1 -1
- package/dist/simrel-runtime.js +1 -1
- package/dist/simrel.iife.js +2 -2
- package/dist/simrel.js +2 -2
- package/dist/{widget-base-DRNUkp-i.js → widget-base-BsHKmSMq.js} +1 -1
- package/package.json +1 -1
- package/dist/request-response-cache-Ddw59jGs.js +0 -1475
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
* Product mention linker.
|
|
3
3
|
*
|
|
4
4
|
* After sanitiseHtml() renders bot text, this module walks text nodes and
|
|
5
|
-
* wraps product name occurrences with clickable links that
|
|
6
|
-
* `launchSingleProduct` action.
|
|
5
|
+
* wraps product name occurrences with clickable links that navigate to the
|
|
6
|
+
* product URL when available, otherwise dispatch a `launchSingleProduct` action.
|
|
7
7
|
*
|
|
8
8
|
* XSS safety: Uses DOM text-node manipulation only — no innerHTML.
|
|
9
9
|
*/
|
|
10
|
-
interface ProductMention {
|
|
10
|
+
export interface ProductMention {
|
|
11
11
|
sku: string;
|
|
12
12
|
short_name: string;
|
|
13
|
+
url?: string;
|
|
13
14
|
}
|
|
14
15
|
export interface ProductMentionLinkerOptions {
|
|
15
16
|
container: HTMLElement;
|
|
16
17
|
mentions: ProductMention[];
|
|
17
|
-
onProductClick: (
|
|
18
|
+
onProductClick: (mention: ProductMention) => void;
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
21
|
* Walk text nodes in `container` and wrap occurrences of each mention's
|
|
@@ -23,4 +24,3 @@ export interface ProductMentionLinkerOptions {
|
|
|
23
24
|
* Only the first occurrence of each mention is linked to avoid visual clutter.
|
|
24
25
|
*/
|
|
25
26
|
export declare function linkProductMentions(options: ProductMentionLinkerOptions): void;
|
|
26
|
-
export {};
|
package/dist/chat/runtime.d.ts
CHANGED
|
@@ -331,6 +331,9 @@ export declare class GengageChat extends BaseWidget<ChatWidgetConfig> {
|
|
|
331
331
|
private _restoreFromHistoryRecord;
|
|
332
332
|
private _persistToIndexedDB;
|
|
333
333
|
private _isSameOriginUrl;
|
|
334
|
+
private _enrichProductMentionsWithUrls;
|
|
335
|
+
private _productMentionUrlForSku;
|
|
336
|
+
private _handleProductNavClick;
|
|
334
337
|
private _markUnavailableProductContext;
|
|
335
338
|
private _clearUnavailableProductContext;
|
|
336
339
|
private _hasUnavailableProductContext;
|
package/dist/chat/types.d.ts
CHANGED
|
@@ -250,6 +250,12 @@ export interface ChatWidgetConfig extends BaseWidgetConfig {
|
|
|
250
250
|
export interface ChatI18n {
|
|
251
251
|
headerTitle: string;
|
|
252
252
|
inputPlaceholder: string;
|
|
253
|
+
/**
|
|
254
|
+
* Accessible name for the message input `<textarea>` (screen readers).
|
|
255
|
+
* Optional — falls back to `inputPlaceholder` when omitted, so existing
|
|
256
|
+
* consumers and locales need no change. Built-in locales set it.
|
|
257
|
+
*/
|
|
258
|
+
inputAriaLabel?: string;
|
|
253
259
|
sendButton: string;
|
|
254
260
|
closeButton: string;
|
|
255
261
|
openButton: string;
|
package/dist/chat-runtime.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e, d as t, f as r, i as s, l as n, n as i, r as l, s as C, t as c, u as d } from "./runtime-
|
|
1
|
+
import { c as e, d as t, f as r, i as s, l as n, n as i, r as l, s as C, t as c, u as d } from "./runtime-DBmJg9TG.js";
|
|
2
2
|
export {
|
|
3
3
|
d as CHAT_SCROLL_ELEMENT_ID,
|
|
4
4
|
s as ChatPresentationState,
|