@salesforce/agentforce-conversation-client 1.116.9 → 1.116.11
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 +63 -11
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.spec.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
# @salesforce/agentforce-conversation-client
|
|
1
|
+
# @salesforce/agentforce-conversation-client(Beta)
|
|
2
|
+
|
|
3
|
+
> **Beta**: This package is currently in beta. APIs and behavior may change in future releases.
|
|
2
4
|
|
|
3
5
|
Agentforce Conversation Client SDK for embedding the Agentforce chat experience into external applications. By default, Lightning Out 2.0 is embedded within the target container.
|
|
4
6
|
|
|
@@ -56,7 +58,7 @@ embedAgentforceClient({
|
|
|
56
58
|
container: "#agentforce-container",
|
|
57
59
|
salesforceOrigin: "https://myorg.my.salesforce.com",
|
|
58
60
|
agentforceClientConfig: {
|
|
59
|
-
renderingConfig: { mode: "floating" },
|
|
61
|
+
renderingConfig: { mode: "floating", showHeaderIcon: true },
|
|
60
62
|
},
|
|
61
63
|
});
|
|
62
64
|
|
|
@@ -70,6 +72,25 @@ embedAgentforceClient({
|
|
|
70
72
|
});
|
|
71
73
|
```
|
|
72
74
|
|
|
75
|
+
### Show Agentforce header icon
|
|
76
|
+
|
|
77
|
+
By default, the header icon is hidden when `showHeaderIcon` is not set.
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
import { embedAgentforceClient } from "@salesforce/agentforce-conversation-client";
|
|
81
|
+
|
|
82
|
+
embedAgentforceClient({
|
|
83
|
+
container: "#agentforce-container",
|
|
84
|
+
salesforceOrigin: "https://myorg.my.salesforce.com",
|
|
85
|
+
agentforceClientConfig: {
|
|
86
|
+
renderingConfig: {
|
|
87
|
+
mode: "floating",
|
|
88
|
+
showHeaderIcon: true, // set false (or omit) to hide the header icon
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
73
94
|
## Theming with `styleTokens`
|
|
74
95
|
|
|
75
96
|
Use `agentforceClientConfig.styleTokens` to theme the Agentforce Conversation Client. You do not need to provide all tokens—only the ones you want to override. Tokens are grouped by UI area:
|
|
@@ -93,15 +114,36 @@ const { loApp, chatClientComponent } = embedAgentforceClient({
|
|
|
93
114
|
|
|
94
115
|
### Agentforce Header
|
|
95
116
|
|
|
96
|
-
| Token name
|
|
97
|
-
|
|
|
98
|
-
| `headerBlockBackground`
|
|
99
|
-
| `headerBlockBorderColor`
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
102
|
-
| `
|
|
103
|
-
| `
|
|
104
|
-
| `
|
|
117
|
+
| Token name | UI area themed |
|
|
118
|
+
| ------------------------------- | ---------------------------------- |
|
|
119
|
+
| `headerBlockBackground` | Header background |
|
|
120
|
+
| `headerBlockBorderColor` | Header border |
|
|
121
|
+
| `headerBlockBorderRadius` | Header corner radius |
|
|
122
|
+
| `headerBlockPadding` | Header inner padding |
|
|
123
|
+
| `headerBlockMinHeight` | Header minimum height |
|
|
124
|
+
| `headerBlockSideMinWidth` | Header side area minimum width |
|
|
125
|
+
| `headerBlockCenterGap` | Header center content gap |
|
|
126
|
+
| `headerBlockCenterMargin` | Header center content margin |
|
|
127
|
+
| `headerBlockFontFamily` | Header font family |
|
|
128
|
+
| `headerBlockFontWeight` | Header title font weight |
|
|
129
|
+
| `headerBlockFontSize` | Header title font size |
|
|
130
|
+
| `headerBlockLineHeight` | Header title line height |
|
|
131
|
+
| `headerBlockTextColor` | Header text color |
|
|
132
|
+
| `headerBlockIconDisplay` | Header icon display |
|
|
133
|
+
| `headerBlockIconMargin` | Header icon margin |
|
|
134
|
+
| `headerBlockIconColor` | Header icon color |
|
|
135
|
+
| `headerBlockIconWidth` | Header icon width |
|
|
136
|
+
| `headerBlockIconHeight` | Header icon height |
|
|
137
|
+
| `headerBlockLogoMaxHeight` | Header logo max height |
|
|
138
|
+
| `headerBlockLogoMaxWidth` | Header logo max width |
|
|
139
|
+
| `headerBlockLogoMinWidth` | Header logo min width |
|
|
140
|
+
| `headerBlockButtonHeight` | Header action button height |
|
|
141
|
+
| `headerBlockButtonWidth` | Header action button width |
|
|
142
|
+
| `headerBlockButtonPadding` | Header action button padding |
|
|
143
|
+
| `headerBlockButtonBorderRadius` | Header action button border radius |
|
|
144
|
+
| `headerBlockHoverBackground` | Header hover background |
|
|
145
|
+
| `headerBlockActiveBackground` | Header active background |
|
|
146
|
+
| `headerBlockFocusBorder` | Header focus border |
|
|
105
147
|
|
|
106
148
|
### Agentforce Messages
|
|
107
149
|
|
|
@@ -118,6 +160,13 @@ const { loApp, chatClientComponent } = embedAgentforceClient({
|
|
|
118
160
|
| `messageBlockBackgroundColor` | Message block background (base) |
|
|
119
161
|
| `messageBlockBodyWidth` | Message block body width |
|
|
120
162
|
|
|
163
|
+
### Avatar visibility (behavioral config)
|
|
164
|
+
|
|
165
|
+
Use `renderingConfig.showAvatar` to control whether avatars are rendered in message rows.
|
|
166
|
+
|
|
167
|
+
- `showAvatar: true` (default) renders avatars.
|
|
168
|
+
- `showAvatar: false` hides avatars by removing them from the DOM.
|
|
169
|
+
|
|
121
170
|
### Inbound message (customer → agent)
|
|
122
171
|
|
|
123
172
|
| Token name | UI area themed |
|
|
@@ -267,6 +316,9 @@ interface AgentforceClientConfig {
|
|
|
267
316
|
mode?: "inline" | "floating";
|
|
268
317
|
width?: string | number;
|
|
269
318
|
height?: string | number;
|
|
319
|
+
headerEnabled?: boolean;
|
|
320
|
+
showHeaderIcon?: boolean;
|
|
321
|
+
showAvatar?: boolean;
|
|
270
322
|
};
|
|
271
323
|
}
|
|
272
324
|
|
package/dist/index.d.ts
CHANGED
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,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MAAM,EAAE,MAAM,CAAC,CAAC;AAEjD,MAAM,WAAW,sBAAsB;IACtC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE;QACjB,IAAI,CAAC,EAAE,kBAAkB,CAAC;QAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACzB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB,CAAC;CACF;AAED,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,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;CAChD;AAED,MAAM,WAAW,2BAA2B;IAC3C,KAAK,EAAE,uBAAuB,CAAC;IAC/B,mBAAmB,EAAE,WAAW,CAAC;CACjC;AAiUD;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,CAAC,EAAE,4BAA4B,GAAG,IAAI,GAC3C,2BAA2B,CAuB7B"}
|
package/dist/index.spec.js
CHANGED
|
@@ -113,7 +113,11 @@ describe("Agentforce Conversation Client SDK", () => {
|
|
|
113
113
|
it("passes agentforceClientConfig to the component", () => {
|
|
114
114
|
const config = {
|
|
115
115
|
styleTokens: { MessageBlockInboundColor: "#0176d3" },
|
|
116
|
-
renderingConfig: {
|
|
116
|
+
renderingConfig: {
|
|
117
|
+
mode: "inline",
|
|
118
|
+
showHeaderIcon: false,
|
|
119
|
+
showAvatar: false,
|
|
120
|
+
},
|
|
117
121
|
};
|
|
118
122
|
const result = embedAgentforceClient({
|
|
119
123
|
container: "#test-container",
|
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": "1.116.
|
|
4
|
+
"version": "1.116.11",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|