@salesforce/agentforce-conversation-client 9.12.0 → 9.13.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 +65 -23
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -152,6 +152,9 @@ Share: [Style Token Reference](#style-token-tables)
|
|
|
152
152
|
| Token name | UI area themed |
|
|
153
153
|
| --------------------- | --------------------------- |
|
|
154
154
|
| `fabBackground` | FAB button background color |
|
|
155
|
+
| `fabForegroundColor` | FAB button text color |
|
|
156
|
+
| `fabFontSize` | FAB button text font size |
|
|
157
|
+
| `fabBorderRadius` | FAB button border radius |
|
|
155
158
|
| `containerBackground` | Chat container background |
|
|
156
159
|
| `headerBackground` | Header background |
|
|
157
160
|
| `containerWidth` | Chat container width |
|
|
@@ -278,7 +281,7 @@ Use `renderingConfig.showAvatar` to control whether avatars are rendered in mess
|
|
|
278
281
|
| `messageInputScrollbarColor` | Message input scrollbar color |
|
|
279
282
|
| `messageInputActionsWidth` | Message input actions width |
|
|
280
283
|
| `messageInputActionsPaddingRight` | Message input actions right padding |
|
|
281
|
-
| `
|
|
284
|
+
| `messageInputFooterPlaceholderTextColor` | Message input placeholder text color |
|
|
282
285
|
| `messageInputPlaceholderFontWeight` | Placeholder font weight |
|
|
283
286
|
| `messageInputErrorTextColor` | Message input error text color |
|
|
284
287
|
| `messageInputActionsGap` | Message input actions gap |
|
|
@@ -302,6 +305,7 @@ Use `renderingConfig.showAvatar` to control whether avatars are rendered in mess
|
|
|
302
305
|
| Token name | UI area themed |
|
|
303
306
|
| ---------------------- | ---------------------------- |
|
|
304
307
|
| `errorBlockBackground` | Error block background color |
|
|
308
|
+
| `errorBlockIconColor` | Error block icon color |
|
|
305
309
|
|
|
306
310
|
### With Configuration
|
|
307
311
|
|
|
@@ -416,25 +420,40 @@ Embeds the Agentforce Conversation Client by creating a Lightning Out 2.0 app an
|
|
|
416
420
|
|
|
417
421
|
#### Parameters
|
|
418
422
|
|
|
419
|
-
| Parameter
|
|
420
|
-
|
|
|
421
|
-
| `options.container`
|
|
422
|
-
| `options.salesforceOrigin`
|
|
423
|
-
| `options.appId`
|
|
424
|
-
| `options.frontdoorUrl`
|
|
425
|
-
| `options.sitePrefix`
|
|
426
|
-
| `options.agentforceClientConfig`
|
|
427
|
-
| `agentforceClientConfig.agentId`
|
|
428
|
-
| `agentforceClientConfig.agentLabel`
|
|
429
|
-
| `agentforceClientConfig.styleTokens`
|
|
430
|
-
| `agentforceClientConfig.renderingConfig.mode`
|
|
431
|
-
| `agentforceClientConfig.renderingConfig.width`
|
|
432
|
-
| `agentforceClientConfig.renderingConfig.height`
|
|
433
|
-
| `agentforceClientConfig.renderingConfig.headerEnabled`
|
|
434
|
-
| `agentforceClientConfig.renderingConfig.showHeaderIcon`
|
|
435
|
-
| `agentforceClientConfig.renderingConfig.showAvatar`
|
|
436
|
-
| `
|
|
437
|
-
| `
|
|
423
|
+
| Parameter | Type | Required | Description |
|
|
424
|
+
| ----------------------------------------------------------- | ------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
425
|
+
| `options.container` | `string \| HTMLElement` | Yes | CSS selector or HTMLElement to embed into |
|
|
426
|
+
| `options.salesforceOrigin` | `string` | No | Salesforce org origin URL (use when hosted in a Salesforce org). At least one of `salesforceOrigin` or `frontdoorUrl` is required |
|
|
427
|
+
| `options.appId` | `string` | No | 18-digit Lightning Out 2.0 app ID (`app-id`); find it in Lightning Out 2.0 App Manager in Setup; not required for apps created before Spring '26 |
|
|
428
|
+
| `options.frontdoorUrl` | `string` | No | Frontdoor URL for authentication (use when embedding outside Salesforce). At least one of `salesforceOrigin` or `frontdoorUrl` is required |
|
|
429
|
+
| `options.sitePrefix` | `string` | No | Experience Cloud site prefix used by Lightning Out (for example, `"/my-site"`). Set as `site-prefix` on the LO app |
|
|
430
|
+
| `options.agentforceClientConfig` | `AgentforceClientConfig` | No | Configuration for the Agentforce client (see sub-properties below) |
|
|
431
|
+
| `agentforceClientConfig.agentId` | `string` | Yes\* | The agent to load — required in practice, will not work without it |
|
|
432
|
+
| `agentforceClientConfig.agentLabel` | `string` | No | Display name shown in the chat header. Falls back to the agent's configured name if omitted |
|
|
433
|
+
| `agentforceClientConfig.styleTokens` | `Record<string, string>` | No | Theme colors and style overrides (see Style Tokens section) |
|
|
434
|
+
| `agentforceClientConfig.renderingConfig.mode` | `"inline" \| "floating"` | No | Rendering mode. Defaults to `"floating"` |
|
|
435
|
+
| `agentforceClientConfig.renderingConfig.width` | `string \| number` | No | Width of the inline frame. Number values are treated as `px`, strings as CSS values (e.g. `"100%"`) |
|
|
436
|
+
| `agentforceClientConfig.renderingConfig.height` | `string \| number` | No | Height of the inline frame. Number values are treated as `px`, strings as CSS values (e.g. `"100%"`) |
|
|
437
|
+
| `agentforceClientConfig.renderingConfig.headerEnabled` | `boolean` | No | Show or hide the chat header bar. Defaults to hidden in inline mode. Set `true` to show it |
|
|
438
|
+
| `agentforceClientConfig.renderingConfig.showHeaderIcon` | `boolean` | No | Show or hide the icon in the header. Omit or set `false` to hide |
|
|
439
|
+
| `agentforceClientConfig.renderingConfig.showAvatar` | `boolean` | No | Show or hide avatars in message rows. Defaults to `true` |
|
|
440
|
+
| `agentforceClientConfig.renderingConfig.agentAvatarUrl` | `string` | No | Custom avatar image URL for agent messages |
|
|
441
|
+
| `agentforceClientConfig.renderingConfig.agentAvatarAltText` | `string` | No | Alt text for the custom agent avatar image |
|
|
442
|
+
| `agentforceClientConfig.renderingConfig.headerIconName` | `string` | No | SLDS icon name for the header (e.g. `"utility:agent"`) |
|
|
443
|
+
| `agentforceClientConfig.renderingConfig.headerIconSize` | `string` | No | Header icon size |
|
|
444
|
+
| `agentforceClientConfig.renderingConfig.headerImageUrl` | `string` | No | Custom header logo image URL |
|
|
445
|
+
| `agentforceClientConfig.renderingConfig.headerImageAlt` | `string` | No | Alt text for the custom header logo image |
|
|
446
|
+
| `agentforceClientConfig.channel` | `string` | No | Channel identifier for analytics/instrumentation |
|
|
447
|
+
| `agentforceClientConfig.messageInputPlaceholderText` | `string` | No | Custom placeholder text for the message input field |
|
|
448
|
+
| `agentforceClientConfig.isHistoryIntroNeeded` | `boolean` | No | Show a conversation history intro block |
|
|
449
|
+
| `agentforceClientConfig.typewriterConfig` | `TypewriterConfig` | No | Customize typewriter animation (see TypewriterConfig type below) |
|
|
450
|
+
| `agentforceClientConfig.floatingButtonLabel` | `string` | No | Label text for the floating action button (floating mode) |
|
|
451
|
+
| `agentforceClientConfig.floatingButtonIcon` | `string` | No | SLDS icon name for the FAB (e.g. `"utility:agent"`) |
|
|
452
|
+
| `agentforceClientConfig.floatingButtonImage` | `string` | No | URL to an external image (PNG/SVG) shown in place of the FAB icon |
|
|
453
|
+
| `agentforceClientConfig.floatingButtonImageAlt` | `string` | No | Alt text for the floating button image |
|
|
454
|
+
| `agentforceClientConfig.iconPosition` | `"left" \| "right"` | No | Icon position in the FAB. Defaults to `"left"` |
|
|
455
|
+
| `options.onReady` | `AgentforceReadyHandler` | No | Callback invoked when the Lightning Out application is ready. Receives the event detail |
|
|
456
|
+
| `options.onError` | `AgentforceErrorHandler` | No | Callback invoked on Lightning Out errors. Receives `{ type, detail }` with the error source and payload |
|
|
438
457
|
|
|
439
458
|
#### Returns
|
|
440
459
|
|
|
@@ -449,12 +468,20 @@ Embeds the Agentforce Conversation Client by creating a Lightning Out 2.0 app an
|
|
|
449
468
|
// Accepts any style property key-value pairs
|
|
450
469
|
type StyleTokens = Record<string, string>;
|
|
451
470
|
|
|
471
|
+
interface TypewriterConfig {
|
|
472
|
+
charsPerFrame?: number;
|
|
473
|
+
charsPerFrameMarkdown?: number;
|
|
474
|
+
queueThresholdMedium?: number;
|
|
475
|
+
queueThresholdHigh?: number;
|
|
476
|
+
queueThresholdCritical?: number;
|
|
477
|
+
frameDelayMs?: number;
|
|
478
|
+
idleCursorTimeoutMs?: number;
|
|
479
|
+
rushToEndMs?: number;
|
|
480
|
+
}
|
|
481
|
+
|
|
452
482
|
interface AgentforceClientConfig {
|
|
453
|
-
// styleTokens supports theming the Agentforce Conversation Client
|
|
454
483
|
styleTokens?: StyleTokens;
|
|
455
|
-
// The agent to load (required in practice)
|
|
456
484
|
agentId?: string;
|
|
457
|
-
// Display name shown in the chat header
|
|
458
485
|
agentLabel?: string;
|
|
459
486
|
renderingConfig?: {
|
|
460
487
|
mode?: "inline" | "floating";
|
|
@@ -463,7 +490,22 @@ interface AgentforceClientConfig {
|
|
|
463
490
|
headerEnabled?: boolean;
|
|
464
491
|
showHeaderIcon?: boolean;
|
|
465
492
|
showAvatar?: boolean;
|
|
493
|
+
agentAvatarUrl?: string;
|
|
494
|
+
agentAvatarAltText?: string;
|
|
495
|
+
headerIconName?: string;
|
|
496
|
+
headerIconSize?: string;
|
|
497
|
+
headerImageUrl?: string;
|
|
498
|
+
headerImageAlt?: string;
|
|
466
499
|
};
|
|
500
|
+
channel?: string;
|
|
501
|
+
messageInputPlaceholderText?: string;
|
|
502
|
+
isHistoryIntroNeeded?: boolean;
|
|
503
|
+
typewriterConfig?: TypewriterConfig;
|
|
504
|
+
floatingButtonLabel?: string;
|
|
505
|
+
floatingButtonIcon?: string;
|
|
506
|
+
floatingButtonImage?: string;
|
|
507
|
+
floatingButtonImageAlt?: string;
|
|
508
|
+
iconPosition?: "left" | "right";
|
|
467
509
|
}
|
|
468
510
|
|
|
469
511
|
// Error event passed to the onError callback
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,16 @@ export declare const RenderingMode: Readonly<{
|
|
|
15
15
|
}>;
|
|
16
16
|
export type RenderingModeValue = (typeof RenderingMode)[keyof typeof RenderingMode];
|
|
17
17
|
export type StyleTokens = Record<string, string>;
|
|
18
|
+
export interface TypewriterConfig {
|
|
19
|
+
charsPerFrame?: number;
|
|
20
|
+
charsPerFrameMarkdown?: number;
|
|
21
|
+
queueThresholdMedium?: number;
|
|
22
|
+
queueThresholdHigh?: number;
|
|
23
|
+
queueThresholdCritical?: number;
|
|
24
|
+
frameDelayMs?: number;
|
|
25
|
+
idleCursorTimeoutMs?: number;
|
|
26
|
+
rushToEndMs?: number;
|
|
27
|
+
}
|
|
18
28
|
export interface AgentforceClientConfig {
|
|
19
29
|
styleTokens?: StyleTokens;
|
|
20
30
|
agentId?: string;
|
|
@@ -26,8 +36,22 @@ export interface AgentforceClientConfig {
|
|
|
26
36
|
headerEnabled?: boolean;
|
|
27
37
|
showHeaderIcon?: boolean;
|
|
28
38
|
showAvatar?: boolean;
|
|
39
|
+
agentAvatarUrl?: string;
|
|
40
|
+
agentAvatarAltText?: string;
|
|
41
|
+
headerIconName?: string;
|
|
42
|
+
headerIconSize?: string;
|
|
43
|
+
headerImageUrl?: string;
|
|
44
|
+
headerImageAlt?: string;
|
|
29
45
|
};
|
|
30
46
|
channel?: string;
|
|
47
|
+
messageInputPlaceholderText?: string;
|
|
48
|
+
isHistoryIntroNeeded?: boolean;
|
|
49
|
+
typewriterConfig?: TypewriterConfig;
|
|
50
|
+
floatingButtonLabel?: string;
|
|
51
|
+
floatingButtonIcon?: string;
|
|
52
|
+
floatingButtonImage?: string;
|
|
53
|
+
floatingButtonImageAlt?: string;
|
|
54
|
+
iconPosition?: "left" | "right";
|
|
31
55
|
}
|
|
32
56
|
export interface AgentforceLoErrorEvent {
|
|
33
57
|
type: "lo.application.error" | "lo.iframe.error";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAMrE,eAAO,MAAM,6BAA6B,oCAAoC,CAAC;AAC/E,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAC7D,eAAO,MAAM,gCAAgC,kBAAkB,CAAC;AAChE,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,e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AC,EAAE,MAAM,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,sBAAsB,GAAG,iBAAiB,CAAC;IACjD,MAAM,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,MAAM,sBAAsB,GAAG,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;AAC7E,MAAM,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;AAE/D,MAAM,WAAW,4BAA4B;IAC5C,SAAS,EAAE,MAAM,GAAG,WAAW,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,OAAO,CAAC,EAAE,sBAAsB,CAAC;CACjC;AAED,MAAM,WAAW,2BAA2B;IAC3C,KAAK,EAAE,uBAAuB,CAAC;IAC/B,mBAAmB,EAAE,WAAW,CAAC;CACjC;AAyVD;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,CAAC,EAAE,4BAA4B,GAAG,IAAI,GAC3C,2BAA2B,CA6B7B"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/agentforce-conversation-client",
|
|
3
3
|
"description": "Agentforce Conversation Client SDK for embedding via Lightning Out 2.0",
|
|
4
|
-
"version": "9.
|
|
4
|
+
"version": "9.13.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|