@salesforce/ui-bundle-template-app-react-sample-b2e 1.120.3 → 1.120.6

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,33 @@
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.6](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.120.5...v1.120.6) (2026-04-07)
7
+
8
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.120.5](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.120.4...v1.120.5) (2026-04-07)
15
+
16
+ **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
17
+
18
+
19
+
20
+
21
+
22
+ ## [1.120.4](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.120.3...v1.120.4) (2026-04-07)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * make tenant owner of own record ([#414](https://github.com/salesforce-experience-platform-emu/webapps/issues/414)) ([bf1f289](https://github.com/salesforce-experience-platform-emu/webapps/commit/bf1f289a8d56a381adde51e642e67db38099f193))
28
+
29
+
30
+
31
+
32
+
6
33
  ## [1.120.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.120.2...v1.120.3) (2026-04-02)
7
34
 
8
35
  **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
package/dist/README.md CHANGED
@@ -16,6 +16,7 @@ A property management sample React UI Bundle for the Salesforce platform. Demons
16
16
  - [6. Generate GraphQL Types](#6-generate-graphql-types)
17
17
  - [7. Rebuild the UI Bundle](#7-rebuild-the-ui-bundle)
18
18
  - [8. Deploy the UI Bundle](#8-deploy-the-ui-bundle)
19
+ - [9. Agentforce Conversation Client](#9-agentforce-conversation-client)
19
20
  5. [Local Development](#local-development)
20
21
  6. [Resources](#resources)
21
22
 
@@ -23,13 +24,14 @@ A property management sample React UI Bundle for the Salesforce platform. Demons
23
24
 
24
25
  ## What's Included
25
26
 
26
- | Path | Description |
27
- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
- | `force-app/main/default/uiBundles/propertymanagementapp/` | React UI Bundle (source, config, tests) |
29
- | `force-app/main/default/objects/` | 17 custom objects `Agent__c`, `Application__c`, `KPI_Snapshot__c`, `Lease__c`, `Maintenance_Request__c`, `Maintenance_Worker__c`, `Notification__c`, `Payment__c`, `Property__c`, `Property_Cost__c`, `Property_Feature__c`, `Property_Image__c`, `Property_Listing__c`, `Property_Management_Company__c`, `Property_Owner__c`, `Property_Sale__c`, `Tenant__c` |
30
- | `force-app/main/default/layouts/` | Page layouts for each custom object |
31
- | `force-app/main/default/permissionsets/` | `Property_Management_Access` permission set — full CRUD access to all custom objects |
32
- | `force-app/main/default/data/` | Sample data (JSON) for all objects, importable via `sf data import tree` |
27
+ ```
28
+ force-app/main/default/
29
+ ├── uiBundles/ # React UI Bundle (source, config, tests)
30
+ ├── objects/ # 17 Custom Objects (Property, Tenant, Lease, etc.)
31
+ ├── layouts/ # Page layouts for all custom objects
32
+ ├── permissionsets/ # Property_Management_Access (Full CRUD)
33
+ └── data/ # Sample JSON data (use: sf data import tree)
34
+ ```
33
35
 
34
36
  ---
35
37
 
@@ -224,6 +226,13 @@ Once the build is complete, deploy the UI Bundle to your org:
224
226
  sf project deploy start --source-dir force-app/main/default/uiBundles --target-org <alias>
225
227
  ```
226
228
 
229
+ ### 9. Agentforce Conversation Client
230
+
231
+ The sample app includes an Agentforce Conversation Client (ACC) placeholder component in `applayout.tsx`. The ACC component requires a valid `agentId` for an agent that exists in the org. The options to create an agent specific to this use-case are:
232
+
233
+ - **Agentforce Vibes:** Generate agent metadata with the extension, then deploy it to the org.
234
+ - **Agentforce Builder:** Create the agent in the UI. See [Set Up Your Agent](https://help.salesforce.com/s/articleView?id=ai.agent_parent_setup.htm&type=5).
235
+
227
236
  ---
228
237
 
229
238
  ## Local Development
@@ -0,0 +1,9 @@
1
+ {
2
+ "permsetAssignments": {
3
+ "defaultAssignee": "skip",
4
+ "assignments": {
5
+ "Property_Management_Access": { "assignee": "currentUser" },
6
+ "Tenant_Maintenance_Access": { "assignee": "currentUser" }
7
+ }
8
+ }
9
+ }
@@ -18,8 +18,8 @@
18
18
  "graphql:schema": "node scripts/get-graphql-schema.mjs"
19
19
  },
20
20
  "dependencies": {
21
- "@salesforce/sdk-data": "^1.120.3",
22
- "@salesforce/ui-bundle": "^1.120.3",
21
+ "@salesforce/sdk-data": "^1.120.6",
22
+ "@salesforce/ui-bundle": "^1.120.6",
23
23
  "@tailwindcss/vite": "^4.1.17",
24
24
  "class-variance-authority": "^0.7.1",
25
25
  "clsx": "^2.1.1",
@@ -46,7 +46,7 @@
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/vite-plugin-ui-bundle": "^1.120.3",
49
+ "@salesforce/vite-plugin-ui-bundle": "^1.120.6",
50
50
  "@testing-library/jest-dom": "^6.6.3",
51
51
  "@testing-library/react": "^16.1.0",
52
52
  "@testing-library/user-event": "^14.5.2",
@@ -69,5 +69,8 @@
69
69
  "vite": "^7.2.4",
70
70
  "vite-plugin-graphql-codegen": "^3.6.3",
71
71
  "vitest": "^4.0.17"
72
+ },
73
+ "overrides": {
74
+ "lodash": "^4.18.1"
72
75
  }
73
76
  }
@@ -113,6 +113,7 @@ async function ensureTenantForApprovedApplication(applicationId: string): Promis
113
113
  Property__c: propertyId,
114
114
  User_Status__c: "Tenant",
115
115
  Status__c: "Active",
116
+ OwnerId: userId,
116
117
  };
117
118
  if (startDate) {
118
119
  tenantFields.Start_Date__c = String(startDate);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
3
- "version": "1.120.3",
3
+ "version": "1.120.6",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
9
- "version": "1.120.3",
9
+ "version": "1.120.6",
10
10
  "license": "SEE LICENSE IN LICENSE.txt",
11
11
  "devDependencies": {
12
12
  "@lwc/eslint-plugin-lwc": "^3.3.0",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/ui-bundle-template-base-sfdx-project",
3
- "version": "1.120.3",
3
+ "version": "1.120.6",
4
4
  "description": "Base SFDX project template",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "publishConfig": {
@@ -0,0 +1,6 @@
1
+ {
2
+ "permsetAssignments": {
3
+ "defaultAssignee": "currentUser",
4
+ "assignments": {}
5
+ }
6
+ }
@@ -14,10 +14,22 @@
14
14
  * 1. login — sf org login web only if org not already connected (skip with --skip-login)
15
15
  * 2. uiBundle — (all UI bundles) npm install && npm run build so dist exists for deploy (skip with --skip-ui-bundle-build)
16
16
  * 3. deploy — sf project deploy start --target-org <alias> (requires dist for entity deployment)
17
- * 4. permset — sf org assign permset for each *.permissionset-meta.xml (skip with --skip-permset; override via --permset-name)
17
+ * 4. permset — assign permsets per org-setup.config.json (skip with --skip-permset; override via --permset-name)
18
18
  * 5. data — prepare unique fields + sf data import tree (skipped if no data dir/plan)
19
19
  * 6. graphql — (in UI bundle) npm run graphql:schema then npm run graphql:codegen
20
20
  * 7. dev — (in UI bundle) npm run dev — launch dev server (skip with --skip-dev)
21
+ *
22
+ * Permset assignment config (scripts/org-setup.config.json):
23
+ * {
24
+ * "permsetAssignments": {
25
+ * "defaultAssignee": "currentUser",
26
+ * "assignments": {
27
+ * "Guest_Permset": { "assignee": "guest@mysite.example.com" },
28
+ * "Internal_Only": { "assignee": "skip" }
29
+ * }
30
+ * }
31
+ * }
32
+ * Assignee values: "currentUser" (default), "skip", or a specific username.
21
33
  */
22
34
 
23
35
  import { spawnSync } from 'node:child_process';
@@ -127,6 +139,20 @@ Options:
127
139
  --skip-dev Do not launch the dev server at the end
128
140
  -y, --yes Skip interactive step picker; run all enabled steps immediately
129
141
  -h, --help Show this help
142
+
143
+ Permset config (scripts/org-setup.config.json):
144
+ Control per-permset assignment via a config file. Example:
145
+ {
146
+ "permsetAssignments": {
147
+ "defaultAssignee": "currentUser",
148
+ "assignments": {
149
+ "Guest_Permset": { "assignee": "guest@mysite.example.com" },
150
+ "Internal_Only": { "assignee": "skip" }
151
+ }
152
+ }
153
+ }
154
+ Assignee values: "currentUser" (default), "skip", or a specific username.
155
+ Without this file, all discovered permsets are assigned to the current user.
130
156
  `);
131
157
  process.exit(0);
132
158
  }
@@ -181,6 +207,51 @@ function discoverPermissionSetNames() {
181
207
  return names.sort();
182
208
  }
183
209
 
210
+ /**
211
+ * Load permset assignment configuration from org-setup.config.json.
212
+ *
213
+ * Config shape:
214
+ * {
215
+ * "permsetAssignments": {
216
+ * "defaultAssignee": "currentUser", // "currentUser" (default) or "skip"
217
+ * "assignments": {
218
+ * "My_Guest_Permset": { "assignee": "guest@mysite.example.com" },
219
+ * "Internal_Only": { "assignee": "skip" }
220
+ * }
221
+ * }
222
+ * }
223
+ *
224
+ * Assignee values:
225
+ * "currentUser" — assign to the user running the script (default)
226
+ * "skip" — do not assign this permset
227
+ * "<username>" — assign to a specific user via --on-behalf-of
228
+ *
229
+ * Returns { defaultAssignee: string, assignments: Record<string, { assignee: string }> }
230
+ */
231
+ function loadPermsetConfig() {
232
+ const configPath = resolve(__dirname, 'org-setup.config.json');
233
+ const defaults = { defaultAssignee: 'currentUser', assignments: {} };
234
+ if (!existsSync(configPath)) return defaults;
235
+ try {
236
+ const raw = JSON.parse(readFileSync(configPath, 'utf8'));
237
+ const section = raw?.permsetAssignments;
238
+ if (!section) return defaults;
239
+ return {
240
+ defaultAssignee: section.defaultAssignee || 'currentUser',
241
+ assignments: section.assignments || {},
242
+ };
243
+ } catch (err) {
244
+ console.warn(`Warning: failed to parse org-setup.config.json: ${err.message}; using defaults.`);
245
+ return defaults;
246
+ }
247
+ }
248
+
249
+ /** Resolve the effective assignee for a given permset name. */
250
+ function resolveAssignee(permsetName, permsetConfig) {
251
+ const override = permsetConfig.assignments[permsetName];
252
+ return override?.assignee || permsetConfig.defaultAssignee;
253
+ }
254
+
184
255
  function isOrgConnected(targetOrg) {
185
256
  const result = spawnSync('sf', ['org', 'display', '--target-org', targetOrg, '--json'], {
186
257
  cwd: ROOT,
@@ -422,28 +493,35 @@ async function main() {
422
493
  }
423
494
 
424
495
  if (!skipPermset) {
496
+ const permsetConfig = loadPermsetConfig();
425
497
  if (permsetNames.length === 0) {
426
498
  console.log('\n--- Assign permission sets ---');
427
499
  console.log('No permission sets found under permissionsets/ and none passed via --permset-name; skipping.');
428
500
  } else {
429
501
  console.log('\n--- Assign permission sets ---');
430
502
  for (const permsetName of permsetNames) {
431
- const permsetResult = spawnSync(
432
- 'sf',
433
- ['org', 'assign', 'permset', '--name', permsetName, '--target-org', targetOrg],
434
- {
435
- cwd: ROOT,
436
- stdio: 'pipe',
437
- shell: true,
438
- }
439
- );
503
+ const assignee = resolveAssignee(permsetName, permsetConfig);
504
+ if (assignee === 'skip') {
505
+ console.log(`Permission set "${permsetName}" skipped (config).`);
506
+ continue;
507
+ }
508
+ const sfArgs = ['org', 'assign', 'permset', '--name', permsetName, '--target-org', targetOrg];
509
+ if (assignee !== 'currentUser') {
510
+ sfArgs.push('--on-behalf-of', assignee);
511
+ }
512
+ const assigneeLabel = assignee === 'currentUser' ? 'current user' : assignee;
513
+ const permsetResult = spawnSync('sf', sfArgs, {
514
+ cwd: ROOT,
515
+ stdio: 'pipe',
516
+ shell: true,
517
+ });
440
518
  if (permsetResult.status === 0) {
441
- console.log(`Permission set "${permsetName}" assigned.`);
519
+ console.log(`Permission set "${permsetName}" assigned to ${assigneeLabel}.`);
442
520
  } else {
443
521
  const out =
444
522
  (permsetResult.stderr?.toString() || '') + (permsetResult.stdout?.toString() || '');
445
523
  if (out.includes('Duplicate') && out.includes('PermissionSet')) {
446
- console.log(`Permission set "${permsetName}" already assigned; skipping.`);
524
+ console.log(`Permission set "${permsetName}" already assigned to ${assigneeLabel}; skipping.`);
447
525
  } else if (out.includes('not found') && out.includes('target org')) {
448
526
  console.log(`Permission set "${permsetName}" not in org; skipping.`);
449
527
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/ui-bundle-template-app-react-sample-b2e",
3
- "version": "1.120.3",
3
+ "version": "1.120.6",
4
4
  "description": "Salesforce sample property rental React app",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "",
@@ -16,7 +16,7 @@
16
16
  "clean": "rm -rf dist"
17
17
  },
18
18
  "dependencies": {
19
- "@salesforce/ui-bundle": "^1.120.3",
19
+ "@salesforce/ui-bundle": "^1.120.6",
20
20
  "sonner": "^1.7.0"
21
21
  },
22
22
  "devDependencies": {