@schandlergarcia/sf-web-components 1.9.14 → 1.9.16
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/README.md +5 -2
- package/package.json +1 -1
- package/scripts/reset-command-center.sh +48 -1
package/README.md
CHANGED
|
@@ -303,12 +303,15 @@ bash node_modules/@schandlergarcia/sf-web-components/scripts/reset-command-cente
|
|
|
303
303
|
|
|
304
304
|
**What it does:**
|
|
305
305
|
- Removes custom dashboard pages
|
|
306
|
-
-
|
|
306
|
+
- Reinstalls BlankDashboard.tsx with EmptyState
|
|
307
307
|
- Resets CommandCenter.tsx (preserves theme mode)
|
|
308
|
-
- Updates Home.tsx to
|
|
308
|
+
- Updates Home.tsx to render CommandCenter (blank dashboard)
|
|
309
|
+
- Creates Search.tsx for search interface at `/search` route
|
|
309
310
|
- Resets routes to baseline configuration
|
|
310
311
|
- Preserves: component library, authentication, all dependencies
|
|
311
312
|
|
|
313
|
+
**Result:** Home route (`/`) displays the CommandCenter with BlankDashboard, ready for customization
|
|
314
|
+
|
|
312
315
|
---
|
|
313
316
|
|
|
314
317
|
## Troubleshooting
|
package/package.json
CHANGED
|
@@ -37,15 +37,62 @@ echo ""
|
|
|
37
37
|
echo "→ Removing custom dashboards…"
|
|
38
38
|
|
|
39
39
|
removed=0
|
|
40
|
+
|
|
41
|
+
# Detect if we're in a webapp directory (inside SFDX project structure)
|
|
42
|
+
# If so, also clean up SFDX project root paths
|
|
43
|
+
SFDX_ROOT=""
|
|
44
|
+
if [[ "$ROOT" == */force-app/main/default/webapplications/* ]]; then
|
|
45
|
+
# Extract SFDX project root (go up to the directory containing force-app)
|
|
46
|
+
SFDX_ROOT="$(cd "$ROOT" && cd ../../../../../../.. && pwd)"
|
|
47
|
+
echo " ℹ Detected SFDX project structure"
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
# Remove from src/pages/
|
|
40
51
|
for f in src/pages/*Dashboard*.tsx src/pages/*Dashboard*.jsx; do
|
|
41
52
|
# Don't remove BlankDashboard
|
|
42
53
|
if [ -f "$f" ] && [[ "$(basename "$f")" != "BlankDashboard"* ]]; then
|
|
43
54
|
rm "$f"
|
|
44
|
-
echo " ✓ Removed $(basename "$f")"
|
|
55
|
+
echo " ✓ Removed $(basename "$f") from webapp"
|
|
45
56
|
removed=$((removed + 1))
|
|
46
57
|
fi
|
|
47
58
|
done
|
|
48
59
|
|
|
60
|
+
# Also remove from src/components/pages/ if it exists
|
|
61
|
+
if [ -d "src/components/pages" ]; then
|
|
62
|
+
for f in src/components/pages/*Dashboard*.tsx src/components/pages/*Dashboard*.jsx; do
|
|
63
|
+
if [ -f "$f" ] && [[ "$(basename "$f")" != "BlankDashboard"* ]]; then
|
|
64
|
+
rm "$f"
|
|
65
|
+
echo " ✓ Removed $(basename "$f") from webapp"
|
|
66
|
+
removed=$((removed + 1))
|
|
67
|
+
fi
|
|
68
|
+
done
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
# If we're in SFDX structure, also check project root paths
|
|
72
|
+
if [ -n "$SFDX_ROOT" ]; then
|
|
73
|
+
# Remove from SFDX_ROOT/src/pages/
|
|
74
|
+
if [ -d "$SFDX_ROOT/src/pages" ]; then
|
|
75
|
+
for f in "$SFDX_ROOT/src/pages/"*Dashboard*.tsx "$SFDX_ROOT/src/pages/"*Dashboard*.jsx; do
|
|
76
|
+
if [ -f "$f" ] && [[ "$(basename "$f")" != "BlankDashboard"* ]]; then
|
|
77
|
+
rm "$f"
|
|
78
|
+
echo " ✓ Removed $(basename "$f") from SFDX root"
|
|
79
|
+
removed=$((removed + 1))
|
|
80
|
+
fi
|
|
81
|
+
done
|
|
82
|
+
fi
|
|
83
|
+
|
|
84
|
+
# Remove from SFDX_ROOT/src/components/pages/
|
|
85
|
+
if [ -d "$SFDX_ROOT/src/components/pages" ]; then
|
|
86
|
+
for f in "$SFDX_ROOT/src/components/pages/"*Dashboard*.tsx "$SFDX_ROOT/src/components/pages/"*Dashboard*.jsx; do
|
|
87
|
+
if [ -f "$f" ] && [[ "$(basename "$f")" != "BlankDashboard"* ]]; then
|
|
88
|
+
rm "$f"
|
|
89
|
+
echo " ✓ Removed $(basename "$f") from SFDX root"
|
|
90
|
+
removed=$((removed + 1))
|
|
91
|
+
fi
|
|
92
|
+
done
|
|
93
|
+
fi
|
|
94
|
+
fi
|
|
95
|
+
|
|
49
96
|
if [ "$removed" -eq 0 ]; then
|
|
50
97
|
echo " (no custom dashboards found)"
|
|
51
98
|
fi
|