@nukleus-sports/page-shells 0.1.0 → 0.1.2

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.
@@ -34,6 +34,7 @@ function MarketingDealsPanel({ adapter, className }) {
34
34
  isLoading,
35
35
  error,
36
36
  errorMessage = "Could not load marketing deals. Please try again.",
37
+ onRetry,
37
38
  activeTab,
38
39
  onTabChange,
39
40
  currentProjectDeals,
@@ -86,7 +87,10 @@ function MarketingDealsPanel({ adapter, className }) {
86
87
  }
87
88
  )
88
89
  ] }),
89
- error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "body-text text-destructive py-6 text-center", children: errorMessage }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
90
+ error ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center justify-center gap-3 py-10 px-6", role: "alert", children: [
91
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "body-text text-text-primary text-center", children: errorMessage }),
92
+ onRetry && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui_web.Button, { variant: "secondary", size: "form", onClick: onRetry, children: "Retry" })
93
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
90
94
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "hidden sm:flex items-center bg-greys-grey-table-h rounded-t-[10px] py-0 px-3 gap-3 h-[33px]", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "label-xs-table text-text-primary font-ss02", children: "Deals" }) }),
91
95
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui_web.TabsContent, { value: "current", className: "mt-0", children: gatedEmptyState ? gatedEmptyState : currentProjectDeals.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex flex-col gap-3 sm:gap-0", children: currentProjectDeals.map((deal) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
92
96
  import_marketing.ProjectDealCard,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/marketing/index.ts","../src/marketing/marketing-deals-panel.tsx"],"sourcesContent":["export {\n MarketingDealsPanel,\n type MarketingDealsAdapter,\n type MarketingDealsPanelProps,\n} from \"./marketing-deals-panel\";\n","import { useState, type MouseEvent, type ReactNode } from \"react\";\n\nimport { Skeleton, Tabs, TabsContent, TabsList, TabsTrigger, cn } from \"@nukleus-sports/ui-web\";\nimport {\n DealEmptyState,\n ManualDealCard,\n ManualDealPreviewDialog,\n ProjectDealCard,\n type EntityImageResolver,\n type ManualDeal,\n type ManualDealDocumentRef,\n type ProjectCollabMembership,\n type ProjectDeal,\n} from \"@nukleus-sports/ui-patterns/marketing\";\n\n/**\n * Reconciled from both apps' real current pages:\n * - `nukleus-app`'s `MarketingDealsTab.tsx` (`ClientMarketingTab`)\n * - `nukleus-clientapp`'s `pages/Marketing.tsx` + `hooks/useMarketing.ts`\n *\n * Both pages share one identical skeleton: a \"Current Deals\"/\"Completed\" tab\n * pair, a \"Deals\" label bar, a `ProjectDealCard` list per tab (`Completed`\n * also appends `ManualDealCard`s), matching empty states, and a shared\n * `ManualDealPreviewDialog`. That skeleton is this component's entire scope.\n *\n * ## Deliberately NOT in this shell (stays app-local, per CLAUDE.md's\n * page-shells rule and the decisions already made for this feature)\n * - The page header/title and the \"Record Past Deal\"/\"New Marketing Deal\"\n * buttons — `nukleus-app`-only chrome with no clientapp equivalent.\n * - `MarketingDealForm` (the CRUD create/edit form) and `DeleteDialog` —\n * `nukleus-app`-only, no clientapp read-only counterpart to reconcile\n * against, same reasoning as `MarketingOverviewPanel`/`Card` (also kept\n * app-local, rendered alongside this shell, not inside it).\n * - The top-level access gate (`nukleus-app`'s `marketingPermission ===\n * \"No Access\"` → `RestrictedAccessCard`; `clientapp`'s `!isAgencyLinked` →\n * `AgencyLinkBanner`). Both are a one-time \"should the deals experience\n * render at all\" decision made from each app's own permission shape\n * (`@nukleus-sports/core`'s `MarketingPermission` union) *before* this\n * shell ever mounts — not something this component re-derives.\n * - Project-membership resolution for the \"Collab\" link gate (`@nukleus-sports/\n * ui-patterns`' `ProjectDealCard` already enforces this structurally via its\n * required `collabMembership` prop) — the actual membership check is an\n * app-level query, surfaced here through `getCollabMembership`.\n *\n * ## Genuine differences reconciled (not formatting)\n * - Client-status gating (`nukleus-app`'s `isGated`, e.g. a \"Prospect\" client\n * can't have deals yet): `clientapp` has no such concept. Modeled as an\n * optional `gatedEmptyState` — when supplied, it replaces the Current tab's\n * content and the Completed tab is disabled, exactly matching `nukleus-app`'s\n * structure; omit it and both tabs behave normally (`clientapp`'s case).\n * - Loading skeleton: `clientapp` shows one before the tabs ever render;\n * `nukleus-app` has none (deals just populate once the query resolves).\n * Kept as an additive, opt-in `isLoading` prop — a loading affordance isn't\n * an agency-vs-client distinction, so both can use it.\n * - \"Deals\" label bar visibility on mobile: `nukleus-app` hides it below `sm`\n * (`hidden sm:flex`), `clientapp` always shows it. Kept `nukleus-app`'s\n * responsive hiding — the mobile layout is already a compact card stack\n * without a tabular header, so the label reads as redundant there.\n * - Completed-tab empty message: `nukleus-app`'s wording depends on whether\n * there are current-tab project deals (\"No past deals recorded yet.\" vs.\n * the fuller \"no deals at all\" message); `clientapp`'s is a single fixed\n * string. `completedEmptyMessage` accepts either a plain string or a\n * `(hasCurrentProjectDeals: boolean) => string` so both shapes work without\n * baking either app's copy into this package.\n */\n\n/**\n * The app-supplied bridge to its own data/backend — per\n * `docs/APPLICATION_ARCHITECTURE.md`'s Layer 5 adapter pattern, this shell\n * takes a single typed `adapter` prop rather than flat individual props, so\n * each app's own `use<Page>()` hook has one output shape to satisfy and\n * drifting apart becomes a compile error, not a silent runtime mismatch.\n */\nexport interface MarketingDealsAdapter {\n /** Shows a loading skeleton in place of the tabs. Additive — see module doc. */\n isLoading?: boolean;\n /** Shows an inline error message in place of the deal lists. */\n error?: boolean;\n errorMessage?: string;\n\n activeTab: \"current\" | \"completed\";\n onTabChange: (tab: \"current\" | \"completed\") => void;\n\n currentProjectDeals: ProjectDeal[];\n completedProjectDeals: ProjectDeal[];\n manualDeals: ManualDeal[];\n\n currentEmptyMessage: string;\n completedEmptyMessage: string | ((hasCurrentProjectDeals: boolean) => string);\n\n /**\n * Replaces the Current tab's content and disables the Completed tab —\n * `nukleus-app`'s client-status gating. Omit for `clientapp`'s ungated\n * behavior.\n */\n gatedEmptyState?: ReactNode;\n\n /** Required — `ProjectDealCard` structurally can't omit this. See module doc. */\n getCollabMembership: (projectId: string) => ProjectCollabMembership;\n getCollabHref: (projectId: string) => string;\n /** `nukleus-app`'s demo-mode upsell toast swaps the link for a button. */\n getOnCollabClick?: (\n projectId: string,\n ) => ((e: MouseEvent<HTMLButtonElement>) => void) | undefined;\n\n /** Presence of each enables that affordance on `ManualDealCard`/the preview\n * dialog — same shape `ManualDealCard`/`ManualDealPreviewDialog` already\n * take, so this just passes through. */\n onEditDeal?: (deal: ManualDeal) => void;\n onDeleteDeal?: (deal: ManualDeal) => void;\n onOpenDocument: (doc: ManualDealDocumentRef) => void;\n\n resolveImageUrl?: EntityImageResolver;\n}\n\nexport interface MarketingDealsPanelProps {\n adapter: MarketingDealsAdapter;\n /** Pure styling override — not part of the adapter, since it's never\n * backend/data-shaped. */\n className?: string;\n}\n\nexport function MarketingDealsPanel({ adapter, className }: MarketingDealsPanelProps) {\n const {\n isLoading,\n error,\n errorMessage = \"Could not load marketing deals. Please try again.\",\n activeTab,\n onTabChange,\n currentProjectDeals,\n completedProjectDeals,\n manualDeals,\n currentEmptyMessage,\n completedEmptyMessage,\n gatedEmptyState,\n getCollabMembership,\n getCollabHref,\n getOnCollabClick,\n onEditDeal,\n onDeleteDeal,\n onOpenDocument,\n resolveImageUrl,\n } = adapter;\n\n const [previewDeal, setPreviewDeal] = useState<ManualDeal | null>(null);\n\n const resolvedCompletedEmptyMessage =\n typeof completedEmptyMessage === \"function\"\n ? completedEmptyMessage(currentProjectDeals.length > 0)\n : completedEmptyMessage;\n const hasCompletedContent = completedProjectDeals.length > 0 || manualDeals.length > 0;\n\n if (isLoading) {\n return (\n <div className={cn(\"flex flex-col gap-3\", className)}>\n <Skeleton className=\"h-9 w-full rounded-[10px]\" />\n <Skeleton className=\"h-[300px] w-full rounded-[10px]\" />\n </div>\n );\n }\n\n return (\n <div className={className}>\n <Tabs\n value={activeTab}\n onValueChange={(value) => onTabChange(value as \"current\" | \"completed\")}\n className=\"w-full flex flex-col gap-3\"\n >\n <TabsList className=\"grid w-full grid-cols-2 bg-transparent border-b border-greys-grey-strokes-tables rounded-none h-auto p-0\">\n <TabsTrigger\n value=\"current\"\n className=\"py-2.5 px-2 rounded-none border-b-2 border-transparent text-text-primary data-[state=active]:text-primary-color-nuk-text data-[state=active]:border-primary-color-nuk-text data-[state=active]:bg-transparent data-[state=active]:shadow-none\"\n >\n Current Deals\n </TabsTrigger>\n <TabsTrigger\n value=\"completed\"\n disabled={!!gatedEmptyState}\n className=\"py-2.5 px-2 rounded-none border-b-2 border-transparent text-text-primary data-[state=active]:text-primary-color-nuk-text data-[state=active]:border-primary-color-nuk-text data-[state=active]:bg-transparent data-[state=active]:shadow-none disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n Completed\n </TabsTrigger>\n </TabsList>\n\n {error ? (\n <p className=\"body-text text-destructive py-6 text-center\">{errorMessage}</p>\n ) : (\n <>\n <div className=\"hidden sm:flex items-center bg-greys-grey-table-h rounded-t-[10px] py-0 px-3 gap-3 h-[33px]\">\n <span className=\"label-xs-table text-text-primary font-ss02\">Deals</span>\n </div>\n\n <TabsContent value=\"current\" className=\"mt-0\">\n {gatedEmptyState ? (\n gatedEmptyState\n ) : currentProjectDeals.length > 0 ? (\n <div className=\"flex flex-col gap-3 sm:gap-0\">\n {currentProjectDeals.map((deal) => (\n <ProjectDealCard\n key={deal.project_id}\n deal={deal}\n isCompleted={false}\n collabMembership={getCollabMembership(deal.project_id)}\n collabHref={getCollabHref(deal.project_id)}\n onCollabClick={getOnCollabClick?.(deal.project_id)}\n resolveImageUrl={resolveImageUrl}\n />\n ))}\n </div>\n ) : (\n <DealEmptyState message={currentEmptyMessage} />\n )}\n </TabsContent>\n\n <TabsContent value=\"completed\" className=\"mt-0\">\n {!hasCompletedContent ? (\n <DealEmptyState message={resolvedCompletedEmptyMessage} />\n ) : (\n <div className=\"flex flex-col gap-3 sm:gap-0\">\n {completedProjectDeals.map((deal) => (\n <ProjectDealCard\n key={deal.project_id}\n deal={deal}\n isCompleted={true}\n collabMembership={getCollabMembership(deal.project_id)}\n collabHref={getCollabHref(deal.project_id)}\n onCollabClick={getOnCollabClick?.(deal.project_id)}\n resolveImageUrl={resolveImageUrl}\n />\n ))}\n {manualDeals.map((deal) => (\n <ManualDealCard\n key={deal.id}\n deal={deal}\n onPreview={setPreviewDeal}\n onEdit={onEditDeal}\n onDelete={onDeleteDeal}\n onOpenDocument={onOpenDocument}\n resolveImageUrl={resolveImageUrl}\n />\n ))}\n </div>\n )}\n </TabsContent>\n </>\n )}\n </Tabs>\n\n <ManualDealPreviewDialog\n deal={previewDeal}\n open={!!previewDeal}\n onOpenChange={(open) => {\n if (!open) setPreviewDeal(null);\n }}\n onEdit={\n onEditDeal\n ? (deal) => {\n // Close the preview before handing off to the edit flow,\n // matching nukleus-app's original behavior.\n setPreviewDeal(null);\n onEditDeal(deal);\n }\n : undefined\n }\n onOpenDocument={onOpenDocument}\n resolveImageUrl={resolveImageUrl}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA0D;AAE1D,oBAAuE;AACvE,uBAUO;AA6ID;AAhCC,SAAS,oBAAoB,EAAE,SAAS,UAAU,GAA6B;AACpF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;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K,UAAU;AAAA,gBACzC,eAAe,mBAAmB,KAAK,UAAU;AAAA,gBACjD;AAAA;AAAA,cANK,KAAK;AAAA,YAOZ,CACD,GACH,IAEA,4CAAC,mCAAe,SAAS,qBAAqB,GAElD;AAAA,YAEA,4CAAC,6BAAY,OAAM,aAAY,WAAU,QACtC,WAAC,sBACA,4CAAC,mCAAe,SAAS,+BAA+B,IAExD,6CAAC,SAAI,WAAU,gCACZ;AAAA,oCAAsB,IAAI,CAAC,SAC1B;AAAA,gBAAC;AAAA;AAAA,kBAEC;AAAA,kBACA,aAAa;AAAA,kBACb,kBAAkB,oBAAoB,KAAK,UAAU;AAAA,kBACrD,YAAY,cAAc,KAAK,UAAU;AAAA,kBACzC,eAAe,mBAAmB,KAAK,UAAU;AAAA,kBACjD;AAAA;AAAA,gBANK,KAAK;AAAA,cAOZ,CACD;AAAA,cACA,YAAY,IAAI,CAAC,SAChB;AAAA,gBAAC;AAAA;AAAA,kBAEC;AAAA,kBACA,WAAW;AAAA,kBACX,QAAQ;AAAA,kBACR,UAAU;AAAA,kBACV;AAAA,kBACA;AAAA;AAAA,gBANK,KAAK;AAAA,cAOZ,CACD;AAAA,eACH,GAEJ;AAAA,aACF;AAAA;AAAA;AAAA,IAEJ;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN,MAAM,CAAC,CAAC;AAAA,QACR,cAAc,CAAC,SAAS;AACtB,cAAI,CAAC,KAAM,gBAAe,IAAI;AAAA,QAChC;AAAA,QACA,QACE,aACI,CAAC,SAAS;AAGR,yBAAe,IAAI;AACnB,qBAAW,IAAI;AAAA,QACjB,IACA;AAAA,QAEN;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/marketing/index.ts","../src/marketing/marketing-deals-panel.tsx"],"sourcesContent":["export {\n MarketingDealsPanel,\n type MarketingDealsAdapter,\n type MarketingDealsPanelProps,\n} from \"./marketing-deals-panel\";\n","import { useState, type MouseEvent, type ReactNode } from \"react\";\n\nimport {\n Button,\n Skeleton,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n cn,\n} from \"@nukleus-sports/ui-web\";\nimport {\n DealEmptyState,\n ManualDealCard,\n ManualDealPreviewDialog,\n ProjectDealCard,\n type EntityImageResolver,\n type ManualDeal,\n type ManualDealDocumentRef,\n type ProjectCollabMembership,\n type ProjectDeal,\n} from \"@nukleus-sports/ui-patterns/marketing\";\n\n/**\n * Reconciled from both apps' real current pages:\n * - `nukleus-app`'s `MarketingDealsTab.tsx` (`ClientMarketingTab`)\n * - `nukleus-clientapp`'s `pages/Marketing.tsx` + `hooks/useMarketing.ts`\n *\n * Both pages share one identical skeleton: a \"Current Deals\"/\"Completed\" tab\n * pair, a \"Deals\" label bar, a `ProjectDealCard` list per tab (`Completed`\n * also appends `ManualDealCard`s), matching empty states, and a shared\n * `ManualDealPreviewDialog`. That skeleton is this component's entire scope.\n *\n * ## Deliberately NOT in this shell (stays app-local, per CLAUDE.md's\n * page-shells rule and the decisions already made for this feature)\n * - The page header/title and the \"Record Past Deal\"/\"New Marketing Deal\"\n * buttons — `nukleus-app`-only chrome with no clientapp equivalent.\n * - `MarketingDealForm` (the CRUD create/edit form) and `DeleteDialog` —\n * `nukleus-app`-only, no clientapp read-only counterpart to reconcile\n * against, same reasoning as `MarketingOverviewPanel`/`Card` (also kept\n * app-local, rendered alongside this shell, not inside it).\n * - The top-level access gate (`nukleus-app`'s `marketingPermission ===\n * \"No Access\"` → `RestrictedAccessCard`; `clientapp`'s `!isAgencyLinked` →\n * `AgencyLinkBanner`). Both are a one-time \"should the deals experience\n * render at all\" decision made from each app's own permission shape\n * (`@nukleus-sports/core`'s `MarketingPermission` union) *before* this\n * shell ever mounts — not something this component re-derives.\n * - Project-membership resolution for the \"Collab\" link gate (`@nukleus-sports/\n * ui-patterns`' `ProjectDealCard` already enforces this structurally via its\n * required `collabMembership` prop) — the actual membership check is an\n * app-level query, surfaced here through `getCollabMembership`.\n *\n * ## Genuine differences reconciled (not formatting)\n * - Client-status gating (`nukleus-app`'s `isGated`, e.g. a \"Prospect\" client\n * can't have deals yet): `clientapp` has no such concept. Modeled as an\n * optional `gatedEmptyState` — when supplied, it replaces the Current tab's\n * content and the Completed tab is disabled, exactly matching `nukleus-app`'s\n * structure; omit it and both tabs behave normally (`clientapp`'s case).\n * - Loading skeleton: `clientapp` shows one before the tabs ever render;\n * `nukleus-app` has none (deals just populate once the query resolves).\n * Kept as an additive, opt-in `isLoading` prop — a loading affordance isn't\n * an agency-vs-client distinction, so both can use it.\n * - \"Deals\" label bar visibility on mobile: `nukleus-app` hides it below `sm`\n * (`hidden sm:flex`), `clientapp` always shows it. Kept `nukleus-app`'s\n * responsive hiding — the mobile layout is already a compact card stack\n * without a tabular header, so the label reads as redundant there.\n * - Completed-tab empty message: `nukleus-app`'s wording depends on whether\n * there are current-tab project deals (\"No past deals recorded yet.\" vs.\n * the fuller \"no deals at all\" message); `clientapp`'s is a single fixed\n * string. `completedEmptyMessage` accepts either a plain string or a\n * `(hasCurrentProjectDeals: boolean) => string` so both shapes work without\n * baking either app's copy into this package.\n */\n\n/**\n * The app-supplied bridge to its own data/backend — per\n * `docs/APPLICATION_ARCHITECTURE.md`'s Layer 5 adapter pattern, this shell\n * takes a single typed `adapter` prop rather than flat individual props, so\n * each app's own `use<Page>()` hook has one output shape to satisfy and\n * drifting apart becomes a compile error, not a silent runtime mismatch.\n */\nexport interface MarketingDealsAdapter {\n /** Shows a loading skeleton in place of the tabs. Additive — see module doc. */\n isLoading?: boolean;\n /** Shows an inline error message in place of the deal lists. */\n error?: boolean;\n errorMessage?: string;\n /** Shows a \"Retry\" button in the error state when supplied. Both apps'\n * real pages combine retrying whichever underlying query actually failed\n * behind one button — this stays a single callback for the same reason. */\n onRetry?: () => void;\n\n activeTab: \"current\" | \"completed\";\n onTabChange: (tab: \"current\" | \"completed\") => void;\n\n currentProjectDeals: ProjectDeal[];\n completedProjectDeals: ProjectDeal[];\n manualDeals: ManualDeal[];\n\n currentEmptyMessage: string;\n completedEmptyMessage: string | ((hasCurrentProjectDeals: boolean) => string);\n\n /**\n * Replaces the Current tab's content and disables the Completed tab —\n * `nukleus-app`'s client-status gating. Omit for `clientapp`'s ungated\n * behavior.\n */\n gatedEmptyState?: ReactNode;\n\n /** Required — `ProjectDealCard` structurally can't omit this. See module doc. */\n getCollabMembership: (projectId: string) => ProjectCollabMembership;\n getCollabHref: (projectId: string) => string;\n /** `nukleus-app`'s demo-mode upsell toast swaps the link for a button. */\n getOnCollabClick?: (\n projectId: string,\n ) => ((e: MouseEvent<HTMLButtonElement>) => void) | undefined;\n\n /** Presence of each enables that affordance on `ManualDealCard`/the preview\n * dialog — same shape `ManualDealCard`/`ManualDealPreviewDialog` already\n * take, so this just passes through. */\n onEditDeal?: (deal: ManualDeal) => void;\n onDeleteDeal?: (deal: ManualDeal) => void;\n onOpenDocument: (doc: ManualDealDocumentRef) => void;\n\n resolveImageUrl?: EntityImageResolver;\n}\n\nexport interface MarketingDealsPanelProps {\n adapter: MarketingDealsAdapter;\n /** Pure styling override — not part of the adapter, since it's never\n * backend/data-shaped. */\n className?: string;\n}\n\nexport function MarketingDealsPanel({ adapter, className }: MarketingDealsPanelProps) {\n const {\n isLoading,\n error,\n errorMessage = \"Could not load marketing deals. Please try again.\",\n onRetry,\n activeTab,\n onTabChange,\n currentProjectDeals,\n completedProjectDeals,\n manualDeals,\n currentEmptyMessage,\n completedEmptyMessage,\n gatedEmptyState,\n getCollabMembership,\n getCollabHref,\n getOnCollabClick,\n onEditDeal,\n onDeleteDeal,\n onOpenDocument,\n resolveImageUrl,\n } = adapter;\n\n const [previewDeal, setPreviewDeal] = useState<ManualDeal | null>(null);\n\n const resolvedCompletedEmptyMessage =\n typeof completedEmptyMessage === \"function\"\n ? completedEmptyMessage(currentProjectDeals.length > 0)\n : completedEmptyMessage;\n const hasCompletedContent = completedProjectDeals.length > 0 || manualDeals.length > 0;\n\n if (isLoading) {\n return (\n <div className={cn(\"flex flex-col gap-3\", className)}>\n <Skeleton className=\"h-9 w-full rounded-[10px]\" />\n <Skeleton className=\"h-[300px] w-full rounded-[10px]\" />\n </div>\n );\n }\n\n return (\n <div className={className}>\n <Tabs\n value={activeTab}\n onValueChange={(value) => onTabChange(value as \"current\" | \"completed\")}\n className=\"w-full flex flex-col gap-3\"\n >\n <TabsList className=\"grid w-full grid-cols-2 bg-transparent border-b border-greys-grey-strokes-tables rounded-none h-auto p-0\">\n <TabsTrigger\n value=\"current\"\n className=\"py-2.5 px-2 rounded-none border-b-2 border-transparent text-text-primary data-[state=active]:text-primary-color-nuk-text data-[state=active]:border-primary-color-nuk-text data-[state=active]:bg-transparent data-[state=active]:shadow-none\"\n >\n Current Deals\n </TabsTrigger>\n <TabsTrigger\n value=\"completed\"\n disabled={!!gatedEmptyState}\n className=\"py-2.5 px-2 rounded-none border-b-2 border-transparent text-text-primary data-[state=active]:text-primary-color-nuk-text data-[state=active]:border-primary-color-nuk-text data-[state=active]:bg-transparent data-[state=active]:shadow-none disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n Completed\n </TabsTrigger>\n </TabsList>\n\n {error ? (\n <div className=\"flex flex-col items-center justify-center gap-3 py-10 px-6\" role=\"alert\">\n <p className=\"body-text text-text-primary text-center\">{errorMessage}</p>\n {onRetry && (\n <Button variant=\"secondary\" size=\"form\" onClick={onRetry}>\n Retry\n </Button>\n )}\n </div>\n ) : (\n <>\n <div className=\"hidden sm:flex items-center bg-greys-grey-table-h rounded-t-[10px] py-0 px-3 gap-3 h-[33px]\">\n <span className=\"label-xs-table text-text-primary font-ss02\">Deals</span>\n </div>\n\n <TabsContent value=\"current\" className=\"mt-0\">\n {gatedEmptyState ? (\n gatedEmptyState\n ) : currentProjectDeals.length > 0 ? (\n <div className=\"flex flex-col gap-3 sm:gap-0\">\n {currentProjectDeals.map((deal) => (\n <ProjectDealCard\n key={deal.project_id}\n deal={deal}\n isCompleted={false}\n collabMembership={getCollabMembership(deal.project_id)}\n collabHref={getCollabHref(deal.project_id)}\n onCollabClick={getOnCollabClick?.(deal.project_id)}\n resolveImageUrl={resolveImageUrl}\n />\n ))}\n </div>\n ) : (\n <DealEmptyState message={currentEmptyMessage} />\n )}\n </TabsContent>\n\n <TabsContent value=\"completed\" className=\"mt-0\">\n {!hasCompletedContent ? (\n <DealEmptyState message={resolvedCompletedEmptyMessage} />\n ) : (\n <div className=\"flex flex-col gap-3 sm:gap-0\">\n {completedProjectDeals.map((deal) => (\n <ProjectDealCard\n key={deal.project_id}\n deal={deal}\n isCompleted={true}\n collabMembership={getCollabMembership(deal.project_id)}\n collabHref={getCollabHref(deal.project_id)}\n onCollabClick={getOnCollabClick?.(deal.project_id)}\n resolveImageUrl={resolveImageUrl}\n />\n ))}\n {manualDeals.map((deal) => (\n <ManualDealCard\n key={deal.id}\n deal={deal}\n onPreview={setPreviewDeal}\n onEdit={onEditDeal}\n onDelete={onDeleteDeal}\n onOpenDocument={onOpenDocument}\n resolveImageUrl={resolveImageUrl}\n />\n ))}\n </div>\n )}\n </TabsContent>\n </>\n )}\n </Tabs>\n\n <ManualDealPreviewDialog\n deal={previewDeal}\n open={!!previewDeal}\n onOpenChange={(open) => {\n if (!open) setPreviewDeal(null);\n }}\n onEdit={\n onEditDeal\n ? (deal) => {\n // Close the preview before handing off to the edit flow,\n // matching nukleus-app's original behavior.\n setPreviewDeal(null);\n onEditDeal(deal);\n }\n : undefined\n }\n onOpenDocument={onOpenDocument}\n resolveImageUrl={resolveImageUrl}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA0D;AAE1D,oBAQO;AACP,uBAUO;AAkJD;AAjCC,SAAS,oBAAoB,EAAE,SAAS,UAAU,GAA6B;AACpF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAC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ACF;AAAA,KACF;AAEJ;","names":[]}
@@ -65,6 +65,10 @@ interface MarketingDealsAdapter {
65
65
  /** Shows an inline error message in place of the deal lists. */
66
66
  error?: boolean;
67
67
  errorMessage?: string;
68
+ /** Shows a "Retry" button in the error state when supplied. Both apps'
69
+ * real pages combine retrying whichever underlying query actually failed
70
+ * behind one button — this stays a single callback for the same reason. */
71
+ onRetry?: () => void;
68
72
  activeTab: "current" | "completed";
69
73
  onTabChange: (tab: "current" | "completed") => void;
70
74
  currentProjectDeals: ProjectDeal[];
@@ -65,6 +65,10 @@ interface MarketingDealsAdapter {
65
65
  /** Shows an inline error message in place of the deal lists. */
66
66
  error?: boolean;
67
67
  errorMessage?: string;
68
+ /** Shows a "Retry" button in the error state when supplied. Both apps'
69
+ * real pages combine retrying whichever underlying query actually failed
70
+ * behind one button — this stays a single callback for the same reason. */
71
+ onRetry?: () => void;
68
72
  activeTab: "current" | "completed";
69
73
  onTabChange: (tab: "current" | "completed") => void;
70
74
  currentProjectDeals: ProjectDeal[];
package/dist/marketing.js CHANGED
@@ -1,6 +1,14 @@
1
1
  // src/marketing/marketing-deals-panel.tsx
2
2
  import { useState } from "react";
3
- import { Skeleton, Tabs, TabsContent, TabsList, TabsTrigger, cn } from "@nukleus-sports/ui-web";
3
+ import {
4
+ Button,
5
+ Skeleton,
6
+ Tabs,
7
+ TabsContent,
8
+ TabsList,
9
+ TabsTrigger,
10
+ cn
11
+ } from "@nukleus-sports/ui-web";
4
12
  import {
5
13
  DealEmptyState,
6
14
  ManualDealCard,
@@ -13,6 +21,7 @@ function MarketingDealsPanel({ adapter, className }) {
13
21
  isLoading,
14
22
  error,
15
23
  errorMessage = "Could not load marketing deals. Please try again.",
24
+ onRetry,
16
25
  activeTab,
17
26
  onTabChange,
18
27
  currentProjectDeals,
@@ -65,7 +74,10 @@ function MarketingDealsPanel({ adapter, className }) {
65
74
  }
66
75
  )
67
76
  ] }),
68
- error ? /* @__PURE__ */ jsx("p", { className: "body-text text-destructive py-6 text-center", children: errorMessage }) : /* @__PURE__ */ jsxs(Fragment, { children: [
77
+ error ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center gap-3 py-10 px-6", role: "alert", children: [
78
+ /* @__PURE__ */ jsx("p", { className: "body-text text-text-primary text-center", children: errorMessage }),
79
+ onRetry && /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "form", onClick: onRetry, children: "Retry" })
80
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
69
81
  /* @__PURE__ */ jsx("div", { className: "hidden sm:flex items-center bg-greys-grey-table-h rounded-t-[10px] py-0 px-3 gap-3 h-[33px]", children: /* @__PURE__ */ jsx("span", { className: "label-xs-table text-text-primary font-ss02", children: "Deals" }) }),
70
82
  /* @__PURE__ */ jsx(TabsContent, { value: "current", className: "mt-0", children: gatedEmptyState ? gatedEmptyState : currentProjectDeals.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 sm:gap-0", children: currentProjectDeals.map((deal) => /* @__PURE__ */ jsx(
71
83
  ProjectDealCard,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/marketing/marketing-deals-panel.tsx"],"sourcesContent":["import { useState, type MouseEvent, type ReactNode } from \"react\";\n\nimport { Skeleton, Tabs, TabsContent, TabsList, TabsTrigger, cn } from \"@nukleus-sports/ui-web\";\nimport {\n DealEmptyState,\n ManualDealCard,\n ManualDealPreviewDialog,\n ProjectDealCard,\n type EntityImageResolver,\n type ManualDeal,\n type ManualDealDocumentRef,\n type ProjectCollabMembership,\n type ProjectDeal,\n} from \"@nukleus-sports/ui-patterns/marketing\";\n\n/**\n * Reconciled from both apps' real current pages:\n * - `nukleus-app`'s `MarketingDealsTab.tsx` (`ClientMarketingTab`)\n * - `nukleus-clientapp`'s `pages/Marketing.tsx` + `hooks/useMarketing.ts`\n *\n * Both pages share one identical skeleton: a \"Current Deals\"/\"Completed\" tab\n * pair, a \"Deals\" label bar, a `ProjectDealCard` list per tab (`Completed`\n * also appends `ManualDealCard`s), matching empty states, and a shared\n * `ManualDealPreviewDialog`. That skeleton is this component's entire scope.\n *\n * ## Deliberately NOT in this shell (stays app-local, per CLAUDE.md's\n * page-shells rule and the decisions already made for this feature)\n * - The page header/title and the \"Record Past Deal\"/\"New Marketing Deal\"\n * buttons — `nukleus-app`-only chrome with no clientapp equivalent.\n * - `MarketingDealForm` (the CRUD create/edit form) and `DeleteDialog` —\n * `nukleus-app`-only, no clientapp read-only counterpart to reconcile\n * against, same reasoning as `MarketingOverviewPanel`/`Card` (also kept\n * app-local, rendered alongside this shell, not inside it).\n * - The top-level access gate (`nukleus-app`'s `marketingPermission ===\n * \"No Access\"` → `RestrictedAccessCard`; `clientapp`'s `!isAgencyLinked` →\n * `AgencyLinkBanner`). Both are a one-time \"should the deals experience\n * render at all\" decision made from each app's own permission shape\n * (`@nukleus-sports/core`'s `MarketingPermission` union) *before* this\n * shell ever mounts — not something this component re-derives.\n * - Project-membership resolution for the \"Collab\" link gate (`@nukleus-sports/\n * ui-patterns`' `ProjectDealCard` already enforces this structurally via its\n * required `collabMembership` prop) — the actual membership check is an\n * app-level query, surfaced here through `getCollabMembership`.\n *\n * ## Genuine differences reconciled (not formatting)\n * - Client-status gating (`nukleus-app`'s `isGated`, e.g. a \"Prospect\" client\n * can't have deals yet): `clientapp` has no such concept. Modeled as an\n * optional `gatedEmptyState` — when supplied, it replaces the Current tab's\n * content and the Completed tab is disabled, exactly matching `nukleus-app`'s\n * structure; omit it and both tabs behave normally (`clientapp`'s case).\n * - Loading skeleton: `clientapp` shows one before the tabs ever render;\n * `nukleus-app` has none (deals just populate once the query resolves).\n * Kept as an additive, opt-in `isLoading` prop — a loading affordance isn't\n * an agency-vs-client distinction, so both can use it.\n * - \"Deals\" label bar visibility on mobile: `nukleus-app` hides it below `sm`\n * (`hidden sm:flex`), `clientapp` always shows it. Kept `nukleus-app`'s\n * responsive hiding — the mobile layout is already a compact card stack\n * without a tabular header, so the label reads as redundant there.\n * - Completed-tab empty message: `nukleus-app`'s wording depends on whether\n * there are current-tab project deals (\"No past deals recorded yet.\" vs.\n * the fuller \"no deals at all\" message); `clientapp`'s is a single fixed\n * string. `completedEmptyMessage` accepts either a plain string or a\n * `(hasCurrentProjectDeals: boolean) => string` so both shapes work without\n * baking either app's copy into this package.\n */\n\n/**\n * The app-supplied bridge to its own data/backend — per\n * `docs/APPLICATION_ARCHITECTURE.md`'s Layer 5 adapter pattern, this shell\n * takes a single typed `adapter` prop rather than flat individual props, so\n * each app's own `use<Page>()` hook has one output shape to satisfy and\n * drifting apart becomes a compile error, not a silent runtime mismatch.\n */\nexport interface MarketingDealsAdapter {\n /** Shows a loading skeleton in place of the tabs. Additive — see module doc. */\n isLoading?: boolean;\n /** Shows an inline error message in place of the deal lists. */\n error?: boolean;\n errorMessage?: string;\n\n activeTab: \"current\" | \"completed\";\n onTabChange: (tab: \"current\" | \"completed\") => void;\n\n currentProjectDeals: ProjectDeal[];\n completedProjectDeals: ProjectDeal[];\n manualDeals: ManualDeal[];\n\n currentEmptyMessage: string;\n completedEmptyMessage: string | ((hasCurrentProjectDeals: boolean) => string);\n\n /**\n * Replaces the Current tab's content and disables the Completed tab —\n * `nukleus-app`'s client-status gating. Omit for `clientapp`'s ungated\n * behavior.\n */\n gatedEmptyState?: ReactNode;\n\n /** Required — `ProjectDealCard` structurally can't omit this. See module doc. */\n getCollabMembership: (projectId: string) => ProjectCollabMembership;\n getCollabHref: (projectId: string) => string;\n /** `nukleus-app`'s demo-mode upsell toast swaps the link for a button. */\n getOnCollabClick?: (\n projectId: string,\n ) => ((e: MouseEvent<HTMLButtonElement>) => void) | undefined;\n\n /** Presence of each enables that affordance on `ManualDealCard`/the preview\n * dialog — same shape `ManualDealCard`/`ManualDealPreviewDialog` already\n * take, so this just passes through. */\n onEditDeal?: (deal: ManualDeal) => void;\n onDeleteDeal?: (deal: ManualDeal) => void;\n onOpenDocument: (doc: ManualDealDocumentRef) => void;\n\n resolveImageUrl?: EntityImageResolver;\n}\n\nexport interface MarketingDealsPanelProps {\n adapter: MarketingDealsAdapter;\n /** Pure styling override — not part of the adapter, since it's never\n * backend/data-shaped. */\n className?: string;\n}\n\nexport function MarketingDealsPanel({ adapter, className }: MarketingDealsPanelProps) {\n const {\n isLoading,\n error,\n errorMessage = \"Could not load marketing deals. Please try again.\",\n activeTab,\n onTabChange,\n currentProjectDeals,\n completedProjectDeals,\n manualDeals,\n currentEmptyMessage,\n completedEmptyMessage,\n gatedEmptyState,\n getCollabMembership,\n getCollabHref,\n getOnCollabClick,\n onEditDeal,\n onDeleteDeal,\n onOpenDocument,\n resolveImageUrl,\n } = adapter;\n\n const [previewDeal, setPreviewDeal] = useState<ManualDeal | null>(null);\n\n const resolvedCompletedEmptyMessage =\n typeof completedEmptyMessage === \"function\"\n ? completedEmptyMessage(currentProjectDeals.length > 0)\n : completedEmptyMessage;\n const hasCompletedContent = completedProjectDeals.length > 0 || manualDeals.length > 0;\n\n if (isLoading) {\n return (\n <div className={cn(\"flex flex-col gap-3\", className)}>\n <Skeleton className=\"h-9 w-full rounded-[10px]\" />\n <Skeleton className=\"h-[300px] w-full rounded-[10px]\" />\n </div>\n );\n }\n\n return (\n <div className={className}>\n <Tabs\n value={activeTab}\n onValueChange={(value) => onTabChange(value as \"current\" | \"completed\")}\n className=\"w-full flex flex-col gap-3\"\n >\n <TabsList className=\"grid w-full grid-cols-2 bg-transparent border-b border-greys-grey-strokes-tables rounded-none h-auto p-0\">\n <TabsTrigger\n value=\"current\"\n className=\"py-2.5 px-2 rounded-none border-b-2 border-transparent text-text-primary data-[state=active]:text-primary-color-nuk-text data-[state=active]:border-primary-color-nuk-text data-[state=active]:bg-transparent data-[state=active]:shadow-none\"\n >\n Current Deals\n </TabsTrigger>\n <TabsTrigger\n value=\"completed\"\n disabled={!!gatedEmptyState}\n className=\"py-2.5 px-2 rounded-none border-b-2 border-transparent text-text-primary data-[state=active]:text-primary-color-nuk-text data-[state=active]:border-primary-color-nuk-text data-[state=active]:bg-transparent data-[state=active]:shadow-none disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n Completed\n </TabsTrigger>\n </TabsList>\n\n {error ? (\n <p className=\"body-text text-destructive py-6 text-center\">{errorMessage}</p>\n ) : (\n <>\n <div className=\"hidden sm:flex items-center bg-greys-grey-table-h rounded-t-[10px] py-0 px-3 gap-3 h-[33px]\">\n <span className=\"label-xs-table text-text-primary font-ss02\">Deals</span>\n </div>\n\n <TabsContent value=\"current\" className=\"mt-0\">\n {gatedEmptyState ? (\n gatedEmptyState\n ) : currentProjectDeals.length > 0 ? (\n <div className=\"flex flex-col gap-3 sm:gap-0\">\n {currentProjectDeals.map((deal) => (\n <ProjectDealCard\n key={deal.project_id}\n deal={deal}\n isCompleted={false}\n collabMembership={getCollabMembership(deal.project_id)}\n collabHref={getCollabHref(deal.project_id)}\n onCollabClick={getOnCollabClick?.(deal.project_id)}\n resolveImageUrl={resolveImageUrl}\n />\n ))}\n </div>\n ) : (\n <DealEmptyState message={currentEmptyMessage} />\n )}\n </TabsContent>\n\n <TabsContent value=\"completed\" className=\"mt-0\">\n {!hasCompletedContent ? (\n <DealEmptyState message={resolvedCompletedEmptyMessage} />\n ) : (\n <div className=\"flex flex-col gap-3 sm:gap-0\">\n {completedProjectDeals.map((deal) => (\n <ProjectDealCard\n key={deal.project_id}\n deal={deal}\n isCompleted={true}\n collabMembership={getCollabMembership(deal.project_id)}\n collabHref={getCollabHref(deal.project_id)}\n onCollabClick={getOnCollabClick?.(deal.project_id)}\n resolveImageUrl={resolveImageUrl}\n />\n ))}\n {manualDeals.map((deal) => (\n <ManualDealCard\n key={deal.id}\n deal={deal}\n onPreview={setPreviewDeal}\n onEdit={onEditDeal}\n onDelete={onDeleteDeal}\n onOpenDocument={onOpenDocument}\n resolveImageUrl={resolveImageUrl}\n />\n ))}\n </div>\n )}\n </TabsContent>\n </>\n )}\n </Tabs>\n\n <ManualDealPreviewDialog\n deal={previewDeal}\n open={!!previewDeal}\n onOpenChange={(open) => {\n if (!open) setPreviewDeal(null);\n }}\n onEdit={\n onEditDeal\n ? (deal) => {\n // Close the preview before handing off to the edit flow,\n // matching nukleus-app's original behavior.\n setPreviewDeal(null);\n onEditDeal(deal);\n }\n : undefined\n }\n onOpenDocument={onOpenDocument}\n resolveImageUrl={resolveImageUrl}\n />\n </div>\n );\n}\n"],"mappings":";AAAA,SAAS,gBAAiD;AAE1D,SAAS,UAAU,MAAM,aAAa,UAAU,aAAa,UAAU;AACvE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AA6ID,SAiCI,UAhCF,KADF;AAhCC,SAAS,oBAAoB,EAAE,SAAS,UAAU,GAA6B;AACpF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,CAAC,aAAa,cAAc,IAAI,SAA4B,IAAI;AAEtE,QAAM,gCACJ,OAAO,0BAA0B,aAC7B,sBAAsB,oBAAoB,SAAS,CAAC,IACpD;AACN,QAAM,sBAAsB,sBAAsB,SAAS,KAAK,YAAY,SAAS;AAErF,MAAI,WAAW;AACb,WACE,qBAAC,SAAI,WAAW,GAAG,uBAAuB,SAAS,GACjD;AAAA,0BAAC,YAAS,WAAU,6BAA4B;AAAA,MAChD,oBAAC,YAAS,WAAU,mCAAkC;AAAA,OACxD;AAAA,EAEJ;AAEA,SACE,qBAAC,SAAI,WACH;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP,eAAe,CAAC,UAAU,YAAY,KAAgC;AAAA,QACtE,WAAU;AAAA,QAEV;AAAA,+BAAC,YAAS,WAAU,4GAClB;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAM;AAAA,gBACN,WAAU;AAAA,g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AAA,gBANK,KAAK;AAAA,cAOZ,CACD;AAAA,eACH,GAEJ;AAAA,aACF;AAAA;AAAA;AAAA,IAEJ;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN,MAAM,CAAC,CAAC;AAAA,QACR,cAAc,CAAC,SAAS;AACtB,cAAI,CAAC,KAAM,gBAAe,IAAI;AAAA,QAChC;AAAA,QACA,QACE,aACI,CAAC,SAAS;AAGR,yBAAe,IAAI;AACnB,qBAAW,IAAI;AAAA,QACjB,IACA;AAAA,QAEN;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/marketing/marketing-deals-panel.tsx"],"sourcesContent":["import { useState, type MouseEvent, type ReactNode } from \"react\";\n\nimport {\n Button,\n Skeleton,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n cn,\n} from \"@nukleus-sports/ui-web\";\nimport {\n DealEmptyState,\n ManualDealCard,\n ManualDealPreviewDialog,\n ProjectDealCard,\n type EntityImageResolver,\n type ManualDeal,\n type ManualDealDocumentRef,\n type ProjectCollabMembership,\n type ProjectDeal,\n} from \"@nukleus-sports/ui-patterns/marketing\";\n\n/**\n * Reconciled from both apps' real current pages:\n * - `nukleus-app`'s `MarketingDealsTab.tsx` (`ClientMarketingTab`)\n * - `nukleus-clientapp`'s `pages/Marketing.tsx` + `hooks/useMarketing.ts`\n *\n * Both pages share one identical skeleton: a \"Current Deals\"/\"Completed\" tab\n * pair, a \"Deals\" label bar, a `ProjectDealCard` list per tab (`Completed`\n * also appends `ManualDealCard`s), matching empty states, and a shared\n * `ManualDealPreviewDialog`. That skeleton is this component's entire scope.\n *\n * ## Deliberately NOT in this shell (stays app-local, per CLAUDE.md's\n * page-shells rule and the decisions already made for this feature)\n * - The page header/title and the \"Record Past Deal\"/\"New Marketing Deal\"\n * buttons — `nukleus-app`-only chrome with no clientapp equivalent.\n * - `MarketingDealForm` (the CRUD create/edit form) and `DeleteDialog` —\n * `nukleus-app`-only, no clientapp read-only counterpart to reconcile\n * against, same reasoning as `MarketingOverviewPanel`/`Card` (also kept\n * app-local, rendered alongside this shell, not inside it).\n * - The top-level access gate (`nukleus-app`'s `marketingPermission ===\n * \"No Access\"` → `RestrictedAccessCard`; `clientapp`'s `!isAgencyLinked` →\n * `AgencyLinkBanner`). Both are a one-time \"should the deals experience\n * render at all\" decision made from each app's own permission shape\n * (`@nukleus-sports/core`'s `MarketingPermission` union) *before* this\n * shell ever mounts — not something this component re-derives.\n * - Project-membership resolution for the \"Collab\" link gate (`@nukleus-sports/\n * ui-patterns`' `ProjectDealCard` already enforces this structurally via its\n * required `collabMembership` prop) — the actual membership check is an\n * app-level query, surfaced here through `getCollabMembership`.\n *\n * ## Genuine differences reconciled (not formatting)\n * - Client-status gating (`nukleus-app`'s `isGated`, e.g. a \"Prospect\" client\n * can't have deals yet): `clientapp` has no such concept. Modeled as an\n * optional `gatedEmptyState` — when supplied, it replaces the Current tab's\n * content and the Completed tab is disabled, exactly matching `nukleus-app`'s\n * structure; omit it and both tabs behave normally (`clientapp`'s case).\n * - Loading skeleton: `clientapp` shows one before the tabs ever render;\n * `nukleus-app` has none (deals just populate once the query resolves).\n * Kept as an additive, opt-in `isLoading` prop — a loading affordance isn't\n * an agency-vs-client distinction, so both can use it.\n * - \"Deals\" label bar visibility on mobile: `nukleus-app` hides it below `sm`\n * (`hidden sm:flex`), `clientapp` always shows it. Kept `nukleus-app`'s\n * responsive hiding — the mobile layout is already a compact card stack\n * without a tabular header, so the label reads as redundant there.\n * - Completed-tab empty message: `nukleus-app`'s wording depends on whether\n * there are current-tab project deals (\"No past deals recorded yet.\" vs.\n * the fuller \"no deals at all\" message); `clientapp`'s is a single fixed\n * string. `completedEmptyMessage` accepts either a plain string or a\n * `(hasCurrentProjectDeals: boolean) => string` so both shapes work without\n * baking either app's copy into this package.\n */\n\n/**\n * The app-supplied bridge to its own data/backend — per\n * `docs/APPLICATION_ARCHITECTURE.md`'s Layer 5 adapter pattern, this shell\n * takes a single typed `adapter` prop rather than flat individual props, so\n * each app's own `use<Page>()` hook has one output shape to satisfy and\n * drifting apart becomes a compile error, not a silent runtime mismatch.\n */\nexport interface MarketingDealsAdapter {\n /** Shows a loading skeleton in place of the tabs. Additive — see module doc. */\n isLoading?: boolean;\n /** Shows an inline error message in place of the deal lists. */\n error?: boolean;\n errorMessage?: string;\n /** Shows a \"Retry\" button in the error state when supplied. Both apps'\n * real pages combine retrying whichever underlying query actually failed\n * behind one button — this stays a single callback for the same reason. */\n onRetry?: () => void;\n\n activeTab: \"current\" | \"completed\";\n onTabChange: (tab: \"current\" | \"completed\") => void;\n\n currentProjectDeals: ProjectDeal[];\n completedProjectDeals: ProjectDeal[];\n manualDeals: ManualDeal[];\n\n currentEmptyMessage: string;\n completedEmptyMessage: string | ((hasCurrentProjectDeals: boolean) => string);\n\n /**\n * Replaces the Current tab's content and disables the Completed tab —\n * `nukleus-app`'s client-status gating. Omit for `clientapp`'s ungated\n * behavior.\n */\n gatedEmptyState?: ReactNode;\n\n /** Required — `ProjectDealCard` structurally can't omit this. See module doc. */\n getCollabMembership: (projectId: string) => ProjectCollabMembership;\n getCollabHref: (projectId: string) => string;\n /** `nukleus-app`'s demo-mode upsell toast swaps the link for a button. */\n getOnCollabClick?: (\n projectId: string,\n ) => ((e: MouseEvent<HTMLButtonElement>) => void) | undefined;\n\n /** Presence of each enables that affordance on `ManualDealCard`/the preview\n * dialog — same shape `ManualDealCard`/`ManualDealPreviewDialog` already\n * take, so this just passes through. */\n onEditDeal?: (deal: ManualDeal) => void;\n onDeleteDeal?: (deal: ManualDeal) => void;\n onOpenDocument: (doc: ManualDealDocumentRef) => void;\n\n resolveImageUrl?: EntityImageResolver;\n}\n\nexport interface MarketingDealsPanelProps {\n adapter: MarketingDealsAdapter;\n /** Pure styling override — not part of the adapter, since it's never\n * backend/data-shaped. */\n className?: string;\n}\n\nexport function MarketingDealsPanel({ adapter, className }: MarketingDealsPanelProps) {\n const {\n isLoading,\n error,\n errorMessage = \"Could not load marketing deals. Please try again.\",\n onRetry,\n activeTab,\n onTabChange,\n currentProjectDeals,\n completedProjectDeals,\n manualDeals,\n currentEmptyMessage,\n completedEmptyMessage,\n gatedEmptyState,\n getCollabMembership,\n getCollabHref,\n getOnCollabClick,\n onEditDeal,\n onDeleteDeal,\n onOpenDocument,\n resolveImageUrl,\n } = adapter;\n\n const [previewDeal, setPreviewDeal] = useState<ManualDeal | null>(null);\n\n const resolvedCompletedEmptyMessage =\n typeof completedEmptyMessage === \"function\"\n ? completedEmptyMessage(currentProjectDeals.length > 0)\n : completedEmptyMessage;\n const hasCompletedContent = completedProjectDeals.length > 0 || manualDeals.length > 0;\n\n if (isLoading) {\n return (\n <div className={cn(\"flex flex-col gap-3\", className)}>\n <Skeleton className=\"h-9 w-full rounded-[10px]\" />\n <Skeleton className=\"h-[300px] w-full rounded-[10px]\" />\n </div>\n );\n }\n\n return (\n <div className={className}>\n <Tabs\n value={activeTab}\n onValueChange={(value) => onTabChange(value as \"current\" | \"completed\")}\n className=\"w-full flex flex-col gap-3\"\n >\n <TabsList className=\"grid w-full grid-cols-2 bg-transparent border-b border-greys-grey-strokes-tables rounded-none h-auto p-0\">\n <TabsTrigger\n value=\"current\"\n className=\"py-2.5 px-2 rounded-none border-b-2 border-transparent text-text-primary data-[state=active]:text-primary-color-nuk-text data-[state=active]:border-primary-color-nuk-text data-[state=active]:bg-transparent data-[state=active]:shadow-none\"\n >\n Current Deals\n </TabsTrigger>\n <TabsTrigger\n value=\"completed\"\n disabled={!!gatedEmptyState}\n className=\"py-2.5 px-2 rounded-none border-b-2 border-transparent text-text-primary data-[state=active]:text-primary-color-nuk-text data-[state=active]:border-primary-color-nuk-text data-[state=active]:bg-transparent data-[state=active]:shadow-none disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n Completed\n </TabsTrigger>\n </TabsList>\n\n {error ? (\n <div className=\"flex flex-col items-center justify-center gap-3 py-10 px-6\" role=\"alert\">\n <p className=\"body-text text-text-primary text-center\">{errorMessage}</p>\n {onRetry && (\n <Button variant=\"secondary\" size=\"form\" onClick={onRetry}>\n Retry\n </Button>\n )}\n </div>\n ) : (\n <>\n <div className=\"hidden sm:flex items-center bg-greys-grey-table-h rounded-t-[10px] py-0 px-3 gap-3 h-[33px]\">\n <span className=\"label-xs-table text-text-primary font-ss02\">Deals</span>\n </div>\n\n <TabsContent value=\"current\" className=\"mt-0\">\n {gatedEmptyState ? (\n gatedEmptyState\n ) : currentProjectDeals.length > 0 ? (\n <div className=\"flex flex-col gap-3 sm:gap-0\">\n {currentProjectDeals.map((deal) => (\n <ProjectDealCard\n key={deal.project_id}\n deal={deal}\n isCompleted={false}\n collabMembership={getCollabMembership(deal.project_id)}\n collabHref={getCollabHref(deal.project_id)}\n onCollabClick={getOnCollabClick?.(deal.project_id)}\n resolveImageUrl={resolveImageUrl}\n />\n ))}\n </div>\n ) : (\n <DealEmptyState message={currentEmptyMessage} />\n )}\n </TabsContent>\n\n <TabsContent value=\"completed\" className=\"mt-0\">\n {!hasCompletedContent ? (\n <DealEmptyState message={resolvedCompletedEmptyMessage} />\n ) : (\n <div className=\"flex flex-col gap-3 sm:gap-0\">\n {completedProjectDeals.map((deal) => (\n <ProjectDealCard\n key={deal.project_id}\n deal={deal}\n isCompleted={true}\n collabMembership={getCollabMembership(deal.project_id)}\n collabHref={getCollabHref(deal.project_id)}\n onCollabClick={getOnCollabClick?.(deal.project_id)}\n resolveImageUrl={resolveImageUrl}\n />\n ))}\n {manualDeals.map((deal) => (\n <ManualDealCard\n key={deal.id}\n deal={deal}\n onPreview={setPreviewDeal}\n onEdit={onEditDeal}\n onDelete={onDeleteDeal}\n onOpenDocument={onOpenDocument}\n resolveImageUrl={resolveImageUrl}\n />\n ))}\n </div>\n )}\n </TabsContent>\n </>\n )}\n </Tabs>\n\n <ManualDealPreviewDialog\n deal={previewDeal}\n open={!!previewDeal}\n onOpenChange={(open) => {\n if (!open) setPreviewDeal(null);\n }}\n onEdit={\n onEditDeal\n ? (deal) => {\n // Close the preview before handing off to the edit flow,\n // matching nukleus-app's original behavior.\n setPreviewDeal(null);\n onEditDeal(deal);\n }\n : undefined\n }\n onOpenDocument={onOpenDocument}\n resolveImageUrl={resolveImageUrl}\n />\n </div>\n );\n}\n"],"mappings":";AAAA,SAAS,gBAAiD;AAE1D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AAkJD,SAwCI,UAvCF,KADF;AAjCC,SAAS,oBAAoB,EAAE,SAAS,UAAU,GAA6B;AACpF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,CAAC,aAAa,cAAc,IAAI,SAA4B,IAAI;AAEtE,QAAM,gCACJ,OAAO,0BAA0B,aAC7B,sBAAsB,oBAAoB,SAAS,CAAC,IACpD;AACN,QAAM,sBAAsB,sBAAsB,SAAS,KAAK,YAAY,SAAS;AAErF,MAAI,WAAW;AACb,WACE,qBAAC,SAAI,WAAW,GAAG,uBAAuB,SAAS,GACjD;AAAA,0BAAC,YAAS,WAAU,6BAA4B;AAAA,MAChD,oBAAC,YAAS,WAAU,mCAAkC;AAAA,OACxD;AAAA,EAEJ;AAEA,SACE,qBAAC,SAAI,WACH;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP,eAAe,CAAC,UAAU,YAAY,KAAgC;AAAA,QACtE,WAAU;AAAA,QAEV;AAAA,+BAAC,YAAS,WAAU,4GAClB;AAAA;AAAA,cAAC;AAAA;AAA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K;AAAA,cAOZ,CACD;AAAA,cACA,YAAY,IAAI,CAAC,SAChB;AAAA,gBAAC;AAAA;AAAA,kBAEC;AAAA,kBACA,WAAW;AAAA,kBACX,QAAQ;AAAA,kBACR,UAAU;AAAA,kBACV;AAAA,kBACA;AAAA;AAAA,gBANK,KAAK;AAAA,cAOZ,CACD;AAAA,eACH,GAEJ;AAAA,aACF;AAAA;AAAA;AAAA,IAEJ;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN,MAAM,CAAC,CAAC;AAAA,QACR,cAAc,CAAC,SAAS;AACtB,cAAI,CAAC,KAAM,gBAAe,IAAI;AAAA,QAChC;AAAA,QACA,QACE,aACI,CAAC,SAAS;AAGR,yBAAe,IAAI;AACnB,qBAAW,IAAI;AAAA,QACjB,IACA;AAAA,QAEN;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nukleus-sports/page-shells",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -40,8 +40,8 @@
40
40
  "react-dom": "^18 || ^19"
41
41
  },
42
42
  "dependencies": {
43
- "@nukleus-sports/ui-patterns": "workspace:*",
44
- "@nukleus-sports/ui-web": "workspace:*"
43
+ "@nukleus-sports/ui-patterns": "^0.1.1",
44
+ "@nukleus-sports/ui-web": "^0.1.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/node": "^26.6.1",