@schandlergarcia/sf-web-components 1.9.62 → 1.9.63

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.
@@ -26,7 +26,7 @@ The Engine dashboard uses a **strict 4-phase build process.** You MUST complete
26
26
  - **Map data:** Add markers, arcs, overlays to GeoMap to show where travelers are (see PRD Section 7)
27
27
  - **Panel titles:** "Disruptions", "Active Travelers", "Escalations", "Travel Spend"
28
28
  - **Escalations panel:** ActivityCard must be wrapped in BaseCard for visible card styling
29
- - **Chart:** Line chart showing monthly spend trend (see PRD Section 8d code block for exact options)
29
+ - **Chart:** Bar chart showing monthly spend trend (see PRD Section 8d code block for exact options and data transformation)
30
30
  - **DO NOT run validation or dev server** — phase is complete after wiring files
31
31
  3. **Phase 3: Real Data** — Connect to Salesforce, keep UI identical to Phase 2
32
32
  4. **Phase 4: Agent** — Add Eva ChatBar integration
package/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.9.63] - 2026-04-01
9
+
10
+ ### Updated
11
+ - **Synced latest .a4drules and PRD from reactapp4** - Final sync of all documentation
12
+ - All `.a4drules/features/` updated
13
+ - All `.a4drules/skills/` updated
14
+ - All `.a4drules/troubleshooting/` updated
15
+ - Root `.a4drules/*.md` files updated
16
+ - `data/engine-command-center-prd.md` updated to latest
17
+
8
18
  ## [1.9.62] - 2026-04-01
9
19
 
10
20
  ### Added
@@ -305,30 +305,31 @@ Examples from sample data:
305
305
 
306
306
  ### 8d. Monthly Spend Trend (1/2 width)
307
307
 
308
- `ChartCard` wrapping a `D3Chart` with `D3ChartTemplates.lineChart`.
308
+ `ChartCard` wrapping a `D3Chart` with `D3ChartTemplates.groupedBarChart` (lineChart doesn't support categorical x-axis).
309
309
 
310
310
  **CRITICAL: Use this exact code structure:**
311
311
 
312
312
  ```tsx
313
+ // Transform data to chart format
314
+ const spendChartData = useDataSource({
315
+ sample: MONTHLY_SPEND.map(m => ({ x: m.month, spend: m.amount })),
316
+ live: []
317
+ });
318
+
313
319
  <ChartCard
314
320
  title="Travel Spend"
315
321
  subtitle="Monthly trend (6 months)"
316
322
  chart={
317
323
  <D3Chart
318
- data={useDataSource({ sample: MONTHLY_SPEND, live: [] })}
319
- renderChart={D3ChartTemplates.lineChart}
324
+ data={spendChartData}
325
+ renderChart={D3ChartTemplates.groupedBarChart}
320
326
  options={{
321
- xKey: "month",
322
- yKey: "amount",
323
- color: "#5BC8C8",
324
- lineWidth: 3,
325
- showDots: true,
326
- dotRadius: 4,
327
- showArea: true,
328
- areaOpacity: 0.1,
327
+ xKey: "x",
328
+ groups: ["spend"],
329
+ colors: ["#5BC8C8"],
330
+ barRadius: 6,
329
331
  margin: { top: 20, right: 20, bottom: 40, left: 60 },
330
332
  showGrid: true,
331
- formatY: (d) => `$${(d / 1000).toFixed(0)}K`,
332
333
  }}
333
334
  responsive
334
335
  height={320}
@@ -337,19 +338,18 @@ Examples from sample data:
337
338
  />
338
339
  ```
339
340
 
340
- **Data source:** Import `MONTHLY_SPEND` from sample data
341
+ **Data source:** Import `MONTHLY_SPEND` from sample data, transform to chart format
341
342
 
342
343
  **Requirements:**
343
- - X-axis: month names (Oct through Mar)
344
- - Y-axis: spend amount formatted as $XXK
344
+ - X-axis: month names (Oct through Mar) - categorical
345
+ - Y-axis: spend amount in dollars (will show as thousands: 98000, 128000, etc.)
345
346
  - Height: 320px
346
- - Line color: Engine teal (#5BC8C8)
347
- - Line width: 3px
348
- - Show dots at data points (radius: 4)
349
- - Show filled area under line (opacity: 0.1)
347
+ - Bar color: Engine teal (#5BC8C8)
348
+ - Bar radius: 6 for rounded corners
349
+ - **Data transformation:** map `{ month, amount }` to `{ x, spend }` format inline
350
350
  - responsive={true}
351
351
 
352
- **Why this chart:** Shows spend trends over time so travel managers can spot anomalies, budget overruns, or seasonal patterns. Actionable data for financial planning.
352
+ **Why this chart:** Shows spend trends over time so travel managers can spot anomalies, budget overruns, or seasonal patterns. Using bars instead of line because D3 lineChart requires numeric x-axis.
353
353
 
354
354
  **That's it!** Only 4 panels total: Disruptions, Active Travelers, Escalations, and Monthly Spend Trend.
355
355
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schandlergarcia/sf-web-components",
3
- "version": "1.9.62",
3
+ "version": "1.9.63",
4
4
  "description": "Reusable Salesforce web components library with Tailwind CSS v4 and shadcn/ui",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",