@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.
Files changed (182) hide show
  1. package/components/metadata/registry.json +2 -2
  2. package/components/metadata/registry.md +2 -2
  3. package/dist/actions/change-team.js +39 -0
  4. package/dist/actions/change-team.js.map +1 -1
  5. package/dist/actions/index.d.mts +1 -1
  6. package/dist/actions/index.d.ts +1 -1
  7. package/dist/actions/index.js +40 -0
  8. package/dist/actions/index.js.map +1 -1
  9. package/dist/actions/install-actions.d.mts +1 -1
  10. package/dist/actions/install-actions.d.ts +1 -1
  11. package/dist/actions/install-actions.js +39 -0
  12. package/dist/actions/install-actions.js.map +1 -1
  13. package/dist/actions/service-account.d.mts +1 -1
  14. package/dist/actions/service-account.d.ts +1 -1
  15. package/dist/actions/service-account.js +39 -0
  16. package/dist/actions/service-account.js.map +1 -1
  17. package/dist/actions/support-bundles.d.mts +1 -1
  18. package/dist/actions/support-bundles.d.ts +1 -1
  19. package/dist/actions/support-bundles.js +39 -0
  20. package/dist/actions/support-bundles.js.map +1 -1
  21. package/dist/actions/team-settings.d.mts +1 -1
  22. package/dist/actions/team-settings.d.ts +1 -1
  23. package/dist/actions/team-settings.js +39 -0
  24. package/dist/actions/team-settings.js.map +1 -1
  25. package/dist/actions/trial-signup.js +39 -0
  26. package/dist/actions/trial-signup.js.map +1 -1
  27. package/dist/actions/user-settings.d.mts +1 -1
  28. package/dist/actions/user-settings.d.ts +1 -1
  29. package/dist/actions/user-settings.js +39 -0
  30. package/dist/actions/user-settings.js.map +1 -1
  31. package/dist/airgap-instances.d.mts +1 -1
  32. package/dist/airgap-instances.d.ts +1 -1
  33. package/dist/airgap-instances.js +3 -2
  34. package/dist/airgap-instances.js.map +1 -1
  35. package/dist/esm/actions/change-team.js +39 -0
  36. package/dist/esm/actions/change-team.js.map +1 -1
  37. package/dist/esm/actions/index.js +40 -1
  38. package/dist/esm/actions/index.js.map +1 -1
  39. package/dist/esm/actions/install-actions.js +39 -0
  40. package/dist/esm/actions/install-actions.js.map +1 -1
  41. package/dist/esm/actions/service-account.js +39 -0
  42. package/dist/esm/actions/service-account.js.map +1 -1
  43. package/dist/esm/actions/support-bundles.js +39 -0
  44. package/dist/esm/actions/support-bundles.js.map +1 -1
  45. package/dist/esm/actions/team-settings.js +39 -0
  46. package/dist/esm/actions/team-settings.js.map +1 -1
  47. package/dist/esm/actions/trial-signup.js +39 -0
  48. package/dist/esm/actions/trial-signup.js.map +1 -1
  49. package/dist/esm/actions/user-settings.js +39 -0
  50. package/dist/esm/actions/user-settings.js.map +1 -1
  51. package/dist/esm/airgap-instances.js +3 -2
  52. package/dist/esm/airgap-instances.js.map +1 -1
  53. package/dist/esm/helm-install-wizard.js +414 -189
  54. package/dist/esm/helm-install-wizard.js.map +1 -1
  55. package/dist/esm/index.js +89 -64
  56. package/dist/esm/index.js.map +1 -1
  57. package/dist/esm/install-actions.js +39 -0
  58. package/dist/esm/install-actions.js.map +1 -1
  59. package/dist/esm/instance-card.js +2 -1
  60. package/dist/esm/instance-card.js.map +1 -1
  61. package/dist/esm/license-details.js +39 -0
  62. package/dist/esm/license-details.js.map +1 -1
  63. package/dist/esm/linux-install-wizard.js +310 -166
  64. package/dist/esm/linux-install-wizard.js.map +1 -1
  65. package/dist/esm/logout-action.js +187 -0
  66. package/dist/esm/logout-action.js.map +1 -0
  67. package/dist/esm/logout-button.js +32 -0
  68. package/dist/esm/logout-button.js.map +1 -0
  69. package/dist/esm/markdown-renderer.js +16 -0
  70. package/dist/esm/markdown-renderer.js.map +1 -0
  71. package/dist/esm/middleware.js +3 -3
  72. package/dist/esm/middleware.js.map +1 -1
  73. package/dist/esm/online-instance-list.js +3 -2
  74. package/dist/esm/online-instance-list.js.map +1 -1
  75. package/dist/esm/saml-callback-client.js +5 -2
  76. package/dist/esm/saml-callback-client.js.map +1 -1
  77. package/dist/esm/saml-handlers.js +104 -0
  78. package/dist/esm/saml-handlers.js.map +1 -1
  79. package/dist/esm/support-bundle-collection-card.js +3 -2
  80. package/dist/esm/support-bundle-collection-card.js.map +1 -1
  81. package/dist/esm/support-bundles-card.js +2 -2
  82. package/dist/esm/support-bundles-card.js.map +1 -1
  83. package/dist/esm/support-card.js +39 -0
  84. package/dist/esm/support-card.js.map +1 -1
  85. package/dist/esm/top-nav-menu-close.js +46 -0
  86. package/dist/esm/top-nav-menu-close.js.map +1 -0
  87. package/dist/esm/top-nav.js +149 -59
  88. package/dist/esm/top-nav.js.map +1 -1
  89. package/dist/esm/trial-signup.js +6 -3
  90. package/dist/esm/trial-signup.js.map +1 -1
  91. package/dist/esm/update-layout.js +149 -59
  92. package/dist/esm/update-layout.js.map +1 -1
  93. package/dist/esm/upload-support-bundle-modal.js +2 -2
  94. package/dist/esm/upload-support-bundle-modal.js.map +1 -1
  95. package/dist/esm/user-menu-dropdown.js +52 -0
  96. package/dist/esm/user-menu-dropdown.js.map +1 -0
  97. package/dist/esm/user-settings.js +5 -5
  98. package/dist/esm/user-settings.js.map +1 -1
  99. package/dist/esm/utils/index.js +39 -0
  100. package/dist/esm/utils/index.js.map +1 -1
  101. package/dist/helm-install-wizard.d.mts +18 -7
  102. package/dist/helm-install-wizard.d.ts +18 -7
  103. package/dist/helm-install-wizard.js +418 -189
  104. package/dist/helm-install-wizard.js.map +1 -1
  105. package/dist/{index-sMbq94M7.d.ts → index-DXy7RxOX.d.ts} +18 -1
  106. package/dist/{index-DyzJ0yKD.d.mts → index-JX9-CIMA.d.mts} +18 -1
  107. package/dist/index.d.mts +1 -1
  108. package/dist/index.d.ts +1 -1
  109. package/dist/index.js +89 -64
  110. package/dist/index.js.map +1 -1
  111. package/dist/install-actions.d.mts +2 -2
  112. package/dist/install-actions.d.ts +2 -2
  113. package/dist/install-actions.js +39 -0
  114. package/dist/install-actions.js.map +1 -1
  115. package/dist/instance-card.d.mts +1 -1
  116. package/dist/instance-card.d.ts +1 -1
  117. package/dist/instance-card.js +2 -1
  118. package/dist/instance-card.js.map +1 -1
  119. package/dist/license-details.js +39 -0
  120. package/dist/license-details.js.map +1 -1
  121. package/dist/linux-install-wizard.d.mts +17 -7
  122. package/dist/linux-install-wizard.d.ts +17 -7
  123. package/dist/linux-install-wizard.js +314 -166
  124. package/dist/linux-install-wizard.js.map +1 -1
  125. package/dist/logout-action.d.mts +7 -0
  126. package/dist/logout-action.d.ts +7 -0
  127. package/dist/logout-action.js +189 -0
  128. package/dist/logout-action.js.map +1 -0
  129. package/dist/logout-button.d.mts +16 -0
  130. package/dist/logout-button.d.ts +16 -0
  131. package/dist/logout-button.js +34 -0
  132. package/dist/logout-button.js.map +1 -0
  133. package/dist/markdown-renderer.d.mts +12 -0
  134. package/dist/markdown-renderer.d.ts +12 -0
  135. package/dist/markdown-renderer.js +22 -0
  136. package/dist/markdown-renderer.js.map +1 -0
  137. package/dist/middleware.js +3 -3
  138. package/dist/middleware.js.map +1 -1
  139. package/dist/online-instance-list.d.mts +1 -1
  140. package/dist/online-instance-list.d.ts +1 -1
  141. package/dist/online-instance-list.js +3 -2
  142. package/dist/online-instance-list.js.map +1 -1
  143. package/dist/pending-installations.d.mts +1 -1
  144. package/dist/pending-installations.d.ts +1 -1
  145. package/dist/saml-callback-client.js +5 -2
  146. package/dist/saml-callback-client.js.map +1 -1
  147. package/dist/saml-handlers.js +104 -0
  148. package/dist/saml-handlers.js.map +1 -1
  149. package/dist/security-card.d.mts +1 -1
  150. package/dist/security-card.d.ts +1 -1
  151. package/dist/styles.css +39 -0
  152. package/dist/support-bundle-collection-card.js +3 -2
  153. package/dist/support-bundle-collection-card.js.map +1 -1
  154. package/dist/support-bundles-card.d.mts +2 -2
  155. package/dist/support-bundles-card.d.ts +2 -2
  156. package/dist/support-bundles-card.js +2 -2
  157. package/dist/support-bundles-card.js.map +1 -1
  158. package/dist/support-card.js +39 -0
  159. package/dist/support-card.js.map +1 -1
  160. package/dist/top-nav-menu-close.d.mts +10 -0
  161. package/dist/top-nav-menu-close.d.ts +10 -0
  162. package/dist/top-nav-menu-close.js +48 -0
  163. package/dist/top-nav-menu-close.js.map +1 -0
  164. package/dist/top-nav.js +149 -59
  165. package/dist/top-nav.js.map +1 -1
  166. package/dist/trial-signup.js +6 -3
  167. package/dist/trial-signup.js.map +1 -1
  168. package/dist/update-layout.js +149 -59
  169. package/dist/update-layout.js.map +1 -1
  170. package/dist/upload-support-bundle-modal.js +2 -2
  171. package/dist/upload-support-bundle-modal.js.map +1 -1
  172. package/dist/user-menu-dropdown.d.mts +25 -0
  173. package/dist/user-menu-dropdown.d.ts +25 -0
  174. package/dist/user-menu-dropdown.js +59 -0
  175. package/dist/user-menu-dropdown.js.map +1 -0
  176. package/dist/user-settings.js +5 -5
  177. package/dist/user-settings.js.map +1 -1
  178. package/dist/utils/index.d.mts +1 -1
  179. package/dist/utils/index.d.ts +1 -1
  180. package/dist/utils/index.js +39 -0
  181. package/dist/utils/index.js.map +1 -1
  182. package/package.json +29 -2
@@ -1,4 +1,5 @@
1
1
  import { cache, useState, useRef, useEffect, useMemo, useCallback } from 'react';
2
+ import ReactMarkdown from 'react-markdown';
2
3
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
4
  import { Buffer } from 'buffer';
4
5
 
@@ -18,8 +19,12 @@ __export(tracer_exports, {
18
19
  default: () => tracer_default
19
20
  });
20
21
  var tracer_default;
22
+ function MarkdownRenderer({ children }) {
23
+ return /* @__PURE__ */ jsx("div", { className: "markdown-content", children: /* @__PURE__ */ jsx(ReactMarkdown, { children }) });
24
+ }
21
25
 
22
26
  // src/utils/constants.ts
27
+ var DEFAULT_PRIMARY_COLOR = "#4f46e5";
23
28
  var DEFAULT_SECONDARY_COLOR = "#6366f1";
24
29
  function useCopyToClipboard(resetDelay = 2e3) {
25
30
  const [copied, setCopied] = useState(false);
@@ -75,35 +80,51 @@ var CodeBlock = ({
75
80
  )
76
81
  ] });
77
82
  };
78
- var StepIndicator = ({ step, primaryColor = DEFAULT_SECONDARY_COLOR }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-3", children: [
79
- /* @__PURE__ */ jsx(
80
- "div",
81
- {
82
- className: `flex h-10 w-10 items-center justify-center rounded-full border-2 ${step > 1 ? "border-gray-900 bg-gray-900 text-white" : ""}`,
83
- style: step === 1 ? { borderColor: primaryColor } : void 0,
84
- children: step > 1 ? /* @__PURE__ */ jsx(
85
- "svg",
83
+ var StepIndicator = ({
84
+ step,
85
+ primaryColor = DEFAULT_PRIMARY_COLOR,
86
+ hasPreInstall = false,
87
+ hasPostInstall = false
88
+ }) => {
89
+ const visibleSteps = [];
90
+ if (hasPreInstall) visibleSteps.push(1);
91
+ visibleSteps.push(2, 3);
92
+ if (hasPostInstall) visibleSteps.push(4);
93
+ const stepCount = visibleSteps.length;
94
+ const currentVisibleIndex = visibleSteps.indexOf(step);
95
+ return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center gap-3", children: visibleSteps.map((visibleStep, index) => {
96
+ const isCompleted = index < currentVisibleIndex;
97
+ const isCurrent = index === currentVisibleIndex;
98
+ const isLast = index === stepCount - 1;
99
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
100
+ /* @__PURE__ */ jsx(
101
+ "div",
86
102
  {
87
- xmlns: "http://www.w3.org/2000/svg",
88
- viewBox: "0 0 16 16",
89
- className: "h-3.5 w-3.5",
90
- fill: "none",
91
- stroke: "currentColor",
92
- strokeWidth: "2",
93
- children: /* @__PURE__ */ jsx("path", { d: "m3.5 8 3 3 6-6" })
103
+ className: `flex h-10 w-10 items-center justify-center rounded-full border-2 ${isCompleted ? "border-gray-900 bg-gray-900 text-white" : isCurrent ? "" : "border-gray-200"}`,
104
+ style: isCurrent ? { borderColor: primaryColor } : void 0,
105
+ children: isCompleted ? /* @__PURE__ */ jsx(
106
+ "svg",
107
+ {
108
+ xmlns: "http://www.w3.org/2000/svg",
109
+ viewBox: "0 0 16 16",
110
+ className: "h-3.5 w-3.5",
111
+ fill: "none",
112
+ stroke: "currentColor",
113
+ strokeWidth: "2",
114
+ children: /* @__PURE__ */ jsx("path", { d: "m3.5 8 3 3 6-6" })
115
+ }
116
+ ) : isCurrent ? /* @__PURE__ */ jsx("span", { className: "h-2.5 w-2.5 rounded-full", style: { backgroundColor: primaryColor } }) : null
94
117
  }
95
- ) : /* @__PURE__ */ jsx("span", { className: "h-2.5 w-2.5 rounded-full", style: { backgroundColor: primaryColor } })
96
- }
97
- ),
98
- /* @__PURE__ */ jsx("div", { className: `h-0.5 w-12 ${step > 1 ? "bg-gray-900" : "bg-gray-200"}` }),
99
- /* @__PURE__ */ jsx(
100
- "div",
101
- {
102
- className: `flex h-10 w-10 items-center justify-center rounded-full border-2 ${step === 2 ? "border-gray-900" : "border-gray-200"}`,
103
- children: step === 2 ? /* @__PURE__ */ jsx("span", { className: "h-2.5 w-2.5 rounded-full bg-gray-900" }) : null
104
- }
105
- )
106
- ] });
118
+ ),
119
+ !isLast && /* @__PURE__ */ jsx(
120
+ "div",
121
+ {
122
+ className: `h-0.5 w-12 ${isCompleted ? "bg-gray-900" : "bg-gray-200"}`
123
+ }
124
+ )
125
+ ] }, visibleStep);
126
+ }) });
127
+ };
107
128
  var VersionDropdown = ({
108
129
  releases,
109
130
  selectedRelease,
@@ -111,7 +132,7 @@ var VersionDropdown = ({
111
132
  isLoading,
112
133
  isLoadingInstructions,
113
134
  error,
114
- primaryColor = DEFAULT_SECONDARY_COLOR
135
+ primaryColor = DEFAULT_PRIMARY_COLOR
115
136
  }) => {
116
137
  if (isLoading) {
117
138
  return /* @__PURE__ */ jsxs("div", { className: "ml-8 flex items-center gap-2 text-sm text-gray-500", children: [
@@ -185,7 +206,9 @@ var InstallationInstructions = ({
185
206
  completedSteps = {},
186
207
  registryAccess = "online",
187
208
  networkAvailability = "online",
188
- primaryColor = DEFAULT_SECONDARY_COLOR
209
+ primaryColor = DEFAULT_PRIMARY_COLOR,
210
+ secondaryColor = DEFAULT_SECONDARY_COLOR,
211
+ valuesOverrideUrl
189
212
  }) => {
190
213
  if (isLoading && !instructions?.steps?.length) {
191
214
  return /* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-gray-500", children: [
@@ -198,7 +221,7 @@ var InstallationInstructions = ({
198
221
  }
199
222
  const completableStepNames = ["export_credentials", "install_chart"];
200
223
  const stepOffset = networkAvailability === "airgap" ? 3 : 2;
201
- return /* @__PURE__ */ jsx("div", { className: `min-w-0 space-y-4 transition-opacity duration-200 ${isLoading ? "opacity-60" : ""}`, children: /* @__PURE__ */ jsx("ol", { className: "min-w-0 space-y-6 text-sm text-gray-700", children: instructions.steps.map((step, index) => {
224
+ return /* @__PURE__ */ jsx("div", { className: `min-w-0 ml-0 space-y-4 transition-opacity duration-200 ${isLoading ? "opacity-60" : ""}`, children: /* @__PURE__ */ jsx("ol", { className: "min-w-0 list-none space-y-6 pl-0 ml-0 text-sm text-gray-700", children: instructions.steps.map((step, index) => {
202
225
  const canComplete = step.maybe_completed || completableStepNames.includes(step.step_name);
203
226
  const isCompleted = canComplete && completedSteps[step.step_name];
204
227
  const isPartialInstallChart = registryAccess === "partial" && step.step_name === "install_chart";
@@ -215,7 +238,30 @@ var InstallationInstructions = ({
215
238
  ),
216
239
  isCompleted && /* @__PURE__ */ jsx("span", { className: "text-xs text-green-600", children: "Completed" })
217
240
  ] }),
218
- step.description && /* @__PURE__ */ jsx("p", { className: "ml-8 text-gray-500", children: step.description }),
241
+ step.description && /* @__PURE__ */ jsxs("p", { className: "ml-8 text-gray-500", children: [
242
+ step.description,
243
+ step.step_name === "create_values_file" && valuesOverrideUrl && /* @__PURE__ */ jsxs(Fragment, { children: [
244
+ " ",
245
+ "See our",
246
+ " ",
247
+ /* @__PURE__ */ jsxs(
248
+ "a",
249
+ {
250
+ href: valuesOverrideUrl,
251
+ target: "_blank",
252
+ rel: "noopener noreferrer",
253
+ className: "font-semibold hover:underline",
254
+ style: { color: secondaryColor },
255
+ children: [
256
+ "values reference documentation",
257
+ /* @__PURE__ */ jsx("svg", { className: "ml-1 inline-block h-4 w-4 align-text-bottom", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" }) })
258
+ ]
259
+ }
260
+ ),
261
+ " ",
262
+ "for configuration options."
263
+ ] })
264
+ ] }),
219
265
  isPartialInstallChart && step.commands.length > 0 ? (() => {
220
266
  const { pullCommands, filesToTransfer, installCommands } = parsePartialRegistryCommands(step.commands);
221
267
  return /* @__PURE__ */ jsxs("div", { className: "ml-8 space-y-4", children: [
@@ -238,7 +284,7 @@ var InstallationInstructions = ({
238
284
  };
239
285
  var HelmInstallWizard = ({
240
286
  token,
241
- primaryColor = DEFAULT_SECONDARY_COLOR,
287
+ primaryColor = DEFAULT_PRIMARY_COLOR,
242
288
  secondaryColor = DEFAULT_SECONDARY_COLOR,
243
289
  createServiceAccountAction,
244
290
  fetchChannelReleasesAction,
@@ -252,9 +298,20 @@ var HelmInstallWizard = ({
252
298
  initialInstallOptionsData,
253
299
  initialChannelReleases,
254
300
  supportPortalLink,
255
- isHelmAirgapEnabled = false
301
+ isHelmAirgapEnabled = false,
302
+ preInstallMarkdown,
303
+ postInstallMarkdown,
304
+ completionUrl,
305
+ helmInstallUrl,
306
+ valuesOverrideUrl
256
307
  }) => {
257
- const [step, setStep] = useState(initialStep ?? 1);
308
+ const hasPreInstall = Boolean(preInstallMarkdown && preInstallMarkdown.trim());
309
+ const hasPostInstall = Boolean(postInstallMarkdown && postInstallMarkdown.trim());
310
+ const effectiveInitialStep = (() => {
311
+ if (initialStep) return initialStep;
312
+ return hasPreInstall ? 1 : 2;
313
+ })();
314
+ const [step, setStep] = useState(effectiveInitialStep);
258
315
  const [instanceName, setInstanceName] = useState(initialInstallOptionsData?.instance_name ?? "");
259
316
  const [kubernetesDistribution, setKubernetesDistribution] = useState(
260
317
  initialInstallOptionsData?.kubernetes_distribution ?? "vanilla"
@@ -268,6 +325,7 @@ var HelmInstallWizard = ({
268
325
  const [showErrors, setShowErrors] = useState(false);
269
326
  const [isCreatingServiceAccount, setIsCreatingServiceAccount] = useState(false);
270
327
  const [apiError, setApiError] = useState(null);
328
+ const [isWaitingForNavigation, setIsWaitingForNavigation] = useState(false);
271
329
  const [installOptionsId, setInstallOptionsId] = useState(initialInstallOptionsId ?? null);
272
330
  const [serviceAccountId, setServiceAccountId] = useState(initialInstallOptionsData?.service_account_id ?? null);
273
331
  const [originalInstanceName, setOriginalInstanceName] = useState(initialInstallOptionsData?.instance_name ?? null);
@@ -314,7 +372,7 @@ var HelmInstallWizard = ({
314
372
  }
315
373
  }, [initialInstallOptionsData]);
316
374
  const hasLoadedReleases = useRef(!!initialChannelReleases?.length);
317
- const hasResumedInstallation = useRef(!!initialInstallOptionsData);
375
+ const hasResumedInstallation = useRef(!!initialInstallOptionsData?.instructions);
318
376
  const selectedReleaseRef = useRef(selectedRelease);
319
377
  const helmReleases = useMemo(() => {
320
378
  return releases.filter((r) => r.helmCharts && r.helmCharts.length > 0);
@@ -326,6 +384,14 @@ var HelmInstallWizard = ({
326
384
  }
327
385
  prevInitialStepRef.current = initialStep;
328
386
  }, [initialStep]);
387
+ useEffect(() => {
388
+ if (step === 1 && !hasPreInstall) {
389
+ setStep(2);
390
+ if (onStepChange) {
391
+ onStepChange(2);
392
+ }
393
+ }
394
+ }, [step, hasPreInstall, onStepChange]);
329
395
  const hasMountedRef = useRef(false);
330
396
  const prevInstallOptionsIdRef = useRef(installOptionsId);
331
397
  useEffect(() => {
@@ -345,7 +411,7 @@ var HelmInstallWizard = ({
345
411
  selectedReleaseRef.current = selectedRelease;
346
412
  }, [selectedRelease]);
347
413
  useEffect(() => {
348
- if (step !== 2 || !fetchChannelReleasesAction || hasLoadedReleases.current) {
414
+ if (step !== 2 && step !== 3 || !fetchChannelReleasesAction || hasLoadedReleases.current) {
349
415
  return;
350
416
  }
351
417
  const loadReleases = async () => {
@@ -453,7 +519,7 @@ var HelmInstallWizard = ({
453
519
  if (hasResumedInstallation.current) {
454
520
  return;
455
521
  }
456
- if (!initialInstallOptionsId || !getInstallOptionsAction || step !== 2) {
522
+ if (!initialInstallOptionsId || !getInstallOptionsAction) {
457
523
  return;
458
524
  }
459
525
  hasResumedInstallation.current = true;
@@ -499,7 +565,7 @@ var HelmInstallWizard = ({
499
565
  if (process.env.NODE_ENV === "development") {
500
566
  return;
501
567
  }
502
- if (step !== 2 || !installOptionsId || !getInstallOptionsAction) {
568
+ if (step !== 3 || !installOptionsId || !getInstallOptionsAction) {
503
569
  return;
504
570
  }
505
571
  if (completedSteps["export_credentials"] && completedSteps["install_chart"]) {
@@ -582,10 +648,8 @@ var HelmInstallWizard = ({
582
648
  sequence: firstRelease.channelSequence
583
649
  };
584
650
  }
585
- console.debug("[helm-install-wizard] Transitioning to step 2 (reused service account)");
586
- setStep(2);
587
- onStepChange?.(2);
588
- onInstallOptionsIdChange?.(installOptionsId);
651
+ setIsWaitingForNavigation(true);
652
+ onStepChange?.(3);
589
653
  return;
590
654
  }
591
655
  if (typeof window !== "undefined" && window.sessionStorage) {
@@ -599,7 +663,6 @@ var HelmInstallWizard = ({
599
663
  setServiceAccountId(saData.service_account.id);
600
664
  setOriginalInstanceName(trimmedInstanceName);
601
665
  if (createInstallOptionsAction) {
602
- console.debug("[helm-install-wizard] Creating install options...");
603
666
  const firstRelease = helmReleases[0];
604
667
  const installOptionsResult = await createInstallOptionsAction({
605
668
  token,
@@ -632,12 +695,9 @@ var HelmInstallWizard = ({
632
695
  if (installOptionsResult.instructions) {
633
696
  setInstructions(installOptionsResult.instructions);
634
697
  }
635
- console.debug("[helm-install-wizard] Transitioning to step 2");
636
- setStep(2);
698
+ setIsWaitingForNavigation(true);
637
699
  } else {
638
- console.debug("[helm-install-wizard] Transitioning to step 2 (no install options)");
639
- setStep(2);
640
- onStepChange?.(2);
700
+ onStepChange?.(3);
641
701
  }
642
702
  } catch (error) {
643
703
  console.error("[helm-install-wizard] Failed to continue", error);
@@ -647,6 +707,7 @@ var HelmInstallWizard = ({
647
707
  } else {
648
708
  setApiError(errorMessage);
649
709
  }
710
+ setIsWaitingForNavigation(false);
650
711
  } finally {
651
712
  setIsCreatingServiceAccount(false);
652
713
  }
@@ -654,12 +715,27 @@ var HelmInstallWizard = ({
654
715
  const handleBack = () => {
655
716
  setApiError(null);
656
717
  setShowErrors(false);
657
- setStep(1);
658
- onStepChange?.(1);
718
+ setIsWaitingForNavigation(false);
719
+ if (step === 2) {
720
+ const targetStep = hasPreInstall ? 1 : 2;
721
+ setStep(targetStep);
722
+ onStepChange?.(targetStep);
723
+ } else if (step === 3) {
724
+ setStep(2);
725
+ onStepChange?.(2);
726
+ } else if (step === 4) {
727
+ setStep(3);
728
+ onStepChange?.(3);
729
+ }
659
730
  };
660
731
  const handleFinish = useCallback(async () => {
661
- navigateTo("/updates/checking");
662
- }, []);
732
+ if (hasPostInstall) {
733
+ setStep(4);
734
+ onStepChange?.(4);
735
+ } else {
736
+ navigateTo(completionUrl);
737
+ }
738
+ }, [hasPostInstall, completionUrl, onStepChange]);
663
739
  const handleReleaseSelect = useCallback((release) => {
664
740
  setSelectedRelease(release);
665
741
  }, []);
@@ -668,12 +744,221 @@ var HelmInstallWizard = ({
668
744
  setInputRegistryHostname(value);
669
745
  setPrivateRegistryHostname(value);
670
746
  }, []);
747
+ const totalSteps = (hasPreInstall ? 1 : 0) + 2 + (hasPostInstall ? 1 : 0);
748
+ const currentDisplayStep = hasPreInstall ? step : step - 1;
749
+ const handleContinueFromPreInstall = () => {
750
+ setStep(2);
751
+ onStepChange?.(2);
752
+ };
753
+ const handleCompletePostInstall = () => {
754
+ navigateTo(completionUrl);
755
+ };
756
+ if (step === 1) {
757
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
758
+ /* @__PURE__ */ jsx(StepIndicator, { step: 1, primaryColor, hasPreInstall, hasPostInstall }),
759
+ /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
760
+ /* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsx(MarkdownRenderer, { children: preInstallMarkdown || "" }) }),
761
+ /* @__PURE__ */ jsxs("div", { className: "mt-6 flex items-center justify-end text-sm text-gray-500", children: [
762
+ /* @__PURE__ */ jsxs("span", { children: [
763
+ "Step 1 of ",
764
+ totalSteps
765
+ ] }),
766
+ /* @__PURE__ */ jsx(
767
+ "button",
768
+ {
769
+ type: "button",
770
+ onClick: handleContinueFromPreInstall,
771
+ className: "ml-4 rounded-xl px-4 py-2 font-medium text-white transition-opacity duration-200 hover:opacity-90",
772
+ style: { backgroundColor: primaryColor },
773
+ children: "Continue"
774
+ }
775
+ )
776
+ ] })
777
+ ] })
778
+ ] });
779
+ }
671
780
  if (step === 2) {
672
781
  return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
673
- /* @__PURE__ */ jsx(StepIndicator, { step: 2, primaryColor }),
782
+ /* @__PURE__ */ jsx(StepIndicator, { step: 2, primaryColor, hasPreInstall, hasPostInstall }),
783
+ /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
784
+ /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
785
+ /* @__PURE__ */ jsxs("div", { children: [
786
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-sm font-medium text-gray-700", children: [
787
+ "Instance Name",
788
+ /* @__PURE__ */ jsx(
789
+ "span",
790
+ {
791
+ className: "flex h-4 w-4 items-center justify-center rounded-full border border-gray-300 text-xs text-gray-400 cursor-help",
792
+ title: "The instance name is both a nickname for the instance and the name of the service account that we will create for the installation.",
793
+ children: "i"
794
+ }
795
+ )
796
+ ] }),
797
+ /* @__PURE__ */ jsx(
798
+ "input",
799
+ {
800
+ value: instanceName,
801
+ onChange: (event) => setInstanceName(event.target.value),
802
+ placeholder: "Instance nickname",
803
+ "aria-invalid": showErrors && !instanceName.trim(),
804
+ className: `portal-input mt-2 w-48 ${showErrors && !instanceName.trim() ? "border-rose-400 focus:border-rose-400 focus:ring-rose-200" : ""}`
805
+ }
806
+ ),
807
+ showErrors && !instanceName.trim() ? /* @__PURE__ */ jsx("span", { className: "mt-1 block text-xs text-rose-500", children: "Instance name is required." }) : null
808
+ ] }),
809
+ apiError ? /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-rose-200 bg-rose-50 p-3 text-sm text-rose-800", children: apiError }) : null,
810
+ /* @__PURE__ */ jsxs("div", { children: [
811
+ /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-gray-700", children: "Kubernetes Distribution" }),
812
+ /* @__PURE__ */ jsx(
813
+ "select",
814
+ {
815
+ value: kubernetesDistribution,
816
+ onChange: (e) => setKubernetesDistribution(e.target.value),
817
+ className: "portal-select mt-2 w-64",
818
+ children: K8S_DISTRIBUTIONS.map(({ value, label }) => /* @__PURE__ */ jsx("option", { value, children: label }, value))
819
+ }
820
+ )
821
+ ] }),
822
+ /* @__PURE__ */ jsxs("fieldset", { className: "space-y-2", children: [
823
+ /* @__PURE__ */ jsx("legend", { className: "text-sm font-medium text-gray-700", children: "Cluster Network Availability" }),
824
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
825
+ /* @__PURE__ */ jsx(
826
+ "input",
827
+ {
828
+ type: "radio",
829
+ name: "network-availability",
830
+ checked: networkAvailability === "online",
831
+ onChange: () => setNetworkAvailability("online"),
832
+ className: "portal-radio"
833
+ }
834
+ ),
835
+ "Outbound requests allowed"
836
+ ] }),
837
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
838
+ /* @__PURE__ */ jsx(
839
+ "input",
840
+ {
841
+ type: "radio",
842
+ name: "network-availability",
843
+ checked: networkAvailability === "proxy",
844
+ onChange: () => setNetworkAvailability("proxy"),
845
+ className: "portal-radio"
846
+ }
847
+ ),
848
+ "Outbound requests require HTTPS Proxy"
849
+ ] }),
850
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", hidden: !isHelmAirgapEnabled, children: [
851
+ /* @__PURE__ */ jsx(
852
+ "input",
853
+ {
854
+ type: "radio",
855
+ name: "network-availability",
856
+ checked: networkAvailability === "airgap",
857
+ onChange: () => setNetworkAvailability("airgap"),
858
+ className: "portal-radio"
859
+ }
860
+ ),
861
+ "No outbound requests allowed (air gap)"
862
+ ] })
863
+ ] }),
864
+ networkAvailability === "airgap" && /* @__PURE__ */ jsxs("fieldset", { className: "space-y-2", children: [
865
+ /* @__PURE__ */ jsx("legend", { className: "text-sm font-medium text-gray-700", children: "Container Registry Access" }),
866
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
867
+ /* @__PURE__ */ jsx(
868
+ "input",
869
+ {
870
+ type: "radio",
871
+ name: "registry-availability",
872
+ checked: registryAccess === "online",
873
+ onChange: () => setRegistryAccess("online"),
874
+ className: "portal-radio"
875
+ }
876
+ ),
877
+ "Registry is accessible from internet (public)"
878
+ ] }),
879
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
880
+ /* @__PURE__ */ jsx(
881
+ "input",
882
+ {
883
+ type: "radio",
884
+ name: "registry-availability",
885
+ checked: registryAccess === "partial",
886
+ onChange: () => setRegistryAccess("partial"),
887
+ className: "portal-radio"
888
+ }
889
+ ),
890
+ "Registry is accessible from cluster but not internet (private)"
891
+ ] }),
892
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
893
+ /* @__PURE__ */ jsx(
894
+ "input",
895
+ {
896
+ type: "radio",
897
+ name: "registry-availability",
898
+ checked: registryAccess === "offline",
899
+ onChange: () => setRegistryAccess("offline"),
900
+ className: "portal-radio"
901
+ }
902
+ ),
903
+ "Registry is not accessible at all (embedded)"
904
+ ] })
905
+ ] })
906
+ ] }),
907
+ /* @__PURE__ */ jsxs("div", { className: "mt-6 flex items-center justify-between text-sm text-gray-500", children: [
908
+ hasPreInstall ? /* @__PURE__ */ jsx(
909
+ "button",
910
+ {
911
+ type: "button",
912
+ onClick: handleBack,
913
+ className: "rounded-xl px-4 py-2 font-medium text-gray-500 transition hover:bg-gray-100",
914
+ children: "Back"
915
+ }
916
+ ) : /* @__PURE__ */ jsx("span", {}),
917
+ /* @__PURE__ */ jsxs("span", { children: [
918
+ "Step ",
919
+ currentDisplayStep,
920
+ " of ",
921
+ totalSteps
922
+ ] }),
923
+ /* @__PURE__ */ jsx(
924
+ "button",
925
+ {
926
+ type: "button",
927
+ onClick: handleContinue,
928
+ disabled: isCreatingServiceAccount || isWaitingForNavigation,
929
+ className: "rounded-xl px-4 py-2 font-medium text-white transition-opacity duration-200 hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",
930
+ style: { backgroundColor: primaryColor },
931
+ children: isCreatingServiceAccount || isWaitingForNavigation ? "Saving..." : "Continue"
932
+ }
933
+ )
934
+ ] })
935
+ ] })
936
+ ] });
937
+ }
938
+ if (step === 3) {
939
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
940
+ /* @__PURE__ */ jsx(StepIndicator, { step: 3, primaryColor, hasPreInstall, hasPostInstall }),
674
941
  /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-2xl border border-gray-100 bg-gray-50 p-6", children: /* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-6", children: [
675
942
  /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
676
943
  /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold text-gray-900", children: networkAvailability === "proxy" ? "Helm Proxy Install" : networkAvailability === "airgap" ? "Helm Air Gap Install" : "Helm Online Install" }),
944
+ helmInstallUrl && /* @__PURE__ */ jsxs("p", { className: "mt-4 text-sm text-gray-700", children: [
945
+ "For detailed installation instructions, please see our",
946
+ " ",
947
+ /* @__PURE__ */ jsxs(
948
+ "a",
949
+ {
950
+ href: helmInstallUrl,
951
+ target: "_blank",
952
+ rel: "noopener noreferrer",
953
+ className: "font-semibold hover:underline",
954
+ style: { color: secondaryColor },
955
+ children: [
956
+ "Helm installation documentation",
957
+ /* @__PURE__ */ jsx("svg", { className: "ml-1 inline-block h-4 w-4 align-text-bottom", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" }) })
958
+ ]
959
+ }
960
+ )
961
+ ] }),
677
962
  /* @__PURE__ */ jsxs("div", { className: "mt-6 space-y-6", children: [
678
963
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
679
964
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", style: { color: primaryColor }, children: [
@@ -724,7 +1009,9 @@ var HelmInstallWizard = ({
724
1009
  completedSteps,
725
1010
  registryAccess,
726
1011
  networkAvailability,
727
- primaryColor
1012
+ primaryColor,
1013
+ secondaryColor,
1014
+ valuesOverrideUrl
728
1015
  }
729
1016
  )
730
1017
  ] })
@@ -739,15 +1026,20 @@ var HelmInstallWizard = ({
739
1026
  children: "Back"
740
1027
  }
741
1028
  ),
742
- /* @__PURE__ */ jsx("span", { children: "Step 2 of 2" }),
1029
+ /* @__PURE__ */ jsxs("span", { children: [
1030
+ "Step ",
1031
+ currentDisplayStep,
1032
+ " of ",
1033
+ totalSteps
1034
+ ] }),
743
1035
  /* @__PURE__ */ jsx(
744
1036
  "button",
745
1037
  {
746
1038
  type: "button",
747
1039
  onClick: handleFinish,
748
- className: "rounded-xl px-4 py-2 font-medium text-white transition-opacity duration-200 hover:opacity-90",
1040
+ className: "rounded-xl px-4 py-2 font-medium text-white transition hover:opacity-90",
749
1041
  style: { backgroundColor: primaryColor },
750
- children: "Finish"
1042
+ children: hasPostInstall ? "Continue" : "Finish"
751
1043
  }
752
1044
  )
753
1045
  ] }),
@@ -769,148 +1061,42 @@ var HelmInstallWizard = ({
769
1061
  ] }) })
770
1062
  ] });
771
1063
  }
772
- return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
773
- /* @__PURE__ */ jsx(StepIndicator, { step, primaryColor }),
774
- /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
775
- /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
776
- /* @__PURE__ */ jsxs("div", { children: [
777
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-sm font-medium text-gray-700", children: [
778
- "Instance Name",
779
- /* @__PURE__ */ jsx(
780
- "span",
781
- {
782
- className: "flex h-4 w-4 items-center justify-center rounded-full border border-gray-300 text-xs text-gray-400 cursor-help",
783
- title: "The instance name is both a nickname for the instance and the name of the service account that we will create for the installation.",
784
- children: "i"
785
- }
786
- )
787
- ] }),
1064
+ if (step === 4) {
1065
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
1066
+ /* @__PURE__ */ jsx(StepIndicator, { step: 4, primaryColor, hasPreInstall, hasPostInstall }),
1067
+ /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
1068
+ /* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsx(MarkdownRenderer, { children: postInstallMarkdown || "" }) }),
1069
+ /* @__PURE__ */ jsxs("div", { className: "mt-6 flex items-center justify-between text-sm text-gray-500", children: [
788
1070
  /* @__PURE__ */ jsx(
789
- "input",
1071
+ "button",
790
1072
  {
791
- value: instanceName,
792
- onChange: (event) => setInstanceName(event.target.value),
793
- placeholder: "Instance nickname",
794
- "aria-invalid": showErrors && !instanceName.trim(),
795
- className: `portal-input mt-2 w-48 ${showErrors && !instanceName.trim() ? "border-rose-400 focus:border-rose-400 focus:ring-rose-200" : ""}`
1073
+ type: "button",
1074
+ onClick: handleBack,
1075
+ className: "rounded-xl px-4 py-2 font-medium text-gray-500 transition hover:bg-gray-100",
1076
+ children: "Back"
796
1077
  }
797
1078
  ),
798
- showErrors && !instanceName.trim() ? /* @__PURE__ */ jsx("span", { className: "mt-1 block text-xs text-rose-500", children: "Instance name is required." }) : null
799
- ] }),
800
- apiError ? /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-rose-200 bg-rose-50 p-3 text-sm text-rose-800", children: apiError }) : null,
801
- /* @__PURE__ */ jsxs("div", { children: [
802
- /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-gray-700", children: "Kubernetes Distribution" }),
1079
+ /* @__PURE__ */ jsxs("span", { children: [
1080
+ "Step ",
1081
+ currentDisplayStep,
1082
+ " of ",
1083
+ totalSteps
1084
+ ] }),
803
1085
  /* @__PURE__ */ jsx(
804
- "select",
1086
+ "button",
805
1087
  {
806
- value: kubernetesDistribution,
807
- onChange: (e) => setKubernetesDistribution(e.target.value),
808
- className: "portal-select mt-2 w-64",
809
- children: K8S_DISTRIBUTIONS.map(({ value, label }) => /* @__PURE__ */ jsx("option", { value, children: label }, value))
1088
+ type: "button",
1089
+ onClick: handleCompletePostInstall,
1090
+ className: "rounded-xl px-4 py-2 font-medium text-white transition hover:brightness-90",
1091
+ style: { backgroundColor: primaryColor },
1092
+ children: "Complete"
810
1093
  }
811
1094
  )
812
- ] }),
813
- /* @__PURE__ */ jsxs("fieldset", { className: "space-y-2", children: [
814
- /* @__PURE__ */ jsx("legend", { className: "text-sm font-medium text-gray-700", children: "Cluster Network Availability" }),
815
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
816
- /* @__PURE__ */ jsx(
817
- "input",
818
- {
819
- type: "radio",
820
- name: "network-availability",
821
- checked: networkAvailability === "online",
822
- onChange: () => setNetworkAvailability("online"),
823
- className: "portal-radio"
824
- }
825
- ),
826
- "Outbound requests allowed"
827
- ] }),
828
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
829
- /* @__PURE__ */ jsx(
830
- "input",
831
- {
832
- type: "radio",
833
- name: "network-availability",
834
- checked: networkAvailability === "proxy",
835
- onChange: () => setNetworkAvailability("proxy"),
836
- className: "portal-radio"
837
- }
838
- ),
839
- "Outbound requests require HTTPS Proxy"
840
- ] }),
841
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", hidden: !isHelmAirgapEnabled, children: [
842
- /* @__PURE__ */ jsx(
843
- "input",
844
- {
845
- type: "radio",
846
- name: "network-availability",
847
- checked: networkAvailability === "airgap",
848
- onChange: () => setNetworkAvailability("airgap"),
849
- className: "portal-radio"
850
- }
851
- ),
852
- "No outbound requests allowed (air gap)"
853
- ] })
854
- ] }),
855
- /* @__PURE__ */ jsxs("fieldset", { className: "space-y-2", children: [
856
- /* @__PURE__ */ jsx("legend", { className: "text-sm font-medium text-gray-700", children: "Registry Access" }),
857
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
858
- /* @__PURE__ */ jsx(
859
- "input",
860
- {
861
- type: "radio",
862
- name: "registry-access",
863
- checked: registryAccess === "online",
864
- onChange: () => setRegistryAccess("online"),
865
- className: "portal-radio"
866
- }
867
- ),
868
- "My workstation can access the internet, the registry AND the cluster"
869
- ] }),
870
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
871
- /* @__PURE__ */ jsx(
872
- "input",
873
- {
874
- type: "radio",
875
- name: "registry-access",
876
- checked: registryAccess === "partial",
877
- onChange: () => setRegistryAccess("partial"),
878
- className: "portal-radio"
879
- }
880
- ),
881
- "My workstation can only access the internet AND the registry (NOT the cluster)"
882
- ] }),
883
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", hidden: !isHelmAirgapEnabled, children: [
884
- /* @__PURE__ */ jsx(
885
- "input",
886
- {
887
- type: "radio",
888
- name: "registry-access",
889
- checked: registryAccess === "offline",
890
- onChange: () => setRegistryAccess("offline"),
891
- className: "portal-radio"
892
- }
893
- ),
894
- "I need to download artifacts and transfer them for offline installation"
895
- ] })
896
1095
  ] })
897
- ] }),
898
- /* @__PURE__ */ jsxs("div", { className: "mt-6 flex items-center justify-between text-sm text-gray-500", children: [
899
- /* @__PURE__ */ jsx("span", { children: "Step 1 of 2" }),
900
- /* @__PURE__ */ jsx(
901
- "button",
902
- {
903
- type: "button",
904
- onClick: handleContinue,
905
- disabled: isCreatingServiceAccount,
906
- className: "rounded-xl px-4 py-2 font-medium text-white transition-opacity duration-200 hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",
907
- style: { backgroundColor: primaryColor },
908
- children: isCreatingServiceAccount ? "Creating..." : "Continue"
909
- }
910
- )
911
1096
  ] })
912
- ] })
913
- ] });
1097
+ ] });
1098
+ }
1099
+ return null;
914
1100
  };
915
1101
  HelmInstallWizard.displayName = "HelmInstallWizard";
916
1102
 
@@ -1066,6 +1252,45 @@ var fetchCustomBrandingImpl = async () => {
1066
1252
  };
1067
1253
  };
1068
1254
  cache(fetchCustomBrandingImpl);
1255
+ var fetchDocumentationImpl = async () => {
1256
+ const { cookies } = await import('next/headers');
1257
+ const sessionStore = await cookies();
1258
+ const session = sessionStore.get("portal_session");
1259
+ const token = session?.value;
1260
+ if (!token) {
1261
+ throw new Error("Authentication required");
1262
+ }
1263
+ const url = `${getApiOrigin()}/enterprise-portal/documentation`;
1264
+ if (process.env.NODE_ENV !== "production") {
1265
+ console.debug(
1266
+ "[portal-components] fetching documentation via %s (Enterprise Portal API)",
1267
+ url
1268
+ );
1269
+ }
1270
+ const response = await authenticatedFetch(url, {
1271
+ method: "GET",
1272
+ token,
1273
+ headers: {
1274
+ accept: "application/json"
1275
+ }
1276
+ });
1277
+ if (!response.ok) {
1278
+ throw new Error(
1279
+ `Documentation request failed (${response.status} ${response.statusText})`
1280
+ );
1281
+ }
1282
+ const data = await response.json();
1283
+ return {
1284
+ helmPreInstall: data.helmPreInstall || "",
1285
+ helmPostInstall: data.helmPostInstall || "",
1286
+ embeddedClusterPreInstall: data.embeddedClusterPreInstall || "",
1287
+ embeddedClusterPostInstall: data.embeddedClusterPostInstall || "",
1288
+ helmInstallUrl: data.helmInstallUrl || "",
1289
+ embeddedClusterInstallUrl: data.embeddedClusterInstallUrl || "",
1290
+ valuesOverrideUrl: data.valuesOverrideUrl || ""
1291
+ };
1292
+ };
1293
+ cache(fetchDocumentationImpl);
1069
1294
 
1070
1295
  export { HELM_INSTALL_SERVICE_ACCOUNT_KEY, HelmInstallWizard, createServiceAccount };
1071
1296
  //# sourceMappingURL=helm-install-wizard.js.map