@burdenoff/microfe-integrations 2026.1109.3 → 2026.1113.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.
Files changed (50) hide show
  1. package/dist/generated/wspace-operations.d.ts +4 -0
  2. package/dist/generated/wspace-operations.js +1 -0
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/integrations/IntegrationsUserRoutes.d.ts +7 -0
  5. package/dist/integrations/IntegrationsUserRoutes.js +57 -47
  6. package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
  7. package/dist/integrations/components/AddConnectionDialog.d.ts +8 -2
  8. package/dist/integrations/components/AddConnectionDialog.js +17 -15
  9. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  10. package/dist/integrations/components/ConnectedAppsMoreMenu.d.ts +12 -0
  11. package/dist/integrations/components/ConnectedAppsMoreMenu.js +60 -0
  12. package/dist/integrations/components/ConnectedAppsMoreMenu.js.map +1 -0
  13. package/dist/integrations/components/ConnectionCard.d.ts +7 -1
  14. package/dist/integrations/components/ConnectionCard.js +40 -26
  15. package/dist/integrations/components/ConnectionCard.js.map +1 -1
  16. package/dist/integrations/components/PopularAppTiles.d.ts +7 -0
  17. package/dist/integrations/components/PopularAppTiles.js +33 -0
  18. package/dist/integrations/components/PopularAppTiles.js.map +1 -0
  19. package/dist/integrations/components/ProviderCard.d.ts +6 -0
  20. package/dist/integrations/components/ProviderCard.js +67 -61
  21. package/dist/integrations/components/ProviderCard.js.map +1 -1
  22. package/dist/integrations/components/RecentActivity.d.ts +7 -0
  23. package/dist/integrations/components/RecentActivity.js +74 -0
  24. package/dist/integrations/components/RecentActivity.js.map +1 -0
  25. package/dist/integrations/hooks/useLogs.d.ts +2 -0
  26. package/dist/integrations/hooks/useLogs.js +2 -1
  27. package/dist/integrations/hooks/useLogs.js.map +1 -1
  28. package/dist/integrations/hooks/useVaultName.d.ts +1 -0
  29. package/dist/integrations/hooks/useVaultName.js +27 -0
  30. package/dist/integrations/hooks/useVaultName.js.map +1 -0
  31. package/dist/integrations/pages/ConnectionDetail.js +561 -283
  32. package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
  33. package/dist/integrations/pages/ConnectionLogs.d.ts +3 -0
  34. package/dist/integrations/pages/ConnectionLogs.js +178 -142
  35. package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
  36. package/dist/integrations/pages/ConnectionsList.js +376 -243
  37. package/dist/integrations/pages/ConnectionsList.js.map +1 -1
  38. package/dist/integrations/pages/ProviderCatalog.js +199 -179
  39. package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
  40. package/dist/integrations/pages/ProviderDetail.js +284 -265
  41. package/dist/integrations/pages/ProviderDetail.js.map +1 -1
  42. package/dist/integrations/providers/IntegrationsProvider.js +22 -21
  43. package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
  44. package/dist/integrations/types/index.d.ts +12 -0
  45. package/dist/integrations/utils/connectedApps.d.ts +26 -0
  46. package/dist/integrations/utils/connectedApps.js +46 -0
  47. package/dist/integrations/utils/connectedApps.js.map +1 -0
  48. package/dist/integrations/utils/mappers.js +1 -0
  49. package/dist/integrations/utils/mappers.js.map +1 -1
  50. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectionCard.js","names":["_Fragment","PrivateBadge","tr","useTr","connection","label","Lock","ConnectionCard","formatLastUsed","useFormatLastUsed","displayMode","GlassCard","cn","onClick","ProviderIcon","ConnectionStatusBadge","Fragment","ChevronRight"],"sources":["../../../src/integrations/components/ConnectionCard.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { ChevronRight, Lock } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../hooks/useTr';\nimport { useFormatLastUsed } from '../hooks/useFormatLastUsed';\nimport type { IntegrationConnection } from '../types';\nimport { ProviderIcon } from '@burdenoff/fe-libs/connections';\nimport { ConnectionStatusBadge } from './ConnectionStatusBadge';\n\ninterface ConnectionCardProps {\n connection: IntegrationConnection;\n displayMode?: 'grid' | 'list';\n onClick?: (connection: IntegrationConnection) => void;\n}\n\n/**\n * A lock for a connection only the people it is shared with can use (BOFF-9726).\n */\nconst PrivateBadge: FC<{ connection: IntegrationConnection }> = ({ connection }) => {\n const tr = useTr();\n if (connection.visibility !== 'RESTRICTED') return null;\n const label = tr(\n 'integrations.connectionCard.private',\n 'Private: only the people it is shared with'\n );\n return (\n <span\n className=\"inline-flex shrink-0 items-center text-text-secondary\"\n title={label}\n data-testid=\"connection-private-badge\"\n >\n <Lock size={13} aria-hidden=\"true\" />\n <span className=\"sr-only\">{label}</span>\n </span>\n );\n};\n\n/**\n * Card showing connection info (provider icon, connection name, account email, status badge, last used).\n */\nexport const ConnectionCard: FC<ConnectionCardProps> = ({\n connection,\n displayMode = 'grid',\n onClick,\n}) => {\n const tr = useTr();\n const formatLastUsed = useFormatLastUsed();\n\n if (displayMode === 'list') {\n return (\n <GlassCard\n className={cn(\n 'group flex items-center gap-4 p-4 border-border-seam',\n 'cursor-pointer hover:shadow-[var(--shadow-pop)] hover:border-border-strong',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'animate-in fade-in-0'\n )}\n onClick={() => onClick?.(connection)}\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick?.(connection);\n }\n }}\n >\n <ProviderIcon provider={connection.provider} size={40} />\n\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <h3 className=\"font-semibold text-text-primary truncate\">{connection.name}</h3>\n <PrivateBadge connection={connection} />\n <ConnectionStatusBadge status={connection.status} />\n </div>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <span className=\"text-sm text-text-secondary\">{connection.provider.name}</span>\n {connection.externalAccountEmail && (\n <>\n <span className=\"text-text-secondary\">·</span>\n <span className=\"text-sm text-text-secondary truncate\">\n {connection.externalAccountEmail}\n </span>\n </>\n )}\n </div>\n </div>\n\n <div className=\"flex items-center gap-3 flex-shrink-0\">\n <span className=\"text-xs text-text-secondary\">\n {tr('integrations.connectionCard.lastUsed', 'Last used {{time}}', {\n time: formatLastUsed(connection.lastUsedAt),\n })}\n </span>\n <ChevronRight\n size={18}\n className=\"text-text-secondary group-hover:text-primary transition-colors\"\n />\n </div>\n </GlassCard>\n );\n }\n\n return (\n <GlassCard\n className={cn(\n 'group relative flex flex-col p-5 border-border-seam',\n 'cursor-pointer hover:shadow-[var(--shadow-pop)] hover:border-border-strong',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'animate-in fade-in-0'\n )}\n onClick={() => onClick?.(connection)}\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick?.(connection);\n }\n }}\n >\n <div className=\"flex items-start justify-between mb-3\">\n <ProviderIcon provider={connection.provider} size={44} />\n <ConnectionStatusBadge status={connection.status} />\n </div>\n\n <div className=\"mb-0.5 flex items-center gap-1.5\">\n <h3 className=\"font-semibold text-text-primary truncate\">{connection.name}</h3>\n <PrivateBadge connection={connection} />\n </div>\n <p className=\"text-sm text-text-secondary truncate\">{connection.provider.name}</p>\n\n {connection.externalAccountEmail && (\n <p className=\"text-xs text-text-secondary truncate mt-1\">\n {connection.externalAccountName || connection.externalAccountEmail}\n </p>\n )}\n\n {connection.description && (\n <p className=\"text-sm text-text-secondary line-clamp-2 mt-2\">{connection.description}</p>\n )}\n\n <div className=\"flex items-center justify-between mt-auto pt-3 border-t border-border-seam\">\n <span className=\"text-xs text-text-secondary\">\n {tr('integrations.connectionCard.lastUsed', 'Last used {{time}}', {\n time: formatLastUsed(connection.lastUsedAt),\n })}\n </span>\n <ChevronRight\n size={16}\n className=\"text-text-secondary group-hover:text-primary transition-colors\"\n />\n </div>\n </GlassCard>\n );\n};\n"],"mappings":";;;;;;;;;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U,EAC5C,CAAC;IACG,CAAA,GACN,kBAACa,GAAD;KACE,MAAM;KACN,WAAU;IACX,CAAA,CACE;;EACI;;AAEf"}
1
+ {"version":3,"file":"ConnectionCard.js","names":["_Fragment","PrivateBadge","tr","useTr","connection","label","Lock","ConnectionCard","formatLastUsed","useFormatLastUsed","anchorProps","suggestAnchorProps","displayMode","GlassCard","cn","onClick","ProviderIcon","ConnectionStatusBadge","Fragment","action","ChevronRight"],"sources":["../../../src/integrations/components/ConnectionCard.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\nimport { ChevronRight, Lock } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../hooks/useTr';\nimport { useFormatLastUsed } from '../hooks/useFormatLastUsed';\nimport type { IntegrationConnection } from '../types';\nimport { ProviderIcon } from '@burdenoff/fe-libs/connections';\nimport { suggestAnchorProps } from '@burdenoff/fe-libs/shared/proactive';\nimport { ConnectionStatusBadge } from './ConnectionStatusBadge';\n\ninterface ConnectionCardProps {\n connection: IntegrationConnection;\n displayMode?: 'grid' | 'list';\n onClick?: (connection: IntegrationConnection) => void;\n /**\n * A button on the card itself, e.g. Navigation v2's \"Reconnect\" on a broken\n * connection. The button stops its own click and key events, so using it\n * does not also open the connection.\n */\n action?: ReactNode;\n}\n\n/**\n * A lock for a connection only the people it is shared with can use (BOFF-9726).\n */\nconst PrivateBadge: FC<{ connection: IntegrationConnection }> = ({ connection }) => {\n const tr = useTr();\n if (connection.visibility !== 'RESTRICTED') return null;\n const label = tr(\n 'integrations.connectionCard.private',\n 'Private: only the people it is shared with'\n );\n return (\n <span\n className=\"inline-flex shrink-0 items-center text-text-secondary\"\n title={label}\n data-testid=\"connection-private-badge\"\n >\n <Lock size={13} aria-hidden=\"true\" />\n <span className=\"sr-only\">{label}</span>\n </span>\n );\n};\n\n/**\n * Card showing connection info (provider icon, connection name, account email, status badge, last used).\n */\nexport const ConnectionCard: FC<ConnectionCardProps> = ({\n connection,\n displayMode = 'grid',\n onClick,\n action,\n}) => {\n const tr = useTr();\n const formatLastUsed = useFormatLastUsed();\n // A proactive suggestion about this connection (an expired token, say) pins\n // to the card (contract C7, BOFF-13166).\n const anchorProps = suggestAnchorProps({ entityType: 'connection', entityId: connection.id });\n\n if (displayMode === 'list') {\n return (\n <GlassCard\n {...anchorProps}\n className={cn(\n 'group flex items-center gap-4 p-4 border-border-seam',\n 'cursor-pointer hover:shadow-[var(--shadow-pop)] hover:border-border-strong',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'animate-in fade-in-0'\n )}\n onClick={() => onClick?.(connection)}\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick?.(connection);\n }\n }}\n >\n <ProviderIcon provider={connection.provider} size={40} />\n\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <h3 className=\"font-semibold text-text-primary truncate\">{connection.name}</h3>\n <PrivateBadge connection={connection} />\n <ConnectionStatusBadge status={connection.status} />\n </div>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <span className=\"text-sm text-text-secondary\">{connection.provider.name}</span>\n {connection.externalAccountEmail && (\n <>\n <span className=\"text-text-secondary\">·</span>\n <span className=\"text-sm text-text-secondary truncate\">\n {connection.externalAccountEmail}\n </span>\n </>\n )}\n </div>\n </div>\n\n <div className=\"flex items-center gap-3 flex-shrink-0\">\n {action}\n <span className=\"text-xs text-text-secondary\">\n {tr('integrations.connectionCard.lastUsed', 'Last used {{time}}', {\n time: formatLastUsed(connection.lastUsedAt),\n })}\n </span>\n <ChevronRight\n size={18}\n className=\"text-text-secondary group-hover:text-primary transition-colors\"\n />\n </div>\n </GlassCard>\n );\n }\n\n return (\n <GlassCard\n {...anchorProps}\n className={cn(\n 'group relative flex flex-col p-5 border-border-seam',\n 'cursor-pointer hover:shadow-[var(--shadow-pop)] hover:border-border-strong',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'animate-in fade-in-0'\n )}\n onClick={() => onClick?.(connection)}\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick?.(connection);\n }\n }}\n >\n <div className=\"flex items-start justify-between mb-3\">\n <ProviderIcon provider={connection.provider} size={44} />\n <ConnectionStatusBadge status={connection.status} />\n </div>\n\n <div className=\"mb-0.5 flex items-center gap-1.5\">\n <h3 className=\"font-semibold text-text-primary truncate\">{connection.name}</h3>\n <PrivateBadge connection={connection} />\n </div>\n <p className=\"text-sm text-text-secondary truncate\">{connection.provider.name}</p>\n\n {connection.externalAccountEmail && (\n <p className=\"text-xs text-text-secondary truncate mt-1\">\n {connection.externalAccountName || connection.externalAccountEmail}\n </p>\n )}\n\n {connection.description && (\n <p className=\"text-sm text-text-secondary line-clamp-2 mt-2\">{connection.description}</p>\n )}\n\n <div\n className={cn(\n 'flex items-center justify-between mt-auto pt-3 border-t border-border-seam',\n action && 'gap-2'\n )}\n >\n <span className=\"text-xs text-text-secondary\">\n {tr('integrations.connectionCard.lastUsed', 'Last used {{time}}', {\n time: formatLastUsed(connection.lastUsedAt),\n })}\n </span>\n {action}\n <ChevronRight\n size={16}\n className=\"text-text-secondary group-hover:text-primary transition-colors\"\n />\n </div>\n </GlassCard>\n );\n};\n"],"mappings":";;;;;;;;;;AA0BA,IAAMC,KAA2D,EAAE,oBAAiB;CAClF,IAAMC,IAAKC,EAAM;CACjB,IAAIC,EAAW,eAAe,cAAc,OAAO;CACnD,IAAMC,IAAQH,EACZ,uCACA,4CACF;CACA,OACE,kBAAC,QAAD;EACE,WAAU;EACV,OAAOG;EACP,eAAY;EAHd,UAAA,CAKE,kBAACC,GAAD;GAAM,MAAM;GAAI,eAAY;EAAQ,CAAA,GACpC,kBAAC,QAAD;GAAM,WAAU;GAAW,UAAAD;EAAY,CAAA,CACn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,CAAC;KACG,CAAA;KACN,kBAACgB,GAAD;MACE,MAAM;MACN,WAAU;KACX,CAAA;IACE;;EACI;C,KAKb,kBAACP,GAAD;EACE,GAAIH;EACJ,WAAWI,EACT,uDACA,8EACA,gGACA,sBACF;EACA,eAAeC,IAAUX,CAAU;EACnC,MAAK;EACL,UAAU;EACV,YAAY,MAAM;GAChB,CAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,SACjC,EAAE,eAAe,GACjBW,IAAUX,CAAU;EAExB;EAhBF,UAAA;GAkBE,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAACY,GAAD;KAAc,UAAUZ,EAAW;KAAU,MAAM;IAAK,CAAA,GACxD,kBAACa,GAAD,EAAuB,QAAQb,EAAW,OAAS,CAAA,CAChD;;GAEL,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;KAA4C,UAAAA,EAAW;IAAS,CAAA,GAC9E,kBAACH,GAAD,EAA0B,cAAa,CAAA,CACpC;;GACL,kBAAC,KAAD;IAAG,WAAU;IAAwC,UAAAG,EAAW,SAAS;GAAQ,CAAA;GAEhFA,EAAW,wBACV,kBAAC,KAAD;IAAG,WAAU;IACV,UAAAA,EAAW,uBAAuBA,EAAW;GAC7C,CAAA;GAGJA,EAAW,eACV,kBAAC,KAAD;IAAG,WAAU;IAAiD,UAAAA,EAAW;GAAe,CAAA;GAG1F,kBAAC,OAAD;IACE,WAAWU,EACT,8EACAK,KAAU,OACZ;IAJF,UAAA;KAME,kBAAC,QAAD;MAAM,WAAU;MACb,UAAAjB,EAAG,wCAAwC,sBAAsB,EAChE,MAAMM,EAAeJ,EAAW,UAAU,EAC5C,CAAC;KACG,CAAA;KACLe;KACD,kBAACC,GAAD;MACE,MAAM;MACN,WAAU;KACX,CAAA;IACE;;EACI;;AAEf"}
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { IntegrationProvider } from '../types';
3
+ interface PopularAppTilesProps {
4
+ onPick: (provider: IntegrationProvider) => void;
5
+ }
6
+ export declare const PopularAppTiles: FC<PopularAppTilesProps>;
7
+ export {};
@@ -0,0 +1,33 @@
1
+ import { useProviders as e } from "../hooks/useProviders.js";
2
+ import { useTr as t } from "../hooks/useTr.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { POPULAR_PROVIDER_KEYS as i, ProviderIcon as a } from "@burdenoff/fe-libs/connections";
5
+ // src/integrations/components/PopularAppTiles.tsx
6
+ var o = 6, s = ({ onPick: s }) => {
7
+ let c = t(), { providers: l } = e(), u = (l ?? []).filter((e) => e.isEnabled && e.pluginStatus === "installed" && i.includes(e.key)).sort((e, t) => i.indexOf(e.key) - i.indexOf(t.key)).slice(0, o);
8
+ return u.length === 0 ? null : /* @__PURE__ */ r("div", {
9
+ className: "space-y-2",
10
+ "data-testid": "popular-app-tiles",
11
+ children: [/* @__PURE__ */ n("p", {
12
+ className: "text-sm font-medium text-text-primary",
13
+ children: c("integrations.connectedApps.popularTitle", "Popular apps")
14
+ }), /* @__PURE__ */ n("div", {
15
+ className: "grid grid-cols-2 sm:grid-cols-3 gap-2",
16
+ children: u.map((e) => /* @__PURE__ */ r("button", {
17
+ type: "button",
18
+ onClick: () => s(e),
19
+ className: "flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-start text-sm font-medium text-text-primary transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
20
+ children: [/* @__PURE__ */ n(a, {
21
+ provider: e,
22
+ size: 24
23
+ }), /* @__PURE__ */ n("span", {
24
+ className: "truncate",
25
+ children: e.name
26
+ })]
27
+ }, e.id))
28
+ })]
29
+ });
30
+ };
31
+ export { s as PopularAppTiles };
32
+
33
+ //# sourceMappingURL=PopularAppTiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PopularAppTiles.js","names":["TILE_COUNT","PopularAppTiles","tr","useTr","useProviders","tiles","providers","provider","POPULAR_PROVIDER_KEYS","a","b","onPick","ProviderIcon"],"sources":["../../../src/integrations/components/PopularAppTiles.tsx"],"sourcesContent":["/**\n * Popular-app tiles for the empty Connected apps list (Navigation v2,\n * BOFF-11875): one click opens \"Connect an app\" on that app. Only apps this\n * workspace offers are shown; with none, nothing renders.\n */\nimport type { FC } from 'react';\nimport { ProviderIcon, POPULAR_PROVIDER_KEYS } from '@burdenoff/fe-libs/connections';\n\nimport { useProviders } from '../hooks/useProviders';\nimport { useTr } from '../hooks/useTr';\nimport type { IntegrationProvider } from '../types';\n\n/** How many tiles the empty list offers. */\nconst TILE_COUNT = 6;\n\ninterface PopularAppTilesProps {\n onPick: (provider: IntegrationProvider) => void;\n}\n\nexport const PopularAppTiles: FC<PopularAppTilesProps> = ({ onPick }) => {\n const tr = useTr();\n const { providers } = useProviders();\n const tiles = (providers ?? [])\n .filter(\n (provider: IntegrationProvider) =>\n provider.isEnabled &&\n provider.pluginStatus === 'installed' &&\n POPULAR_PROVIDER_KEYS.includes(provider.key)\n )\n .sort(\n (a: IntegrationProvider, b: IntegrationProvider) =>\n POPULAR_PROVIDER_KEYS.indexOf(a.key) - POPULAR_PROVIDER_KEYS.indexOf(b.key)\n )\n .slice(0, TILE_COUNT);\n if (tiles.length === 0) return null;\n return (\n <div className=\"space-y-2\" data-testid=\"popular-app-tiles\">\n <p className=\"text-sm font-medium text-text-primary\">\n {tr('integrations.connectedApps.popularTitle', 'Popular apps')}\n </p>\n <div className=\"grid grid-cols-2 sm:grid-cols-3 gap-2\">\n {tiles.map((provider: IntegrationProvider) => (\n <button\n key={provider.id}\n type=\"button\"\n onClick={() => onPick(provider)}\n className=\"flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-start text-sm font-medium text-text-primary transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n >\n <ProviderIcon provider={provider} size={24} />\n <span className=\"truncate\">{provider.name}</span>\n </button>\n ))}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;AAaA,IAAMA,IAAa,GAMNC,KAA6C,EAAE,gBAAa;CACvE,IAAMC,IAAKC,EAAM,GACX,EAAE,iBAAcC,EAAa,GAC7BC,KAASC,KAAa,CAAC,EAAA,CAC1B,QACE,MACCC,EAAS,aACTA,EAAS,iBAAiB,eAC1BC,EAAsB,SAASD,EAAS,GAAG,CAC/C,CAAC,CACA,MACE,GAAwB,MACvBC,EAAsB,QAAQC,EAAE,GAAG,IAAID,EAAsB,QAAQE,EAAE,GAAG,CAC9E,CAAC,CACA,MAAM,GAAGV,CAAU;CAEtB,OADIK,EAAM,WAAW,IAAU,OAE7B,kBAAC,OAAD;EAAK,WAAU;EAAY,eAAY;EAAvC,UAAA,CACE,kBAAC,KAAD;GAAG,WAAU;GACV,UAAAH,EAAG,2CAA2C,cAAc;EAC5D,CAAA,GACH,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAAG,EAAM,KAAK,MACV,kBAAC,UAAD;IAEE,MAAK;IACL,eAAeM,EAAOJ,CAAQ;IAC9B,WAAU;IAJZ,UAAA,CAME,kBAACK,GAAD;KAAwB;KAAU,MAAM;IAAK,CAAA,GAC7C,kBAAC,QAAD;KAAM,WAAU;KAAY,UAAAL,EAAS;IAAW,CAAA,CAC1C;GAPD,GAAAA,EAAS,EAOR,CACT;EACE,CAAA,CACF;;AAET"}
@@ -4,6 +4,12 @@ interface ProviderCardProps {
4
4
  provider: IntegrationProvider;
5
5
  displayMode?: 'grid' | 'list';
6
6
  onConnect?: (provider: IntegrationProvider) => void;
7
+ /**
8
+ * Navigation v2's All apps card (BOFF-11875): no plugin-status badge and no
9
+ * auth-type chip (both on the app's page under "Technical details"); a
10
+ * "Connected" check once the workspace has a connection to it.
11
+ */
12
+ simple?: boolean;
7
13
  onClick?: (provider: IntegrationProvider) => void;
8
14
  }
9
15
  /**
@@ -1,124 +1,130 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
2
  import { useTr as t } from "../hooks/useTr.js";
3
- import { Link2 as n, Plug as r } from "lucide-react";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
- import { ProviderIcon as o } from "@burdenoff/fe-libs/connections";
6
- import { GlassCard as s } from "@burdenoff/fe-libs/ui";
3
+ import { CheckCircle2 as n, Link2 as r, Plug as i } from "lucide-react";
4
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
5
+ import { ProviderIcon as c } from "@burdenoff/fe-libs/connections";
6
+ import { GlassCard as l } from "@burdenoff/fe-libs/ui";
7
7
  // src/integrations/components/ProviderCard.tsx
8
- var c = ({ provider: c, displayMode: l = "grid", onConnect: u, onClick: d }) => {
9
- let f = t(), p = (e) => {
10
- e.stopPropagation(), u?.(c);
11
- }, m = (e) => f(`integrations.pluginStatus.${e}`, e), h = (e) => f(`integrations.category.${e}`, e), g = (e) => f(`integrations.authType.${e}`, e), _ = c.pluginStatus === "installed" ? "text-status-success-text bg-status-success-bg-subtle border-border-default" : c.pluginStatus === "update_available" ? "text-status-warning-text bg-status-warning-bg-subtle border-border-default" : c.pluginStatus === "deprecated" ? "text-status-error-text bg-status-error-bg-subtle border-border-default" : "text-text-secondary bg-bg-sunken border-border-subtle";
12
- return l === "list" ? /* @__PURE__ */ a(s, {
8
+ var u = ({ provider: u, displayMode: d = "grid", onConnect: f, onClick: p, simple: m = !1 }) => {
9
+ let h = t(), g = m && u.connectionCount > 0 ? /* @__PURE__ */ s("span", {
10
+ className: "inline-flex items-center gap-1 text-xs font-medium text-status-success-text",
11
+ "data-testid": "provider-connected",
12
+ children: [/* @__PURE__ */ o(n, {
13
+ size: 14,
14
+ "aria-hidden": "true"
15
+ }), h("integrations.providerCard.connected", "Connected")]
16
+ }) : null, _ = (e) => {
17
+ e.stopPropagation(), f?.(u);
18
+ }, v = (e) => h(`integrations.pluginStatus.${e}`, e), y = (e) => h(`integrations.category.${e}`, e), b = (e) => h(`integrations.authType.${e}`, e), x = u.pluginStatus === "installed" ? "text-status-success-text bg-status-success-bg-subtle border-border-default" : u.pluginStatus === "update_available" ? "text-status-warning-text bg-status-warning-bg-subtle border-border-default" : u.pluginStatus === "deprecated" ? "text-status-error-text bg-status-error-bg-subtle border-border-default" : "text-text-secondary bg-bg-sunken border-border-subtle";
19
+ return d === "list" ? /* @__PURE__ */ s(l, {
13
20
  className: e("group flex items-center gap-4 p-4 border-border-seam", "cursor-pointer hover:shadow-[var(--shadow-pop)] hover:border-border-strong", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", "animate-in fade-in-0"),
14
- onClick: () => d?.(c),
21
+ onClick: () => p?.(u),
15
22
  role: "button",
16
23
  tabIndex: 0,
17
24
  onKeyDown: (e) => {
18
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), d?.(c));
25
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), p?.(u));
19
26
  },
20
27
  children: [
21
- /* @__PURE__ */ i(o, {
22
- provider: c,
28
+ /* @__PURE__ */ o(c, {
29
+ provider: u,
23
30
  size: 40
24
31
  }),
25
- /* @__PURE__ */ a("div", {
32
+ /* @__PURE__ */ s("div", {
26
33
  className: "flex-1 min-w-0",
27
- children: [/* @__PURE__ */ a("div", {
34
+ children: [/* @__PURE__ */ s("div", {
28
35
  className: "flex items-center gap-2",
29
- children: [/* @__PURE__ */ i("h3", {
36
+ children: [/* @__PURE__ */ o("h3", {
30
37
  className: "font-semibold text-text-primary truncate",
31
- children: c.name
32
- }), /* @__PURE__ */ i("span", {
33
- className: e("text-xs px-2 py-0.5 rounded-full border", _),
34
- children: m(c.pluginStatus)
38
+ children: u.name
39
+ }), m ? g : /* @__PURE__ */ o("span", {
40
+ className: e("text-xs px-2 py-0.5 rounded-full border", x),
41
+ children: v(u.pluginStatus)
35
42
  })]
36
- }), /* @__PURE__ */ i("p", {
43
+ }), /* @__PURE__ */ o("p", {
37
44
  className: "text-sm text-text-secondary truncate mt-0.5",
38
- children: c.description
45
+ children: u.description
39
46
  })]
40
47
  }),
41
- /* @__PURE__ */ a("div", {
48
+ /* @__PURE__ */ s("div", {
42
49
  className: "flex items-center gap-3 flex-shrink-0",
43
50
  children: [
44
- /* @__PURE__ */ i("span", {
51
+ /* @__PURE__ */ o("span", {
45
52
  className: "text-xs text-text-secondary",
46
- children: h(c.category)
53
+ children: y(u.category)
47
54
  }),
48
- /* @__PURE__ */ i("span", {
55
+ !m && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("span", {
49
56
  className: "text-xs text-text-secondary",
50
- children: g(c.authType)
51
- }),
52
- /* @__PURE__ */ a("span", {
57
+ children: b(u.authType)
58
+ }), /* @__PURE__ */ s("span", {
53
59
  className: "inline-flex items-center gap-1 text-xs text-text-secondary",
54
- children: [/* @__PURE__ */ i(n, { size: 12 }), c.connectionCount]
55
- }),
56
- u && c.pluginStatus === "installed" && c.isEnabled && /* @__PURE__ */ i("button", {
60
+ children: [/* @__PURE__ */ o(r, { size: 12 }), u.connectionCount]
61
+ })] }),
62
+ f && u.pluginStatus === "installed" && u.isEnabled && /* @__PURE__ */ o("button", {
57
63
  type: "button",
58
- onClick: p,
64
+ onClick: _,
59
65
  className: "px-3 py-1.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
60
- children: f("integrations.providerCard.actions.connect", "Connect")
66
+ children: h("integrations.providerCard.actions.connect", "Connect")
61
67
  })
62
68
  ]
63
69
  })
64
70
  ]
65
- }) : /* @__PURE__ */ a(s, {
71
+ }) : /* @__PURE__ */ s(l, {
66
72
  className: e("group relative flex flex-col p-5 border-border-seam", "cursor-pointer hover:shadow-[var(--shadow-pop)] hover:border-border-strong", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", "animate-in fade-in-0"),
67
- onClick: () => d?.(c),
73
+ onClick: () => p?.(u),
68
74
  role: "button",
69
75
  tabIndex: 0,
70
76
  onKeyDown: (e) => {
71
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), d?.(c));
77
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), p?.(u));
72
78
  },
73
79
  children: [
74
- /* @__PURE__ */ a("div", {
80
+ /* @__PURE__ */ s("div", {
75
81
  className: "flex items-start justify-between mb-3",
76
- children: [/* @__PURE__ */ i(o, {
77
- provider: c,
82
+ children: [/* @__PURE__ */ o(c, {
83
+ provider: u,
78
84
  size: 48
79
- }), /* @__PURE__ */ i("span", {
80
- className: e("text-xs px-2 py-0.5 rounded-full border", _),
81
- children: m(c.pluginStatus)
85
+ }), m ? g : /* @__PURE__ */ o("span", {
86
+ className: e("text-xs px-2 py-0.5 rounded-full border", x),
87
+ children: v(u.pluginStatus)
82
88
  })]
83
89
  }),
84
- /* @__PURE__ */ i("h3", {
90
+ /* @__PURE__ */ o("h3", {
85
91
  className: "font-semibold text-text-primary mb-1 truncate",
86
- children: c.name
92
+ children: u.name
87
93
  }),
88
- /* @__PURE__ */ i("p", {
94
+ /* @__PURE__ */ o("p", {
89
95
  className: "text-sm text-text-secondary line-clamp-2 mb-3 flex-1",
90
- children: c.description
96
+ children: u.description
91
97
  }),
92
- /* @__PURE__ */ a("div", {
98
+ /* @__PURE__ */ s("div", {
93
99
  className: "flex items-center gap-2 flex-wrap mb-3",
94
- children: [/* @__PURE__ */ i("span", {
100
+ children: [/* @__PURE__ */ o("span", {
95
101
  className: "text-xs px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary",
96
- children: h(c.category)
97
- }), /* @__PURE__ */ i("span", {
102
+ children: y(u.category)
103
+ }), !m && /* @__PURE__ */ o("span", {
98
104
  className: "text-xs px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary",
99
- children: g(c.authType)
105
+ children: b(u.authType)
100
106
  })]
101
107
  }),
102
- /* @__PURE__ */ a("div", {
108
+ /* @__PURE__ */ s("div", {
103
109
  className: "flex items-center justify-between mt-auto pt-3 border-t border-border-seam",
104
- children: [/* @__PURE__ */ a("span", {
110
+ children: [/* @__PURE__ */ s("span", {
105
111
  className: "inline-flex items-center gap-1.5 text-sm text-text-secondary",
106
112
  children: [
107
- /* @__PURE__ */ i(r, { size: 14 }),
108
- c.connectionCount,
113
+ /* @__PURE__ */ o(i, { size: 14 }),
114
+ u.connectionCount,
109
115
  " ",
110
- c.connectionCount === 1 ? f("integrations.providerCard.connectionCount.single", "connection") : f("integrations.providerCard.connectionCount.multiple", "connections")
116
+ u.connectionCount === 1 ? h("integrations.providerCard.connectionCount.single", "connection") : h("integrations.providerCard.connectionCount.multiple", "connections")
111
117
  ]
112
- }), u && c.pluginStatus === "installed" && c.isEnabled && /* @__PURE__ */ i("button", {
118
+ }), f && u.pluginStatus === "installed" && u.isEnabled && /* @__PURE__ */ o("button", {
113
119
  type: "button",
114
- onClick: p,
120
+ onClick: _,
115
121
  className: "px-3 py-1.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
116
- children: f("integrations.providerCard.actions.connect", "Connect")
122
+ children: h("integrations.providerCard.actions.connect", "Connect")
117
123
  })]
118
124
  })
119
125
  ]
120
126
  });
121
127
  };
122
- export { c as ProviderCard };
128
+ export { u as ProviderCard };
123
129
 
124
130
  //# sourceMappingURL=ProviderCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProviderCard.js","names":["ProviderCard","tr","useTr","handleConnect","onConnect","provider","getPluginStatusLabel","status","getCategoryLabel","category","getAuthTypeLabel","authType","pluginBadgeClass","displayMode","GlassCard","cn","onClick","ProviderIcon","Link2","Plug"],"sources":["../../../src/integrations/components/ProviderCard.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Plug, Link2 } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { useTr } from '../hooks/useTr';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport type { IntegrationProvider } from '../types';\nimport { ProviderIcon } from '@burdenoff/fe-libs/connections';\n\ninterface ProviderCardProps {\n provider: IntegrationProvider;\n displayMode?: 'grid' | 'list';\n onConnect?: (provider: IntegrationProvider) => void;\n onClick?: (provider: IntegrationProvider) => void;\n}\n\n/**\n * Card component showing provider info (icon, name, category, auth type, connection count).\n * Has a \"Connect\" button.\n */\nexport const ProviderCard: FC<ProviderCardProps> = ({\n provider,\n displayMode = 'grid',\n onConnect,\n onClick,\n}) => {\n const tr = useTr();\n\n const handleConnect = (e: React.MouseEvent) => {\n e.stopPropagation();\n onConnect?.(provider);\n };\n\n const getPluginStatusLabel = (status: IntegrationProvider['pluginStatus']) =>\n tr(`integrations.pluginStatus.${status}`, status);\n\n const getCategoryLabel = (category: IntegrationProvider['category']) =>\n tr(`integrations.category.${category}`, category);\n\n const getAuthTypeLabel = (authType: IntegrationProvider['authType']) =>\n tr(`integrations.authType.${authType}`, authType);\n\n const pluginBadgeClass =\n provider.pluginStatus === 'installed'\n ? 'text-status-success-text bg-status-success-bg-subtle border-border-default'\n : provider.pluginStatus === 'update_available'\n ? 'text-status-warning-text bg-status-warning-bg-subtle border-border-default'\n : provider.pluginStatus === 'deprecated'\n ? 'text-status-error-text bg-status-error-bg-subtle border-border-default'\n : 'text-text-secondary bg-bg-sunken border-border-subtle';\n\n if (displayMode === 'list') {\n return (\n <GlassCard\n className={cn(\n 'group flex items-center gap-4 p-4 border-border-seam',\n 'cursor-pointer hover:shadow-[var(--shadow-pop)] hover:border-border-strong',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'animate-in fade-in-0'\n )}\n onClick={() => onClick?.(provider)}\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick?.(provider);\n }\n }}\n >\n <ProviderIcon provider={provider} size={40} />\n\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <h3 className=\"font-semibold text-text-primary truncate\">{provider.name}</h3>\n <span className={cn('text-xs px-2 py-0.5 rounded-full border', pluginBadgeClass)}>\n {getPluginStatusLabel(provider.pluginStatus)}\n </span>\n </div>\n <p className=\"text-sm text-text-secondary truncate mt-0.5\">{provider.description}</p>\n </div>\n\n <div className=\"flex items-center gap-3 flex-shrink-0\">\n <span className=\"text-xs text-text-secondary\">{getCategoryLabel(provider.category)}</span>\n <span className=\"text-xs text-text-secondary\">{getAuthTypeLabel(provider.authType)}</span>\n <span className=\"inline-flex items-center gap-1 text-xs text-text-secondary\">\n <Link2 size={12} />\n {provider.connectionCount}\n </span>\n {onConnect && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n type=\"button\"\n onClick={handleConnect}\n className=\"px-3 py-1.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n {tr('integrations.providerCard.actions.connect', 'Connect')}\n </button>\n )}\n </div>\n </GlassCard>\n );\n }\n\n return (\n <GlassCard\n className={cn(\n 'group relative flex flex-col p-5 border-border-seam',\n 'cursor-pointer hover:shadow-[var(--shadow-pop)] hover:border-border-strong',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'animate-in fade-in-0'\n )}\n onClick={() => onClick?.(provider)}\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick?.(provider);\n }\n }}\n >\n <div className=\"flex items-start justify-between mb-3\">\n <ProviderIcon provider={provider} size={48} />\n <span className={cn('text-xs px-2 py-0.5 rounded-full border', pluginBadgeClass)}>\n {getPluginStatusLabel(provider.pluginStatus)}\n </span>\n </div>\n\n <h3 className=\"font-semibold text-text-primary mb-1 truncate\">{provider.name}</h3>\n <p className=\"text-sm text-text-secondary line-clamp-2 mb-3 flex-1\">{provider.description}</p>\n\n <div className=\"flex items-center gap-2 flex-wrap mb-3\">\n <span className=\"text-xs px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary\">\n {getCategoryLabel(provider.category)}\n </span>\n <span className=\"text-xs px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary\">\n {getAuthTypeLabel(provider.authType)}\n </span>\n </div>\n\n <div className=\"flex items-center justify-between mt-auto pt-3 border-t border-border-seam\">\n <span className=\"inline-flex items-center gap-1.5 text-sm text-text-secondary\">\n <Plug size={14} />\n {provider.connectionCount}{' '}\n {provider.connectionCount === 1\n ? tr('integrations.providerCard.connectionCount.single', 'connection')\n : tr('integrations.providerCard.connectionCount.multiple', 'connections')}\n </span>\n {onConnect && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n type=\"button\"\n onClick={handleConnect}\n className=\"px-3 py-1.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n {tr('integrations.providerCard.actions.connect', 'Connect')}\n </button>\n )}\n </div>\n </GlassCard>\n );\n};\n"],"mappings":";;;;;;;AAmBA,IAAaA,KAAuC,EAClD,aACA,iBAAc,QACd,cACA,iBACI;CACJ,IAAMC,IAAKC,EAAM,GAEXC,KAAiB,MAAwB;EAE7C,AADA,EAAE,gBAAgB,GAClBC,IAAYC,CAAQ;CACtB,GAEMC,KAAwB,MAC5BL,EAAG,6BAA6BM,KAAUA,CAAM,GAE5CC,KAAoB,MACxBP,EAAG,yBAAyBQ,KAAYA,CAAQ,GAE5CC,KAAoB,MACxBT,EAAG,yBAAyBU,KAAYA,CAAQ,GAE5CC,IACJP,EAAS,iBAAiB,cACtB,+EACAA,EAAS,iBAAiB,qBACxB,+EACAA,EAAS,iBAAiB,eACxB,2EACA;CAsDV,OApDIQ,MAAgB,SAEhB,kBAACC,GAAD;EACE,WAAWC,EACT,wDACA,8EACA,gGACA,sBACF;EACA,eAAeC,IAAUX,CAAQ;EACjC,MAAK;EACL,UAAU;EACV,YAAY,MAAM;GAChB,CAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,SACjC,EAAE,eAAe,GACjBW,IAAUX,CAAQ;EAEtB;EAfF,UAAA;GAiBE,kBAACY,GAAD;IAAwB;IAAU,MAAM;GAAK,CAAA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ACH;;GAEL,kBAAC,MAAD;IAAI,WAAU;IAAiD,UAAAA,EAAS;GAAS,CAAA;GACjF,kBAAC,KAAD;IAAG,WAAU;IAAwD,UAAAA,EAAS;GAAe,CAAA;GAE7F,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,QAAD;KAAM,WAAU;KACb,UAAAG,EAAiBH,EAAS,QAAQ;IAC/B,CAAA,GACN,kBAAC,QAAD;KAAM,WAAU;KACb,UAAAK,EAAiBL,EAAS,QAAQ;IAC/B,CAAA,CACH;;GAEL,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,QAAD;KAAM,WAAU;KAAhB,UAAA;MACE,kBAACc,GAAD,EAAM,MAAM,GAAK,CAAA;MAChBd,EAAS;MAAiB;MAC1BA,EAAS,oBAAoB,IAC1BJ,EAAG,oDAAoD,YAAY,IACnEA,EAAG,sDAAsD,aAAa;KACtE;IACL,CAAA,GAAAG,KAAaC,EAAS,iBAAiB,eAAeA,EAAS,aAC9D,kBAAC,UAAD;KACE,MAAK;KACL,SAASF;KACT,WAAU;KAET,UAAAF,EAAG,6CAA6C,SAAS;IACpD,CAAA,CAEP;;EACI;;AAEf"}
1
+ {"version":3,"file":"ProviderCard.js","names":["_Fragment","ProviderCard","tr","useTr","connectedCheck","simple","provider","CheckCircle2","handleConnect","onConnect","getPluginStatusLabel","status","getCategoryLabel","category","getAuthTypeLabel","authType","pluginBadgeClass","displayMode","GlassCard","cn","onClick","ProviderIcon","Fragment","Link2","Plug"],"sources":["../../../src/integrations/components/ProviderCard.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { CheckCircle2, Plug, Link2 } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { useTr } from '../hooks/useTr';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport type { IntegrationProvider } from '../types';\nimport { ProviderIcon } from '@burdenoff/fe-libs/connections';\n\ninterface ProviderCardProps {\n provider: IntegrationProvider;\n displayMode?: 'grid' | 'list';\n onConnect?: (provider: IntegrationProvider) => void;\n /**\n * Navigation v2's All apps card (BOFF-11875): no plugin-status badge and no\n * auth-type chip (both on the app's page under \"Technical details\"); a\n * \"Connected\" check once the workspace has a connection to it.\n */\n simple?: boolean;\n onClick?: (provider: IntegrationProvider) => void;\n}\n\n/**\n * Card component showing provider info (icon, name, category, auth type, connection count).\n * Has a \"Connect\" button.\n */\nexport const ProviderCard: FC<ProviderCardProps> = ({\n provider,\n displayMode = 'grid',\n onConnect,\n onClick,\n simple = false,\n}) => {\n const tr = useTr();\n const connectedCheck =\n simple && provider.connectionCount > 0 ? (\n <span\n className=\"inline-flex items-center gap-1 text-xs font-medium text-status-success-text\"\n data-testid=\"provider-connected\"\n >\n <CheckCircle2 size={14} aria-hidden=\"true\" />\n {tr('integrations.providerCard.connected', 'Connected')}\n </span>\n ) : null;\n\n const handleConnect = (e: React.MouseEvent) => {\n e.stopPropagation();\n onConnect?.(provider);\n };\n\n const getPluginStatusLabel = (status: IntegrationProvider['pluginStatus']) =>\n tr(`integrations.pluginStatus.${status}`, status);\n\n const getCategoryLabel = (category: IntegrationProvider['category']) =>\n tr(`integrations.category.${category}`, category);\n\n const getAuthTypeLabel = (authType: IntegrationProvider['authType']) =>\n tr(`integrations.authType.${authType}`, authType);\n\n const pluginBadgeClass =\n provider.pluginStatus === 'installed'\n ? 'text-status-success-text bg-status-success-bg-subtle border-border-default'\n : provider.pluginStatus === 'update_available'\n ? 'text-status-warning-text bg-status-warning-bg-subtle border-border-default'\n : provider.pluginStatus === 'deprecated'\n ? 'text-status-error-text bg-status-error-bg-subtle border-border-default'\n : 'text-text-secondary bg-bg-sunken border-border-subtle';\n\n if (displayMode === 'list') {\n return (\n <GlassCard\n className={cn(\n 'group flex items-center gap-4 p-4 border-border-seam',\n 'cursor-pointer hover:shadow-[var(--shadow-pop)] hover:border-border-strong',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'animate-in fade-in-0'\n )}\n onClick={() => onClick?.(provider)}\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick?.(provider);\n }\n }}\n >\n <ProviderIcon provider={provider} size={40} />\n\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <h3 className=\"font-semibold text-text-primary truncate\">{provider.name}</h3>\n {simple ? (\n connectedCheck\n ) : (\n <span className={cn('text-xs px-2 py-0.5 rounded-full border', pluginBadgeClass)}>\n {getPluginStatusLabel(provider.pluginStatus)}\n </span>\n )}\n </div>\n <p className=\"text-sm text-text-secondary truncate mt-0.5\">{provider.description}</p>\n </div>\n\n <div className=\"flex items-center gap-3 flex-shrink-0\">\n <span className=\"text-xs text-text-secondary\">{getCategoryLabel(provider.category)}</span>\n {!simple && (\n <>\n <span className=\"text-xs text-text-secondary\">\n {getAuthTypeLabel(provider.authType)}\n </span>\n <span className=\"inline-flex items-center gap-1 text-xs text-text-secondary\">\n <Link2 size={12} />\n {provider.connectionCount}\n </span>\n </>\n )}\n {onConnect && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n type=\"button\"\n onClick={handleConnect}\n className=\"px-3 py-1.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n {tr('integrations.providerCard.actions.connect', 'Connect')}\n </button>\n )}\n </div>\n </GlassCard>\n );\n }\n\n return (\n <GlassCard\n className={cn(\n 'group relative flex flex-col p-5 border-border-seam',\n 'cursor-pointer hover:shadow-[var(--shadow-pop)] hover:border-border-strong',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'animate-in fade-in-0'\n )}\n onClick={() => onClick?.(provider)}\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick?.(provider);\n }\n }}\n >\n <div className=\"flex items-start justify-between mb-3\">\n <ProviderIcon provider={provider} size={48} />\n {simple ? (\n connectedCheck\n ) : (\n <span className={cn('text-xs px-2 py-0.5 rounded-full border', pluginBadgeClass)}>\n {getPluginStatusLabel(provider.pluginStatus)}\n </span>\n )}\n </div>\n\n <h3 className=\"font-semibold text-text-primary mb-1 truncate\">{provider.name}</h3>\n <p className=\"text-sm text-text-secondary line-clamp-2 mb-3 flex-1\">{provider.description}</p>\n\n <div className=\"flex items-center gap-2 flex-wrap mb-3\">\n <span className=\"text-xs px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary\">\n {getCategoryLabel(provider.category)}\n </span>\n {!simple && (\n <span className=\"text-xs px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary\">\n {getAuthTypeLabel(provider.authType)}\n </span>\n )}\n </div>\n\n <div className=\"flex items-center justify-between mt-auto pt-3 border-t border-border-seam\">\n <span className=\"inline-flex items-center gap-1.5 text-sm text-text-secondary\">\n <Plug size={14} />\n {provider.connectionCount}{' '}\n {provider.connectionCount === 1\n ? tr('integrations.providerCard.connectionCount.single', 'connection')\n : tr('integrations.providerCard.connectionCount.multiple', 'connections')}\n </span>\n {onConnect && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n type=\"button\"\n onClick={handleConnect}\n className=\"px-3 py-1.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n {tr('integrations.providerCard.actions.connect', 'Connect')}\n </button>\n )}\n </div>\n </GlassCard>\n );\n};\n"],"mappings":";;;;;;;AAyBA,IAAaC,KAAuC,EAClD,aACA,iBAAc,QACd,cACA,YACA,YAAS,SACL;CACJ,IAAMC,IAAKC,EAAM,GACXC,IACJC,KAAUC,EAAS,kBAAkB,IACnC,kBAAC,QAAD;EACE,WAAU;EACV,eAAY;EAFd,UAAA,CAIE,kBAACC,GAAD;GAAc,MAAM;GAAI,eAAY;EAAQ,CAAA,GAC3CL,EAAG,uCAAuC,WAAW,CAClD;CACJ,CAAA,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EAAS;MAAiB;MAC1BA,EAAS,oBAAoB,IAC1BJ,EAAG,oDAAoD,YAAY,IACnEA,EAAG,sDAAsD,aAAa;KACtE;IACL,CAAA,GAAAO,KAAaH,EAAS,iBAAiB,eAAeA,EAAS,aAC9D,kBAAC,UAAD;KACE,MAAK;KACL,SAASE;KACT,WAAU;KAET,UAAAN,EAAG,6CAA6C,SAAS;IACpD,CAAA,CAEP;;EACI;;AAEf"}
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ interface RecentActivityProps {
3
+ connectionId: string;
4
+ onShowAll: () => void;
5
+ }
6
+ export declare const RecentActivity: FC<RecentActivityProps>;
7
+ export {};
@@ -0,0 +1,74 @@
1
+ import { useFormatLastUsed as e } from "../hooks/useFormatLastUsed.js";
2
+ import { useIntegrationLogs as t } from "../hooks/useLogs.js";
3
+ import { useTr as n } from "../hooks/useTr.js";
4
+ import { orderRecentActivity as r } from "../utils/connectedApps.js";
5
+ import { AlertCircle as i, AlertTriangle as a, CheckCircle2 as o, Clock as s } from "lucide-react";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
+ import { GlassCard as u } from "@burdenoff/fe-libs/ui";
8
+ // src/integrations/components/RecentActivity.tsx
9
+ var d = 5, f = ({ connectionId: f, onShowAll: p }) => {
10
+ let m = n(), h = e(), { logs: g, loading: _, error: v } = t({
11
+ connectionId: f,
12
+ pageSize: d
13
+ }), y = r(g);
14
+ return /* @__PURE__ */ l(u, {
15
+ className: "border-border-seam p-5",
16
+ "data-testid": "connection-recent-activity",
17
+ children: [/* @__PURE__ */ l("div", {
18
+ className: "mb-3 flex items-center justify-between gap-2",
19
+ children: [/* @__PURE__ */ l("h2", {
20
+ className: "font-semibold text-text-primary flex items-center gap-2",
21
+ children: [/* @__PURE__ */ c(s, {
22
+ size: 18,
23
+ className: "text-primary",
24
+ "aria-hidden": "true"
25
+ }), m("integrations.connectedApps.recentActivity", "Recent activity")]
26
+ }), /* @__PURE__ */ c("button", {
27
+ type: "button",
28
+ onClick: p,
29
+ className: "text-sm font-medium text-primary hover:underline",
30
+ children: m("integrations.connectedApps.allActivity", "All activity")
31
+ })]
32
+ }), _ ? /* @__PURE__ */ c("p", {
33
+ className: "text-sm text-text-secondary",
34
+ children: m("integrations.connectedApps.recentActivityLoading", "Loading recent activity…")
35
+ }) : v ? /* @__PURE__ */ c("p", {
36
+ className: "text-sm text-text-secondary",
37
+ children: m("integrations.connectedApps.recentActivityError", "Recent activity could not be loaded.")
38
+ }) : y.length === 0 ? /* @__PURE__ */ c("p", {
39
+ className: "text-sm text-text-secondary",
40
+ children: m("integrations.connectedApps.recentActivityEmpty", "Nothing has happened yet.")
41
+ }) : /* @__PURE__ */ c("ul", {
42
+ className: "space-y-2",
43
+ children: y.map((e) => /* @__PURE__ */ l("li", {
44
+ className: "flex items-start gap-2 text-sm",
45
+ children: [
46
+ e.level === "error" ? /* @__PURE__ */ c(i, {
47
+ size: 16,
48
+ className: "mt-0.5 shrink-0 text-status-error-text",
49
+ "aria-hidden": "true"
50
+ }) : e.level === "warn" ? /* @__PURE__ */ c(a, {
51
+ size: 16,
52
+ className: "mt-0.5 shrink-0 text-status-warning-text",
53
+ "aria-hidden": "true"
54
+ }) : /* @__PURE__ */ c(o, {
55
+ size: 16,
56
+ className: "mt-0.5 shrink-0 text-text-tertiary",
57
+ "aria-hidden": "true"
58
+ }),
59
+ /* @__PURE__ */ c("span", {
60
+ className: "min-w-0 flex-1 text-text-primary",
61
+ children: e.message
62
+ }),
63
+ /* @__PURE__ */ c("span", {
64
+ className: "shrink-0 text-xs text-text-secondary",
65
+ children: h(e.createdAt)
66
+ })
67
+ ]
68
+ }, e.id))
69
+ })]
70
+ });
71
+ };
72
+ export { f as RecentActivity };
73
+
74
+ //# sourceMappingURL=RecentActivity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecentActivity.js","names":["RECENT_COUNT","RecentActivity","tr","useTr","formatWhen","useFormatLastUsed","useIntegrationLogs","ordered","orderRecentActivity","logs","GlassCard","Clock","onShowAll","loading","error","log","AlertCircle","AlertTriangle","CheckCircle2"],"sources":["../../../src/integrations/components/RecentActivity.tsx"],"sourcesContent":["/**\n * \"Recent activity\" on a connected app's page (Navigation v2, BOFF-11875): the\n * last few things this one connection did, problems first, in the plain\n * sentences the service logs. The full, filterable list is the Activity logs\n * page, opened on this connection.\n */\nimport type { FC } from 'react';\nimport { AlertCircle, AlertTriangle, CheckCircle2, Clock } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\n\nimport { useFormatLastUsed } from '../hooks/useFormatLastUsed';\nimport { useIntegrationLogs } from '../hooks/useLogs';\nimport { useTr } from '../hooks/useTr';\nimport { orderRecentActivity } from '../utils/connectedApps';\n\n/** How many entries the panel shows. */\nconst RECENT_COUNT = 5;\n\ninterface RecentActivityProps {\n connectionId: string;\n onShowAll: () => void;\n}\n\nexport const RecentActivity: FC<RecentActivityProps> = ({ connectionId, onShowAll }) => {\n const tr = useTr();\n const formatWhen = useFormatLastUsed();\n const { logs, loading, error } = useIntegrationLogs({ connectionId, pageSize: RECENT_COUNT });\n const ordered = orderRecentActivity(logs);\n\n return (\n <GlassCard className=\"border-border-seam p-5\" data-testid=\"connection-recent-activity\">\n <div className=\"mb-3 flex items-center justify-between gap-2\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Clock size={18} className=\"text-primary\" aria-hidden=\"true\" />\n {tr('integrations.connectedApps.recentActivity', 'Recent activity')}\n </h2>\n <button\n type=\"button\"\n onClick={onShowAll}\n className=\"text-sm font-medium text-primary hover:underline\"\n >\n {tr('integrations.connectedApps.allActivity', 'All activity')}\n </button>\n </div>\n {loading ? (\n <p className=\"text-sm text-text-secondary\">\n {tr('integrations.connectedApps.recentActivityLoading', 'Loading recent activity…')}\n </p>\n ) : error ? (\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'integrations.connectedApps.recentActivityError',\n 'Recent activity could not be loaded.'\n )}\n </p>\n ) : ordered.length === 0 ? (\n <p className=\"text-sm text-text-secondary\">\n {tr('integrations.connectedApps.recentActivityEmpty', 'Nothing has happened yet.')}\n </p>\n ) : (\n <ul className=\"space-y-2\">\n {ordered.map((log) => (\n <li key={log.id} className=\"flex items-start gap-2 text-sm\">\n {log.level === 'error' ? (\n <AlertCircle\n size={16}\n className=\"mt-0.5 shrink-0 text-status-error-text\"\n aria-hidden=\"true\"\n />\n ) : log.level === 'warn' ? (\n <AlertTriangle\n size={16}\n className=\"mt-0.5 shrink-0 text-status-warning-text\"\n aria-hidden=\"true\"\n />\n ) : (\n <CheckCircle2\n size={16}\n className=\"mt-0.5 shrink-0 text-text-tertiary\"\n aria-hidden=\"true\"\n />\n )}\n <span className=\"min-w-0 flex-1 text-text-primary\">{log.message}</span>\n <span className=\"shrink-0 text-xs text-text-secondary\">\n {formatWhen(log.createdAt)}\n </span>\n </li>\n ))}\n </ul>\n )}\n </GlassCard>\n );\n};\n"],"mappings":";;;;;;;;AAgBA,IAAMA,IAAe,GAORC,KAA2C,EAAE,iBAAc,mBAAgB;CACtF,IAAMC,IAAKC,EAAM,GACXC,IAAaC,EAAkB,GAC/B,EAAE,SAAM,YAAS,aAAUC,EAAmB;EAAE;EAAc,UAAUN;CAAa,CAAC,GACtFO,IAAUC,EAAoBC,CAAI;CAExC,OACE,kBAACC,GAAD;EAAW,WAAU;EAAyB,eAAY;EAA1D,UAAA,CACE,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;IAAd,UAAA,CACE,kBAACC,GAAD;KAAO,MAAM;KAAI,WAAU;KAAe,eAAY;IAAQ,CAAA,GAC7DT,EAAG,6CAA6C,iBAAiB,CAChE;GACJ,CAAA,GAAA,kBAAC,UAAD;IACE,MAAK;IACL,SAASU;IACT,WAAU;IAET,UAAAV,EAAG,0CAA0C,cAAc;GACtD,CAAA,CACL;EACJ,CAAA,GAAAW,IACC,kBAAC,KAAD;GAAG,WAAU;GACV,UAAAX,EAAG,oDAAoD,0BAA0B;EACjF,CAAA,IACDY,IACF,kBAAC,KAAD;GAAG,WAAU;GACV,UAAAZ,EACC,kDACA,sCACF;EACC,CAAA,IACDK,EAAQ,WAAW,IACrB,kBAAC,KAAD;GAAG,WAAU;GACV,UAAAL,EAAG,kDAAkD,2BAA2B;EAChF,CAAA,IAEH,kBAAC,MAAD;GAAI,WAAU;GACX,UAAAK,EAAQ,KAAK,MACZ,kBAAC,MAAD;IAAiB,WAAU;IAA3B,UAAA;KACGQ,EAAI,UAAU,UACb,kBAACC,GAAD;MACE,MAAM;MACN,WAAU;MACV,eAAY;KACb,CAAA,IACCD,EAAI,UAAU,SAChB,kBAACE,GAAD;MACE,MAAM;MACN,WAAU;MACV,eAAY;KACb,CAAA,IAED,kBAACC,GAAD;MACE,MAAM;MACN,WAAU;MACV,eAAY;KACb,CAAA;KAEH,kBAAC,QAAD;MAAM,WAAU;MAAoC,UAAAH,EAAI;KAAc,CAAA;KACtE,kBAAC,QAAD;MAAM,WAAU;MACb,UAAAX,EAAWW,EAAI,SAAS;KACrB,CAAA;IACJ;GAxBK,GAAAA,EAAI,EAwBT,CACL;EACC,CAAA,CAEG;;AAEf"}
@@ -2,6 +2,8 @@ import { IntegrationLog, LogLevel, LogAction } from '../types';
2
2
  interface LogFilterOptions {
3
3
  level?: LogLevel;
4
4
  action?: LogAction;
5
+ /** One connection's activity; the service filters `getIntegrationLogs` by it. */
6
+ connectionId?: string;
5
7
  page?: number;
6
8
  pageSize?: number;
7
9
  skip?: boolean;
@@ -7,7 +7,8 @@ function r(r) {
7
7
  variables: {
8
8
  filter: {
9
9
  level: r?.level,
10
- action: r?.action
10
+ action: r?.action,
11
+ ...r?.connectionId ? { connectionId: r.connectionId } : {}
11
12
  },
12
13
  pagination: {
13
14
  limit: o,
@@ -1 +1 @@
1
- {"version":3,"file":"useLogs.js","names":["useIntegrationLogs","useIntegrations","page","filter","pageSize","useGetIntegrationLogsQuery","workspaceId","data","mapLog","item"],"sources":["../../../src/integrations/hooks/useLogs.ts"],"sourcesContent":["/**\n * Custom hooks wrapping GraphQL queries for integration logs.\n */\n\nimport { useGetIntegrationLogsQuery } from '../../generated/wspace-operations';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { mapLog } from '../utils/mappers';\nimport type { IntegrationLog, LogLevel, LogAction } from '../types';\nimport { DEFAULT_PAGE_SIZE } from '../utils/constants';\n\n// ─── Hooks ──────────────────────────────────────────────────────────────────\n\ninterface LogFilterOptions {\n level?: LogLevel;\n action?: LogAction;\n page?: number;\n pageSize?: number;\n skip?: boolean;\n}\n\nexport function useIntegrationLogs(filter?: LogFilterOptions) {\n const { workspaceId } = useIntegrations();\n const page = filter?.page ?? 1;\n const pageSize = filter?.pageSize ?? DEFAULT_PAGE_SIZE;\n\n const { data, loading, error, refetch } = useGetIntegrationLogsQuery({\n variables: {\n filter: {\n level: filter?.level,\n action: filter?.action,\n },\n pagination: {\n limit: pageSize,\n offset: (page - 1) * pageSize,\n },\n },\n skip: !workspaceId || filter?.skip,\n errorPolicy: 'all',\n });\n\n const logs: IntegrationLog[] = (data?.getIntegrationLogs?.items ?? []).map(\n (item: Record<string, unknown>) => mapLog(item)\n );\n\n return {\n logs,\n total: data?.getIntegrationLogs?.total ?? 0,\n hasMore: data?.getIntegrationLogs?.hasMore ?? false,\n loading,\n error,\n refetch,\n };\n}\n"],"mappings":";;;;AAoBA,SAAgBA,EAAmB,GAA2B;CAC5D,IAAM,EAAE,mBAAgBC,EAAgB,GAClCC,IAAOC,GAAQ,QAAQ,GACvBC,IAAWD,GAAQ,YAAA,IAEnB,EAAE,SAAM,YAAS,UAAO,eAAYE,EAA2B;EACnE,WAAW;GACT,QAAQ;IACN,OAAOF,GAAQ;IACf,QAAQA,GAAQ;GAClB;GACA,YAAY;IACV,OAAOC;IACP,SAASF,IAAO,KAAKE;GACvB;EACF;EACA,MAAM,CAACE,KAAeH,GAAQ;EAC9B,aAAa;CACf,CAAC;CAMD,OAAO;EACL,OAL8BI,GAAM,oBAAoB,SAAS,CAAC,EAAA,CAAG,KACpE,MAAkCC,EAAOC,CAAI,CAI9C;EACA,OAAOF,GAAM,oBAAoB,SAAS;EAC1C,SAASA,GAAM,oBAAoB,WAAW;EAC9C;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"useLogs.js","names":["useIntegrationLogs","useIntegrations","page","filter","pageSize","useGetIntegrationLogsQuery","workspaceId","data","mapLog","item"],"sources":["../../../src/integrations/hooks/useLogs.ts"],"sourcesContent":["/**\n * Custom hooks wrapping GraphQL queries for integration logs.\n */\n\nimport { useGetIntegrationLogsQuery } from '../../generated/wspace-operations';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { mapLog } from '../utils/mappers';\nimport type { IntegrationLog, LogLevel, LogAction } from '../types';\nimport { DEFAULT_PAGE_SIZE } from '../utils/constants';\n\n// ─── Hooks ──────────────────────────────────────────────────────────────────\n\ninterface LogFilterOptions {\n level?: LogLevel;\n action?: LogAction;\n /** One connection's activity; the service filters `getIntegrationLogs` by it. */\n connectionId?: string;\n page?: number;\n pageSize?: number;\n skip?: boolean;\n}\n\nexport function useIntegrationLogs(filter?: LogFilterOptions) {\n const { workspaceId } = useIntegrations();\n const page = filter?.page ?? 1;\n const pageSize = filter?.pageSize ?? DEFAULT_PAGE_SIZE;\n\n const { data, loading, error, refetch } = useGetIntegrationLogsQuery({\n variables: {\n filter: {\n level: filter?.level,\n action: filter?.action,\n ...(filter?.connectionId ? { connectionId: filter.connectionId } : {}),\n },\n pagination: {\n limit: pageSize,\n offset: (page - 1) * pageSize,\n },\n },\n skip: !workspaceId || filter?.skip,\n errorPolicy: 'all',\n });\n\n const logs: IntegrationLog[] = (data?.getIntegrationLogs?.items ?? []).map(\n (item: Record<string, unknown>) => mapLog(item)\n );\n\n return {\n logs,\n total: data?.getIntegrationLogs?.total ?? 0,\n hasMore: data?.getIntegrationLogs?.hasMore ?? false,\n loading,\n error,\n refetch,\n };\n}\n"],"mappings":";;;;AAsBA,SAAgBA,EAAmB,GAA2B;CAC5D,IAAM,EAAE,mBAAgBC,EAAgB,GAClCC,IAAOC,GAAQ,QAAQ,GACvBC,IAAWD,GAAQ,YAAA,IAEnB,EAAE,SAAM,YAAS,UAAO,eAAYE,EAA2B;EACnE,WAAW;GACT,QAAQ;IACN,OAAOF,GAAQ;IACf,QAAQA,GAAQ;IAChB,GAAIA,GAAQ,eAAe,EAAE,cAAcA,EAAO,aAAa,IAAI,CAAC;GACtE;GACA,YAAY;IACV,OAAOC;IACP,SAASF,IAAO,KAAKE;GACvB;EACF;EACA,MAAM,CAACE,KAAeH,GAAQ;EAC9B,aAAa;CACf,CAAC;CAMD,OAAO;EACL,OAL8BI,GAAM,oBAAoB,SAAS,CAAC,EAAA,CAAG,KACpE,MAAkCC,EAAOC,CAAI,CAI9C;EACA,OAAOF,GAAM,oBAAoB,SAAS;EAC1C,SAASA,GAAM,oBAAoB,WAAW;EAC9C;EACA;EACA;CACF;AACF"}
@@ -0,0 +1 @@
1
+ export declare function useVaultName(vaultId: string | null | undefined): string | null;
@@ -0,0 +1,27 @@
1
+ import { useEffect as e, useMemo as t, useState as n } from "react";
2
+ import { useApolloClient as r } from "@apollo/client/react";
3
+ import { createConnectionsApi as i } from "@burdenoff/fe-libs/connections";
4
+ // src/integrations/hooks/useVaultName.ts
5
+ function a(a) {
6
+ let o = r(), s = t(() => i(o), [o]), [c, l] = n(null);
7
+ return e(() => {
8
+ if (!a) return;
9
+ let e = !1;
10
+ return s.listVaults().then((t) => {
11
+ e || l({
12
+ id: a,
13
+ name: t.find((e) => e.id === a)?.name ?? null
14
+ });
15
+ }).catch(() => {
16
+ e || l({
17
+ id: a,
18
+ name: null
19
+ });
20
+ }), () => {
21
+ e = !0;
22
+ };
23
+ }, [s, a]), c && c.id === a ? c.name : null;
24
+ }
25
+ export { a as useVaultName };
26
+
27
+ //# sourceMappingURL=useVaultName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useVaultName.js","names":["useVaultName","client","useApolloClient","api","useMemo","createConnectionsApi","resolved","setResolved","useState","useEffect","vaultId","cancelled","vaults","v"],"sources":["../../../src/integrations/hooks/useVaultName.ts"],"sourcesContent":["/**\n * The name of the vault a connection's credential lives in, for the\n * credential-storage card (BOFF-11875): it showed the raw vault id.\n *\n * Reads the vaults this person can see through the same query the connect\n * dialog uses. Null while loading, when the vault is not visible to them, or\n * when the lookup fails, so the card falls back to the id.\n */\nimport { useEffect, useMemo, useState } from 'react';\nimport { useApolloClient } from '@apollo/client/react';\nimport { createConnectionsApi } from '@burdenoff/fe-libs/connections';\n\nexport function useVaultName(vaultId: string | null | undefined): string | null {\n const client = useApolloClient();\n const api = useMemo(() => createConnectionsApi(client), [client]);\n const [resolved, setResolved] = useState<{ id: string; name: string | null } | null>(null);\n\n useEffect(() => {\n if (!vaultId) return;\n let cancelled = false;\n api\n .listVaults()\n .then((vaults) => {\n if (!cancelled) {\n setResolved({ id: vaultId, name: vaults.find((v) => v.id === vaultId)?.name ?? null });\n }\n })\n .catch(() => {\n if (!cancelled) setResolved({ id: vaultId, name: null });\n });\n return () => {\n cancelled = true;\n };\n }, [api, vaultId]);\n\n return resolved && resolved.id === vaultId ? resolved.name : null;\n}\n"],"mappings":";;;;AAYA,SAAgBA,EAAa,GAAmD;CAC9E,IAAMC,IAASC,EAAgB,GACzBC,IAAMC,QAAcC,EAAqBJ,CAAM,GAAG,CAACA,CAAM,CAAC,GAC1D,CAACK,GAAUC,KAAeC,EAAqD,IAAI;CAoBzF,OAlBAC,QAAgB;EACd,IAAI,CAACC,GAAS;EACd,IAAIC,IAAY;EAWhB,OAVAR,EACG,WAAW,CAAC,CACZ,MAAM,MAAW;GAChB,AAAKQ,KACHJ,EAAY;IAAE,IAAIG;IAAS,MAAME,EAAO,MAAM,MAAMC,EAAE,OAAOH,CAAO,CAAC,EAAE,QAAQ;GAAK,CAAC;EAEzF,CAAC,CAAC,CACD,YAAY;GACX,AAAKC,KAAWJ,EAAY;IAAE,IAAIG;IAAS,MAAM;GAAK,CAAC;EACzD,CAAC,SACU;GACX,IAAY;EACd;CACF,GAAG,CAACP,GAAKO,CAAO,CAAC,GAEVJ,KAAYA,EAAS,OAAOI,IAAUJ,EAAS,OAAO;AAC/D"}