@schandlergarcia/sf-web-components 1.9.12 → 1.9.14
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 +11 -63
package/package.json
CHANGED
|
@@ -123,67 +123,14 @@ HOME="src/pages/Home.tsx"
|
|
|
123
123
|
echo "→ Updating ${HOME}..."
|
|
124
124
|
|
|
125
125
|
cat > "$HOME" << 'HOME_EOF'
|
|
126
|
-
import
|
|
127
|
-
import { useNavigate } from "react-router";
|
|
128
|
-
import UIInput from '@/components/library/ui/UIInput';
|
|
129
|
-
import UIButton from '@/components/library/ui/UIButton';
|
|
130
|
-
import { Search } from "lucide-react";
|
|
126
|
+
import CommandCenter from "@/components/workspace/CommandCenter";
|
|
131
127
|
|
|
132
128
|
export default function HomePage() {
|
|
133
|
-
|
|
134
|
-
const navigate = useNavigate();
|
|
135
|
-
|
|
136
|
-
const handleSearch = () => {
|
|
137
|
-
const trimmed = searchQuery.trim();
|
|
138
|
-
if (trimmed) {
|
|
139
|
-
navigate(`/accounts?search=${encodeURIComponent(trimmed)}`);
|
|
140
|
-
} else {
|
|
141
|
-
navigate('/accounts');
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
|
146
|
-
if (e.key === "Enter") {
|
|
147
|
-
e.preventDefault();
|
|
148
|
-
handleSearch();
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
return (
|
|
153
|
-
<div className="flex min-h-[80vh] items-center justify-center px-4 sm:px-6 lg:px-8 bg-slate-50 dark:bg-slate-950 transition-colors">
|
|
154
|
-
<div className="w-full max-w-4xl">
|
|
155
|
-
<div className="text-center mb-8">
|
|
156
|
-
<h1 className="text-4xl font-bold text-slate-900 dark:text-slate-50 mb-4">Search</h1>
|
|
157
|
-
<p className="text-lg text-slate-600 dark:text-slate-300">Find records across your organization.</p>
|
|
158
|
-
</div>
|
|
159
|
-
<div className="flex flex-col gap-4">
|
|
160
|
-
<div className="relative">
|
|
161
|
-
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-slate-400" />
|
|
162
|
-
<UIInput
|
|
163
|
-
type="text"
|
|
164
|
-
value={searchQuery}
|
|
165
|
-
onChange={(e) => setSearchQuery(e.target.value)}
|
|
166
|
-
onKeyDown={handleKeyDown}
|
|
167
|
-
placeholder="Search..."
|
|
168
|
-
className="pl-10 w-full"
|
|
169
|
-
/>
|
|
170
|
-
</div>
|
|
171
|
-
<div className="flex gap-3 justify-center">
|
|
172
|
-
<UIButton onClick={handleSearch} variant="primary">
|
|
173
|
-
Search
|
|
174
|
-
</UIButton>
|
|
175
|
-
<UIButton onClick={() => navigate('/accounts')} variant="secondary">
|
|
176
|
-
Browse All
|
|
177
|
-
</UIButton>
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
182
|
-
);
|
|
129
|
+
return <CommandCenter />;
|
|
183
130
|
}
|
|
184
131
|
HOME_EOF
|
|
185
132
|
|
|
186
|
-
echo " ✓ Home renders
|
|
133
|
+
echo " ✓ Home renders CommandCenter (dashboard)"
|
|
187
134
|
echo ""
|
|
188
135
|
|
|
189
136
|
# ── 5. Ensure Search.tsx page exists ─────────────────────────────────────────
|
|
@@ -264,14 +211,14 @@ cat > "$ROUTES" << 'ROUTES_EOF'
|
|
|
264
211
|
import type { RouteObject } from 'react-router';
|
|
265
212
|
import Home from './pages/Home';
|
|
266
213
|
import NotFound from './pages/NotFound';
|
|
267
|
-
import
|
|
214
|
+
import AppLayout from './appLayout';
|
|
268
215
|
import AccountSearch from "./features/object-search/__examples__/pages/AccountSearch";
|
|
269
216
|
import AccountObjectDetail from "./features/object-search/__examples__/pages/AccountObjectDetailPage";
|
|
270
217
|
|
|
271
218
|
export const routes: RouteObject[] = [
|
|
272
219
|
{
|
|
273
220
|
path: "/",
|
|
274
|
-
element: <
|
|
221
|
+
element: <AppLayout />,
|
|
275
222
|
children: [
|
|
276
223
|
{
|
|
277
224
|
index: true,
|
|
@@ -317,13 +264,14 @@ echo "║ • Authentication features ║"
|
|
|
317
264
|
echo "║ • All styles & dependencies ║"
|
|
318
265
|
echo "║ ║"
|
|
319
266
|
echo "║ Layout: ║"
|
|
320
|
-
echo "║ / →
|
|
267
|
+
echo "║ / → CommandCenter (blank dashboard)║"
|
|
268
|
+
echo "║ /search → Search interface ║"
|
|
321
269
|
echo "║ /accounts → Account search and browse ║"
|
|
322
270
|
echo "║ ║"
|
|
323
|
-
echo "║
|
|
324
|
-
echo "║ •
|
|
325
|
-
echo "║ •
|
|
326
|
-
echo "║ •
|
|
271
|
+
echo "║ Command Center setup: ║"
|
|
272
|
+
echo "║ • Home renders BlankDashboard ║"
|
|
273
|
+
echo "║ • Theme and data providers configured ║"
|
|
274
|
+
echo "║ • Ready to build custom dashboards ║"
|
|
327
275
|
echo "║ ║"
|
|
328
276
|
echo "║ Start building: ║"
|
|
329
277
|
echo "║ npm run dev ║"
|