@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/esm/index.js CHANGED
@@ -10,7 +10,7 @@ import Link from 'next/link';
10
10
 
11
11
  // package.json
12
12
  var package_default = {
13
- version: "0.0.14"};
13
+ version: "0.0.16"};
14
14
 
15
15
  // src/tokens/index.ts
16
16
  var baseTokens = {
@@ -1029,6 +1029,36 @@ var getSecurityInfoSBOM = defineServerAction({
1029
1029
  return envelope.data;
1030
1030
  }
1031
1031
  });
1032
+ var downloadSecuritySBOM = defineServerAction({
1033
+ id: "security/download-sbom",
1034
+ description: "Downloads the full SBOM file for a specific release",
1035
+ visibility: "customer",
1036
+ tags: ["security", "sbom", "download"],
1037
+ async run({ token, installType, channelSequence, isAirgap = false }, context) {
1038
+ if (!token || typeof token !== "string") {
1039
+ throw new Error("Security SBOM download requires a session token");
1040
+ }
1041
+ const params = new URLSearchParams({
1042
+ install_type: installType,
1043
+ channel_sequence: channelSequence.toString(),
1044
+ is_airgap: isAirgap.toString()
1045
+ });
1046
+ const url = `${getApiOrigin()}/enterprise-portal/security-sbom/download?${params.toString()}`;
1047
+ if (process.env.NODE_ENV !== "production") {
1048
+ console.debug("[portal-components] downloading security SBOM via %s", url);
1049
+ }
1050
+ const response = await authenticatedFetch(url, {
1051
+ token,
1052
+ signal: context?.signal
1053
+ });
1054
+ if (!response.ok) {
1055
+ throw new Error(
1056
+ `Security SBOM download failed (${response.status} ${response.statusText})`
1057
+ );
1058
+ }
1059
+ return await response.text();
1060
+ }
1061
+ });
1032
1062
  var fetchDashboardComposite = defineServerAction({
1033
1063
  id: "dashboard/fetch-composite",
1034
1064
  description: "Fetches all dashboard data from the composite Enterprise Portal API endpoint",
@@ -1687,7 +1717,8 @@ var TopNav = async ({
1687
1717
  customers,
1688
1718
  currentCustomerId,
1689
1719
  onChangeTeam,
1690
- userMenuChildren
1720
+ userMenuChildren,
1721
+ logoutButton
1691
1722
  }) => {
1692
1723
  const displayLabel = userMenuLabel || (customerName ? `Team: ${customerName}` : "Team: Example");
1693
1724
  let logo;
@@ -1836,14 +1867,7 @@ var TopNav = async ({
1836
1867
  }
1837
1868
  ),
1838
1869
  userMenuChildren,
1839
- /* @__PURE__ */ jsx(
1840
- "a",
1841
- {
1842
- href: `${process.env.NEXT_PUBLIC_BASE_PATH || ""}/?expired=1`,
1843
- className: "block w-full px-4 py-2 text-left hover:bg-gray-100",
1844
- children: "Logout"
1845
- }
1846
- )
1870
+ logoutButton
1847
1871
  ] })
1848
1872
  ] })
1849
1873
  ] }),
@@ -2425,6 +2449,6 @@ UpdateLayout.displayName = "UpdateLayout";
2425
2449
  // src/index.ts
2426
2450
  var portalComponentsVersion = package_default.version;
2427
2451
 
2428
- export { Button, LicenseDetails, SupportCard, TeamSettingsCard, TopNav, UpdateLayout, UpdatesCard, UserSettings, UserSettingsCard, createPortalTheme, decodeJwtPayload, defaultTopNavLinks, defineServerAction, deleteSupportBundle, downloadSupportBundle, fetchCurrentUser, fetchCustomBranding, fetchDashboardComposite, fetchLicenseDetails, fetchNotifications, getCustomerIdFromToken, getSecurityInfo, getSecurityInfoDiff, getSecurityInfoSBOM, getSupportBundleUploadUrl, initiateLogin, listReleases, listSupportBundles, portalComponentsVersion, portalThemeTokens, updateNotifications, updateUser, uploadSupportBundle, verifyMagicLink };
2452
+ export { Button, LicenseDetails, SupportCard, TeamSettingsCard, TopNav, UpdateLayout, UpdatesCard, UserSettings, UserSettingsCard, createPortalTheme, decodeJwtPayload, defaultTopNavLinks, defineServerAction, deleteSupportBundle, downloadSecuritySBOM, downloadSupportBundle, fetchCurrentUser, fetchCustomBranding, fetchDashboardComposite, fetchLicenseDetails, fetchNotifications, getCustomerIdFromToken, getSecurityInfo, getSecurityInfoDiff, getSecurityInfoSBOM, getSupportBundleUploadUrl, initiateLogin, listReleases, listSupportBundles, portalComponentsVersion, portalThemeTokens, updateNotifications, updateUser, uploadSupportBundle, verifyMagicLink };
2429
2453
  //# sourceMappingURL=index.js.map
2430
2454
  //# sourceMappingURL=index.js.map