@salesforce/templates 66.7.6 → 66.7.8

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.
Files changed (34) hide show
  1. package/lib/templates/project/reactexternalapp/AGENT.md +84 -25
  2. package/lib/templates/project/reactexternalapp/CHANGELOG.md +126 -0
  3. package/lib/templates/project/reactexternalapp/README.md +60 -5
  4. package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/package.json +6 -3
  5. package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/filterUtils.ts +10 -1
  6. package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/menu/AuthMenu.tsx +93 -0
  7. package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/appLayout.tsx +81 -76
  8. package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/components/ui/avatar.tsx +109 -0
  9. package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/components/ui/dropdown-menu.tsx +257 -0
  10. package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/components/ui/index.ts +25 -0
  11. package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/routes.tsx +2 -2
  12. package/lib/templates/project/reactexternalapp/package.json +2 -2
  13. package/lib/templates/project/reactexternalapp/scripts/gitignore-templates.json +4 -0
  14. package/lib/templates/project/reactexternalapp/scripts/{setup-cli.mjs → org-setup.mjs} +45 -6
  15. package/lib/templates/project/reactexternalapp/scripts/sf-project-setup.mjs +40 -1
  16. package/lib/templates/project/reactinternalapp/AGENT.md +84 -25
  17. package/lib/templates/project/reactinternalapp/CHANGELOG.md +126 -0
  18. package/lib/templates/project/reactinternalapp/README.md +61 -6
  19. package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/package.json +6 -3
  20. package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/_os_/utils/filterUtils.ts +10 -1
  21. package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/components/AgentforceConversationClient.tsx +37 -3
  22. package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/components/ui/avatar.tsx +109 -0
  23. package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/components/ui/dropdown-menu.tsx +257 -0
  24. package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/components/ui/index.ts +25 -0
  25. package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/types/conversation.ts +2 -0
  26. package/lib/templates/project/reactinternalapp/package.json +2 -2
  27. package/lib/templates/project/reactinternalapp/scripts/gitignore-templates.json +4 -0
  28. package/lib/templates/project/reactinternalapp/scripts/{setup-cli.mjs → org-setup.mjs} +45 -6
  29. package/lib/templates/project/reactinternalapp/scripts/sf-project-setup.mjs +40 -1
  30. package/lib/templates/uiBundles/reactbasic/package.json +6 -3
  31. package/lib/templates/uiBundles/reactbasic/src/components/ui/avatar.tsx +109 -0
  32. package/lib/templates/uiBundles/reactbasic/src/components/ui/dropdown-menu.tsx +257 -0
  33. package/lib/templates/uiBundles/reactbasic/src/components/ui/index.ts +25 -0
  34. package/package.json +6 -6
@@ -4,11 +4,11 @@
4
4
  * Use this script to make setup easier for each app generated from this template.
5
5
  *
6
6
  * Usage:
7
- * node scripts/setup-cli.mjs --target-org <alias> # interactive step picker (all selected)
8
- * node scripts/setup-cli.mjs --target-org <alias> --yes # skip picker, run all steps
9
- * node scripts/setup-cli.mjs --target-org afv5 --skip-login
10
- * node scripts/setup-cli.mjs --target-org afv5 --skip-data --skip-ui-bundle-build
11
- * node scripts/setup-cli.mjs --target-org myorg --ui-bundle-name my-app
7
+ * node scripts/org-setup.mjs --target-org <alias> # interactive step picker (all selected)
8
+ * node scripts/org-setup.mjs --target-org <alias> --yes # skip picker, run all steps
9
+ * node scripts/org-setup.mjs --target-org afv5 --skip-login
10
+ * node scripts/org-setup.mjs --target-org afv5 --skip-data --skip-ui-bundle-build
11
+ * node scripts/org-setup.mjs --target-org myorg --ui-bundle-name my-app
12
12
  *
13
13
  * Steps (in order):
14
14
  * 1. login — sf org login web only if org not already connected (skip with --skip-login)
@@ -28,6 +28,32 @@ import { readdirSync, existsSync, readFileSync, writeFileSync, unlinkSync } from
28
28
  const __dirname = dirname(fileURLToPath(import.meta.url));
29
29
  const ROOT = resolve(__dirname, '..');
30
30
 
31
+ /**
32
+ * npm strips .gitignore from published packages — generate them on first run.
33
+ * Templates are stored in scripts/gitignore-templates.json (generated at build
34
+ * time from the actual .gitignore files) so the content lives in one place.
35
+ * The JSON may not exist in git-cloned distributions where .gitignore is
36
+ * already present, so loading is best-effort.
37
+ */
38
+ function loadGitignoreTemplates() {
39
+ const templatesPath = resolve(__dirname, 'gitignore-templates.json');
40
+ if (!existsSync(templatesPath)) return null;
41
+ try {
42
+ return JSON.parse(readFileSync(templatesPath, 'utf8'));
43
+ } catch {
44
+ return null;
45
+ }
46
+ }
47
+
48
+ function ensureGitignore(dir, content) {
49
+ if (!content) return;
50
+ const gitignorePath = resolve(dir, '.gitignore');
51
+ if (!existsSync(gitignorePath)) {
52
+ writeFileSync(gitignorePath, content, 'utf8');
53
+ console.log(`Created .gitignore in ${dir}`);
54
+ }
55
+ }
56
+
31
57
  function resolveSfdxSource() {
32
58
  const sfdxPath = resolve(ROOT, 'sfdx-project.json');
33
59
  if (!existsSync(sfdxPath)) {
@@ -84,7 +110,7 @@ function parseArgs() {
84
110
  Setup CLI — one-command setup for apps in this project
85
111
 
86
112
  Usage:
87
- node scripts/setup-cli.mjs --target-org <alias> [options]
113
+ node scripts/org-setup.mjs --target-org <alias> [options]
88
114
 
89
115
  Required:
90
116
  --target-org <alias> Target Salesforce org alias (e.g. myorg)
@@ -292,6 +318,19 @@ function run(name, cmd, args, opts = {}) {
292
318
  }
293
319
 
294
320
  async function main() {
321
+ // Ensure .gitignore files exist (npm strips them from published packages).
322
+ const gitignoreTemplates = loadGitignoreTemplates();
323
+ if (gitignoreTemplates) {
324
+ ensureGitignore(ROOT, gitignoreTemplates.sfdx);
325
+ if (existsSync(UIBUNDLES_DIR)) {
326
+ for (const entry of readdirSync(UIBUNDLES_DIR, { withFileTypes: true })) {
327
+ if (entry.isDirectory() && !entry.name.startsWith('.')) {
328
+ ensureGitignore(resolve(UIBUNDLES_DIR, entry.name), gitignoreTemplates.webapp);
329
+ }
330
+ }
331
+ }
332
+ }
333
+
295
334
  const {
296
335
  targetOrg,
297
336
  uiBundleName,
@@ -10,11 +10,36 @@
10
10
  import { spawnSync } from 'node:child_process';
11
11
  import { resolve, dirname } from 'node:path';
12
12
  import { fileURLToPath } from 'node:url';
13
- import { readdirSync, existsSync, readFileSync } from 'node:fs';
13
+ import { readdirSync, existsSync, readFileSync, writeFileSync } from 'node:fs';
14
14
 
15
15
  const __dirname = dirname(fileURLToPath(import.meta.url));
16
16
  const ROOT = resolve(__dirname, '..');
17
17
 
18
+ /**
19
+ * npm strips .gitignore from published packages — generate them on first run.
20
+ * Templates are stored in scripts/gitignore-templates.json (generated at build
21
+ * time from the actual .gitignore files). The JSON may not exist in git-cloned
22
+ * distributions where .gitignore is already present, so loading is best-effort.
23
+ */
24
+ function loadGitignoreTemplates() {
25
+ const templatesPath = resolve(__dirname, 'gitignore-templates.json');
26
+ if (!existsSync(templatesPath)) return null;
27
+ try {
28
+ return JSON.parse(readFileSync(templatesPath, 'utf8'));
29
+ } catch {
30
+ return null;
31
+ }
32
+ }
33
+
34
+ function ensureGitignore(dir, content) {
35
+ if (!content) return;
36
+ const gitignorePath = resolve(dir, '.gitignore');
37
+ if (!existsSync(gitignorePath)) {
38
+ writeFileSync(gitignorePath, content, 'utf8');
39
+ console.log(`Created .gitignore in ${dir}`);
40
+ }
41
+ }
42
+
18
43
  function resolveUIBundlesDir() {
19
44
  const sfdxPath = resolve(ROOT, 'sfdx-project.json');
20
45
  if (!existsSync(sfdxPath)) {
@@ -56,6 +81,20 @@ function run(label, cmd, args, opts) {
56
81
  }
57
82
  }
58
83
 
84
+ // Ensure .gitignore files exist (npm strips them from published packages).
85
+ const gitignoreTemplates = loadGitignoreTemplates();
86
+ if (gitignoreTemplates) {
87
+ ensureGitignore(ROOT, gitignoreTemplates.sfdx);
88
+ const bundlesDir = resolveUIBundlesDir();
89
+ if (existsSync(bundlesDir)) {
90
+ for (const entry of readdirSync(bundlesDir, { withFileTypes: true })) {
91
+ if (entry.isDirectory() && !entry.name.startsWith('.')) {
92
+ ensureGitignore(resolve(bundlesDir, entry.name), gitignoreTemplates.webapp);
93
+ }
94
+ }
95
+ }
96
+ }
97
+
59
98
  const uiBundleDir = discoverUIBundleDir();
60
99
  console.log('SFDX project root:', ROOT);
61
100
  console.log('UI bundle directory:', uiBundleDir);
@@ -19,7 +19,7 @@ Replace `<appName>` with the actual folder name found under `uiBundles/`. The so
19
19
  ├── sfdx-project.json
20
20
  ├── package.json # SFDX root scripts
21
21
  ├── scripts/
22
- │ ├── setup-cli.mjs # One-command setup (deploy, schema, build)
22
+ │ ├── org-setup.mjs # One-time org setup (deploy, schema, build)
23
23
  │ └── graphql-search.sh # Schema entity lookup
24
24
  ├── config/
25
25
  │ └── project-scratch-def.json
@@ -45,7 +45,7 @@ Replace `<appName>` with the actual folder name found under `uiBundles/`. The so
45
45
  └── data/ # Sample data for import (optional)
46
46
  ```
47
47
 
48
- ## Web application source structure
48
+ ## UI Bundle source structure
49
49
 
50
50
  All application code lives inside the UI Bundle's `src/` directory:
51
51
 
@@ -93,11 +93,13 @@ Used for SFDX metadata tooling. Scripts here target LWC/Aura, not the React app.
93
93
  | `npm run prettier` | Format metadata files |
94
94
  | `npm run prettier:verify` | Check Prettier |
95
95
 
96
- **One-command setup:** `node scripts/setup-cli.mjs --target-org <alias>` runs login, deploy, permset assignment, data import, GraphQL schema/codegen, UI Bundle build, and optionally the dev server. Use `--help` for all flags.
96
+ **One-time org setup:** `node scripts/org-setup.mjs --target-org <alias>` runs login, deploy, permset assignment, data import, GraphQL schema/codegen, UI Bundle build, and optionally the dev server. Use `--help` for all flags.
97
97
 
98
- ### 2. Web app directory (primary workspace)
98
+ ### 2. UI Bundle directory (primary workspace)
99
99
 
100
- **Always `cd` into the UI Bundle directory for dev/build/lint/test:**
100
+ **ALL dev, build, lint, and test commands MUST be run from inside the UI Bundle directory (`<sfdx-source>/uiBundles/<appName>/`). Never run them from the project root.**
101
+
102
+ Resolve the correct path from `sfdx-project.json` before running any command. Do not hardcode the path.
101
103
 
102
104
  | Command | Purpose |
103
105
  |---------|---------|
@@ -109,13 +111,17 @@ Used for SFDX metadata tooling. Scripts here target LWC/Aura, not the React app.
109
111
  | `npm run graphql:codegen` | Generate GraphQL types from schema |
110
112
  | `npm run graphql:schema` | Fetch GraphQL schema from org |
111
113
 
112
- **Before completing any change:** run `npm run build` and `npm run lint` from the UI Bundle directory. Both must pass with zero errors.
114
+ **After every task, without exception:**
115
+ 1. Run `npm run build` from the UI Bundle directory — must pass with zero errors.
116
+ 2. Run `npm run lint` from the UI Bundle directory — must pass with zero errors.
117
+ 3. Run `npm run dev` to start the dev server so the user can verify the result.
113
118
 
119
+ Do not consider a task complete until all three steps have been run successfully.
114
120
  ## Development conventions
115
121
 
116
122
  ### UI
117
123
 
118
- - **Component library:** shadcn/ui primitives in `src/components/ui/`. Always use these over raw HTML equivalents.
124
+ - **Component library:** shadcn/ui primitives in `src/components/ui/`. Always use these over raw HTML equivalents. **Before importing any component, verify both the file exists in `src/components/ui/` AND the named export exists within that file.** Never assume a component or export is available — read the file to confirm the exact exports before importing.
119
125
  - **Styling:** Tailwind CSS only. No inline `style={{}}`. Use `cn()` from `@/lib/utils` for conditional classes.
120
126
  - **Icons:** Lucide React.
121
127
  - **Path alias:** `@/*` maps to `src/*`. Use it for all imports.
@@ -140,6 +146,10 @@ Used for SFDX metadata tooling. Scripts here target LWC/Aura, not the React app.
140
146
 
141
147
  ### Data access (Salesforce)
142
148
 
149
+ **Before writing any code that connects to Salesforce, you MUST invoke the `using-ui-bundle-salesforce-data` skill. Do not write any data access code without consulting it first.**
150
+
151
+ This applies to: GraphQL queries/mutations, REST calls, SDK initialization, custom hooks that fetch data, or any code that imports from `@salesforce/sdk-data`.
152
+
143
153
  - **All data access uses the Data SDK** (`@salesforce/sdk-data`) via `createDataSDK()`.
144
154
  - **Never** use `fetch()` or `axios` directly for Salesforce data.
145
155
  - **GraphQL is preferred** for record operations (`sdk.graphql`). Use `sdk.fetch` only when GraphQL cannot cover the case (UI API REST, Apex REST, Connect REST, Einstein LLM).
@@ -149,25 +159,74 @@ Used for SFDX metadata tooling. Scripts here target LWC/Aura, not the React app.
149
159
  - Use `__SF_API_VERSION__` global for API version in REST calls.
150
160
  - **Blocked APIs:** Enterprise REST query endpoint (`/query` with SOQL), `@AuraEnabled` Apex, Chatter API.
151
161
 
162
+ #### Permitted APIs
163
+
164
+ | API | Method | Endpoints / Use Case |
165
+ |-----|--------|----------------------|
166
+ | GraphQL | `sdk.graphql` | All record queries and mutations via `uiapi { }` namespace |
167
+ | UI API REST | `sdk.fetch` | `/services/data/v{ver}/ui-api/records/{id}` |
168
+ | Apex REST | `sdk.fetch` | `/services/apexrest/{resource}` |
169
+ | Connect REST | `sdk.fetch` | `/services/data/v{ver}/connect/...` |
170
+ | Einstein LLM | `sdk.fetch` | `/services/data/v{ver}/einstein/llm/prompt/generations` |
171
+
172
+ Any endpoint not listed above is not permitted.
173
+
174
+ #### GraphQL non-negotiable rules
175
+
176
+ 1. **Schema is the single source of truth** — every entity and field name must be confirmed via the schema search script before use. Never guess.
177
+ 2. **`@optional` on all record fields** — FLS causes entire queries to fail if any field is inaccessible. Apply to every scalar, parent, and child relationship field.
178
+ 3. **Correct mutation syntax** — mutations wrap under `uiapi(input: { allOrNone: true/false })`, not bare `uiapi { ... }`.
179
+ 4. **Explicit `first:` in every query** — omitting it silently defaults to 10 records. Always include `pageInfo { hasNextPage endCursor }` for paginated queries.
180
+ 5. **SOQL-derived execution limits** — max 10 subqueries per request, max 5 levels of child-to-parent traversal, max 1 level parent-to-child, max 2,000 records per subquery.
181
+ 6. **HTTP 200 does not mean success** — Salesforce returns HTTP 200 even on failure. Always check the `errors` array in the response body.
182
+
183
+ #### GraphQL inline queries
184
+ Must use the `gql` template tag from `@salesforce/sdk-data` — plain template strings bypass `@graphql-eslint` schema validation. For complex queries, use external `.graphql` files with codegen.
185
+
186
+ #### Current user info
187
+ Use GraphQL (`uiapi { currentUser { Id Name { value } } }`), not Chatter (`/chatter/users/me`).
188
+
189
+ #### Schema file (`schema.graphql`)
190
+
191
+ The `schema.graphql` file at the SFDX project root is the source of truth for all entity and field name lookups. It is 265K+ lines — never open or parse it directly. Use the schema search script instead.
192
+
193
+ - **Generate/refresh:** Run `npm run graphql:schema` from the UI bundle directory
194
+ - **When to regenerate:** After any metadata deployment that changes objects, fields, or permission sets
195
+ - **Custom objects** only appear in the schema after metadata deployment AND permission set assignment
196
+ - **After regenerating:** Always re-run `npm run graphql:codegen` and `npm run build` (schema changes may affect generated types)
197
+
152
198
  ### CSP trusted sites
153
199
 
154
200
  Any external domain the app calls (APIs, CDNs, fonts) must have a `.cspTrustedSite-meta.xml` file under `<sfdx-source>/cspTrustedSites/`. Unregistered domains are blocked at runtime. Each subdomain needs its own entry. URLs must be HTTPS with no trailing slash, no path, and no wildcards.
155
201
 
202
+ ## Building and launching the app
203
+
204
+ All build, dev, and test commands run from the UI Bundle directory. Before running any command, read the UI Bundle's `package.json` to confirm available scripts — do not assume script names.
205
+
206
+ Typical scripts found in the UI Bundle:
207
+
208
+ | Command | Purpose |
209
+ |---------|---------|
210
+ | `npm run build` | TypeScript check + Vite production build |
211
+ | `npm run dev` | Start Vite dev server |
212
+ | `npm run lint` | ESLint |
213
+ | `npm run test` | Vitest unit tests |
214
+ | `npm run graphql:codegen` | Generate GraphQL types |
215
+ | `npm run graphql:schema` | Fetch GraphQL schema from org |
216
+
217
+ If dependencies have not been installed yet, run `npm install` in the UI Bundle directory first. Alternatively, run `npm run sf-project-setup` from the project root — it resolves the UI Bundle directory automatically and runs install, build, and dev in sequence.
218
+
219
+ **After any JavaScript or TypeScript change, run `npm run build` to validate the change.** If the build fails, read the error output, identify the cause, fix it, and run `npm run build` again. Do not move on until the build passes.
220
+
156
221
  ## Deploying
157
222
 
158
223
  **Deployment order matters.** Metadata (objects, permission sets) must be deployed before fetching the GraphQL schema. After any metadata deployment that changes objects, fields, or permissions, re-run schema fetch and codegen.
159
224
 
160
- **Recommended sequence:**
225
+ **Deployment steps:**
161
226
 
162
227
  1. Authenticate to the target org
163
228
  2. Build the UI Bundle (`npm run build` in the UI Bundle directory)
164
229
  3. Deploy metadata (`sf project deploy start --source-dir <packageDir> --target-org <alias>`)
165
- 4. Assign permission sets
166
- 5. Import data (only with user confirmation)
167
- 6. Fetch GraphQL schema + run codegen (`npm run graphql:schema && npm run graphql:codegen`)
168
- 7. Rebuild the UI Bundle (schema changes may affect generated types)
169
-
170
- **Or use the one-command setup:** `node scripts/setup-cli.mjs --target-org <alias>`
171
230
 
172
231
  ```bash
173
232
  # Deploy UI Bundle only
@@ -177,17 +236,17 @@ sf project deploy start --source-dir <sfdx-source>/ui-bundles --target-org <alia
177
236
  sf project deploy start --source-dir <packageDir> --target-org <alias>
178
237
  ```
179
238
 
180
- ## Skills
239
+ **Do not open the app after deployment.** Do not run `sf org open`, do not guess the runtime URL, and do not construct paths like `/s/<appName>`. Deployment is complete when the `sf project deploy start` command succeeds.
181
240
 
182
- Check for available skills before implementing any of the following:
241
+ ## Post-deployment org setup
183
242
 
184
- | Area | When to consult |
185
- |------|----------------|
186
- | UI generation | Building pages, components, modifying header/footer/layout |
187
- | Salesforce data access | Reading/writing records, GraphQL queries, REST calls |
188
- | Metadata and deployment | Scaffolding apps, configuring CSP, deployment sequencing |
189
- | Feature installation | Before building something from scratch check if a pre-built feature exists |
190
- | File upload | Adding file upload with Salesforce ContentVersion |
191
- | Agentforce conversation | Adding or modifying the Agentforce chat widget |
243
+ These steps apply after a fresh deployment to configure the org. They are not part of routine deployment.
244
+
245
+ 1. Assign permission sets
246
+ 2. Import data (only with user confirmation)
247
+ 3. Fetch GraphQL schema + run codegen (`npm run graphql:schema && npm run graphql:codegen`)
248
+ 4. Rebuild the UI Bundle (`npm run build`schema changes may affect generated types)
249
+
250
+ ## Skills
192
251
 
193
- Skills are the authoritative source for detailed patterns, constraints, and code examples in each area. This file provides project-level orientation; skills provide implementation depth.
252
+ Before starting any task, check whether a relevant skill exists. If one does, invoke it before writing any code or making any implementation decision. Skills are the authoritative source for patterns, constraints, and code examples.
@@ -3,6 +3,132 @@
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.120.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.120.1...v1.120.2) (2026-04-01)
7
+
8
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.120.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.120.0...v1.120.1) (2026-04-01)
15
+
16
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
17
+
18
+
19
+
20
+
21
+
22
+ # [1.120.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.119.6...v1.120.0) (2026-04-01)
23
+
24
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
25
+
26
+
27
+
28
+
29
+
30
+ ## [1.119.6](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.119.5...v1.119.6) (2026-04-01)
31
+
32
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
33
+
34
+
35
+
36
+
37
+
38
+ ## [1.119.5](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.119.4...v1.119.5) (2026-03-31)
39
+
40
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
41
+
42
+
43
+
44
+
45
+
46
+ ## [1.119.4](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.119.3...v1.119.4) (2026-03-31)
47
+
48
+
49
+ ### Bug Fixes
50
+
51
+ * replace undefined WEBAPPLICATIONS_DIR with UIBUNDLES_DIR in org-setup ([#398](https://github.com/salesforce-experience-platform-emu/webapps/issues/398)) ([615d499](https://github.com/salesforce-experience-platform-emu/webapps/commit/615d49976fd4b92a840d25db79591e2818938a92))
52
+
53
+
54
+
55
+
56
+
57
+ ## [1.119.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.119.2...v1.119.3) (2026-03-31)
58
+
59
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
60
+
61
+
62
+
63
+
64
+
65
+ ## [1.119.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.119.1...v1.119.2) (2026-03-31)
66
+
67
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
68
+
69
+
70
+
71
+
72
+
73
+ ## [1.119.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.119.0...v1.119.1) (2026-03-31)
74
+
75
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
76
+
77
+
78
+
79
+
80
+
81
+ # [1.119.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.118.4...v1.119.0) (2026-03-31)
82
+
83
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
84
+
85
+
86
+
87
+
88
+
89
+ ## [1.118.4](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.118.3...v1.118.4) (2026-03-31)
90
+
91
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
92
+
93
+
94
+
95
+
96
+
97
+ ## [1.118.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.118.2...v1.118.3) (2026-03-31)
98
+
99
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
100
+
101
+
102
+
103
+
104
+
105
+ ## [1.118.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.118.1...v1.118.2) (2026-03-31)
106
+
107
+
108
+ ### Bug Fixes
109
+
110
+ * (@W-21734559) addresses missing .gitignore within template apps for vibes welcome experience ([#383](https://github.com/salesforce-experience-platform-emu/webapps/issues/383)) ([b8a35cf](https://github.com/salesforce-experience-platform-emu/webapps/commit/b8a35cf5352c231ccaa0797df88e64ee1c20a02a))
111
+
112
+
113
+
114
+
115
+
116
+ ## [1.118.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.118.0...v1.118.1) (2026-03-31)
117
+
118
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
119
+
120
+
121
+
122
+
123
+
124
+ # [1.118.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.117.5...v1.118.0) (2026-03-30)
125
+
126
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
127
+
128
+
129
+
130
+
131
+
6
132
  ## [1.117.5](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.117.4...v1.117.5) (2026-03-30)
7
133
 
8
134
  **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
@@ -8,19 +8,42 @@ This project ships the UI Bundle only. No additional Salesforce metadata (object
8
8
 
9
9
  | Path | Description |
10
10
  | ---------------------------------------------------- | --------------------------------------- |
11
- | `force-app/main/default/uiBundles/reactinternalapp/` | React UI Bundle (source, config, tests) |
11
+ | `force-app/main/default/uibundles/reactinternalapp/` | React UI Bundle (source, config, tests) |
12
12
 
13
13
  ## Getting started
14
14
 
15
- Navigate to the UI Bundle and install dependencies:
15
+ Install project dependencies and start the local dev server:
16
16
 
17
17
  ```bash
18
- cd force-app/main/default/uiBundles/reactinternalapp
19
18
  npm install
20
- npm run dev
19
+ npm run sf-project-setup
21
20
  ```
22
21
 
23
- Opens at http://localhost:5173 by default. For build and test instructions, see the [UI Bundle README](force-app/main/default/uiBundles/reactinternalapp/README.md).
22
+ This installs the UI Bundle dependencies, builds the app, and opens the dev server at http://localhost:5173. For manual build and test instructions, see the [UI Bundle README](force-app/main/default/uiBundles/reactinternalapp/README.md).
23
+
24
+ ## Add features
25
+
26
+ Use the features CLI to install additional UI features into the UI Bundle.
27
+
28
+ List all available features:
29
+
30
+ ```bash
31
+ npx @salesforce/ui-bundle-features-experimental list
32
+ ```
33
+
34
+ Get details about a specific feature (description, dependencies, files, and integration examples):
35
+
36
+ ```bash
37
+ npx @salesforce/ui-bundle-features-experimental describe <feature-name>
38
+ ```
39
+
40
+ Install a feature:
41
+
42
+ ```bash
43
+ npx @salesforce/ui-bundle-features-experimental install <feature-name> --ui-bundle-dir reactinternalapp
44
+ ```
45
+
46
+ After installation, the CLI will list any `__example__` files that need manual integration. Read each example file to see the integration pattern, apply it to the target file, then delete the example file.
24
47
 
25
48
  ## Deploy
26
49
 
@@ -35,11 +58,43 @@ sf project deploy start --source-dir force-app --target-org <alias>
35
58
 
36
59
  ```bash
37
60
  cd force-app/main/default/uiBundles/reactinternalapp && npm install && npm run build && cd -
38
- sf project deploy start --source-dir force-app/main/default/ui-bundles --target-org <alias>
61
+ sf project deploy start --source-dir force-app/main/default/uiBundles --target-org <alias>
39
62
  ```
40
63
 
41
64
  Replace `<alias>` with your target org alias.
42
65
 
66
+ ## Setup scripts
67
+
68
+ Two npm scripts at the project root streamline getting started and deployment.
69
+
70
+ **`npm run sf-project-setup`** — installs the UI Bundle dependencies, builds the app, and starts the dev server (see [Getting started](#getting-started)).
71
+
72
+ **`npm run setup`** — runs the full deployment setup in one command: org login (if needed), UI Bundle build, deploy the UI Bundle, fetch GraphQL schema, run codegen, and optionally start the dev server:
73
+
74
+ ```bash
75
+ npm run setup -- --target-org <alias>
76
+ ```
77
+
78
+ Running without flags presents an interactive step picker. Pass `--yes` to skip it and run all steps immediately:
79
+
80
+ ```bash
81
+ npm run setup -- --target-org <alias> --yes
82
+ ```
83
+
84
+ Common options:
85
+
86
+ | Option | Description |
87
+ | ------------------------- | ---------------------------------------------- |
88
+ | `--skip-login` | Skip browser login (org already authenticated) |
89
+ | `--skip-deploy` | Do not deploy metadata |
90
+ | `--skip-graphql` | Skip GraphQL schema fetch and codegen |
91
+ | `--skip-ui-bundle-build` | Skip `npm install` and UI Bundle build |
92
+ | `--skip-dev` | Do not start the dev server at the end |
93
+ | `--ui-bundle-name <name>` | UI Bundle folder name when multiple exist |
94
+ | `-y, --yes` | Skip interactive step picker; run all steps |
95
+
96
+ For all options: `npm run setup -- --help`.
97
+
43
98
  ## Configure Your Salesforce DX Project
44
99
 
45
100
  The `sfdx-project.json` file contains useful configuration information for your project. See [Salesforce DX Project Configuration](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm) in the _Salesforce DX Developer Guide_ for details about this file.
@@ -3,6 +3,9 @@
3
3
  "private": true,
4
4
  "version": "1.59.0",
5
5
  "type": "module",
6
+ "engines": {
7
+ "node": ">=22"
8
+ },
6
9
  "scripts": {
7
10
  "dev": "vite",
8
11
  "dev:design": "vite --mode design",
@@ -15,8 +18,8 @@
15
18
  "graphql:schema": "node scripts/get-graphql-schema.mjs"
16
19
  },
17
20
  "dependencies": {
18
- "@salesforce/sdk-data": "^1.117.5",
19
- "@salesforce/ui-bundle": "^1.117.5",
21
+ "@salesforce/sdk-data": "^1.120.2",
22
+ "@salesforce/ui-bundle": "^1.120.2",
20
23
  "@tailwindcss/vite": "^4.1.17",
21
24
  "class-variance-authority": "^0.7.1",
22
25
  "clsx": "^2.1.1",
@@ -42,7 +45,7 @@
42
45
  "@graphql-eslint/eslint-plugin": "^4.1.0",
43
46
  "@graphql-tools/utils": "^11.0.0",
44
47
  "@playwright/test": "^1.49.0",
45
- "@salesforce/vite-plugin-ui-bundle": "^1.117.5",
48
+ "@salesforce/vite-plugin-ui-bundle": "^1.120.2",
46
49
  "@testing-library/jest-dom": "^6.6.3",
47
50
  "@testing-library/react": "^16.1.0",
48
51
  "@testing-library/user-event": "^14.5.2",
@@ -385,7 +385,16 @@ function buildSingleFilter<TFilter>(
385
385
  if (!value) return null;
386
386
  const searchFields = config?.searchFields ?? [];
387
387
  if (searchFields.length === 0) return null;
388
- const clauses = searchFields.map((f) => ({ [f]: { like: `%${value}%` } }) as TFilter);
388
+ // Supports dot-notation for relationship fields (e.g. "User__r.Name")
389
+ // by building nested filter objects: { User__r: { Name: { like: "%x%" } } }
390
+ const clauses = searchFields.map((f) => {
391
+ const parts = f.split(".");
392
+ let clause: Record<string, unknown> = { like: `%${value}%` };
393
+ for (let i = parts.length - 1; i >= 0; i--) {
394
+ clause = { [parts[i]]: clause };
395
+ }
396
+ return clause as TFilter;
397
+ });
389
398
  if (clauses.length === 1) return clauses[0];
390
399
  return { or: clauses } as TFilter;
391
400
  }
@@ -13,6 +13,38 @@ import type {
13
13
  } from "../types/conversation";
14
14
 
15
15
  const GLOBAL_HOST_ID = "agentforce-conversation-client-global-host";
16
+
17
+ const DEFAULT_STYLE_TOKENS: NonNullable<AgentforceClientConfig["styleTokens"]> = {
18
+ containerBackground: "#fafafa",
19
+
20
+ headerBlockBackground: "#372949",
21
+ headerBlockTextColor: "#ffffff",
22
+ headerBlockIconColor: "#ffffff",
23
+ headerBlockBorderBottomColor: "#3b0764",
24
+ headerBlockFocusBorder: "#c4b5fd",
25
+
26
+ messageBlockInboundBackgroundColor: "#ffffff",
27
+ messageBlockInboundTextColor: "#1f2937",
28
+ messageBlockInboundBorder: "1px solid #e5e7eb",
29
+
30
+ messageBlockOutboundBackgroundColor: "#ede9fe",
31
+ messageBlockOutboundTextColor: "#1f2937",
32
+ messageBlockOutboundBorder: "1px solid #d8b4fe",
33
+
34
+ messageInputTextColor: "#1f2937",
35
+ messageInputTextBackgroundColor: "#ffffff",
36
+ messageInputFooterBorderColor: "#d1d5db",
37
+ messageInputFooterBorderFocusColor: "#9ca3af",
38
+ messageInputFocusShadow: "0 0 0 3px rgba(156, 163, 175, 0.25)",
39
+ messageInputFooterPlaceholderText: "#6b7280",
40
+
41
+ messageInputFooterSendButton: "#7e22ce",
42
+ messageInputFooterSendButtonHoverColor: "#6b21a8",
43
+ messageInputSendButtonIconColor: "#ffffff",
44
+ messageInputSendButtonDisabledColor: "#e5e7eb",
45
+ messageInputActionButtonFocusBorder: "#a855f7",
46
+ errorBlockBackground: "#fafafa",
47
+ };
16
48
  const SINGLETON_KEY = "__agentforceConversationClientSingleton";
17
49
 
18
50
  interface AgentforceConversationClientSingleton {
@@ -55,6 +87,7 @@ function getDefaultEmbedOptions(): ResolvedEmbedOptions {
55
87
  */
56
88
  export function AgentforceConversationClient({
57
89
  agentId,
90
+ agentLabel,
58
91
  inline: inlineProp,
59
92
  headerEnabled,
60
93
  showHeaderIcon,
@@ -77,10 +110,11 @@ export function AgentforceConversationClient({
77
110
 
78
111
  return {
79
112
  ...(agentId !== undefined && { agentId }),
80
- ...(styleTokens !== undefined && { styleTokens }),
113
+ ...(agentLabel !== undefined && { agentLabel }),
114
+ styleTokens: { ...DEFAULT_STYLE_TOKENS, ...styleTokens },
81
115
  renderingConfig,
82
116
  };
83
- }, [agentId, inlineProp, headerEnabled, showHeaderIcon, width, height, styleTokens]);
117
+ }, [agentId, agentLabel, inlineProp, headerEnabled, showHeaderIcon, width, height, styleTokens]);
84
118
 
85
119
  const inline = normalizedAgentforceClientConfig?.renderingConfig?.mode === "inline";
86
120
 
@@ -88,7 +122,7 @@ export function AgentforceConversationClient({
88
122
  if (!normalizedAgentforceClientConfig?.agentId) {
89
123
  throw new Error(
90
124
  "AgentforceConversationClient requires agentId. " +
91
- "Pass flat props only (agentId, inline, headerEnabled, showHeaderIcon, width, height, styleTokens).",
125
+ "Pass flat props only (agentId, agentLabel, inline, headerEnabled, showHeaderIcon, width, height, styleTokens).",
92
126
  );
93
127
  }
94
128