@salesforce/ui-bundle-template-app-react-sample-b2e 11.26.2 → 11.26.3
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 +8 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/package.json +4 -4
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/components/search/UnifiedSearch.tsx +23 -9
- package/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/package.json +2 -2
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.26.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.26.2...v11.26.3) (2026-07-14)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [11.26.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.26.1...v11.26.2) (2026-07-14)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@salesforce/platform-sdk": "^11.26.
|
|
22
|
-
"@salesforce/ui-bundle": "^11.26.
|
|
21
|
+
"@salesforce/platform-sdk": "^11.26.3",
|
|
22
|
+
"@salesforce/ui-bundle": "^11.26.3",
|
|
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.26.
|
|
50
|
-
"@salesforce/vite-plugin-ui-bundle": "^11.26.
|
|
49
|
+
"@salesforce/graphiti": "^11.26.3",
|
|
50
|
+
"@salesforce/vite-plugin-ui-bundle": "^11.26.3",
|
|
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",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* that one source.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import { useCallback, useState } from "react";
|
|
26
|
+
import { useCallback, useRef, useState } from "react";
|
|
27
27
|
import { Search, type SearchConfig } from "../../features/search";
|
|
28
28
|
import { toast } from "../ui/sonner";
|
|
29
29
|
import { searchConfig, SOURCE_KEYS, type SourceKey } from "../../lib/searchConfig";
|
|
@@ -79,6 +79,20 @@ export function UnifiedSearch({
|
|
|
79
79
|
}: UnifiedSearchProps) {
|
|
80
80
|
const [selected, setSelected] = useState<Selected | null>(null);
|
|
81
81
|
const [statusOverrides, setStatusOverrides] = useState<Record<string, string>>({});
|
|
82
|
+
const triggerRef = useRef<HTMLElement | null>(null);
|
|
83
|
+
|
|
84
|
+
const openModal = useCallback((value: Selected) => {
|
|
85
|
+
triggerRef.current = document.activeElement as HTMLElement;
|
|
86
|
+
setSelected(value);
|
|
87
|
+
}, []);
|
|
88
|
+
|
|
89
|
+
const closeModal = useCallback(() => {
|
|
90
|
+
const trigger = triggerRef.current;
|
|
91
|
+
triggerRef.current = null;
|
|
92
|
+
setSelected(null);
|
|
93
|
+
// Use rAF to focus after Radix Dialog has finished its own focus management
|
|
94
|
+
requestAnimationFrame(() => trigger?.focus());
|
|
95
|
+
}, []);
|
|
82
96
|
|
|
83
97
|
// -- Optimistic status save -------------------------------------------------
|
|
84
98
|
|
|
@@ -142,7 +156,7 @@ export function UnifiedSearch({
|
|
|
142
156
|
return (
|
|
143
157
|
<PropertyCard
|
|
144
158
|
property={property}
|
|
145
|
-
onClick={() =>
|
|
159
|
+
onClick={() => openModal({ key: SOURCE_KEYS.PROPERTIES, node: property })}
|
|
146
160
|
/>
|
|
147
161
|
);
|
|
148
162
|
},
|
|
@@ -151,7 +165,7 @@ export function UnifiedSearch({
|
|
|
151
165
|
return (
|
|
152
166
|
<MaintenanceRequestCard
|
|
153
167
|
request={request}
|
|
154
|
-
onClick={() =>
|
|
168
|
+
onClick={() => openModal({ key: SOURCE_KEYS.MAINTENANCE, node: request })}
|
|
155
169
|
/>
|
|
156
170
|
);
|
|
157
171
|
},
|
|
@@ -160,7 +174,7 @@ export function UnifiedSearch({
|
|
|
160
174
|
return (
|
|
161
175
|
<WorkerCard
|
|
162
176
|
worker={worker}
|
|
163
|
-
onClick={() =>
|
|
177
|
+
onClick={() => openModal({ key: SOURCE_KEYS.WORKERS, node: worker })}
|
|
164
178
|
/>
|
|
165
179
|
);
|
|
166
180
|
},
|
|
@@ -169,7 +183,7 @@ export function UnifiedSearch({
|
|
|
169
183
|
return (
|
|
170
184
|
<ApplicationCard
|
|
171
185
|
application={application}
|
|
172
|
-
onClick={() =>
|
|
186
|
+
onClick={() => openModal({ key: SOURCE_KEYS.APPLICATIONS, node: application })}
|
|
173
187
|
/>
|
|
174
188
|
);
|
|
175
189
|
},
|
|
@@ -187,24 +201,24 @@ export function UnifiedSearch({
|
|
|
187
201
|
/>
|
|
188
202
|
|
|
189
203
|
{selected?.key === SOURCE_KEYS.PROPERTIES && (
|
|
190
|
-
<PropertyDetailsModal property={selected.node} isOpen onClose={
|
|
204
|
+
<PropertyDetailsModal property={selected.node} isOpen onClose={closeModal} />
|
|
191
205
|
)}
|
|
192
206
|
{selected?.key === SOURCE_KEYS.MAINTENANCE && (
|
|
193
207
|
<MaintenanceDetailsModal
|
|
194
208
|
request={selected.node}
|
|
195
209
|
isOpen
|
|
196
|
-
onClose={
|
|
210
|
+
onClose={closeModal}
|
|
197
211
|
onSave={handleMaintenanceSave}
|
|
198
212
|
/>
|
|
199
213
|
)}
|
|
200
214
|
{selected?.key === SOURCE_KEYS.WORKERS && (
|
|
201
|
-
<WorkerDetailsModal worker={selected.node} isOpen onClose={
|
|
215
|
+
<WorkerDetailsModal worker={selected.node} isOpen onClose={closeModal} />
|
|
202
216
|
)}
|
|
203
217
|
{selected?.key === SOURCE_KEYS.APPLICATIONS && (
|
|
204
218
|
<ApplicationDetailsModal
|
|
205
219
|
application={selected.node}
|
|
206
220
|
isOpen
|
|
207
|
-
onClose={
|
|
221
|
+
onClose={closeModal}
|
|
208
222
|
onSave={handleApplicationSave}
|
|
209
223
|
/>
|
|
210
224
|
)}
|
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle-template-base-sfdx-project",
|
|
3
|
-
"version": "11.26.
|
|
3
|
+
"version": "11.26.3",
|
|
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.26.
|
|
9
|
+
"version": "11.26.3",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fast-xml-parser": "^5.9.3",
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle-template-app-react-sample-b2e",
|
|
3
|
-
"version": "11.26.
|
|
3
|
+
"version": "11.26.3",
|
|
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": "^11.26.
|
|
19
|
+
"@salesforce/ui-bundle": "^11.26.3",
|
|
20
20
|
"sonner": "^1.7.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|