@salesforce/ui-bundle-template-app-react-template-b2x 11.51.0 → 11.53.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/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
+ ## [11.53.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.52.0...v11.53.0) (2026-08-11)
7
+
8
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
9
+
10
+
11
+
12
+
13
+
14
+ ## [11.52.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.51.0...v11.52.0) (2026-08-09)
15
+
16
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
17
+
18
+
19
+
20
+
21
+
6
22
  ## [11.51.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.50.0...v11.51.0) (2026-08-07)
7
23
 
8
24
  **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
package/dist/PRD.md CHANGED
@@ -10,7 +10,7 @@ Building a customer-facing portal on Salesforce usually means solving the hard p
10
10
 
11
11
  ## Solution
12
12
 
13
- A minimal external-facing starter with everything already in place: the app framework, a full sign-in experience with protected private areas, the public site setup, and a single example feature — Account search — that shows how the app displays Salesforce data. The sign-in and site setup are done for you so teams can focus on the customer experience, and the Account example serves as a template for building their own features.
13
+ A minimal external-facing starter with everything already in place: the app framework, a full sign-in experience with protected private areas, a built-in Agentforce chat assistant, the public site setup, and a single example feature — Account search — that shows how the app displays Salesforce data. The sign-in and site setup are done for you so teams can focus on the customer experience, and the Account example serves as a template for building their own features.
14
14
 
15
15
  ### Core Features
16
16
 
@@ -18,8 +18,8 @@
18
18
  "graphql:schema": "node scripts/get-graphql-schema.mjs"
19
19
  },
20
20
  "dependencies": {
21
- "@salesforce/platform-sdk": "^11.51.0",
22
- "@salesforce/ui-bundle": "^11.51.0",
21
+ "@salesforce/platform-sdk": "^11.53.0",
22
+ "@salesforce/ui-bundle": "^11.53.0",
23
23
  "@tailwindcss/vite": "^4.1.17",
24
24
  "class-variance-authority": "^0.7.1",
25
25
  "clsx": "^2.1.1",
@@ -46,8 +46,8 @@
46
46
  "@graphql-eslint/eslint-plugin": "^4.1.0",
47
47
  "@graphql-tools/utils": "^11.0.0",
48
48
  "@playwright/test": "^1.49.0",
49
- "@salesforce/graphiti": "^11.51.0",
50
- "@salesforce/vite-plugin-ui-bundle": "^11.51.0",
49
+ "@salesforce/graphiti": "^11.53.0",
50
+ "@salesforce/vite-plugin-ui-bundle": "^11.53.0",
51
51
  "@testing-library/jest-dom": "^6.6.3",
52
52
  "@testing-library/react": "^16.1.0",
53
53
  "@testing-library/user-event": "^14.5.2",
@@ -3,6 +3,7 @@ import { getAllRoutes } from "./router-utils";
3
3
  import { useState } from "react";
4
4
  import { AuthMenu } from "./features/authentication/menu/AuthMenu";
5
5
  import { Button } from "./components/ui/button";
6
+ import CustomerWebClientChat from "./components/CustomerWebClientChat";
6
7
 
7
8
  export default function AppLayout() {
8
9
  const [isOpen, setIsOpen] = useState(false);
@@ -83,6 +84,12 @@ export default function AppLayout() {
83
84
  </div>
84
85
  </nav>
85
86
  <Outlet />
87
+ <CustomerWebClientChat
88
+ orgId="<ORG_ID_15_OR_18_CHAR_00D...>"
89
+ deploymentName="<EMBEDDED_SERVICE_DEPLOYMENT_NAME>"
90
+ siteURL="<SITE_URL>"
91
+ scrt2URL="<SCRT2_URL>"
92
+ />
86
93
  </>
87
94
  );
88
95
  }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+
7
+ import { useEffect } from "react";
8
+ import type { CustomerWebClientChatProps, WindowWithCwcProperties } from "../types/chat";
9
+
10
+ /**
11
+ * React wrapper that embeds the Customer Web Client (Embedded Messaging) chat
12
+ * widget into an external site. It dynamically loads the site's
13
+ * `embeddedservice_bootstrap` script and calls `init` with the org, deployment,
14
+ * site, and SCRT2 configuration. Renders nothing itself — the chat UI is a
15
+ * floating widget injected by the bootstrap script.
16
+ */
17
+ export function CustomerWebClientChat({
18
+ orgId,
19
+ deploymentName,
20
+ siteURL,
21
+ scrt2URL,
22
+ language = "en",
23
+ devMode = false,
24
+ }: CustomerWebClientChatProps) {
25
+ useEffect(() => {
26
+ if (typeof window === "undefined") return;
27
+ if (
28
+ !orgId ||
29
+ !deploymentName ||
30
+ !siteURL ||
31
+ !scrt2URL ||
32
+ !(orgId.length === 15 || orgId.length === 18)
33
+ ) {
34
+ console.warn("[CustomerWebClientChat] missing required config; skipping init");
35
+ return;
36
+ }
37
+
38
+ const win = window as WindowWithCwcProperties;
39
+ const bootstrapSrc = `${siteURL}/assets/js/bootstrap.js`;
40
+ const existing = document.querySelector<HTMLScriptElement>(`script[src="${bootstrapSrc}"]`);
41
+ const script: HTMLScriptElement = existing ?? document.createElement("script");
42
+
43
+ const init = () => {
44
+ try {
45
+ if (!win.embeddedservice_bootstrap) return;
46
+ win.embeddedservice_bootstrap.settings.language = language;
47
+ if (devMode) win.embeddedservice_bootstrap.settings.devMode = true;
48
+ win.embeddedservice_bootstrap.init(orgId, deploymentName, siteURL, {
49
+ scrt2URL,
50
+ });
51
+ } catch (err) {
52
+ console.error("Error loading Embedded Messaging: ", err);
53
+ }
54
+ };
55
+
56
+ if (existing) {
57
+ if (win.embeddedservice_bootstrap) init();
58
+ else existing.addEventListener("load", init, { once: true });
59
+ } else {
60
+ script.type = "text/javascript";
61
+ script.src = bootstrapSrc;
62
+ script.addEventListener("load", init, { once: true });
63
+ document.body.appendChild(script);
64
+ }
65
+
66
+ return () => {
67
+ script.removeEventListener("load", init);
68
+ };
69
+ }, [orgId, deploymentName, siteURL, scrt2URL, language, devMode]);
70
+
71
+ return null;
72
+ }
73
+
74
+ export default CustomerWebClientChat;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * feature-react-customer-web-client-chat – Customer Web Client (Embedded Messaging) chat
3
+ */
4
+
5
+ export { CustomerWebClientChat } from "./components/CustomerWebClientChat";
6
+ export type { CustomerWebClientChatProps } from "./types/chat";
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+
7
+ import CustomerWebClientChat from "../components/CustomerWebClientChat";
8
+
9
+ export default function TestChatPage() {
10
+ return (
11
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
12
+ <div className="text-center">
13
+ <h1 className="text-4xl font-bold text-gray-900 mb-4">Chat</h1>
14
+ <p className="text-lg text-gray-600 mb-8">
15
+ Welcome to your Customer Web Client chat application.
16
+ </p>
17
+ </div>
18
+ <CustomerWebClientChat
19
+ orgId="<ORG_ID_15_OR_18_CHAR_00D...>"
20
+ deploymentName="<EMBEDDED_SERVICE_DEPLOYMENT_NAME>"
21
+ siteURL="<SITE_URL>"
22
+ scrt2URL="<SCRT2_URL>"
23
+ />
24
+ </div>
25
+ );
26
+ }
@@ -9,6 +9,7 @@ import Profile from "./features/authentication/pages/Profile";
9
9
  import ChangePassword from "./features/authentication/pages/ChangePassword";
10
10
  import PrivateRoute from "./features/authentication/layouts/privateRouteLayout";
11
11
  import { ROUTES } from "./features/authentication/authenticationConfig";
12
+ import TestChatPage from "./pages/TestChatPage";
12
13
  import AuthAppLayout from "./features/authentication/layouts/AuthAppLayout";
13
14
  import AccountSearch from "./pages/AccountSearch";
14
15
  import AccountObjectDetail from "./pages/AccountObjectDetailPage";
@@ -58,6 +59,11 @@ export const routes: RouteObject[] = [
58
59
  }
59
60
  ]
60
61
  },
62
+ {
63
+ path: "test-chat",
64
+ element: <TestChatPage />,
65
+ handle: { showInNavigation: true, label: "Test Chat" }
66
+ },
61
67
  {
62
68
  path: "accounts/:recordId",
63
69
  element: <AccountObjectDetail />
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+
7
+ /** Shape of the Embedded Messaging bootstrap global injected by the site's bootstrap.js. */
8
+ export interface WindowWithCwcProperties extends Window {
9
+ embeddedservice_bootstrap?: {
10
+ settings: {
11
+ language: string;
12
+ devMode?: boolean;
13
+ };
14
+ init: (
15
+ orgId: string,
16
+ deploymentName: string,
17
+ siteURL: string,
18
+ options: { scrt2URL: string },
19
+ ) => void;
20
+ };
21
+ }
22
+
23
+ export interface CustomerWebClientChatProps {
24
+ /** The organization id (15- or 18-char Salesforce id starting with `00D`). */
25
+ orgId: string;
26
+ /** The Embedded Service deployment / channel name the agent is connected to. */
27
+ deploymentName: string;
28
+ /** The ESW site URL. Usually contains `ESW` and the deployment name. */
29
+ siteURL: string;
30
+ /** The SCRT2 (Service Cloud Real-Time) chat service URL. Usually contains `scrt`. */
31
+ scrt2URL: string;
32
+ /** Optional chat language. Defaults to `"en"`. */
33
+ language?: string;
34
+ /** Optional. Enables Embedded Messaging dev mode. Defaults to `false`. */
35
+ devMode?: boolean;
36
+ }
@@ -1 +1 @@
1
- {"root":["./src/app.tsx","./src/appLayout.tsx","./src/navigationMenu.tsx","./src/router-utils.tsx","./src/routes.tsx","./src/api/graphqlClient.ts","./src/components/ObjectBreadcrumb.tsx","./src/components/alerts/status-alert.tsx","./src/components/layouts/card-layout.tsx","./src/components/ui/alert.tsx","./src/components/ui/avatar.tsx","./src/components/ui/badge.tsx","./src/components/ui/breadcrumb.tsx","./src/components/ui/button.tsx","./src/components/ui/calendar.tsx","./src/components/ui/card.tsx","./src/components/ui/checkbox.tsx","./src/components/ui/collapsible.tsx","./src/components/ui/datePicker.tsx","./src/components/ui/dialog.tsx","./src/components/ui/dropdown-menu.tsx","./src/components/ui/field.tsx","./src/components/ui/index.ts","./src/components/ui/input.tsx","./src/components/ui/label.tsx","./src/components/ui/pagination.tsx","./src/components/ui/popover.tsx","./src/components/ui/select.tsx","./src/components/ui/separator.tsx","./src/components/ui/skeleton.tsx","./src/components/ui/sonner.tsx","./src/components/ui/spinner.tsx","./src/components/ui/table.tsx","./src/components/ui/tabs.tsx","./src/features/authentication/authHelpers.ts","./src/features/authentication/authenticationConfig.ts","./src/features/authentication/api/userProfileApi.ts","./src/features/authentication/context/AuthContext.tsx","./src/features/authentication/footers/footer-link.tsx","./src/features/authentication/forms/auth-form.tsx","./src/features/authentication/forms/submit-button.tsx","./src/features/authentication/hooks/form.tsx","./src/features/authentication/hooks/useCountdownTimer.ts","./src/features/authentication/hooks/useRetryWithBackoff.ts","./src/features/authentication/layout/centered-page-layout.tsx","./src/features/authentication/layouts/AuthAppLayout.tsx","./src/features/authentication/layouts/privateRouteLayout.tsx","./src/features/authentication/menu/AuthMenu.tsx","./src/features/authentication/pages/ChangePassword.tsx","./src/features/authentication/pages/ForgotPassword.tsx","./src/features/authentication/pages/Login.tsx","./src/features/authentication/pages/Profile.tsx","./src/features/authentication/pages/Register.tsx","./src/features/authentication/pages/ResetPassword.tsx","./src/features/authentication/sessionTimeout/SessionTimeoutValidator.tsx","./src/features/authentication/sessionTimeout/sessionTimeService.ts","./src/features/authentication/sessionTimeout/sessionTimeoutConfig.ts","./src/features/authentication/utils/helpers.ts","./src/features/search/index.ts","./src/features/search/loadConfig.ts","./src/features/search/queryBuilder.ts","./src/features/search/types.ts","./src/features/search/api/distinctValuesService.ts","./src/features/search/api/searchService.ts","./src/features/search/components/MergedSearchResults.tsx","./src/features/search/components/Search.tsx","./src/features/search/components/SearchResults.tsx","./src/features/search/components/SourceSection.tsx","./src/features/search/components/controls/PaginationControls.tsx","./src/features/search/components/controls/ScopeSelector.tsx","./src/features/search/components/controls/SearchBar.tsx","./src/features/search/components/controls/SortControl.tsx","./src/features/search/components/filters/ActiveFilters.tsx","./src/features/search/components/filters/DefaultFilterPanel.tsx","./src/features/search/components/filters/FilterContext.tsx","./src/features/search/components/filters/inputs/BooleanFilter.tsx","./src/features/search/components/filters/inputs/DateRangeFilter.tsx","./src/features/search/components/filters/inputs/FilterFieldWrapper.tsx","./src/features/search/components/filters/inputs/MultiSelectFilter.tsx","./src/features/search/components/filters/inputs/NumericRangeFilter.tsx","./src/features/search/components/filters/inputs/SelectFilter.tsx","./src/features/search/components/filters/inputs/TextFilter.tsx","./src/features/search/components/results/DefaultResultRow.tsx","./src/features/search/hooks/useAsyncData.ts","./src/features/search/hooks/useDistinctValues.ts","./src/features/search/hooks/useSearch.ts","./src/features/search/utils/debounce.ts","./src/features/search/utils/fieldUtils.ts","./src/features/search/utils/filterUtils.ts","./src/features/search/utils/sortUtils.ts","./src/hooks/useAsyncData.ts","./src/lib/utils.ts","./src/pages/AccountObjectDetailPage.tsx","./src/pages/AccountSearch.tsx","./src/pages/Home.tsx","./src/pages/NotFound.tsx","./src/utils/accountFields.ts","./e2e/app.spec.ts","./vite-env.d.ts","./vitest-env.d.ts","./vitest.setup.ts","../../../../../../../../../sdk/platform-sdk/types/env.d.ts"],"version":"5.9.3"}
1
+ {"root":["./src/app.tsx","./src/appLayout.tsx","./src/navigationMenu.tsx","./src/router-utils.tsx","./src/routes.tsx","./src/api/graphqlClient.ts","./src/components/ObjectBreadcrumb.tsx","./src/components/alerts/status-alert.tsx","./src/components/layouts/card-layout.tsx","./src/components/ui/alert.tsx","./src/components/ui/avatar.tsx","./src/components/ui/badge.tsx","./src/components/ui/breadcrumb.tsx","./src/components/ui/button.tsx","./src/components/ui/calendar.tsx","./src/components/ui/card.tsx","./src/components/ui/checkbox.tsx","./src/components/ui/collapsible.tsx","./src/components/ui/datePicker.tsx","./src/components/ui/dialog.tsx","./src/components/ui/dropdown-menu.tsx","./src/components/ui/field.tsx","./src/components/ui/index.ts","./src/components/ui/input.tsx","./src/components/ui/label.tsx","./src/components/ui/pagination.tsx","./src/components/ui/popover.tsx","./src/components/ui/select.tsx","./src/components/ui/separator.tsx","./src/components/ui/skeleton.tsx","./src/components/ui/sonner.tsx","./src/components/ui/spinner.tsx","./src/components/ui/table.tsx","./src/components/ui/tabs.tsx","./src/features/authentication/authHelpers.ts","./src/features/authentication/authenticationConfig.ts","./src/features/authentication/api/userProfileApi.ts","./src/features/authentication/components/SocialLogin.tsx","./src/features/authentication/context/AuthContext.tsx","./src/features/authentication/footers/footer-link.tsx","./src/features/authentication/forms/auth-form.tsx","./src/features/authentication/forms/submit-button.tsx","./src/features/authentication/hooks/form.tsx","./src/features/authentication/hooks/useCountdownTimer.ts","./src/features/authentication/hooks/useRetryWithBackoff.ts","./src/features/authentication/layout/centered-page-layout.tsx","./src/features/authentication/layouts/AuthAppLayout.tsx","./src/features/authentication/layouts/privateRouteLayout.tsx","./src/features/authentication/menu/AuthMenu.tsx","./src/features/authentication/pages/ChangePassword.tsx","./src/features/authentication/pages/ForgotPassword.tsx","./src/features/authentication/pages/Login.tsx","./src/features/authentication/pages/Profile.tsx","./src/features/authentication/pages/Register.tsx","./src/features/authentication/pages/ResetPassword.tsx","./src/features/authentication/sessionTimeout/SessionTimeoutValidator.tsx","./src/features/authentication/sessionTimeout/sessionTimeService.ts","./src/features/authentication/sessionTimeout/sessionTimeoutConfig.ts","./src/features/authentication/utils/helpers.ts","./src/features/search/index.ts","./src/features/search/loadConfig.ts","./src/features/search/queryBuilder.ts","./src/features/search/types.ts","./src/features/search/api/distinctValuesService.ts","./src/features/search/api/searchService.ts","./src/features/search/components/MergedSearchResults.tsx","./src/features/search/components/Search.tsx","./src/features/search/components/SearchResults.tsx","./src/features/search/components/SourceSection.tsx","./src/features/search/components/controls/PaginationControls.tsx","./src/features/search/components/controls/ScopeSelector.tsx","./src/features/search/components/controls/SearchBar.tsx","./src/features/search/components/controls/SortControl.tsx","./src/features/search/components/filters/ActiveFilters.tsx","./src/features/search/components/filters/DefaultFilterPanel.tsx","./src/features/search/components/filters/FilterContext.tsx","./src/features/search/components/filters/inputs/BooleanFilter.tsx","./src/features/search/components/filters/inputs/DateRangeFilter.tsx","./src/features/search/components/filters/inputs/FilterFieldWrapper.tsx","./src/features/search/components/filters/inputs/MultiSelectFilter.tsx","./src/features/search/components/filters/inputs/NumericRangeFilter.tsx","./src/features/search/components/filters/inputs/SelectFilter.tsx","./src/features/search/components/filters/inputs/TextFilter.tsx","./src/features/search/components/results/DefaultResultRow.tsx","./src/features/search/hooks/useAsyncData.ts","./src/features/search/hooks/useDistinctValues.ts","./src/features/search/hooks/useSearch.ts","./src/features/search/utils/debounce.ts","./src/features/search/utils/fieldUtils.ts","./src/features/search/utils/filterUtils.ts","./src/features/search/utils/sortUtils.ts","./src/hooks/useAsyncData.ts","./src/lib/utils.ts","./src/pages/AccountObjectDetailPage.tsx","./src/pages/AccountSearch.tsx","./src/pages/Home.tsx","./src/pages/NotFound.tsx","./src/utils/accountFields.ts","./e2e/app.spec.ts","./vite-env.d.ts","./vitest-env.d.ts","./vitest.setup.ts","../../../../../../../../../sdk/platform-sdk/types/env.d.ts"],"version":"5.9.3"}
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@salesforce/ui-bundle-template-base-sfdx-project",
3
- "version": "11.51.0",
3
+ "version": "11.53.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@salesforce/ui-bundle-template-base-sfdx-project",
9
- "version": "11.51.0",
9
+ "version": "11.53.0",
10
10
  "license": "SEE LICENSE IN LICENSE.txt",
11
11
  "dependencies": {
12
12
  "fast-xml-parser": "^5.9.3",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/ui-bundle-template-base-sfdx-project",
3
- "version": "11.51.0",
3
+ "version": "11.53.0",
4
4
  "description": "Base SFDX project template",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "publishConfig": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/ui-bundle-template-app-react-template-b2x",
3
- "version": "11.51.0",
3
+ "version": "11.53.0",
4
4
  "description": "Salesforce React external app template",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "",