@schandlergarcia/sf-web-components 2.3.10 → 2.3.11

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/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ 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
+ ## [2.3.11] - 2026-04-13
9
+
10
+ ### Added
11
+ - **Eva agent ChatBar on Partner Hub** — Integrated the `ChatBar` component with the `useEvaAgent` hook above the booking stats grid. Connects to the Agentforce Agent REST API on mount, provides contextual suggestions ("Summarize my penalties", "Which property is growing fastest?", "Show overdue invoices"), and opens as a command-palette overlay (⌘K).
12
+
8
13
  ## [2.3.10] - 2026-04-13
9
14
 
10
15
  ### Changed
@@ -1,9 +1,10 @@
1
- import { ListCard, ActivityCard, D3Chart, Dropdown, Button, Modal, CardSkeleton } from "@/components/library";
1
+ import { ListCard, ActivityCard, D3Chart, Dropdown, Button, Modal, CardSkeleton, ChatBar } from "@/components/library";
2
2
  import useDataSource from "@/components/library/data/useDataSource";
3
3
  import { useThemeMode } from "@/components/library/theme/AppThemeProvider";
4
4
  import { toast } from "sonner";
5
5
  import React from "react";
6
6
  import { usePartnerDashboardData } from "@/hooks/usePartnerDashboardData";
7
+ import useEvaAgent from "@/hooks/useEvaAgent";
7
8
  import { ENABLE_SAMPLE_DATA_CACHE } from "@/lib/dataStrategy";
8
9
  import {
9
10
  PENALTY_TABLE_ITEMS,
@@ -32,6 +33,7 @@ import {
32
33
  } from "@heroicons/react/24/outline";
33
34
  import * as d3 from "d3";
34
35
  import engineLogo from "@/assets/images/engine_logo.png";
36
+ import Data360Widget from "@/components/Data360Widget";
35
37
 
36
38
  /**
37
39
  * Partner Hub Dashboard
@@ -54,6 +56,9 @@ export default function PartnerHubDashboard() {
54
56
  const [isDisputesModalOpen, setIsDisputesModalOpen] = React.useState(false);
55
57
  const [isInvoicesModalOpen, setIsInvoicesModalOpen] = React.useState(false);
56
58
 
59
+ const eva = useEvaAgent();
60
+ React.useEffect(() => { eva.connect(); }, []);
61
+
57
62
  // Simulated logged-in partner (in real app, this comes from auth context)
58
63
  const currentPartner = {
59
64
  name: "Summit Hotels & Resorts",
@@ -834,6 +839,31 @@ export default function PartnerHubDashboard() {
834
839
 
835
840
  {/* Main Content */}
836
841
  <div className="max-w-[1600px] mx-auto px-8 -mt-12 space-y-10">
842
+ {/* Eva Agent ChatBar */}
843
+ <div className="relative z-10">
844
+ <ChatBar
845
+ title="Eva — Partner Assistant"
846
+ placeholder="Ask Eva anything about your properties, invoices, or penalties…"
847
+ suggestions={[
848
+ "Summarize my penalties",
849
+ "Which property is growing fastest?",
850
+ "Show overdue invoices",
851
+ ]}
852
+ onSend={async (text) => {
853
+ if (eva.isReady) {
854
+ await eva.sendMessage(text);
855
+ } else {
856
+ return "Eva is still connecting — please try again in a moment.";
857
+ }
858
+ }}
859
+ initialMessages={eva.messages.map((m) => ({
860
+ id: m.id,
861
+ role: m.role === "agent" ? "assistant" : "user",
862
+ content: m.text,
863
+ }))}
864
+ />
865
+ </div>
866
+
837
867
  {/* Quick Stats - Uniform metrics grid */}
838
868
  <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-5 animate-slide-up relative z-10">
839
869
  {/* Revenue */}
@@ -966,6 +996,9 @@ export default function PartnerHubDashboard() {
966
996
  </div>
967
997
  </div>
968
998
 
999
+ {/* Data 360 Widget */}
1000
+ <Data360Widget />
1001
+
969
1002
  {/* Property Leaderboard - NEW SECTION */}
970
1003
  {isLoading ? (
971
1004
  <div className="bg-gradient-to-br from-white via-[var(--color-dash-surface)] to-white dark:from-[var(--color-dash-text)] dark:via-[var(--color-dash-dark)] dark:to-[var(--color-dash-text)] rounded-2xl p-8 shadow-xl border border-[var(--color-dash-label)]/20 dark:border-[var(--color-dash-muted)]/30">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schandlergarcia/sf-web-components",
3
- "version": "2.3.10",
3
+ "version": "2.3.11",
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",