@replicated/portal-components 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/metadata/registry.json +2 -2
- package/components/metadata/registry.md +2 -2
- package/dist/actions/change-team.js +39 -0
- package/dist/actions/change-team.js.map +1 -1
- package/dist/actions/index.d.mts +1 -1
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/index.js +40 -0
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/install-actions.d.mts +1 -1
- package/dist/actions/install-actions.d.ts +1 -1
- package/dist/actions/install-actions.js +39 -0
- package/dist/actions/install-actions.js.map +1 -1
- package/dist/actions/service-account.d.mts +1 -1
- package/dist/actions/service-account.d.ts +1 -1
- package/dist/actions/service-account.js +39 -0
- package/dist/actions/service-account.js.map +1 -1
- package/dist/actions/support-bundles.d.mts +1 -1
- package/dist/actions/support-bundles.d.ts +1 -1
- package/dist/actions/support-bundles.js +39 -0
- package/dist/actions/support-bundles.js.map +1 -1
- package/dist/actions/team-settings.d.mts +1 -1
- package/dist/actions/team-settings.d.ts +1 -1
- package/dist/actions/team-settings.js +39 -0
- package/dist/actions/team-settings.js.map +1 -1
- package/dist/actions/trial-signup.js +39 -0
- package/dist/actions/trial-signup.js.map +1 -1
- package/dist/actions/user-settings.d.mts +1 -1
- package/dist/actions/user-settings.d.ts +1 -1
- package/dist/actions/user-settings.js +39 -0
- package/dist/actions/user-settings.js.map +1 -1
- package/dist/airgap-instances.d.mts +1 -1
- package/dist/airgap-instances.d.ts +1 -1
- package/dist/airgap-instances.js +3 -2
- package/dist/airgap-instances.js.map +1 -1
- package/dist/esm/actions/change-team.js +39 -0
- package/dist/esm/actions/change-team.js.map +1 -1
- package/dist/esm/actions/index.js +40 -1
- package/dist/esm/actions/index.js.map +1 -1
- package/dist/esm/actions/install-actions.js +39 -0
- package/dist/esm/actions/install-actions.js.map +1 -1
- package/dist/esm/actions/service-account.js +39 -0
- package/dist/esm/actions/service-account.js.map +1 -1
- package/dist/esm/actions/support-bundles.js +39 -0
- package/dist/esm/actions/support-bundles.js.map +1 -1
- package/dist/esm/actions/team-settings.js +39 -0
- package/dist/esm/actions/team-settings.js.map +1 -1
- package/dist/esm/actions/trial-signup.js +39 -0
- package/dist/esm/actions/trial-signup.js.map +1 -1
- package/dist/esm/actions/user-settings.js +39 -0
- package/dist/esm/actions/user-settings.js.map +1 -1
- package/dist/esm/airgap-instances.js +3 -2
- package/dist/esm/airgap-instances.js.map +1 -1
- package/dist/esm/helm-install-wizard.js +414 -189
- package/dist/esm/helm-install-wizard.js.map +1 -1
- package/dist/esm/index.js +89 -64
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/install-actions.js +39 -0
- package/dist/esm/install-actions.js.map +1 -1
- package/dist/esm/instance-card.js +2 -1
- package/dist/esm/instance-card.js.map +1 -1
- package/dist/esm/license-details.js +39 -0
- package/dist/esm/license-details.js.map +1 -1
- package/dist/esm/linux-install-wizard.js +310 -166
- package/dist/esm/linux-install-wizard.js.map +1 -1
- package/dist/esm/logout-action.js +187 -0
- package/dist/esm/logout-action.js.map +1 -0
- package/dist/esm/logout-button.js +32 -0
- package/dist/esm/logout-button.js.map +1 -0
- package/dist/esm/markdown-renderer.js +16 -0
- package/dist/esm/markdown-renderer.js.map +1 -0
- package/dist/esm/middleware.js +3 -3
- package/dist/esm/middleware.js.map +1 -1
- package/dist/esm/online-instance-list.js +3 -2
- package/dist/esm/online-instance-list.js.map +1 -1
- package/dist/esm/saml-callback-client.js +5 -2
- package/dist/esm/saml-callback-client.js.map +1 -1
- package/dist/esm/saml-handlers.js +104 -0
- package/dist/esm/saml-handlers.js.map +1 -1
- package/dist/esm/support-bundle-collection-card.js +3 -2
- package/dist/esm/support-bundle-collection-card.js.map +1 -1
- package/dist/esm/support-bundles-card.js +2 -2
- package/dist/esm/support-bundles-card.js.map +1 -1
- package/dist/esm/support-card.js +39 -0
- package/dist/esm/support-card.js.map +1 -1
- package/dist/esm/top-nav-menu-close.js +46 -0
- package/dist/esm/top-nav-menu-close.js.map +1 -0
- package/dist/esm/top-nav.js +149 -59
- package/dist/esm/top-nav.js.map +1 -1
- package/dist/esm/trial-signup.js +6 -3
- package/dist/esm/trial-signup.js.map +1 -1
- package/dist/esm/update-layout.js +149 -59
- package/dist/esm/update-layout.js.map +1 -1
- package/dist/esm/upload-support-bundle-modal.js +2 -2
- package/dist/esm/upload-support-bundle-modal.js.map +1 -1
- package/dist/esm/user-menu-dropdown.js +52 -0
- package/dist/esm/user-menu-dropdown.js.map +1 -0
- package/dist/esm/user-settings.js +5 -5
- package/dist/esm/user-settings.js.map +1 -1
- package/dist/esm/utils/index.js +39 -0
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/helm-install-wizard.d.mts +18 -7
- package/dist/helm-install-wizard.d.ts +18 -7
- package/dist/helm-install-wizard.js +418 -189
- package/dist/helm-install-wizard.js.map +1 -1
- package/dist/{index-sMbq94M7.d.ts → index-DXy7RxOX.d.ts} +18 -1
- package/dist/{index-DyzJ0yKD.d.mts → index-JX9-CIMA.d.mts} +18 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +89 -64
- package/dist/index.js.map +1 -1
- package/dist/install-actions.d.mts +2 -2
- package/dist/install-actions.d.ts +2 -2
- package/dist/install-actions.js +39 -0
- package/dist/install-actions.js.map +1 -1
- package/dist/instance-card.d.mts +1 -1
- package/dist/instance-card.d.ts +1 -1
- package/dist/instance-card.js +2 -1
- package/dist/instance-card.js.map +1 -1
- package/dist/license-details.js +39 -0
- package/dist/license-details.js.map +1 -1
- package/dist/linux-install-wizard.d.mts +17 -7
- package/dist/linux-install-wizard.d.ts +17 -7
- package/dist/linux-install-wizard.js +314 -166
- package/dist/linux-install-wizard.js.map +1 -1
- package/dist/logout-action.d.mts +7 -0
- package/dist/logout-action.d.ts +7 -0
- package/dist/logout-action.js +189 -0
- package/dist/logout-action.js.map +1 -0
- package/dist/logout-button.d.mts +16 -0
- package/dist/logout-button.d.ts +16 -0
- package/dist/logout-button.js +34 -0
- package/dist/logout-button.js.map +1 -0
- package/dist/markdown-renderer.d.mts +12 -0
- package/dist/markdown-renderer.d.ts +12 -0
- package/dist/markdown-renderer.js +22 -0
- package/dist/markdown-renderer.js.map +1 -0
- package/dist/middleware.js +3 -3
- package/dist/middleware.js.map +1 -1
- package/dist/online-instance-list.d.mts +1 -1
- package/dist/online-instance-list.d.ts +1 -1
- package/dist/online-instance-list.js +3 -2
- package/dist/online-instance-list.js.map +1 -1
- package/dist/pending-installations.d.mts +1 -1
- package/dist/pending-installations.d.ts +1 -1
- package/dist/saml-callback-client.js +5 -2
- package/dist/saml-callback-client.js.map +1 -1
- package/dist/saml-handlers.js +104 -0
- package/dist/saml-handlers.js.map +1 -1
- package/dist/security-card.d.mts +1 -1
- package/dist/security-card.d.ts +1 -1
- package/dist/styles.css +39 -0
- package/dist/support-bundle-collection-card.js +3 -2
- package/dist/support-bundle-collection-card.js.map +1 -1
- package/dist/support-bundles-card.d.mts +2 -2
- package/dist/support-bundles-card.d.ts +2 -2
- package/dist/support-bundles-card.js +2 -2
- package/dist/support-bundles-card.js.map +1 -1
- package/dist/support-card.js +39 -0
- package/dist/support-card.js.map +1 -1
- package/dist/top-nav-menu-close.d.mts +10 -0
- package/dist/top-nav-menu-close.d.ts +10 -0
- package/dist/top-nav-menu-close.js +48 -0
- package/dist/top-nav-menu-close.js.map +1 -0
- package/dist/top-nav.js +149 -59
- package/dist/top-nav.js.map +1 -1
- package/dist/trial-signup.js +6 -3
- package/dist/trial-signup.js.map +1 -1
- package/dist/update-layout.js +149 -59
- package/dist/update-layout.js.map +1 -1
- package/dist/upload-support-bundle-modal.js +2 -2
- package/dist/upload-support-bundle-modal.js.map +1 -1
- package/dist/user-menu-dropdown.d.mts +25 -0
- package/dist/user-menu-dropdown.d.ts +25 -0
- package/dist/user-menu-dropdown.js +59 -0
- package/dist/user-menu-dropdown.js.map +1 -0
- package/dist/user-settings.js +5 -5
- package/dist/user-settings.js.map +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +39 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +29 -2
package/dist/esm/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { Buffer } from 'buffer';
|
|
4
4
|
import { cookies } from 'next/headers';
|
|
5
5
|
import Link from 'next/link';
|
|
6
|
+
import { User } from 'lucide-react';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Enterprise Portal Components
|
|
@@ -120,7 +121,7 @@ var init_tracer = __esm({
|
|
|
120
121
|
|
|
121
122
|
// package.json
|
|
122
123
|
var package_default = {
|
|
123
|
-
version: "0.0.
|
|
124
|
+
version: "0.0.22"};
|
|
124
125
|
|
|
125
126
|
// src/tokens/index.ts
|
|
126
127
|
var baseTokens = {
|
|
@@ -1450,6 +1451,45 @@ var updateNotifications = defineServerAction({
|
|
|
1450
1451
|
};
|
|
1451
1452
|
}
|
|
1452
1453
|
});
|
|
1454
|
+
var fetchDocumentationImpl = async () => {
|
|
1455
|
+
const { cookies: cookies2 } = await import('next/headers');
|
|
1456
|
+
const sessionStore = await cookies2();
|
|
1457
|
+
const session = sessionStore.get("portal_session");
|
|
1458
|
+
const token = session?.value;
|
|
1459
|
+
if (!token) {
|
|
1460
|
+
throw new Error("Authentication required");
|
|
1461
|
+
}
|
|
1462
|
+
const url = `${getApiOrigin()}/enterprise-portal/documentation`;
|
|
1463
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1464
|
+
console.debug(
|
|
1465
|
+
"[portal-components] fetching documentation via %s (Enterprise Portal API)",
|
|
1466
|
+
url
|
|
1467
|
+
);
|
|
1468
|
+
}
|
|
1469
|
+
const response = await authenticatedFetch(url, {
|
|
1470
|
+
method: "GET",
|
|
1471
|
+
token,
|
|
1472
|
+
headers: {
|
|
1473
|
+
accept: "application/json"
|
|
1474
|
+
}
|
|
1475
|
+
});
|
|
1476
|
+
if (!response.ok) {
|
|
1477
|
+
throw new Error(
|
|
1478
|
+
`Documentation request failed (${response.status} ${response.statusText})`
|
|
1479
|
+
);
|
|
1480
|
+
}
|
|
1481
|
+
const data = await response.json();
|
|
1482
|
+
return {
|
|
1483
|
+
helmPreInstall: data.helmPreInstall || "",
|
|
1484
|
+
helmPostInstall: data.helmPostInstall || "",
|
|
1485
|
+
embeddedClusterPreInstall: data.embeddedClusterPreInstall || "",
|
|
1486
|
+
embeddedClusterPostInstall: data.embeddedClusterPostInstall || "",
|
|
1487
|
+
helmInstallUrl: data.helmInstallUrl || "",
|
|
1488
|
+
embeddedClusterInstallUrl: data.embeddedClusterInstallUrl || "",
|
|
1489
|
+
valuesOverrideUrl: data.valuesOverrideUrl || ""
|
|
1490
|
+
};
|
|
1491
|
+
};
|
|
1492
|
+
cache(fetchDocumentationImpl);
|
|
1453
1493
|
var ShieldIcon = (props) => /* @__PURE__ */ jsx(
|
|
1454
1494
|
"svg",
|
|
1455
1495
|
{
|
|
@@ -1707,6 +1747,45 @@ var LicenseDetails = async ({
|
|
|
1707
1747
|
] })
|
|
1708
1748
|
] });
|
|
1709
1749
|
};
|
|
1750
|
+
function UserMenuDropdown({
|
|
1751
|
+
displayLabel,
|
|
1752
|
+
children,
|
|
1753
|
+
className = ""
|
|
1754
|
+
}) {
|
|
1755
|
+
return /* @__PURE__ */ jsxs("details", { className: `group relative ${className}`, children: [
|
|
1756
|
+
/* @__PURE__ */ jsxs("summary", { className: "flex cursor-pointer items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 transition-colors list-none border border-transparent hover:border-gray-200", children: [
|
|
1757
|
+
/* @__PURE__ */ jsx(User, { className: "h-4 w-4" }),
|
|
1758
|
+
/* @__PURE__ */ jsx("span", { children: displayLabel }),
|
|
1759
|
+
/* @__PURE__ */ jsx(
|
|
1760
|
+
"svg",
|
|
1761
|
+
{
|
|
1762
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1763
|
+
width: "16",
|
|
1764
|
+
height: "16",
|
|
1765
|
+
viewBox: "0 0 24 24",
|
|
1766
|
+
fill: "none",
|
|
1767
|
+
stroke: "currentColor",
|
|
1768
|
+
strokeWidth: "2",
|
|
1769
|
+
strokeLinecap: "round",
|
|
1770
|
+
strokeLinejoin: "round",
|
|
1771
|
+
className: "h-4 w-4 text-gray-500 transition-transform group-open:rotate-180",
|
|
1772
|
+
children: /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
|
|
1773
|
+
}
|
|
1774
|
+
)
|
|
1775
|
+
] }),
|
|
1776
|
+
/* @__PURE__ */ jsx("div", { className: "absolute right-0 mt-2 w-52 rounded-lg border border-gray-200 bg-white py-1.5 shadow-xl z-50", children })
|
|
1777
|
+
] });
|
|
1778
|
+
}
|
|
1779
|
+
function UserMenuItem({ href, children }) {
|
|
1780
|
+
return /* @__PURE__ */ jsx(
|
|
1781
|
+
Link,
|
|
1782
|
+
{
|
|
1783
|
+
href,
|
|
1784
|
+
className: "block w-full px-4 py-2.5 text-sm text-gray-700 hover:bg-gray-50 transition-colors",
|
|
1785
|
+
children
|
|
1786
|
+
}
|
|
1787
|
+
);
|
|
1788
|
+
}
|
|
1710
1789
|
var defaultTopNavLinks = [
|
|
1711
1790
|
{
|
|
1712
1791
|
label: "Dashboard",
|
|
@@ -2003,65 +2082,11 @@ var TopNav = async ({
|
|
|
2003
2082
|
),
|
|
2004
2083
|
/* @__PURE__ */ jsx("span", { className: "text-xl font-bold text-gray-900", children: brandTitle || "Enterprise Portal" })
|
|
2005
2084
|
] }),
|
|
2006
|
-
/* @__PURE__ */ jsxs(
|
|
2007
|
-
/* @__PURE__ */
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2012
|
-
width: "16",
|
|
2013
|
-
height: "16",
|
|
2014
|
-
viewBox: "0 0 24 24",
|
|
2015
|
-
fill: "none",
|
|
2016
|
-
stroke: "currentColor",
|
|
2017
|
-
strokeWidth: "2",
|
|
2018
|
-
strokeLinecap: "round",
|
|
2019
|
-
strokeLinejoin: "round",
|
|
2020
|
-
className: "text-gray-500",
|
|
2021
|
-
children: [
|
|
2022
|
-
/* @__PURE__ */ jsx("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
|
|
2023
|
-
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "7", r: "4" })
|
|
2024
|
-
]
|
|
2025
|
-
}
|
|
2026
|
-
),
|
|
2027
|
-
/* @__PURE__ */ jsx("span", { children: displayLabel }),
|
|
2028
|
-
/* @__PURE__ */ jsx(
|
|
2029
|
-
"svg",
|
|
2030
|
-
{
|
|
2031
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2032
|
-
width: "16",
|
|
2033
|
-
height: "16",
|
|
2034
|
-
viewBox: "0 0 24 24",
|
|
2035
|
-
fill: "none",
|
|
2036
|
-
stroke: "currentColor",
|
|
2037
|
-
strokeWidth: "2",
|
|
2038
|
-
strokeLinecap: "round",
|
|
2039
|
-
strokeLinejoin: "round",
|
|
2040
|
-
className: "text-gray-500",
|
|
2041
|
-
children: /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
|
|
2042
|
-
}
|
|
2043
|
-
)
|
|
2044
|
-
] }),
|
|
2045
|
-
/* @__PURE__ */ jsxs("div", { className: "absolute right-0 mt-2 w-48 rounded-md border border-gray-200 bg-white py-2 text-sm text-gray-700 shadow-lg z-50", children: [
|
|
2046
|
-
/* @__PURE__ */ jsx(
|
|
2047
|
-
Link,
|
|
2048
|
-
{
|
|
2049
|
-
href: "/user-settings",
|
|
2050
|
-
className: "block w-full px-4 py-2 text-left hover:bg-gray-100",
|
|
2051
|
-
children: "User settings"
|
|
2052
|
-
}
|
|
2053
|
-
),
|
|
2054
|
-
/* @__PURE__ */ jsx(
|
|
2055
|
-
Link,
|
|
2056
|
-
{
|
|
2057
|
-
href: "/team-settings",
|
|
2058
|
-
className: "block w-full px-4 py-2 text-left hover:bg-gray-100",
|
|
2059
|
-
children: "Team settings"
|
|
2060
|
-
}
|
|
2061
|
-
),
|
|
2062
|
-
userMenuChildren,
|
|
2063
|
-
logoutButton
|
|
2064
|
-
] })
|
|
2085
|
+
/* @__PURE__ */ jsxs(UserMenuDropdown, { displayLabel, children: [
|
|
2086
|
+
/* @__PURE__ */ jsx(UserMenuItem, { href: "/user-settings", children: "User settings" }),
|
|
2087
|
+
/* @__PURE__ */ jsx(UserMenuItem, { href: "/team-settings", children: "Team settings" }),
|
|
2088
|
+
userMenuChildren,
|
|
2089
|
+
logoutButton
|
|
2065
2090
|
] })
|
|
2066
2091
|
] }),
|
|
2067
2092
|
/* @__PURE__ */ jsx("div", { className: "mt-3 flex flex-wrap gap-3 pb-2 text-sm font-medium text-gray-500", children: resolvedLinks.map(({ label, icon, href }) => {
|
|
@@ -2328,7 +2353,7 @@ var TeamsSection = ({
|
|
|
2328
2353
|
"svg",
|
|
2329
2354
|
{
|
|
2330
2355
|
className: "h-4 w-4",
|
|
2331
|
-
style: { color: primaryColor ||
|
|
2356
|
+
style: { color: primaryColor || DEFAULT_PRIMARY_COLOR },
|
|
2332
2357
|
fill: "none",
|
|
2333
2358
|
viewBox: "0 0 24 24",
|
|
2334
2359
|
stroke: "currentColor",
|
|
@@ -2352,7 +2377,7 @@ var TeamsSection = ({
|
|
|
2352
2377
|
"svg",
|
|
2353
2378
|
{
|
|
2354
2379
|
className: "h-4 w-4",
|
|
2355
|
-
style: { color: primaryColor ||
|
|
2380
|
+
style: { color: primaryColor || DEFAULT_PRIMARY_COLOR },
|
|
2356
2381
|
fill: "none",
|
|
2357
2382
|
viewBox: "0 0 24 24",
|
|
2358
2383
|
stroke: "currentColor",
|
|
@@ -2418,8 +2443,8 @@ var ProfileSection = ({
|
|
|
2418
2443
|
setIsEditing(true);
|
|
2419
2444
|
};
|
|
2420
2445
|
const buttonStyle = {
|
|
2421
|
-
backgroundColor: primaryColor ||
|
|
2422
|
-
borderColor: primaryColor ||
|
|
2446
|
+
backgroundColor: primaryColor || DEFAULT_PRIMARY_COLOR,
|
|
2447
|
+
borderColor: primaryColor || DEFAULT_PRIMARY_COLOR
|
|
2423
2448
|
};
|
|
2424
2449
|
return /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-gray-200 bg-white p-6 shadow-sm", children: [
|
|
2425
2450
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|