@schandlergarcia/sf-web-components 1.9.35 → 1.9.37
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/package.json +1 -1
- package/scripts/reset-command-center.sh +20 -31
package/package.json
CHANGED
|
@@ -15,7 +15,17 @@
|
|
|
15
15
|
#
|
|
16
16
|
set -euo pipefail
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
# Detect if running from node_modules (installed package) or directly (dev mode)
|
|
19
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
20
|
+
|
|
21
|
+
if [[ "$SCRIPT_DIR" == */node_modules/@schandlergarcia/sf-web-components/scripts ]]; then
|
|
22
|
+
# Running from installed package - go up to webapp root
|
|
23
|
+
ROOT="$(cd "$SCRIPT_DIR/../../../.." && pwd)"
|
|
24
|
+
else
|
|
25
|
+
# Running from package source - go up one level to package root
|
|
26
|
+
ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
27
|
+
fi
|
|
28
|
+
|
|
19
29
|
cd "$ROOT"
|
|
20
30
|
|
|
21
31
|
echo ""
|
|
@@ -130,8 +140,6 @@ SEARCH="src/pages/Search.tsx"
|
|
|
130
140
|
echo "→ Updating ${SEARCH}..."
|
|
131
141
|
|
|
132
142
|
cat > "$SEARCH" << 'SEARCH_EOF'
|
|
133
|
-
import { GlobalSearchInput } from "../features/global-search/components/search/GlobalSearchInput";
|
|
134
|
-
|
|
135
143
|
export default function Search() {
|
|
136
144
|
return (
|
|
137
145
|
<div className="flex min-h-[80vh] items-center justify-center px-4 sm:px-6 lg:px-8">
|
|
@@ -140,7 +148,13 @@ export default function Search() {
|
|
|
140
148
|
<h1 className="text-4xl font-bold text-slate-900 dark:text-slate-50 mb-4">Search</h1>
|
|
141
149
|
<p className="text-lg text-slate-600 dark:text-slate-300">Find records across your organization.</p>
|
|
142
150
|
</div>
|
|
143
|
-
<
|
|
151
|
+
<div className="relative">
|
|
152
|
+
<input
|
|
153
|
+
type="text"
|
|
154
|
+
placeholder="Search..."
|
|
155
|
+
className="w-full px-4 py-3 text-lg border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-slate-800 dark:border-slate-600 dark:text-slate-50"
|
|
156
|
+
/>
|
|
157
|
+
</div>
|
|
144
158
|
</div>
|
|
145
159
|
</div>
|
|
146
160
|
);
|
|
@@ -163,9 +177,6 @@ const AppLayout = lazy(() => import('./appLayout'));
|
|
|
163
177
|
const Home = lazy(() => import('./pages/Home'));
|
|
164
178
|
const Search = lazy(() => import('./pages/Search'));
|
|
165
179
|
const NotFound = lazy(() => import('./pages/NotFound'));
|
|
166
|
-
const TestAccPage = lazy(() => import("./pages/TestAccPage"));
|
|
167
|
-
const GlobalSearch = lazy(() => import("./features/global-search/pages/GlobalSearch"));
|
|
168
|
-
const DetailPage = lazy(() => import("./features/global-search/pages/DetailPage"));
|
|
169
180
|
|
|
170
181
|
function SuspenseWrap({ children }: { children: React.ReactNode }) {
|
|
171
182
|
return <Suspense fallback={<div className="flex min-h-screen items-center justify-center text-sm text-muted-foreground">Loading...</div>}>{children}</Suspense>;
|
|
@@ -190,29 +201,6 @@ export const routes: RouteObject[] = [
|
|
|
190
201
|
element: <SuspenseWrap><Search /></SuspenseWrap>,
|
|
191
202
|
handle: { showInNavigation: true, showNavBar: true, label: 'Search' }
|
|
192
203
|
},
|
|
193
|
-
{
|
|
194
|
-
path: "test-acc",
|
|
195
|
-
element: <SuspenseWrap><TestAccPage /></SuspenseWrap>,
|
|
196
|
-
handle: { showInNavigation: true, label: "Test ACC" }
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
path: "global-search/:query",
|
|
200
|
-
element: (
|
|
201
|
-
<SuspenseWrap>
|
|
202
|
-
<GlobalSearch />
|
|
203
|
-
</SuspenseWrap>
|
|
204
|
-
),
|
|
205
|
-
handle: { showInNavigation: false }
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
path: "object/:objectApiName/:recordId",
|
|
209
|
-
element: (
|
|
210
|
-
<SuspenseWrap>
|
|
211
|
-
<DetailPage />
|
|
212
|
-
</SuspenseWrap>
|
|
213
|
-
),
|
|
214
|
-
handle: { showInNavigation: false }
|
|
215
|
-
},
|
|
216
204
|
{
|
|
217
205
|
path: '*',
|
|
218
206
|
element: <SuspenseWrap><NotFound /></SuspenseWrap>
|
|
@@ -319,7 +307,8 @@ export default function AppLayout() {
|
|
|
319
307
|
</nav>
|
|
320
308
|
)}
|
|
321
309
|
<Outlet />
|
|
322
|
-
|
|
310
|
+
{/* Uncomment and configure when you have an Agentforce agent:
|
|
311
|
+
<AgentforceConversationClient agentId="your-agent-id" /> */}
|
|
323
312
|
</>
|
|
324
313
|
);
|
|
325
314
|
}
|