@salesforce/webapp-template-app-react-template-b2e-experimental 1.90.2 → 1.90.4
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/CHANGELOG.md +16 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/package.json +4 -4
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/AgentforceConversationClient.tsx +15 -5
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.90.4](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.90.3...v1.90.4) (2026-03-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.90.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.90.2...v1.90.3) (2026-03-11)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [1.90.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.90.1...v1.90.2) (2026-03-11)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@salesforce/agentforce-conversation-client": "^1.90.
|
|
19
|
-
"@salesforce/sdk-data": "^1.90.
|
|
20
|
-
"@salesforce/webapp-experimental": "^1.90.
|
|
18
|
+
"@salesforce/agentforce-conversation-client": "^1.90.4",
|
|
19
|
+
"@salesforce/sdk-data": "^1.90.4",
|
|
20
|
+
"@salesforce/webapp-experimental": "^1.90.4",
|
|
21
21
|
"@tailwindcss/vite": "^4.1.17",
|
|
22
22
|
"@tanstack/react-form": "^1.28.4",
|
|
23
23
|
"class-variance-authority": "^0.7.1",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
42
42
|
"@graphql-tools/utils": "^11.0.0",
|
|
43
43
|
"@playwright/test": "^1.49.0",
|
|
44
|
-
"@salesforce/vite-plugin-webapp-experimental": "^1.90.
|
|
44
|
+
"@salesforce/vite-plugin-webapp-experimental": "^1.90.4",
|
|
45
45
|
"@testing-library/jest-dom": "^6.6.3",
|
|
46
46
|
"@testing-library/react": "^16.1.0",
|
|
47
47
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { embedAgentforceClient } from "@salesforce/agentforce-conversation-client";
|
|
8
|
-
import { useEffect } from "react";
|
|
8
|
+
import { useEffect, useRef } from "react";
|
|
9
9
|
import type {
|
|
10
10
|
ResolvedEmbedOptions,
|
|
11
11
|
AgentforceConversationClientProps,
|
|
@@ -57,14 +57,20 @@ export function AgentforceConversationClient({
|
|
|
57
57
|
salesforceOrigin,
|
|
58
58
|
frontdoorUrl,
|
|
59
59
|
}: AgentforceConversationClientProps) {
|
|
60
|
+
const containerRef = useRef<HTMLDivElement>(null);
|
|
61
|
+
const inline = agentforceClientConfig?.renderingConfig?.mode === "inline";
|
|
62
|
+
|
|
60
63
|
useEffect(() => {
|
|
61
64
|
const singleton = getSingleton();
|
|
62
65
|
if (singleton.initialized || singleton.initPromise) {
|
|
63
66
|
return;
|
|
64
67
|
}
|
|
65
68
|
|
|
69
|
+
if (inline && !containerRef.current) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
66
73
|
const initialize = (options: ResolvedEmbedOptions) => {
|
|
67
|
-
// If already initialized while this flow was in progress, no-op.
|
|
68
74
|
if (singleton.initialized) {
|
|
69
75
|
return;
|
|
70
76
|
}
|
|
@@ -73,7 +79,7 @@ export function AgentforceConversationClient({
|
|
|
73
79
|
singleton.initialized = true;
|
|
74
80
|
return;
|
|
75
81
|
}
|
|
76
|
-
const host = getOrCreateGlobalHost();
|
|
82
|
+
const host = inline ? containerRef.current! : getOrCreateGlobalHost();
|
|
77
83
|
|
|
78
84
|
embedAgentforceClient({
|
|
79
85
|
container: host,
|
|
@@ -119,9 +125,13 @@ export function AgentforceConversationClient({
|
|
|
119
125
|
// Intentionally no cleanup:
|
|
120
126
|
// This component guarantees a single LO initialization per window.
|
|
121
127
|
};
|
|
122
|
-
}, [salesforceOrigin, frontdoorUrl, agentforceClientConfig]);
|
|
128
|
+
}, [salesforceOrigin, frontdoorUrl, agentforceClientConfig, inline]);
|
|
129
|
+
|
|
130
|
+
if (!inline) {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
123
133
|
|
|
124
|
-
return
|
|
134
|
+
return <div ref={containerRef} />;
|
|
125
135
|
}
|
|
126
136
|
|
|
127
137
|
export default AgentforceConversationClient;
|
package/dist/package.json
CHANGED