@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,9 +1,14 @@
1
1
  'use strict';
2
2
 
3
3
  var react = require('react');
4
+ var ReactMarkdown = require('react-markdown');
4
5
  var jsxRuntime = require('react/jsx-runtime');
5
6
  var buffer = require('buffer');
6
7
 
8
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
+
10
+ var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
11
+
7
12
  /**
8
13
  * Enterprise Portal Components
9
14
  * This file is generated by tsup. Do not edit manually.
@@ -20,8 +25,12 @@ __export(tracer_exports, {
20
25
  default: () => tracer_default
21
26
  });
22
27
  var tracer_default;
28
+ function MarkdownRenderer({ children }) {
29
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "markdown-content", children: /* @__PURE__ */ jsxRuntime.jsx(ReactMarkdown__default.default, { children }) });
30
+ }
23
31
 
24
32
  // src/utils/constants.ts
33
+ var DEFAULT_PRIMARY_COLOR = "#4f46e5";
25
34
  var DEFAULT_SECONDARY_COLOR = "#6366f1";
26
35
  function useCopyToClipboard(resetDelay = 2e3) {
27
36
  const [copied, setCopied] = react.useState(false);
@@ -77,35 +86,51 @@ var CodeBlock = ({
77
86
  )
78
87
  ] });
79
88
  };
80
- var StepIndicator = ({ step, primaryColor = DEFAULT_SECONDARY_COLOR }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-3", children: [
81
- /* @__PURE__ */ jsxRuntime.jsx(
82
- "div",
83
- {
84
- className: `flex h-10 w-10 items-center justify-center rounded-full border-2 ${step > 1 ? "border-gray-900 bg-gray-900 text-white" : ""}`,
85
- style: step === 1 ? { borderColor: primaryColor } : void 0,
86
- children: step > 1 ? /* @__PURE__ */ jsxRuntime.jsx(
87
- "svg",
89
+ var StepIndicator = ({
90
+ step,
91
+ primaryColor = DEFAULT_PRIMARY_COLOR,
92
+ hasPreInstall = false,
93
+ hasPostInstall = false
94
+ }) => {
95
+ const visibleSteps = [];
96
+ if (hasPreInstall) visibleSteps.push(1);
97
+ visibleSteps.push(2, 3);
98
+ if (hasPostInstall) visibleSteps.push(4);
99
+ const stepCount = visibleSteps.length;
100
+ const currentVisibleIndex = visibleSteps.indexOf(step);
101
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center gap-3", children: visibleSteps.map((visibleStep, index) => {
102
+ const isCompleted = index < currentVisibleIndex;
103
+ const isCurrent = index === currentVisibleIndex;
104
+ const isLast = index === stepCount - 1;
105
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
106
+ /* @__PURE__ */ jsxRuntime.jsx(
107
+ "div",
108
+ {
109
+ 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"}`,
110
+ style: isCurrent ? { borderColor: primaryColor } : void 0,
111
+ children: isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(
112
+ "svg",
113
+ {
114
+ xmlns: "http://www.w3.org/2000/svg",
115
+ viewBox: "0 0 16 16",
116
+ className: "h-3.5 w-3.5",
117
+ fill: "none",
118
+ stroke: "currentColor",
119
+ strokeWidth: "2",
120
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m3.5 8 3 3 6-6" })
121
+ }
122
+ ) : isCurrent ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-2.5 w-2.5 rounded-full", style: { backgroundColor: primaryColor } }) : null
123
+ }
124
+ ),
125
+ !isLast && /* @__PURE__ */ jsxRuntime.jsx(
126
+ "div",
88
127
  {
89
- xmlns: "http://www.w3.org/2000/svg",
90
- viewBox: "0 0 16 16",
91
- className: "h-3.5 w-3.5",
92
- fill: "none",
93
- stroke: "currentColor",
94
- strokeWidth: "2",
95
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m3.5 8 3 3 6-6" })
128
+ className: `h-0.5 w-12 ${isCompleted ? "bg-gray-900" : "bg-gray-200"}`
96
129
  }
97
- ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-2.5 w-2.5 rounded-full", style: { backgroundColor: primaryColor } })
98
- }
99
- ),
100
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-0.5 w-12 ${step > 1 ? "bg-gray-900" : "bg-gray-200"}` }),
101
- /* @__PURE__ */ jsxRuntime.jsx(
102
- "div",
103
- {
104
- className: `flex h-10 w-10 items-center justify-center rounded-full border-2 ${step === 2 ? "border-gray-900" : "border-gray-200"}`,
105
- children: step === 2 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-2.5 w-2.5 rounded-full bg-gray-900" }) : null
106
- }
107
- )
108
- ] });
130
+ )
131
+ ] }, visibleStep);
132
+ }) });
133
+ };
109
134
  var VersionDropdown = ({
110
135
  releases,
111
136
  selectedRelease,
@@ -113,7 +138,7 @@ var VersionDropdown = ({
113
138
  isLoading,
114
139
  isLoadingInstructions,
115
140
  error,
116
- primaryColor = DEFAULT_SECONDARY_COLOR
141
+ primaryColor = DEFAULT_PRIMARY_COLOR
117
142
  }) => {
118
143
  if (isLoading) {
119
144
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-8 flex items-center gap-2 text-sm text-gray-500", children: [
@@ -187,7 +212,9 @@ var InstallationInstructions = ({
187
212
  completedSteps = {},
188
213
  registryAccess = "online",
189
214
  networkAvailability = "online",
190
- primaryColor = DEFAULT_SECONDARY_COLOR
215
+ primaryColor = DEFAULT_PRIMARY_COLOR,
216
+ secondaryColor = DEFAULT_SECONDARY_COLOR,
217
+ valuesOverrideUrl
191
218
  }) => {
192
219
  if (isLoading && !instructions?.steps?.length) {
193
220
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-sm text-gray-500", children: [
@@ -200,7 +227,7 @@ var InstallationInstructions = ({
200
227
  }
201
228
  const completableStepNames = ["export_credentials", "install_chart"];
202
229
  const stepOffset = networkAvailability === "airgap" ? 3 : 2;
203
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `min-w-0 space-y-4 transition-opacity duration-200 ${isLoading ? "opacity-60" : ""}`, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "min-w-0 space-y-6 text-sm text-gray-700", children: instructions.steps.map((step, index) => {
230
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `min-w-0 ml-0 space-y-4 transition-opacity duration-200 ${isLoading ? "opacity-60" : ""}`, children: /* @__PURE__ */ jsxRuntime.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) => {
204
231
  const canComplete = step.maybe_completed || completableStepNames.includes(step.step_name);
205
232
  const isCompleted = canComplete && completedSteps[step.step_name];
206
233
  const isPartialInstallChart = registryAccess === "partial" && step.step_name === "install_chart";
@@ -217,7 +244,30 @@ var InstallationInstructions = ({
217
244
  ),
218
245
  isCompleted && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-green-600", children: "Completed" })
219
246
  ] }),
220
- step.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ml-8 text-gray-500", children: step.description }),
247
+ step.description && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "ml-8 text-gray-500", children: [
248
+ step.description,
249
+ step.step_name === "create_values_file" && valuesOverrideUrl && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
250
+ " ",
251
+ "See our",
252
+ " ",
253
+ /* @__PURE__ */ jsxRuntime.jsxs(
254
+ "a",
255
+ {
256
+ href: valuesOverrideUrl,
257
+ target: "_blank",
258
+ rel: "noopener noreferrer",
259
+ className: "font-semibold hover:underline",
260
+ style: { color: secondaryColor },
261
+ children: [
262
+ "values reference documentation",
263
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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" }) })
264
+ ]
265
+ }
266
+ ),
267
+ " ",
268
+ "for configuration options."
269
+ ] })
270
+ ] }),
221
271
  isPartialInstallChart && step.commands.length > 0 ? (() => {
222
272
  const { pullCommands, filesToTransfer, installCommands } = parsePartialRegistryCommands(step.commands);
223
273
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-8 space-y-4", children: [
@@ -240,7 +290,7 @@ var InstallationInstructions = ({
240
290
  };
241
291
  var HelmInstallWizard = ({
242
292
  token,
243
- primaryColor = DEFAULT_SECONDARY_COLOR,
293
+ primaryColor = DEFAULT_PRIMARY_COLOR,
244
294
  secondaryColor = DEFAULT_SECONDARY_COLOR,
245
295
  createServiceAccountAction,
246
296
  fetchChannelReleasesAction,
@@ -254,9 +304,20 @@ var HelmInstallWizard = ({
254
304
  initialInstallOptionsData,
255
305
  initialChannelReleases,
256
306
  supportPortalLink,
257
- isHelmAirgapEnabled = false
307
+ isHelmAirgapEnabled = false,
308
+ preInstallMarkdown,
309
+ postInstallMarkdown,
310
+ completionUrl,
311
+ helmInstallUrl,
312
+ valuesOverrideUrl
258
313
  }) => {
259
- const [step, setStep] = react.useState(initialStep ?? 1);
314
+ const hasPreInstall = Boolean(preInstallMarkdown && preInstallMarkdown.trim());
315
+ const hasPostInstall = Boolean(postInstallMarkdown && postInstallMarkdown.trim());
316
+ const effectiveInitialStep = (() => {
317
+ if (initialStep) return initialStep;
318
+ return hasPreInstall ? 1 : 2;
319
+ })();
320
+ const [step, setStep] = react.useState(effectiveInitialStep);
260
321
  const [instanceName, setInstanceName] = react.useState(initialInstallOptionsData?.instance_name ?? "");
261
322
  const [kubernetesDistribution, setKubernetesDistribution] = react.useState(
262
323
  initialInstallOptionsData?.kubernetes_distribution ?? "vanilla"
@@ -270,6 +331,7 @@ var HelmInstallWizard = ({
270
331
  const [showErrors, setShowErrors] = react.useState(false);
271
332
  const [isCreatingServiceAccount, setIsCreatingServiceAccount] = react.useState(false);
272
333
  const [apiError, setApiError] = react.useState(null);
334
+ const [isWaitingForNavigation, setIsWaitingForNavigation] = react.useState(false);
273
335
  const [installOptionsId, setInstallOptionsId] = react.useState(initialInstallOptionsId ?? null);
274
336
  const [serviceAccountId, setServiceAccountId] = react.useState(initialInstallOptionsData?.service_account_id ?? null);
275
337
  const [originalInstanceName, setOriginalInstanceName] = react.useState(initialInstallOptionsData?.instance_name ?? null);
@@ -316,7 +378,7 @@ var HelmInstallWizard = ({
316
378
  }
317
379
  }, [initialInstallOptionsData]);
318
380
  const hasLoadedReleases = react.useRef(!!initialChannelReleases?.length);
319
- const hasResumedInstallation = react.useRef(!!initialInstallOptionsData);
381
+ const hasResumedInstallation = react.useRef(!!initialInstallOptionsData?.instructions);
320
382
  const selectedReleaseRef = react.useRef(selectedRelease);
321
383
  const helmReleases = react.useMemo(() => {
322
384
  return releases.filter((r) => r.helmCharts && r.helmCharts.length > 0);
@@ -328,6 +390,14 @@ var HelmInstallWizard = ({
328
390
  }
329
391
  prevInitialStepRef.current = initialStep;
330
392
  }, [initialStep]);
393
+ react.useEffect(() => {
394
+ if (step === 1 && !hasPreInstall) {
395
+ setStep(2);
396
+ if (onStepChange) {
397
+ onStepChange(2);
398
+ }
399
+ }
400
+ }, [step, hasPreInstall, onStepChange]);
331
401
  const hasMountedRef = react.useRef(false);
332
402
  const prevInstallOptionsIdRef = react.useRef(installOptionsId);
333
403
  react.useEffect(() => {
@@ -347,7 +417,7 @@ var HelmInstallWizard = ({
347
417
  selectedReleaseRef.current = selectedRelease;
348
418
  }, [selectedRelease]);
349
419
  react.useEffect(() => {
350
- if (step !== 2 || !fetchChannelReleasesAction || hasLoadedReleases.current) {
420
+ if (step !== 2 && step !== 3 || !fetchChannelReleasesAction || hasLoadedReleases.current) {
351
421
  return;
352
422
  }
353
423
  const loadReleases = async () => {
@@ -455,7 +525,7 @@ var HelmInstallWizard = ({
455
525
  if (hasResumedInstallation.current) {
456
526
  return;
457
527
  }
458
- if (!initialInstallOptionsId || !getInstallOptionsAction || step !== 2) {
528
+ if (!initialInstallOptionsId || !getInstallOptionsAction) {
459
529
  return;
460
530
  }
461
531
  hasResumedInstallation.current = true;
@@ -501,7 +571,7 @@ var HelmInstallWizard = ({
501
571
  if (process.env.NODE_ENV === "development") {
502
572
  return;
503
573
  }
504
- if (step !== 2 || !installOptionsId || !getInstallOptionsAction) {
574
+ if (step !== 3 || !installOptionsId || !getInstallOptionsAction) {
505
575
  return;
506
576
  }
507
577
  if (completedSteps["export_credentials"] && completedSteps["install_chart"]) {
@@ -584,10 +654,8 @@ var HelmInstallWizard = ({
584
654
  sequence: firstRelease.channelSequence
585
655
  };
586
656
  }
587
- console.debug("[helm-install-wizard] Transitioning to step 2 (reused service account)");
588
- setStep(2);
589
- onStepChange?.(2);
590
- onInstallOptionsIdChange?.(installOptionsId);
657
+ setIsWaitingForNavigation(true);
658
+ onStepChange?.(3);
591
659
  return;
592
660
  }
593
661
  if (typeof window !== "undefined" && window.sessionStorage) {
@@ -601,7 +669,6 @@ var HelmInstallWizard = ({
601
669
  setServiceAccountId(saData.service_account.id);
602
670
  setOriginalInstanceName(trimmedInstanceName);
603
671
  if (createInstallOptionsAction) {
604
- console.debug("[helm-install-wizard] Creating install options...");
605
672
  const firstRelease = helmReleases[0];
606
673
  const installOptionsResult = await createInstallOptionsAction({
607
674
  token,
@@ -634,12 +701,9 @@ var HelmInstallWizard = ({
634
701
  if (installOptionsResult.instructions) {
635
702
  setInstructions(installOptionsResult.instructions);
636
703
  }
637
- console.debug("[helm-install-wizard] Transitioning to step 2");
638
- setStep(2);
704
+ setIsWaitingForNavigation(true);
639
705
  } else {
640
- console.debug("[helm-install-wizard] Transitioning to step 2 (no install options)");
641
- setStep(2);
642
- onStepChange?.(2);
706
+ onStepChange?.(3);
643
707
  }
644
708
  } catch (error) {
645
709
  console.error("[helm-install-wizard] Failed to continue", error);
@@ -649,6 +713,7 @@ var HelmInstallWizard = ({
649
713
  } else {
650
714
  setApiError(errorMessage);
651
715
  }
716
+ setIsWaitingForNavigation(false);
652
717
  } finally {
653
718
  setIsCreatingServiceAccount(false);
654
719
  }
@@ -656,12 +721,27 @@ var HelmInstallWizard = ({
656
721
  const handleBack = () => {
657
722
  setApiError(null);
658
723
  setShowErrors(false);
659
- setStep(1);
660
- onStepChange?.(1);
724
+ setIsWaitingForNavigation(false);
725
+ if (step === 2) {
726
+ const targetStep = hasPreInstall ? 1 : 2;
727
+ setStep(targetStep);
728
+ onStepChange?.(targetStep);
729
+ } else if (step === 3) {
730
+ setStep(2);
731
+ onStepChange?.(2);
732
+ } else if (step === 4) {
733
+ setStep(3);
734
+ onStepChange?.(3);
735
+ }
661
736
  };
662
737
  const handleFinish = react.useCallback(async () => {
663
- navigateTo("/updates/checking");
664
- }, []);
738
+ if (hasPostInstall) {
739
+ setStep(4);
740
+ onStepChange?.(4);
741
+ } else {
742
+ navigateTo(completionUrl);
743
+ }
744
+ }, [hasPostInstall, completionUrl, onStepChange]);
665
745
  const handleReleaseSelect = react.useCallback((release) => {
666
746
  setSelectedRelease(release);
667
747
  }, []);
@@ -670,12 +750,221 @@ var HelmInstallWizard = ({
670
750
  setInputRegistryHostname(value);
671
751
  setPrivateRegistryHostname(value);
672
752
  }, []);
753
+ const totalSteps = (hasPreInstall ? 1 : 0) + 2 + (hasPostInstall ? 1 : 0);
754
+ const currentDisplayStep = hasPreInstall ? step : step - 1;
755
+ const handleContinueFromPreInstall = () => {
756
+ setStep(2);
757
+ onStepChange?.(2);
758
+ };
759
+ const handleCompletePostInstall = () => {
760
+ navigateTo(completionUrl);
761
+ };
762
+ if (step === 1) {
763
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
764
+ /* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { step: 1, primaryColor, hasPreInstall, hasPostInstall }),
765
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
766
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(MarkdownRenderer, { children: preInstallMarkdown || "" }) }),
767
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6 flex items-center justify-end text-sm text-gray-500", children: [
768
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
769
+ "Step 1 of ",
770
+ totalSteps
771
+ ] }),
772
+ /* @__PURE__ */ jsxRuntime.jsx(
773
+ "button",
774
+ {
775
+ type: "button",
776
+ onClick: handleContinueFromPreInstall,
777
+ className: "ml-4 rounded-xl px-4 py-2 font-medium text-white transition-opacity duration-200 hover:opacity-90",
778
+ style: { backgroundColor: primaryColor },
779
+ children: "Continue"
780
+ }
781
+ )
782
+ ] })
783
+ ] })
784
+ ] });
785
+ }
673
786
  if (step === 2) {
674
787
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
675
- /* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { step: 2, primaryColor }),
788
+ /* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { step: 2, primaryColor, hasPreInstall, hasPostInstall }),
789
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
790
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
791
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
792
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-sm font-medium text-gray-700", children: [
793
+ "Instance Name",
794
+ /* @__PURE__ */ jsxRuntime.jsx(
795
+ "span",
796
+ {
797
+ className: "flex h-4 w-4 items-center justify-center rounded-full border border-gray-300 text-xs text-gray-400 cursor-help",
798
+ 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.",
799
+ children: "i"
800
+ }
801
+ )
802
+ ] }),
803
+ /* @__PURE__ */ jsxRuntime.jsx(
804
+ "input",
805
+ {
806
+ value: instanceName,
807
+ onChange: (event) => setInstanceName(event.target.value),
808
+ placeholder: "Instance nickname",
809
+ "aria-invalid": showErrors && !instanceName.trim(),
810
+ className: `portal-input mt-2 w-48 ${showErrors && !instanceName.trim() ? "border-rose-400 focus:border-rose-400 focus:ring-rose-200" : ""}`
811
+ }
812
+ ),
813
+ showErrors && !instanceName.trim() ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 block text-xs text-rose-500", children: "Instance name is required." }) : null
814
+ ] }),
815
+ apiError ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-rose-200 bg-rose-50 p-3 text-sm text-rose-800", children: apiError }) : null,
816
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
817
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm font-medium text-gray-700", children: "Kubernetes Distribution" }),
818
+ /* @__PURE__ */ jsxRuntime.jsx(
819
+ "select",
820
+ {
821
+ value: kubernetesDistribution,
822
+ onChange: (e) => setKubernetesDistribution(e.target.value),
823
+ className: "portal-select mt-2 w-64",
824
+ children: K8S_DISTRIBUTIONS.map(({ value, label }) => /* @__PURE__ */ jsxRuntime.jsx("option", { value, children: label }, value))
825
+ }
826
+ )
827
+ ] }),
828
+ /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "space-y-2", children: [
829
+ /* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-sm font-medium text-gray-700", children: "Cluster Network Availability" }),
830
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
831
+ /* @__PURE__ */ jsxRuntime.jsx(
832
+ "input",
833
+ {
834
+ type: "radio",
835
+ name: "network-availability",
836
+ checked: networkAvailability === "online",
837
+ onChange: () => setNetworkAvailability("online"),
838
+ className: "portal-radio"
839
+ }
840
+ ),
841
+ "Outbound requests allowed"
842
+ ] }),
843
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
844
+ /* @__PURE__ */ jsxRuntime.jsx(
845
+ "input",
846
+ {
847
+ type: "radio",
848
+ name: "network-availability",
849
+ checked: networkAvailability === "proxy",
850
+ onChange: () => setNetworkAvailability("proxy"),
851
+ className: "portal-radio"
852
+ }
853
+ ),
854
+ "Outbound requests require HTTPS Proxy"
855
+ ] }),
856
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", hidden: !isHelmAirgapEnabled, children: [
857
+ /* @__PURE__ */ jsxRuntime.jsx(
858
+ "input",
859
+ {
860
+ type: "radio",
861
+ name: "network-availability",
862
+ checked: networkAvailability === "airgap",
863
+ onChange: () => setNetworkAvailability("airgap"),
864
+ className: "portal-radio"
865
+ }
866
+ ),
867
+ "No outbound requests allowed (air gap)"
868
+ ] })
869
+ ] }),
870
+ networkAvailability === "airgap" && /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "space-y-2", children: [
871
+ /* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-sm font-medium text-gray-700", children: "Container Registry Access" }),
872
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
873
+ /* @__PURE__ */ jsxRuntime.jsx(
874
+ "input",
875
+ {
876
+ type: "radio",
877
+ name: "registry-availability",
878
+ checked: registryAccess === "online",
879
+ onChange: () => setRegistryAccess("online"),
880
+ className: "portal-radio"
881
+ }
882
+ ),
883
+ "Registry is accessible from internet (public)"
884
+ ] }),
885
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
886
+ /* @__PURE__ */ jsxRuntime.jsx(
887
+ "input",
888
+ {
889
+ type: "radio",
890
+ name: "registry-availability",
891
+ checked: registryAccess === "partial",
892
+ onChange: () => setRegistryAccess("partial"),
893
+ className: "portal-radio"
894
+ }
895
+ ),
896
+ "Registry is accessible from cluster but not internet (private)"
897
+ ] }),
898
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
899
+ /* @__PURE__ */ jsxRuntime.jsx(
900
+ "input",
901
+ {
902
+ type: "radio",
903
+ name: "registry-availability",
904
+ checked: registryAccess === "offline",
905
+ onChange: () => setRegistryAccess("offline"),
906
+ className: "portal-radio"
907
+ }
908
+ ),
909
+ "Registry is not accessible at all (embedded)"
910
+ ] })
911
+ ] })
912
+ ] }),
913
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6 flex items-center justify-between text-sm text-gray-500", children: [
914
+ hasPreInstall ? /* @__PURE__ */ jsxRuntime.jsx(
915
+ "button",
916
+ {
917
+ type: "button",
918
+ onClick: handleBack,
919
+ className: "rounded-xl px-4 py-2 font-medium text-gray-500 transition hover:bg-gray-100",
920
+ children: "Back"
921
+ }
922
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
923
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
924
+ "Step ",
925
+ currentDisplayStep,
926
+ " of ",
927
+ totalSteps
928
+ ] }),
929
+ /* @__PURE__ */ jsxRuntime.jsx(
930
+ "button",
931
+ {
932
+ type: "button",
933
+ onClick: handleContinue,
934
+ disabled: isCreatingServiceAccount || isWaitingForNavigation,
935
+ 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",
936
+ style: { backgroundColor: primaryColor },
937
+ children: isCreatingServiceAccount || isWaitingForNavigation ? "Saving..." : "Continue"
938
+ }
939
+ )
940
+ ] })
941
+ ] })
942
+ ] });
943
+ }
944
+ if (step === 3) {
945
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
946
+ /* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { step: 3, primaryColor, hasPreInstall, hasPostInstall }),
676
947
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden rounded-2xl border border-gray-100 bg-gray-50 p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 space-y-6", children: [
677
948
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
678
949
  /* @__PURE__ */ jsxRuntime.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" }),
950
+ helmInstallUrl && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-4 text-sm text-gray-700", children: [
951
+ "For detailed installation instructions, please see our",
952
+ " ",
953
+ /* @__PURE__ */ jsxRuntime.jsxs(
954
+ "a",
955
+ {
956
+ href: helmInstallUrl,
957
+ target: "_blank",
958
+ rel: "noopener noreferrer",
959
+ className: "font-semibold hover:underline",
960
+ style: { color: secondaryColor },
961
+ children: [
962
+ "Helm installation documentation",
963
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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" }) })
964
+ ]
965
+ }
966
+ )
967
+ ] }),
679
968
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6 space-y-6", children: [
680
969
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
681
970
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", style: { color: primaryColor }, children: [
@@ -726,7 +1015,9 @@ var HelmInstallWizard = ({
726
1015
  completedSteps,
727
1016
  registryAccess,
728
1017
  networkAvailability,
729
- primaryColor
1018
+ primaryColor,
1019
+ secondaryColor,
1020
+ valuesOverrideUrl
730
1021
  }
731
1022
  )
732
1023
  ] })
@@ -741,15 +1032,20 @@ var HelmInstallWizard = ({
741
1032
  children: "Back"
742
1033
  }
743
1034
  ),
744
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Step 2 of 2" }),
1035
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
1036
+ "Step ",
1037
+ currentDisplayStep,
1038
+ " of ",
1039
+ totalSteps
1040
+ ] }),
745
1041
  /* @__PURE__ */ jsxRuntime.jsx(
746
1042
  "button",
747
1043
  {
748
1044
  type: "button",
749
1045
  onClick: handleFinish,
750
- className: "rounded-xl px-4 py-2 font-medium text-white transition-opacity duration-200 hover:opacity-90",
1046
+ className: "rounded-xl px-4 py-2 font-medium text-white transition hover:opacity-90",
751
1047
  style: { backgroundColor: primaryColor },
752
- children: "Finish"
1048
+ children: hasPostInstall ? "Continue" : "Finish"
753
1049
  }
754
1050
  )
755
1051
  ] }),
@@ -771,148 +1067,42 @@ var HelmInstallWizard = ({
771
1067
  ] }) })
772
1068
  ] });
773
1069
  }
774
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
775
- /* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { step, primaryColor }),
776
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
777
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
778
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
779
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-sm font-medium text-gray-700", children: [
780
- "Instance Name",
781
- /* @__PURE__ */ jsxRuntime.jsx(
782
- "span",
783
- {
784
- className: "flex h-4 w-4 items-center justify-center rounded-full border border-gray-300 text-xs text-gray-400 cursor-help",
785
- 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.",
786
- children: "i"
787
- }
788
- )
789
- ] }),
1070
+ if (step === 4) {
1071
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
1072
+ /* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { step: 4, primaryColor, hasPreInstall, hasPostInstall }),
1073
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
1074
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(MarkdownRenderer, { children: postInstallMarkdown || "" }) }),
1075
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6 flex items-center justify-between text-sm text-gray-500", children: [
790
1076
  /* @__PURE__ */ jsxRuntime.jsx(
791
- "input",
1077
+ "button",
792
1078
  {
793
- value: instanceName,
794
- onChange: (event) => setInstanceName(event.target.value),
795
- placeholder: "Instance nickname",
796
- "aria-invalid": showErrors && !instanceName.trim(),
797
- className: `portal-input mt-2 w-48 ${showErrors && !instanceName.trim() ? "border-rose-400 focus:border-rose-400 focus:ring-rose-200" : ""}`
1079
+ type: "button",
1080
+ onClick: handleBack,
1081
+ className: "rounded-xl px-4 py-2 font-medium text-gray-500 transition hover:bg-gray-100",
1082
+ children: "Back"
798
1083
  }
799
1084
  ),
800
- showErrors && !instanceName.trim() ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 block text-xs text-rose-500", children: "Instance name is required." }) : null
801
- ] }),
802
- apiError ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-rose-200 bg-rose-50 p-3 text-sm text-rose-800", children: apiError }) : null,
803
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
804
- /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm font-medium text-gray-700", children: "Kubernetes Distribution" }),
1085
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
1086
+ "Step ",
1087
+ currentDisplayStep,
1088
+ " of ",
1089
+ totalSteps
1090
+ ] }),
805
1091
  /* @__PURE__ */ jsxRuntime.jsx(
806
- "select",
1092
+ "button",
807
1093
  {
808
- value: kubernetesDistribution,
809
- onChange: (e) => setKubernetesDistribution(e.target.value),
810
- className: "portal-select mt-2 w-64",
811
- children: K8S_DISTRIBUTIONS.map(({ value, label }) => /* @__PURE__ */ jsxRuntime.jsx("option", { value, children: label }, value))
1094
+ type: "button",
1095
+ onClick: handleCompletePostInstall,
1096
+ className: "rounded-xl px-4 py-2 font-medium text-white transition hover:brightness-90",
1097
+ style: { backgroundColor: primaryColor },
1098
+ children: "Complete"
812
1099
  }
813
1100
  )
814
- ] }),
815
- /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "space-y-2", children: [
816
- /* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-sm font-medium text-gray-700", children: "Cluster Network Availability" }),
817
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
818
- /* @__PURE__ */ jsxRuntime.jsx(
819
- "input",
820
- {
821
- type: "radio",
822
- name: "network-availability",
823
- checked: networkAvailability === "online",
824
- onChange: () => setNetworkAvailability("online"),
825
- className: "portal-radio"
826
- }
827
- ),
828
- "Outbound requests allowed"
829
- ] }),
830
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
831
- /* @__PURE__ */ jsxRuntime.jsx(
832
- "input",
833
- {
834
- type: "radio",
835
- name: "network-availability",
836
- checked: networkAvailability === "proxy",
837
- onChange: () => setNetworkAvailability("proxy"),
838
- className: "portal-radio"
839
- }
840
- ),
841
- "Outbound requests require HTTPS Proxy"
842
- ] }),
843
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", hidden: !isHelmAirgapEnabled, children: [
844
- /* @__PURE__ */ jsxRuntime.jsx(
845
- "input",
846
- {
847
- type: "radio",
848
- name: "network-availability",
849
- checked: networkAvailability === "airgap",
850
- onChange: () => setNetworkAvailability("airgap"),
851
- className: "portal-radio"
852
- }
853
- ),
854
- "No outbound requests allowed (air gap)"
855
- ] })
856
- ] }),
857
- /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "space-y-2", children: [
858
- /* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-sm font-medium text-gray-700", children: "Registry Access" }),
859
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
860
- /* @__PURE__ */ jsxRuntime.jsx(
861
- "input",
862
- {
863
- type: "radio",
864
- name: "registry-access",
865
- checked: registryAccess === "online",
866
- onChange: () => setRegistryAccess("online"),
867
- className: "portal-radio"
868
- }
869
- ),
870
- "My workstation can access the internet, the registry AND the cluster"
871
- ] }),
872
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
873
- /* @__PURE__ */ jsxRuntime.jsx(
874
- "input",
875
- {
876
- type: "radio",
877
- name: "registry-access",
878
- checked: registryAccess === "partial",
879
- onChange: () => setRegistryAccess("partial"),
880
- className: "portal-radio"
881
- }
882
- ),
883
- "My workstation can only access the internet AND the registry (NOT the cluster)"
884
- ] }),
885
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", hidden: !isHelmAirgapEnabled, children: [
886
- /* @__PURE__ */ jsxRuntime.jsx(
887
- "input",
888
- {
889
- type: "radio",
890
- name: "registry-access",
891
- checked: registryAccess === "offline",
892
- onChange: () => setRegistryAccess("offline"),
893
- className: "portal-radio"
894
- }
895
- ),
896
- "I need to download artifacts and transfer them for offline installation"
897
- ] })
898
1101
  ] })
899
- ] }),
900
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6 flex items-center justify-between text-sm text-gray-500", children: [
901
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Step 1 of 2" }),
902
- /* @__PURE__ */ jsxRuntime.jsx(
903
- "button",
904
- {
905
- type: "button",
906
- onClick: handleContinue,
907
- disabled: isCreatingServiceAccount,
908
- 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",
909
- style: { backgroundColor: primaryColor },
910
- children: isCreatingServiceAccount ? "Creating..." : "Continue"
911
- }
912
- )
913
1102
  ] })
914
- ] })
915
- ] });
1103
+ ] });
1104
+ }
1105
+ return null;
916
1106
  };
917
1107
  HelmInstallWizard.displayName = "HelmInstallWizard";
918
1108
 
@@ -1068,6 +1258,45 @@ var fetchCustomBrandingImpl = async () => {
1068
1258
  };
1069
1259
  };
1070
1260
  react.cache(fetchCustomBrandingImpl);
1261
+ var fetchDocumentationImpl = async () => {
1262
+ const { cookies } = await import('next/headers');
1263
+ const sessionStore = await cookies();
1264
+ const session = sessionStore.get("portal_session");
1265
+ const token = session?.value;
1266
+ if (!token) {
1267
+ throw new Error("Authentication required");
1268
+ }
1269
+ const url = `${getApiOrigin()}/enterprise-portal/documentation`;
1270
+ if (process.env.NODE_ENV !== "production") {
1271
+ console.debug(
1272
+ "[portal-components] fetching documentation via %s (Enterprise Portal API)",
1273
+ url
1274
+ );
1275
+ }
1276
+ const response = await authenticatedFetch(url, {
1277
+ method: "GET",
1278
+ token,
1279
+ headers: {
1280
+ accept: "application/json"
1281
+ }
1282
+ });
1283
+ if (!response.ok) {
1284
+ throw new Error(
1285
+ `Documentation request failed (${response.status} ${response.statusText})`
1286
+ );
1287
+ }
1288
+ const data = await response.json();
1289
+ return {
1290
+ helmPreInstall: data.helmPreInstall || "",
1291
+ helmPostInstall: data.helmPostInstall || "",
1292
+ embeddedClusterPreInstall: data.embeddedClusterPreInstall || "",
1293
+ embeddedClusterPostInstall: data.embeddedClusterPostInstall || "",
1294
+ helmInstallUrl: data.helmInstallUrl || "",
1295
+ embeddedClusterInstallUrl: data.embeddedClusterInstallUrl || "",
1296
+ valuesOverrideUrl: data.valuesOverrideUrl || ""
1297
+ };
1298
+ };
1299
+ react.cache(fetchDocumentationImpl);
1071
1300
 
1072
1301
  exports.HELM_INSTALL_SERVICE_ACCOUNT_KEY = HELM_INSTALL_SERVICE_ACCOUNT_KEY;
1073
1302
  exports.HelmInstallWizard = HelmInstallWizard;