@patternfly/quickstarts 6.2.0-prerelease.2 → 6.2.0-prerelease.3

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/dist/index.js CHANGED
@@ -2064,7 +2064,13 @@ const QuickStartFooter = ({ status, taskNumber, totalTasks, onNext, onBack, quic
2064
2064
  const QuickStartController = ({ quickStart, nextQuickStarts, contentRef, footerClass, }) => {
2065
2065
  const { metadata: { name }, spec: { tasks = [] }, } = quickStart;
2066
2066
  const totalTasks = tasks === null || tasks === void 0 ? void 0 : tasks.length;
2067
- const { activeQuickStartState, setActiveQuickStart, setQuickStartTaskNumber, setQuickStartTaskStatus, nextStep, previousStep, } = React__namespace.useContext(QuickStartContext);
2067
+ const { activeQuickStartID, allQuickStartStates, setAllQuickStartStates, activeQuickStartState, setActiveQuickStart, setQuickStartTaskNumber, setQuickStartTaskStatus, nextStep, previousStep, } = React__namespace.useContext(QuickStartContext);
2068
+ React__namespace.useEffect(() => {
2069
+ // If activeQuickStartID was changed through prop from QuickStartContainer, need to init the state if it does not exist yet
2070
+ if (activeQuickStartID && !allQuickStartStates[activeQuickStartID]) {
2071
+ setAllQuickStartStates(Object.assign(Object.assign({}, allQuickStartStates), { [activeQuickStartID]: getDefaultQuickStartState() }));
2072
+ }
2073
+ }, [activeQuickStartID, allQuickStartStates, setAllQuickStartStates]);
2068
2074
  const status = activeQuickStartState === null || activeQuickStartState === void 0 ? void 0 : activeQuickStartState.status;
2069
2075
  const taskNumber = activeQuickStartState === null || activeQuickStartState === void 0 ? void 0 : activeQuickStartState.taskNumber;
2070
2076
  const allTaskStatuses = tasks.map((task, index) => activeQuickStartState[`taskStatus${index}`]);
@@ -2539,6 +2545,7 @@ exports.QuickStartContainer = QuickStartContainer;
2539
2545
  exports.QuickStartContext = QuickStartContext;
2540
2546
  exports.QuickStartContextDefaults = QuickStartContextDefaults;
2541
2547
  exports.QuickStartContextProvider = QuickStartContextProvider;
2548
+ exports.QuickStartController = QuickStartController;
2542
2549
  exports.QuickStartDrawer = QuickStartDrawer;
2543
2550
  exports.QuickStartDrawerContent = QuickStartDrawerContent;
2544
2551
  exports.QuickStartPanelContent = QuickStartPanelContent;