@schandlergarcia/sf-web-components 1.9.34 → 1.9.36

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.
@@ -9,6 +9,8 @@ This is the master routing guide for building command center dashboards. It help
9
9
 
10
10
  ## Available Skills
11
11
 
12
+ ### Project-Local Skills (in .a4drules/)
13
+
12
14
  The command center codebase has **4 specialized skills** that work together:
13
15
 
14
16
  | Skill Name | Purpose | Line Count | When to Use |
@@ -21,6 +23,21 @@ The command center codebase has **4 specialized skills** that work together:
21
23
  Plus **1 feature rule**:
22
24
  - **command-center-dashboard-rule.md** (50 lines) — Automated validation rules for dashboards
23
25
 
26
+ ### Global Skills (from VS Code)
27
+
28
+ These global Salesforce skills are automatically available and should be referenced when needed:
29
+
30
+ | Skill Name | Purpose | When to Use |
31
+ |------------|---------|-------------|
32
+ | **accessing-webapp-data** | Data SDK patterns, GraphQL vs REST | Any data fetching from Salesforce |
33
+ | **using-webapp-graphql** | GraphQL query workflow, codegen | Writing GraphQL queries for records |
34
+ | **exploring-webapp-graphql-schema** | Schema exploration, field lookup | Finding available fields on objects |
35
+ | **generating-webapp-graphql-read-query** | Query generation | Creating read queries |
36
+ | **generating-webapp-graphql-mutation-query** | Mutation generation | Creating/updating records |
37
+ | **managing-webapp-agentforce-conversation-client** | Agentforce chat integration | Adding Agentforce agent/chatbot |
38
+ | **building-webapp-react-components** | React patterns, hooks | Building custom React components |
39
+ | **building-webapp-data-visualization** | Charts, graphs, visualizations | Creating data visualizations |
40
+
24
41
  ## Decision Tree: Which Skill to Use?
25
42
 
26
43
  Follow this decision tree to find the right skill:
@@ -63,7 +80,27 @@ This skill explains:
63
80
 
64
81
  **NO** → Continue to question 4
65
82
 
66
- ### 4. Are you modifying the app shell (header, sidebar, global nav)?
83
+ ### 4. Are you connecting to live Salesforce data?
84
+
85
+ **YES** → Use global skills: **accessing-webapp-data**, **exploring-webapp-graphql-schema**, **using-webapp-graphql**
86
+
87
+ Workflow:
88
+ 1. Explore schema for custom objects
89
+ 2. Write GraphQL queries with actual field names
90
+ 3. Run codegen for TypeScript types
91
+ 4. Create hook with useDataSource for sample/live mode switching
92
+
93
+ **NO** → Continue to question 5
94
+
95
+ ### 5. Are you adding an Agentforce agent or chatbot?
96
+
97
+ **YES** → Use global skill: **managing-webapp-agentforce-conversation-client**
98
+
99
+ Or for simpler chat UI: Use **[component-library](../component-library/chat-data.md)** (ChatBar component)
100
+
101
+ **NO** → Continue to question 6
102
+
103
+ ### 6. Are you modifying the app shell (header, sidebar, global nav)?
67
104
 
68
105
  **YES** → Use **[outer-app](#outer-app)**
69
106
 
@@ -88,6 +125,15 @@ This skill covers:
88
125
  6. **[command-center-builder/charts-visualization.md](../command-center-builder/charts-visualization.md)** — If using charts, follow MANDATORY rules
89
126
  7. **[command-center-builder/completion-checklist.md](../command-center-builder/completion-checklist.md)** — Validate before reporting done
90
127
 
128
+ ### Workflow 1b: Connect Dashboard to Live Salesforce Data
129
+
130
+ 1. **accessing-webapp-data** (global) — Understand Data SDK requirements
131
+ 2. **exploring-webapp-graphql-schema** (global) — Explore schema for custom objects (Trip__c, Flight__c, etc.)
132
+ 3. **using-webapp-graphql** (global) — Write GraphQL queries, run codegen for types
133
+ 4. **[component-library/chat-data.md](../component-library/chat-data.md)** — Use DataModeProvider and useDataSource hook
134
+ 5. Create custom hook that transforms live data to match sample data shape
135
+ 6. Add DataModeToggle to switch between sample/live modes
136
+
91
137
  ### Workflow 2: Add a Chart to an Existing Dashboard
92
138
 
93
139
  1. **[command-center-builder/charts-visualization.md](../command-center-builder/charts-visualization.md)** — Read chart requirements
@@ -113,6 +159,13 @@ This skill covers:
113
159
  1. **[outer-app](../outer-app/SKILL.md)** — App shell structure and header/sidebar
114
160
  2. **[command-center-project](../command-center-project/SKILL.md)** — Router configuration if adding nav links
115
161
 
162
+ ### Workflow 6: Add Agentforce Agent/Chatbot
163
+
164
+ 1. **managing-webapp-agentforce-conversation-client** (global) — Complete integration guide
165
+ 2. **[component-library/chat-data.md](../component-library/chat-data.md)** — For ChatBar component (simpler alternative)
166
+ 3. Ask user for agent ID if not already configured
167
+ 4. Configure inline vs floating mode, styling, dimensions
168
+
116
169
  ## Skill Interaction Rules
117
170
 
118
171
  ### component-library vs command-center-builder
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schandlergarcia/sf-web-components",
3
- "version": "1.9.34",
3
+ "version": "1.9.36",
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",
@@ -15,7 +15,17 @@
15
15
  #
16
16
  set -euo pipefail
17
17
 
18
- ROOT="$(cd "$(dirname "$0")/.." && pwd)"
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 ""