@replicated/portal-components 0.0.14 → 0.0.16

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 (45) hide show
  1. package/components/metadata/registry.json +2 -2
  2. package/components/metadata/registry.md +2 -2
  3. package/dist/actions/index.d.mts +20 -16
  4. package/dist/actions/index.d.ts +20 -16
  5. package/dist/actions/index.js +31 -0
  6. package/dist/actions/index.js.map +1 -1
  7. package/dist/esm/actions/index.js +31 -1
  8. package/dist/esm/actions/index.js.map +1 -1
  9. package/dist/esm/helm-install-wizard.js.map +1 -1
  10. package/dist/esm/index.js +35 -11
  11. package/dist/esm/index.js.map +1 -1
  12. package/dist/esm/install-actions.js.map +1 -1
  13. package/dist/esm/license-details.js.map +1 -1
  14. package/dist/esm/linux-install-wizard.js.map +1 -1
  15. package/dist/esm/security-card.js +38 -30
  16. package/dist/esm/security-card.js.map +1 -1
  17. package/dist/esm/support-card.js.map +1 -1
  18. package/dist/esm/top-nav.js +3 -9
  19. package/dist/esm/top-nav.js.map +1 -1
  20. package/dist/esm/update-layout.js +3 -9
  21. package/dist/esm/update-layout.js.map +1 -1
  22. package/dist/esm/utils/index.js.map +1 -1
  23. package/dist/helm-install-wizard.js.map +1 -1
  24. package/dist/index.d.mts +2 -2
  25. package/dist/index.d.ts +2 -2
  26. package/dist/index.js +35 -10
  27. package/dist/index.js.map +1 -1
  28. package/dist/install-actions.js.map +1 -1
  29. package/dist/license-details.js.map +1 -1
  30. package/dist/linux-install-wizard.js.map +1 -1
  31. package/dist/security-card.d.mts +10 -5
  32. package/dist/security-card.d.ts +10 -5
  33. package/dist/security-card.js +38 -30
  34. package/dist/security-card.js.map +1 -1
  35. package/dist/support-card.js.map +1 -1
  36. package/dist/{top-nav-0mb1K_H0.d.mts → top-nav-IRIn66wS.d.mts} +2 -1
  37. package/dist/{top-nav-0mb1K_H0.d.ts → top-nav-IRIn66wS.d.ts} +2 -1
  38. package/dist/top-nav.d.mts +1 -1
  39. package/dist/top-nav.d.ts +1 -1
  40. package/dist/top-nav.js +3 -9
  41. package/dist/top-nav.js.map +1 -1
  42. package/dist/update-layout.js +3 -9
  43. package/dist/update-layout.js.map +1 -1
  44. package/dist/utils/index.js.map +1 -1
  45. package/package.json +2 -1
package/dist/index.d.mts CHANGED
@@ -2,14 +2,14 @@ export { PortalThemeOverrides, PortalThemeTokens, createPortalTheme, portalTheme
2
2
  import * as react from 'react';
3
3
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
4
4
  export { LicenseDetails, LicenseDetailsProps } from './license-details.mjs';
5
- export { C as Customer, b as TopNav, T as TopNavLink, a as TopNavProps, d as defaultTopNavLinks } from './top-nav-0mb1K_H0.mjs';
5
+ export { C as Customer, b as TopNav, T as TopNavLink, a as TopNavProps, d as defaultTopNavLinks } from './top-nav-IRIn66wS.mjs';
6
6
  export { a as UpdatesCard, U as UpdatesCardProps } from './updates-card-BbubBrVR.mjs';
7
7
  export { SupportCard } from './support-card.mjs';
8
8
  export { UserSettings, UserSettingsCustomer, UserSettingsNotification, UserSettingsProps, UserSettingsTeam, UserSettingsUser } from './user-settings.mjs';
9
9
  export { UserSettingsCard } from './user-settings-card.mjs';
10
10
  export { a as TeamSettingsCard, T as TeamSettingsCardProps } from './team-settings-card-Dq1d9b5c.mjs';
11
11
  export { UpdateLayout } from './update-layout.mjs';
12
- export { CustomBrandingResponse, DeleteSupportBundleInput, DeleteSupportBundleResult, DownloadSupportBundleInput, DownloadSupportBundleResult, FetchCurrentUserInput, FetchCurrentUserResult, FetchLicenseDetailsInput, FetchLicenseDetailsResult, FetchNotificationsInput, FetchNotificationsResult, GetSecurityInfoDiffInput, GetSecurityInfoDiffResult, GetSecurityInfoInput, GetSecurityInfoResult, GetSecurityInfoSBOMInput, GetSecurityInfoSBOMResult, InitiateLoginInput, InitiateLoginResult, ListReleasesInput, ListReleasesResult, ListSupportBundlesInput, ListSupportBundlesResult, NotificationSetting, PortalActionContext, PortalActionVisibility, PortalLicenseDetails, PortalLicenseField, PortalServerActionDefinition, SecurityInfoDiff, SecurityInstallType, SecurityReleaseImage, SecurityScanSummary, SecurityScanWrapper, SpdxDocument, SupportBundleInsight, SupportBundleSummary, UnifiedSbom, UpdateNotificationsInput, UpdateNotificationsResult, UpdateUserInput, UpdateUserResult, UploadSupportBundleCompleteInput, UploadSupportBundleCompleteResult, UserProfile, VerifyMagicLinkError, VerifyMagicLinkInput, VerifyMagicLinkResult, decodeJwtPayload, defineServerAction, deleteSupportBundle, downloadSupportBundle, fetchCurrentUser, fetchCustomBranding, fetchDashboardComposite, fetchLicenseDetails, fetchNotifications, getCustomerIdFromToken, getSecurityInfo, getSecurityInfoDiff, getSecurityInfoSBOM, getSupportBundleUploadUrl, initiateLogin, listReleases, listSupportBundles, updateNotifications, updateUser, uploadSupportBundle, verifyMagicLink } from './actions/index.mjs';
12
+ export { CustomBrandingResponse, DeleteSupportBundleInput, DeleteSupportBundleResult, DownloadSBOMInput, DownloadSupportBundleInput, DownloadSupportBundleResult, FetchCurrentUserInput, FetchCurrentUserResult, FetchLicenseDetailsInput, FetchLicenseDetailsResult, FetchNotificationsInput, FetchNotificationsResult, GetSecurityInfoDiffInput, GetSecurityInfoDiffResult, GetSecurityInfoInput, GetSecurityInfoResult, GetSecurityInfoSBOMInput, GetSecurityInfoSBOMResult, InitiateLoginInput, InitiateLoginResult, ListReleasesInput, ListReleasesResult, ListSupportBundlesInput, ListSupportBundlesResult, NotificationSetting, PortalActionContext, PortalActionVisibility, PortalLicenseDetails, PortalLicenseField, PortalServerActionDefinition, SBOMMetadata, SecurityInfoDiff, SecurityInstallType, SecurityReleaseImage, SecurityScanSummary, SecurityScanWrapper, SupportBundleInsight, SupportBundleSummary, UpdateNotificationsInput, UpdateNotificationsResult, UpdateUserInput, UpdateUserResult, UploadSupportBundleCompleteInput, UploadSupportBundleCompleteResult, UserProfile, VerifyMagicLinkError, VerifyMagicLinkInput, VerifyMagicLinkResult, decodeJwtPayload, defineServerAction, deleteSupportBundle, downloadSecuritySBOM, downloadSupportBundle, fetchCurrentUser, fetchCustomBranding, fetchDashboardComposite, fetchLicenseDetails, fetchNotifications, getCustomerIdFromToken, getSecurityInfo, getSecurityInfoDiff, getSecurityInfoSBOM, getSupportBundleUploadUrl, initiateLogin, listReleases, listSupportBundles, updateNotifications, updateUser, uploadSupportBundle, verifyMagicLink } from './actions/index.mjs';
13
13
  import 'react/jsx-runtime';
14
14
 
15
15
  /**
package/dist/index.d.ts CHANGED
@@ -2,14 +2,14 @@ export { PortalThemeOverrides, PortalThemeTokens, createPortalTheme, portalTheme
2
2
  import * as react from 'react';
3
3
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
4
4
  export { LicenseDetails, LicenseDetailsProps } from './license-details.js';
5
- export { C as Customer, b as TopNav, T as TopNavLink, a as TopNavProps, d as defaultTopNavLinks } from './top-nav-0mb1K_H0.js';
5
+ export { C as Customer, b as TopNav, T as TopNavLink, a as TopNavProps, d as defaultTopNavLinks } from './top-nav-IRIn66wS.js';
6
6
  export { a as UpdatesCard, U as UpdatesCardProps } from './updates-card-BbubBrVR.js';
7
7
  export { SupportCard } from './support-card.js';
8
8
  export { UserSettings, UserSettingsCustomer, UserSettingsNotification, UserSettingsProps, UserSettingsTeam, UserSettingsUser } from './user-settings.js';
9
9
  export { UserSettingsCard } from './user-settings-card.js';
10
10
  export { a as TeamSettingsCard, T as TeamSettingsCardProps } from './team-settings-card-Dq1d9b5c.js';
11
11
  export { UpdateLayout } from './update-layout.js';
12
- export { CustomBrandingResponse, DeleteSupportBundleInput, DeleteSupportBundleResult, DownloadSupportBundleInput, DownloadSupportBundleResult, FetchCurrentUserInput, FetchCurrentUserResult, FetchLicenseDetailsInput, FetchLicenseDetailsResult, FetchNotificationsInput, FetchNotificationsResult, GetSecurityInfoDiffInput, GetSecurityInfoDiffResult, GetSecurityInfoInput, GetSecurityInfoResult, GetSecurityInfoSBOMInput, GetSecurityInfoSBOMResult, InitiateLoginInput, InitiateLoginResult, ListReleasesInput, ListReleasesResult, ListSupportBundlesInput, ListSupportBundlesResult, NotificationSetting, PortalActionContext, PortalActionVisibility, PortalLicenseDetails, PortalLicenseField, PortalServerActionDefinition, SecurityInfoDiff, SecurityInstallType, SecurityReleaseImage, SecurityScanSummary, SecurityScanWrapper, SpdxDocument, SupportBundleInsight, SupportBundleSummary, UnifiedSbom, UpdateNotificationsInput, UpdateNotificationsResult, UpdateUserInput, UpdateUserResult, UploadSupportBundleCompleteInput, UploadSupportBundleCompleteResult, UserProfile, VerifyMagicLinkError, VerifyMagicLinkInput, VerifyMagicLinkResult, decodeJwtPayload, defineServerAction, deleteSupportBundle, downloadSupportBundle, fetchCurrentUser, fetchCustomBranding, fetchDashboardComposite, fetchLicenseDetails, fetchNotifications, getCustomerIdFromToken, getSecurityInfo, getSecurityInfoDiff, getSecurityInfoSBOM, getSupportBundleUploadUrl, initiateLogin, listReleases, listSupportBundles, updateNotifications, updateUser, uploadSupportBundle, verifyMagicLink } from './actions/index.js';
12
+ export { CustomBrandingResponse, DeleteSupportBundleInput, DeleteSupportBundleResult, DownloadSBOMInput, DownloadSupportBundleInput, DownloadSupportBundleResult, FetchCurrentUserInput, FetchCurrentUserResult, FetchLicenseDetailsInput, FetchLicenseDetailsResult, FetchNotificationsInput, FetchNotificationsResult, GetSecurityInfoDiffInput, GetSecurityInfoDiffResult, GetSecurityInfoInput, GetSecurityInfoResult, GetSecurityInfoSBOMInput, GetSecurityInfoSBOMResult, InitiateLoginInput, InitiateLoginResult, ListReleasesInput, ListReleasesResult, ListSupportBundlesInput, ListSupportBundlesResult, NotificationSetting, PortalActionContext, PortalActionVisibility, PortalLicenseDetails, PortalLicenseField, PortalServerActionDefinition, SBOMMetadata, SecurityInfoDiff, SecurityInstallType, SecurityReleaseImage, SecurityScanSummary, SecurityScanWrapper, SupportBundleInsight, SupportBundleSummary, UpdateNotificationsInput, UpdateNotificationsResult, UpdateUserInput, UpdateUserResult, UploadSupportBundleCompleteInput, UploadSupportBundleCompleteResult, UserProfile, VerifyMagicLinkError, VerifyMagicLinkInput, VerifyMagicLinkResult, decodeJwtPayload, defineServerAction, deleteSupportBundle, downloadSecuritySBOM, downloadSupportBundle, fetchCurrentUser, fetchCustomBranding, fetchDashboardComposite, fetchLicenseDetails, fetchNotifications, getCustomerIdFromToken, getSecurityInfo, getSecurityInfoDiff, getSecurityInfoSBOM, getSupportBundleUploadUrl, initiateLogin, listReleases, listSupportBundles, updateNotifications, updateUser, uploadSupportBundle, verifyMagicLink } from './actions/index.js';
13
13
  import 'react/jsx-runtime';
14
14
 
15
15
  /**
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ var Link__default = /*#__PURE__*/_interopDefault(Link);
16
16
 
17
17
  // package.json
18
18
  var package_default = {
19
- version: "0.0.14"};
19
+ version: "0.0.16"};
20
20
 
21
21
  // src/tokens/index.ts
22
22
  var baseTokens = {
@@ -1035,6 +1035,36 @@ var getSecurityInfoSBOM = defineServerAction({
1035
1035
  return envelope.data;
1036
1036
  }
1037
1037
  });
1038
+ var downloadSecuritySBOM = defineServerAction({
1039
+ id: "security/download-sbom",
1040
+ description: "Downloads the full SBOM file for a specific release",
1041
+ visibility: "customer",
1042
+ tags: ["security", "sbom", "download"],
1043
+ async run({ token, installType, channelSequence, isAirgap = false }, context) {
1044
+ if (!token || typeof token !== "string") {
1045
+ throw new Error("Security SBOM download requires a session token");
1046
+ }
1047
+ const params = new URLSearchParams({
1048
+ install_type: installType,
1049
+ channel_sequence: channelSequence.toString(),
1050
+ is_airgap: isAirgap.toString()
1051
+ });
1052
+ const url = `${getApiOrigin()}/enterprise-portal/security-sbom/download?${params.toString()}`;
1053
+ if (process.env.NODE_ENV !== "production") {
1054
+ console.debug("[portal-components] downloading security SBOM via %s", url);
1055
+ }
1056
+ const response = await authenticatedFetch(url, {
1057
+ token,
1058
+ signal: context?.signal
1059
+ });
1060
+ if (!response.ok) {
1061
+ throw new Error(
1062
+ `Security SBOM download failed (${response.status} ${response.statusText})`
1063
+ );
1064
+ }
1065
+ return await response.text();
1066
+ }
1067
+ });
1038
1068
  var fetchDashboardComposite = defineServerAction({
1039
1069
  id: "dashboard/fetch-composite",
1040
1070
  description: "Fetches all dashboard data from the composite Enterprise Portal API endpoint",
@@ -1693,7 +1723,8 @@ var TopNav = async ({
1693
1723
  customers,
1694
1724
  currentCustomerId,
1695
1725
  onChangeTeam,
1696
- userMenuChildren
1726
+ userMenuChildren,
1727
+ logoutButton
1697
1728
  }) => {
1698
1729
  const displayLabel = userMenuLabel || (customerName ? `Team: ${customerName}` : "Team: Example");
1699
1730
  let logo;
@@ -1842,14 +1873,7 @@ var TopNav = async ({
1842
1873
  }
1843
1874
  ),
1844
1875
  userMenuChildren,
1845
- /* @__PURE__ */ jsxRuntime.jsx(
1846
- "a",
1847
- {
1848
- href: `${process.env.NEXT_PUBLIC_BASE_PATH || ""}/?expired=1`,
1849
- className: "block w-full px-4 py-2 text-left hover:bg-gray-100",
1850
- children: "Logout"
1851
- }
1852
- )
1876
+ logoutButton
1853
1877
  ] })
1854
1878
  ] })
1855
1879
  ] }),
@@ -2445,6 +2469,7 @@ exports.decodeJwtPayload = decodeJwtPayload;
2445
2469
  exports.defaultTopNavLinks = defaultTopNavLinks;
2446
2470
  exports.defineServerAction = defineServerAction;
2447
2471
  exports.deleteSupportBundle = deleteSupportBundle;
2472
+ exports.downloadSecuritySBOM = downloadSecuritySBOM;
2448
2473
  exports.downloadSupportBundle = downloadSupportBundle;
2449
2474
  exports.fetchCurrentUser = fetchCurrentUser;
2450
2475
  exports.fetchCustomBranding = fetchCustomBranding;