@patternfly/quickstarts 6.2.2 → 6.3.0-prerelease.10

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 (136) hide show
  1. package/dist/ConsoleInternal/components/markdown-view.d.ts +2 -2
  2. package/dist/ConsoleInternal/components/utils/camel-case-wrap.d.ts +1 -1
  3. package/dist/ConsoleInternal/components/utils/status-box.d.ts +3 -3
  4. package/dist/ConsoleShared/src/components/markdown-extensions/MarkdownCopyClipboard.d.ts +3 -3
  5. package/dist/ConsoleShared/src/components/markdown-extensions/accordion-extension.d.ts +1 -1
  6. package/dist/ConsoleShared/src/components/markdown-extensions/accordion-render-extension.d.ts +2 -2
  7. package/dist/ConsoleShared/src/components/markdown-extensions/admonition-extension.d.ts +1 -1
  8. package/dist/ConsoleShared/src/components/markdown-highlight-extension/MarkdownHighlightExtension.d.ts +2 -2
  9. package/dist/ConsoleShared/src/components/modal/Modal.d.ts +3 -3
  10. package/dist/ConsoleShared/src/components/popper/Portal.d.ts +3 -3
  11. package/dist/ConsoleShared/src/components/popper/SimplePopper.d.ts +3 -3
  12. package/dist/ConsoleShared/src/components/spotlight/InteractiveSpotlight.d.ts +2 -2
  13. package/dist/ConsoleShared/src/components/spotlight/Spotlight.d.ts +2 -2
  14. package/dist/ConsoleShared/src/components/spotlight/StaticSpotlight.d.ts +2 -2
  15. package/dist/ConsoleShared/src/components/status/GenericStatus.d.ts +4 -4
  16. package/dist/ConsoleShared/src/components/status/NotStartedIcon.d.ts +1 -2
  17. package/dist/ConsoleShared/src/components/status/PopoverStatus.d.ts +4 -4
  18. package/dist/ConsoleShared/src/components/status/Status.d.ts +3 -3
  19. package/dist/ConsoleShared/src/components/status/StatusIconAndText.d.ts +3 -3
  20. package/dist/ConsoleShared/src/components/status/icons.d.ts +4 -4
  21. package/dist/ConsoleShared/src/components/status/statuses.d.ts +4 -4
  22. package/dist/ConsoleShared/src/components/utils/FallbackImg.d.ts +3 -3
  23. package/dist/ConsoleShared/src/utils/useCombineRefs.d.ts +2 -2
  24. package/dist/HelpTopicDrawer.d.ts +3 -3
  25. package/dist/HelpTopicPanelContent.d.ts +2 -2
  26. package/dist/QuickStartCatalogPage.d.ts +3 -3
  27. package/dist/QuickStartCloseModal.d.ts +2 -2
  28. package/dist/QuickStartContainer.d.ts +2 -2
  29. package/dist/QuickStartController.d.ts +2 -2
  30. package/dist/QuickStartDrawer.d.ts +2 -2
  31. package/dist/QuickStartDrawerContent.d.ts +2 -2
  32. package/dist/QuickStartMarkdownView.d.ts +2 -2
  33. package/dist/QuickStartPanelContent.d.ts +2 -2
  34. package/dist/catalog/Catalog/QuickStartCatalogHeader.d.ts +2 -2
  35. package/dist/catalog/Catalog/QuickStartCatalogSection.d.ts +2 -2
  36. package/dist/catalog/Catalog/QuickStartCatalogToolbar.d.ts +2 -2
  37. package/dist/catalog/QuickStartCatalog.d.ts +2 -2
  38. package/dist/catalog/QuickStartTile.d.ts +2 -2
  39. package/dist/catalog/QuickStartTileDescription.d.ts +2 -2
  40. package/dist/catalog/QuickStartTileFooter.d.ts +2 -2
  41. package/dist/catalog/QuickStartTileFooterExternal.d.ts +2 -2
  42. package/dist/catalog/QuickStartTileHeader.d.ts +2 -2
  43. package/dist/catalog/Toolbar/QuickStartCatalogFilter.d.ts +2 -2
  44. package/dist/catalog/Toolbar/QuickStartCatalogFilterItems.d.ts +7 -7
  45. package/dist/controller/QuickStartConclusion.d.ts +2 -2
  46. package/dist/controller/QuickStartContent.d.ts +2 -2
  47. package/dist/controller/QuickStartFooter.d.ts +2 -2
  48. package/dist/controller/QuickStartIntroduction.d.ts +2 -2
  49. package/dist/controller/QuickStartTaskHeader.d.ts +2 -2
  50. package/dist/controller/QuickStartTaskHeaderList.d.ts +2 -2
  51. package/dist/controller/QuickStartTaskReview.d.ts +2 -2
  52. package/dist/controller/QuickStartTasks.d.ts +2 -2
  53. package/dist/index.es.js +489 -561
  54. package/dist/index.es.js.map +1 -1
  55. package/dist/index.js +500 -574
  56. package/dist/index.js.map +1 -1
  57. package/dist/quickstarts-base.css +4 -4
  58. package/dist/quickstarts-full.es.js +1963 -693
  59. package/dist/quickstarts-full.es.js.map +1 -1
  60. package/dist/quickstarts.css +4 -4
  61. package/dist/quickstarts.min.css +1 -1
  62. package/dist/utils/help-topic-context.d.ts +2 -2
  63. package/dist/utils/quick-start-context.d.ts +3 -3
  64. package/package.json +7 -7
  65. package/src/ConsoleInternal/components/markdown-view.tsx +112 -22
  66. package/src/ConsoleInternal/components/utils/camel-case-wrap.tsx +3 -3
  67. package/src/ConsoleInternal/components/utils/status-box.tsx +4 -4
  68. package/src/ConsoleShared/src/components/markdown-extensions/MarkdownCopyClipboard.tsx +8 -15
  69. package/src/ConsoleShared/src/components/markdown-extensions/__tests__/MarkdownCopyClipboard.spec.tsx +0 -1
  70. package/src/ConsoleShared/src/components/markdown-extensions/__tests__/accordion-extension.spec.tsx +105 -0
  71. package/src/ConsoleShared/src/components/markdown-extensions/__tests__/admonition-extension.spec.tsx +121 -0
  72. package/src/ConsoleShared/src/components/markdown-extensions/accordion-extension.tsx +22 -15
  73. package/src/ConsoleShared/src/components/markdown-extensions/accordion-render-extension.tsx +23 -9
  74. package/src/ConsoleShared/src/components/markdown-extensions/admonition-extension.tsx +19 -8
  75. package/src/ConsoleShared/src/components/markdown-extensions/code-extension.tsx +2 -2
  76. package/src/ConsoleShared/src/components/markdown-extensions/inline-clipboard-extension.tsx +3 -3
  77. package/src/ConsoleShared/src/components/markdown-extensions/multiline-clipboard-extension.tsx +3 -3
  78. package/src/ConsoleShared/src/components/markdown-highlight-extension/MarkdownHighlightExtension.tsx +5 -5
  79. package/src/ConsoleShared/src/components/modal/Modal.tsx +3 -3
  80. package/src/ConsoleShared/src/components/popper/Portal.tsx +5 -5
  81. package/src/ConsoleShared/src/components/popper/SimplePopper.tsx +15 -15
  82. package/src/ConsoleShared/src/components/spotlight/InteractiveSpotlight.tsx +5 -5
  83. package/src/ConsoleShared/src/components/spotlight/Spotlight.tsx +3 -3
  84. package/src/ConsoleShared/src/components/spotlight/StaticSpotlight.tsx +3 -3
  85. package/src/ConsoleShared/src/components/status/GenericStatus.tsx +5 -5
  86. package/src/ConsoleShared/src/components/status/NotStartedIcon.tsx +0 -1
  87. package/src/ConsoleShared/src/components/status/PopoverStatus.tsx +4 -4
  88. package/src/ConsoleShared/src/components/status/Status.tsx +3 -11
  89. package/src/ConsoleShared/src/components/status/StatusIconAndText.tsx +6 -6
  90. package/src/ConsoleShared/src/components/status/icons.tsx +4 -8
  91. package/src/ConsoleShared/src/components/status/statuses.tsx +4 -5
  92. package/src/ConsoleShared/src/components/utils/FallbackImg.tsx +4 -4
  93. package/src/ConsoleShared/src/hooks/scroll.ts +4 -4
  94. package/src/ConsoleShared/src/hooks/useBoundingClientRect.ts +3 -3
  95. package/src/ConsoleShared/src/hooks/useForceRender.ts +2 -2
  96. package/src/ConsoleShared/src/hooks/useResizeObserver.ts +3 -6
  97. package/src/ConsoleShared/src/hooks/useScrollShadows.ts +4 -4
  98. package/src/ConsoleShared/src/utils/useCombineRefs.ts +4 -4
  99. package/src/HelpTopicDrawer.tsx +6 -6
  100. package/src/HelpTopicPanelContent.tsx +4 -4
  101. package/src/QuickStartCatalogPage.tsx +9 -9
  102. package/src/QuickStartCloseModal.tsx +3 -7
  103. package/src/QuickStartContainer.tsx +4 -4
  104. package/src/QuickStartController.tsx +11 -11
  105. package/src/QuickStartDrawer.tsx +6 -6
  106. package/src/QuickStartDrawerContent.tsx +6 -4
  107. package/src/QuickStartMarkdownView.tsx +3 -3
  108. package/src/QuickStartPanelContent.tsx +8 -8
  109. package/src/catalog/Catalog/QuickStartCatalogHeader.tsx +2 -2
  110. package/src/catalog/Catalog/QuickStartCatalogSection.tsx +2 -2
  111. package/src/catalog/Catalog/QuickStartCatalogToolbar.tsx +2 -2
  112. package/src/catalog/QuickStartCatalog.tsx +3 -3
  113. package/src/catalog/QuickStartTile.tsx +4 -4
  114. package/src/catalog/QuickStartTileDescription.tsx +4 -4
  115. package/src/catalog/QuickStartTileFooter.tsx +6 -6
  116. package/src/catalog/QuickStartTileFooterExternal.tsx +2 -5
  117. package/src/catalog/QuickStartTileHeader.tsx +2 -6
  118. package/src/catalog/Toolbar/QuickStartCatalogFilter.tsx +2 -2
  119. package/src/catalog/Toolbar/QuickStartCatalogFilterItems.tsx +17 -20
  120. package/src/catalog/__tests__/QuickStartCatalog.spec.tsx +0 -1
  121. package/src/catalog/__tests__/QuickStartTile.spec.tsx +0 -1
  122. package/src/catalog/__tests__/QuickStartTileDescription.spec.tsx +1 -2
  123. package/src/controller/QuickStartConclusion.tsx +3 -3
  124. package/src/controller/QuickStartContent.tsx +2 -2
  125. package/src/controller/QuickStartFooter.tsx +10 -11
  126. package/src/controller/QuickStartIntroduction.tsx +5 -5
  127. package/src/controller/QuickStartTaskHeader.tsx +5 -5
  128. package/src/controller/QuickStartTaskHeaderList.tsx +2 -2
  129. package/src/controller/QuickStartTaskReview.tsx +4 -4
  130. package/src/controller/QuickStartTasks.tsx +5 -5
  131. package/src/controller/__tests__/QuickStartConclusion.spec.tsx +3 -3
  132. package/src/controller/__tests__/QuickStartContent.spec.tsx +2 -2
  133. package/src/controller/__tests__/QuickStartTaskHeader.spec.tsx +2 -2
  134. package/src/controller/__tests__/QuickStartTaskReview.spec.tsx +2 -2
  135. package/src/utils/help-topic-context.tsx +7 -10
  136. package/src/utils/quick-start-context.tsx +11 -11
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import React__default, { createContext, useCallback, useEffect, useState } from 'react';
1
+ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
2
+ import { createContext, useState, useCallback, useEffect, useContext, Fragment, useRef, useMemo, useReducer, cloneElement, Children, forwardRef } from 'react';
3
3
  import { useIsomorphicLayoutEffect, Tooltip, Alert, CodeBlock, Accordion, AccordionItem, AccordionToggle, AccordionContent, Popover, PopoverPosition, Button, Icon, Flex, FlexItem, Card, CardHeader, CardTitle, CardBody, Stack, Label, CardFooter, Gallery, ToolbarItem, SearchInput, Select, SelectList, SelectOption, MenuToggle, Badge, Toolbar, ToolbarContent, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateActions, PageSection, Content, Title, Divider, WizardNavItem, ExpandableSection, List, ListItem, Radio, ActionList, ActionListGroup, ActionListItem, DrawerPanelContent, DrawerHead, DrawerActions, DrawerCloseButton, DrawerPanelBody, Drawer, DrawerContent, DrawerContentBody, StackItem } from '@patternfly/react-core';
4
4
  import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
5
5
  import { css } from '@patternfly/react-styles';
@@ -7,6 +7,7 @@ import RocketIcon from '@patternfly/react-icons/dist/js/icons/rocket-icon';
7
7
  import { __rest, __awaiter } from 'tslib';
8
8
  import { Modal as Modal$1, ModalVariant } from '@patternfly/react-core/deprecated';
9
9
  import * as ReactDOM from 'react-dom';
10
+ import { createPortal } from 'react-dom';
10
11
  import { renderToStaticMarkup } from 'react-dom/server';
11
12
  import CopyIcon from '@patternfly/react-icons/dist/js/icons/copy-icon';
12
13
  import LightbulbIcon from '@patternfly/react-icons/dist/js/icons/lightbulb-icon';
@@ -23,18 +24,13 @@ import ArrowRightIcon from '@patternfly/react-icons/dist/js/icons/arrow-right-ic
23
24
  import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
24
25
 
25
26
  function _extends() {
26
- _extends = Object.assign ? Object.assign.bind() : function (target) {
27
- for (var i = 1; i < arguments.length; i++) {
28
- var source = arguments[i];
29
- for (var key in source) {
30
- if (Object.prototype.hasOwnProperty.call(source, key)) {
31
- target[key] = source[key];
32
- }
33
- }
27
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
28
+ for (var e = 1; e < arguments.length; e++) {
29
+ var t = arguments[e];
30
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
34
31
  }
35
- return target;
36
- };
37
- return _extends.apply(this, arguments);
32
+ return n;
33
+ }, _extends.apply(null, arguments);
38
34
  }
39
35
 
40
36
  var m,x=m||(m={});x.Pop="POP";x.Push="PUSH";x.Replace="REPLACE";var y="production"!==process.env.NODE_ENV?function(a){return Object.freeze(a)}:function(a){return a};function z(a,b){if(!a){"undefined"!==typeof console&&console.warn(b);try{throw Error(b);}catch(g){}}}function A(a){a.preventDefault();a.returnValue="";}
@@ -594,27 +590,27 @@ const useValuesForQuickStartContext = (value = {}) => {
594
590
  var _a, _b;
595
591
  const combinedValue = Object.assign(Object.assign({}, QuickStartContextDefaults), value);
596
592
  const { activeQuickStartID, setActiveQuickStartID, setAllQuickStartStates, useQueryParams, allQuickStartStates, allQuickStarts = [], footer, useLegacyHeaderColors, markdown, } = combinedValue;
597
- const [quickStarts, setQuickStarts] = React__default.useState(combinedValue.allQuickStarts || []);
598
- const [resourceBundle, setResourceBundle] = React__default.useState(Object.assign(Object.assign({}, en), combinedValue.resourceBundle));
599
- const [language, setLanguage] = React__default.useState(combinedValue.language);
593
+ const [quickStarts, setQuickStarts] = useState(combinedValue.allQuickStarts || []);
594
+ const [resourceBundle, setResourceBundle] = useState(Object.assign(Object.assign({}, en), combinedValue.resourceBundle));
595
+ const [language, setLanguage] = useState(combinedValue.language);
600
596
  const changeResourceBundle = (bundle, lng) => {
601
597
  lng && setLanguage(lng);
602
598
  setResourceBundle(Object.assign(Object.assign({}, en), bundle));
603
599
  };
604
600
  const findResource = useCallback((resource, count) => getResource(resource, count !== undefined ? { count } : null, resourceBundle, language), [resourceBundle, language]);
605
- const [loading, setLoading] = React__default.useState(combinedValue.loading);
606
- const [alwaysShowTaskReview, setAlwaysShowTaskReview] = React__default.useState(combinedValue.alwaysShowTaskReview);
601
+ const [loading, setLoading] = useState(combinedValue.loading);
602
+ const [alwaysShowTaskReview, setAlwaysShowTaskReview] = useState(combinedValue.alwaysShowTaskReview);
607
603
  const initialSearchParams = new URLSearchParams(window.location.search);
608
604
  const initialSearchQuery = initialSearchParams.get(QUICKSTART_SEARCH_FILTER_KEY) || '';
609
605
  const initialStatusFilters = ((_a = initialSearchParams.get(QUICKSTART_STATUS_FILTER_KEY)) === null || _a === void 0 ? void 0 : _a.split(',')) || [];
610
606
  const quickStartStatusCount = getQuickStartStatusCount(allQuickStartStates, allQuickStarts);
611
- const [statusTypes, setStatusTypes] = React__default.useState({
607
+ const [statusTypes, setStatusTypes] = useState({
612
608
  [QuickStartStatus.COMPLETE]: findResource('Complete ({{statusCount, number}})').replace('{{statusCount, number}}', quickStartStatusCount[QuickStartStatus.COMPLETE]),
613
609
  [QuickStartStatus.IN_PROGRESS]: findResource('In progress ({{statusCount, number}})').replace('{{statusCount, number}}', quickStartStatusCount[QuickStartStatus.IN_PROGRESS]),
614
610
  [QuickStartStatus.NOT_STARTED]: findResource('Not started ({{statusCount, number}})').replace('{{statusCount, number}}', quickStartStatusCount[QuickStartStatus.NOT_STARTED]),
615
611
  });
616
- const [statusFilters, setStatusFilters] = React__default.useState(initialStatusFilters);
617
- const [filterKeyword, setFilterKeyword] = React__default.useState(initialSearchQuery);
612
+ const [statusFilters, setStatusFilters] = useState(initialStatusFilters);
613
+ const [filterKeyword, setFilterKeyword] = useState(initialSearchQuery);
618
614
  const setFilter = (type, val) => {
619
615
  if (type === 'keyword') {
620
616
  setFilterKeyword(val);
@@ -623,7 +619,7 @@ const useValuesForQuickStartContext = (value = {}) => {
623
619
  setStatusFilters(val);
624
620
  }
625
621
  };
626
- React__default.useEffect(() => {
622
+ useEffect(() => {
627
623
  const updatedQuickStartStatusCount = getQuickStartStatusCount(allQuickStartStates, quickStarts);
628
624
  setStatusTypes({
629
625
  [QuickStartStatus.COMPLETE]: findResource('Complete ({{statusCount, number}})').replace('{{statusCount, number}}', updatedQuickStartStatusCount[QuickStartStatus.COMPLETE]),
@@ -795,24 +791,18 @@ const useValuesForQuickStartContext = (value = {}) => {
795
791
  setAlwaysShowTaskReview,
796
792
  };
797
793
  };
798
- const QuickStartContextProvider = ({ children, value }) => (React__default.createElement(QuickStartContext.Provider, { value: useValuesForQuickStartContext(value) }, children));
794
+ const QuickStartContextProvider = ({ children, value }) => (jsx(QuickStartContext.Provider, Object.assign({ value: useValuesForQuickStartContext(value) }, { children: children })));
799
795
 
800
- const Box = ({ children, className }) => (React.createElement("div", { className: css('pfext-status-box', className) }, children));
801
- const Loading = ({ className }) => (React.createElement("div", { className: css('pfext-m-loader', className) },
802
- React.createElement("div", { className: "pfext-m-loader-dot__one" }),
803
- React.createElement("div", { className: "pfext-m-loader-dot__two" }),
804
- React.createElement("div", { className: "pfext-m-loader-dot__three" })));
796
+ const Box = ({ children, className }) => (jsx("div", Object.assign({ className: css('pfext-status-box', className) }, { children: children })));
797
+ const Loading = ({ className }) => (jsxs("div", Object.assign({ className: css('pfext-m-loader', className) }, { children: [jsx("div", { className: "pfext-m-loader-dot__one" }), jsx("div", { className: "pfext-m-loader-dot__two" }), jsx("div", { className: "pfext-m-loader-dot__three" })] })));
805
798
  Loading.displayName = 'Loading';
806
- const LoadingBox = ({ className, message }) => (React.createElement(Box, { className: css('pfext-status-box--loading', className) },
807
- React.createElement(Loading, null),
808
- message && React.createElement("div", { className: "pfext-status-box__loading-message" }, message)));
799
+ const LoadingBox = ({ className, message }) => (jsxs(Box, Object.assign({ className: css('pfext-status-box--loading', className) }, { children: [jsx(Loading, {}), message && jsx("div", Object.assign({ className: "pfext-status-box__loading-message" }, { children: message }))] })));
809
800
  LoadingBox.displayName = 'LoadingBox';
810
801
  const EmptyBox = ({ label }) => {
811
- const { getResource } = React.useContext(QuickStartContext);
812
- return (React.createElement(Box, null,
813
- React.createElement("div", { "data-test": "empty-message", className: "text-center" }, label
814
- ? getResource('No {{label}} found').replace('{{label}}', label)
815
- : getResource('Not found'))));
802
+ const { getResource } = useContext(QuickStartContext);
803
+ return (jsx(Box, { children: jsx("div", Object.assign({ "data-test": "empty-message", className: "text-center" }, { children: label
804
+ ? getResource('No {{label}} found').replace('{{label}}', label)
805
+ : getResource('Not found') })) }));
816
806
  };
817
807
  EmptyBox.displayName = 'EmptyBox';
818
808
 
@@ -826,49 +816,47 @@ const CamelCaseWrap = ({ value, dataTest }) => {
826
816
  }
827
817
  // Add word break points before capital letters (but keep consecutive capital letters together).
828
818
  const words = value.match(/[A-Z]+[^A-Z]*|[^A-Z]+/g);
829
- const rendered = (React.createElement("span", { "data-test": dataTest }, words.map((word, i) => (React.createElement(React.Fragment, { key: i },
830
- word,
831
- i !== words.length - 1 && React.createElement("wbr", null))))));
819
+ const rendered = (jsx("span", Object.assign({ "data-test": dataTest }, { children: words.map((word, i) => (jsxs(Fragment, { children: [word, i !== words.length - 1 && jsx("wbr", {})] }, i))) })));
832
820
  MEMO[value] = rendered;
833
821
  return rendered;
834
822
  };
835
823
 
836
824
  const Modal = (_a) => {
837
825
  var { isFullScreen = false, className } = _a, props = __rest(_a, ["isFullScreen", "className"]);
838
- return (React.createElement(Modal$1, Object.assign({}, props, { className: css('pfext-modal', className), appendTo: () => (isFullScreen ? document.body : document.querySelector('#modal-container')) })));
826
+ return (jsx(Modal$1, Object.assign({}, props, { className: css('pfext-modal', className), appendTo: () => (isFullScreen ? document.body : document.querySelector('#modal-container')) })));
839
827
  };
840
828
 
841
829
  const getContainer = (container) => typeof container === 'function' ? container() : container;
842
830
  const Portal = ({ children, container }) => {
843
- const [containerNode, setContainerNode] = React.useState();
831
+ const [containerNode, setContainerNode] = useState();
844
832
  useIsomorphicLayoutEffect(() => {
845
833
  setContainerNode(getContainer(container) || document.body);
846
834
  }, [container]);
847
- return containerNode ? ReactDOM.createPortal(children, containerNode) : null;
835
+ return containerNode ? createPortal(children, containerNode) : null;
848
836
  };
849
837
 
850
838
  const SimplePopper = ({ children }) => {
851
839
  const openProp = true;
852
- const nodeRef = React.useRef();
853
- const popperRef = React.useRef(null);
854
- const [isOpen, setOpenState] = React.useState(openProp);
855
- const setOpen = React.useCallback((newOpen) => {
840
+ const nodeRef = useRef(null);
841
+ const popperRef = useRef(null);
842
+ const [isOpen, setOpenState] = useState(openProp);
843
+ const setOpen = useCallback((newOpen) => {
856
844
  setOpenState(newOpen);
857
845
  }, []);
858
- React.useEffect(() => {
846
+ useEffect(() => {
859
847
  setOpen(openProp);
860
848
  }, [openProp, setOpen]);
861
- const onKeyDown = React.useCallback((e) => {
849
+ const onKeyDown = useCallback((e) => {
862
850
  if (e.keyCode === 27) {
863
851
  setOpen(false);
864
852
  }
865
853
  }, [setOpen]);
866
- const onClickOutside = React.useCallback((e) => {
854
+ const onClickOutside = useCallback((e) => {
867
855
  if (!nodeRef.current || (e.target instanceof Node && !nodeRef.current.contains(e.target))) {
868
856
  setOpen(false);
869
857
  }
870
858
  }, [setOpen]);
871
- const destroy = React.useCallback(() => {
859
+ const destroy = useCallback(() => {
872
860
  if (popperRef.current) {
873
861
  popperRef.current.destroy();
874
862
  document.removeEventListener('keydown', onKeyDown, true);
@@ -876,29 +864,28 @@ const SimplePopper = ({ children }) => {
876
864
  document.removeEventListener('touchstart', onClickOutside, true);
877
865
  }
878
866
  }, [onClickOutside, onKeyDown]);
879
- const initialize = React.useCallback(() => {
867
+ const initialize = useCallback(() => {
880
868
  if (!nodeRef.current || !isOpen) {
881
869
  return;
882
870
  }
883
871
  destroy();
884
872
  }, [isOpen, destroy]);
885
- const nodeRefCallback = React.useCallback((node) => {
873
+ const nodeRefCallback = useCallback((node) => {
886
874
  nodeRef.current = node;
887
875
  initialize();
888
876
  }, [initialize]);
889
- React.useEffect(() => {
877
+ useEffect(() => {
890
878
  initialize();
891
879
  }, [initialize]);
892
- React.useEffect(() => () => {
880
+ useEffect(() => () => {
893
881
  destroy();
894
882
  }, [destroy]);
895
- React.useEffect(() => {
883
+ useEffect(() => {
896
884
  if (!isOpen) {
897
885
  destroy();
898
886
  }
899
887
  }, [destroy, isOpen]);
900
- return isOpen ? (React.createElement(Portal, null,
901
- React.createElement("div", { ref: nodeRefCallback, style: { zIndex: 9999, position: 'absolute', top: 0, left: 0 }, className: "pfext-quick-start__base" }, children))) : null;
888
+ return isOpen ? (jsx(Portal, { children: jsx("div", Object.assign({ ref: nodeRefCallback, style: { zIndex: 9999, position: 'absolute', top: 0, left: 0 }, className: "pfext-quick-start__base" }, { children: children })) })) : null;
902
889
  };
903
890
 
904
891
  const isInViewport = (elementToCheck) => {
@@ -918,8 +905,8 @@ const InteractiveSpotlight = ({ element }) => {
918
905
  bottom,
919
906
  right,
920
907
  };
921
- const [clicked, setClicked] = React.useState(false);
922
- React.useEffect(() => {
908
+ const [clicked, setClicked] = useState(false);
909
+ useEffect(() => {
923
910
  if (!clicked) {
924
911
  if (!isInViewport(element)) {
925
912
  element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest' });
@@ -935,9 +922,7 @@ const InteractiveSpotlight = ({ element }) => {
935
922
  if (clicked) {
936
923
  return null;
937
924
  }
938
- return (React.createElement(Portal, null,
939
- React.createElement(SimplePopper, null,
940
- React.createElement("div", { className: "pfext-spotlight pfext-spotlight__element-highlight-animate", style: style }))));
925
+ return (jsx(Portal, { children: jsx(SimplePopper, { children: jsx("div", { className: "pfext-spotlight pfext-spotlight__element-highlight-animate", style: style }) }) }));
941
926
  };
942
927
 
943
928
  var ScrollDirection;
@@ -949,8 +934,8 @@ var ScrollDirection;
949
934
  })(ScrollDirection || (ScrollDirection = {}));
950
935
 
951
936
  const useResizeObserver = (callback, targetElement, observerOptions = undefined) => {
952
- const element = React.useMemo(() => targetElement !== null && targetElement !== void 0 ? targetElement : document.querySelector('body'), [targetElement]);
953
- React.useEffect(() => {
937
+ const element = useMemo(() => targetElement !== null && targetElement !== void 0 ? targetElement : document.querySelector('body'), [targetElement]);
938
+ useEffect(() => {
954
939
  const observer = new ResizeObserver(callback);
955
940
  observer.observe(element, observerOptions);
956
941
  return () => {
@@ -968,8 +953,8 @@ var Shadows;
968
953
  })(Shadows || (Shadows = {}));
969
954
 
970
955
  const useBoundingClientRect = (targetElement) => {
971
- const [clientRect, setClientRect] = React.useState(() => targetElement ? targetElement.getBoundingClientRect() : null);
972
- const observerCallback = React.useCallback(() => {
956
+ const [clientRect, setClientRect] = useState(() => targetElement ? targetElement.getBoundingClientRect() : null);
957
+ const observerCallback = useCallback(() => {
973
958
  setClientRect(targetElement ? targetElement.getBoundingClientRect() : null);
974
959
  }, [targetElement]);
975
960
  useResizeObserver(observerCallback);
@@ -979,7 +964,7 @@ const useBoundingClientRect = (targetElement) => {
979
964
  /**
980
965
  * React hook that forces component render.
981
966
  */
982
- const useForceRender = () => React.useReducer((s) => !s, false)[1];
967
+ const useForceRender = () => useReducer((s) => !s, false)[1];
983
968
 
984
969
  const useEventListener = (target, event, callback) => {
985
970
  useEffect(() => {
@@ -1000,14 +985,12 @@ const StaticSpotlight = ({ element }) => {
1000
985
  width: clientRect.width,
1001
986
  }
1002
987
  : {};
1003
- return clientRect ? (React.createElement(Portal, null,
1004
- React.createElement("div", { className: "pf-v6-c-backdrop pfext-spotlight__with-backdrop" },
1005
- React.createElement("div", { className: "pfext-spotlight pfext-spotlight__element-highlight-noanimate", style: style })))) : null;
988
+ return clientRect ? (jsx(Portal, { children: jsx("div", Object.assign({ className: "pf-v6-c-backdrop pfext-spotlight__with-backdrop" }, { children: jsx("div", { className: "pfext-spotlight pfext-spotlight__element-highlight-noanimate", style: style }) })) })) : null;
1006
989
  };
1007
990
 
1008
991
  const Spotlight = ({ selector, interactive }) => {
1009
992
  // if target element is a hidden one return null
1010
- const element = React.useMemo(() => {
993
+ const element = useMemo(() => {
1011
994
  const highlightElement = document.querySelector(selector);
1012
995
  let hiddenElement = highlightElement;
1013
996
  while (hiddenElement) {
@@ -1022,12 +1005,12 @@ const Spotlight = ({ selector, interactive }) => {
1022
1005
  if (!element) {
1023
1006
  return null;
1024
1007
  }
1025
- return interactive ? (React.createElement(InteractiveSpotlight, { element: element })) : (React.createElement(StaticSpotlight, { element: element }));
1008
+ return interactive ? (jsx(InteractiveSpotlight, { element: element })) : (jsx(StaticSpotlight, { element: element }));
1026
1009
  };
1027
1010
 
1028
1011
  const MarkdownHighlightExtension = ({ docContext, rootSelector, }) => {
1029
- const [selector, setSelector] = React.useState(null);
1030
- React.useEffect(() => {
1012
+ const [selector, setSelector] = useState(null);
1013
+ useEffect(() => {
1031
1014
  const elements = docContext.querySelectorAll(`${rootSelector} [data-highlight]`);
1032
1015
  let timeoutId;
1033
1016
  function startHighlight(e) {
@@ -1046,7 +1029,7 @@ const MarkdownHighlightExtension = ({ docContext, rootSelector, }) => {
1046
1029
  elements && elements.forEach((elm) => elm.removeEventListener('click', startHighlight));
1047
1030
  };
1048
1031
  }, [docContext, rootSelector]);
1049
- React.useEffect(() => {
1032
+ useEffect(() => {
1050
1033
  const elements = docContext.querySelectorAll(`${rootSelector} [class^=data-highlight__]`);
1051
1034
  let timeoutId;
1052
1035
  function startHighlight(e) {
@@ -1076,7 +1059,7 @@ const MarkdownHighlightExtension = ({ docContext, rootSelector, }) => {
1076
1059
  if (!selector) {
1077
1060
  return null;
1078
1061
  }
1079
- return React.createElement(Spotlight, { selector: selector, interactive: true });
1062
+ return jsx(Spotlight, { selector: selector, interactive: true });
1080
1063
  };
1081
1064
 
1082
1065
  const MARKDOWN_COPY_BUTTON_ID = 'data-copy-for';
@@ -1084,15 +1067,15 @@ const MARKDOWN_SNIPPET_ID = 'data-snippet-id';
1084
1067
  const ACCORDION_MARKDOWN_BUTTON_ID = `accordion-markdown-button-id`;
1085
1068
  const ACCORDION_MARKDOWN_CONTENT_ID = `accordion-markdown-content-id`;
1086
1069
 
1087
- const CopyClipboard = ({ element, rootSelector, docContext, }) => {
1088
- const { getResource } = React.useContext(QuickStartContext);
1089
- const [showSuccessContent, setShowSuccessContent] = React.useState(false);
1090
- const textToCopy = React.useMemo(() => {
1070
+ const CopyClipboard = ({ element, rootSelector, docContext }) => {
1071
+ const { getResource } = useContext(QuickStartContext);
1072
+ const [showSuccessContent, setShowSuccessContent] = useState(false);
1073
+ const textToCopy = useMemo(() => {
1091
1074
  var _a;
1092
1075
  const copyTextId = element.getAttribute(MARKDOWN_COPY_BUTTON_ID);
1093
1076
  return (_a = docContext.querySelector(`${rootSelector} [${MARKDOWN_SNIPPET_ID}="${copyTextId}"]`)) === null || _a === void 0 ? void 0 : _a.innerText;
1094
1077
  }, [element, docContext, rootSelector]);
1095
- useEventListener(element, 'click', React.useCallback(() => {
1078
+ useEventListener(element, 'click', useCallback(() => {
1096
1079
  navigator.clipboard
1097
1080
  .writeText(textToCopy.trim())
1098
1081
  .then(() => {
@@ -1100,24 +1083,24 @@ const CopyClipboard = ({ element, rootSelector, docContext, }) => {
1100
1083
  })
1101
1084
  .catch(() => { });
1102
1085
  }, [textToCopy]));
1103
- useEventListener(element, 'mouseleave', React.useCallback(() => {
1086
+ useEventListener(element, 'mouseleave', useCallback(() => {
1104
1087
  setShowSuccessContent(false);
1105
1088
  }, []));
1106
- return showSuccessContent ? (React.createElement(Tooltip, { key: "after-copy", isVisible: true, triggerRef: () => element, content: getResource('Successfully copied to clipboard!'), className: "pfext-quick-start__base" })) : (React.createElement(Tooltip, { key: "before-copy", triggerRef: () => element, content: getResource('Copy to clipboard'), className: "pfext-quick-start__base" }));
1089
+ return showSuccessContent ? (jsx(Tooltip, { isVisible: true, triggerRef: () => element, content: getResource('Successfully copied to clipboard!'), className: "pfext-quick-start__base" }, "after-copy")) : (jsx(Tooltip, { triggerRef: () => element, content: getResource('Copy to clipboard'), className: "pfext-quick-start__base" }, "before-copy"));
1107
1090
  };
1108
- const MarkdownCopyClipboard = ({ docContext, rootSelector, }) => {
1091
+ const MarkdownCopyClipboard = ({ docContext, rootSelector }) => {
1109
1092
  const elements = docContext.querySelectorAll(`${rootSelector} [${MARKDOWN_COPY_BUTTON_ID}]`);
1110
- return elements.length > 0 ? (React.createElement(React.Fragment, null, Array.from(elements).map((elm) => {
1111
- const attributeValue = elm.getAttribute(MARKDOWN_COPY_BUTTON_ID);
1112
- return (React.createElement(CopyClipboard, { key: attributeValue, element: elm, rootSelector: rootSelector, docContext: docContext }));
1113
- }))) : null;
1093
+ return elements.length > 0 ? (jsx(Fragment$1, { children: Array.from(elements).map((elm) => {
1094
+ const attributeValue = elm.getAttribute(MARKDOWN_COPY_BUTTON_ID);
1095
+ return (jsx(CopyClipboard, { element: elm, rootSelector: rootSelector, docContext: docContext }, attributeValue));
1096
+ }) })) : null;
1114
1097
  };
1115
1098
 
1116
1099
  const removeTemplateWhitespace = (template) => template.replace(/>(?:\s|\n)+</g, '><');
1117
1100
 
1118
1101
  const useInlineCopyClipboardShowdownExtension = () => {
1119
- const { getResource } = React.useContext(QuickStartContext);
1120
- return React.useMemo(() => ({
1102
+ const { getResource } = useContext(QuickStartContext);
1103
+ return useMemo(() => ({
1121
1104
  type: 'lang',
1122
1105
  regex: /`([^`](.*?)[^`])`{{copy}}/g,
1123
1106
  replace: (text, group, _, groupId) => {
@@ -1129,7 +1112,7 @@ const useInlineCopyClipboardShowdownExtension = () => {
1129
1112
  <span class="pf-v6-c-clipboard-copy__actions">
1130
1113
  <span class="pf-v6-c-clipboard-copy__actions-item">
1131
1114
  <button class="pf-v6-c-button pf-m-plain" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupId}">
1132
- ${renderToStaticMarkup(React.createElement(CopyIcon, null))}
1115
+ ${renderToStaticMarkup(jsx(CopyIcon, {}))}
1133
1116
  </button>
1134
1117
  </span>
1135
1118
  </span>
@@ -1138,10 +1121,9 @@ const useInlineCopyClipboardShowdownExtension = () => {
1138
1121
  }), [getResource]);
1139
1122
  };
1140
1123
 
1141
- /* eslint-disable max-len */
1142
1124
  const useMultilineCopyClipboardShowdownExtension = () => {
1143
- const { getResource } = React.useContext(QuickStartContext);
1144
- return React.useMemo(() => ({
1125
+ const { getResource } = useContext(QuickStartContext);
1126
+ return useMemo(() => ({
1145
1127
  type: 'lang',
1146
1128
  regex: /```[\n]\s*((((?!```).)*?\n)+)\s*```{{copy}}/g,
1147
1129
  replace: (text, group, _1, _2, groupId) => {
@@ -1153,7 +1135,7 @@ const useMultilineCopyClipboardShowdownExtension = () => {
1153
1135
  <div class="pf-v6-c-code-block__actions">
1154
1136
  <div class="pf-v6-c-code-block__actions-item">
1155
1137
  <button class="pf-v6-c-button pf-m-plain" type="button" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupId}">
1156
- ${renderToStaticMarkup(React.createElement(CopyIcon, null))}
1138
+ ${renderToStaticMarkup(jsx(CopyIcon, {}))}
1157
1139
  </button>
1158
1140
  </div>
1159
1141
  </div>
@@ -1166,6 +1148,155 @@ const useMultilineCopyClipboardShowdownExtension = () => {
1166
1148
  }), [getResource]);
1167
1149
  };
1168
1150
 
1151
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
1152
+ const DOMPurify$2 = require('dompurify');
1153
+ var AdmonitionType;
1154
+ (function (AdmonitionType) {
1155
+ AdmonitionType["TIP"] = "TIP";
1156
+ AdmonitionType["NOTE"] = "NOTE";
1157
+ AdmonitionType["IMPORTANT"] = "IMPORTANT";
1158
+ AdmonitionType["WARNING"] = "WARNING";
1159
+ AdmonitionType["CAUTION"] = "CAUTION";
1160
+ })(AdmonitionType || (AdmonitionType = {}));
1161
+ const admonitionToAlertVariantMap = {
1162
+ [AdmonitionType.NOTE]: { variant: 'info' },
1163
+ [AdmonitionType.TIP]: { variant: 'custom', customIcon: jsx(LightbulbIcon, {}) },
1164
+ [AdmonitionType.IMPORTANT]: { variant: 'danger' },
1165
+ [AdmonitionType.CAUTION]: { variant: 'warning', customIcon: jsx(FireIcon, {}) },
1166
+ [AdmonitionType.WARNING]: { variant: 'warning' },
1167
+ };
1168
+ const useAdmonitionShowdownExtension = () =>
1169
+ // const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
1170
+ useMemo(() => ({
1171
+ type: 'lang',
1172
+ regex: /\[(.+)]{{(admonition) ([\w-]+)}}/g,
1173
+ replace: (text, content, admonitionLabel, admonitionType) => {
1174
+ if (!content || !admonitionLabel || !admonitionType) {
1175
+ return text;
1176
+ }
1177
+ if (admonitionLabel !== 'admonition') {
1178
+ return text;
1179
+ }
1180
+ admonitionType = admonitionType.toUpperCase();
1181
+ // Process markdown content directly using marked
1182
+ const processedContent = marked.parseInline(content);
1183
+ const sanitizedContent = DOMPurify$2.sanitize(processedContent);
1184
+ // Handle unknown admonition types by defaulting to NOTE
1185
+ const admonitionConfig = admonitionToAlertVariantMap[admonitionType] || admonitionToAlertVariantMap.NOTE;
1186
+ const { variant, customIcon } = admonitionConfig;
1187
+ const pfAlert = (jsx(Alert, Object.assign({ variant: variant }, (customIcon && { customIcon }), { isInline: true, title: admonitionType, className: "pfext-markdown-admonition" }, { children: jsx("div", { dangerouslySetInnerHTML: { __html: sanitizedContent } }) })));
1188
+ return removeTemplateWhitespace(renderToStaticMarkup(pfAlert));
1189
+ },
1190
+ }), []);
1191
+
1192
+ const useCodeShowdownExtension = () => useMemo(() => ({
1193
+ type: 'output',
1194
+ regex: /<pre><code>(.*?)\n?<\/code><\/pre>/g,
1195
+ replace: (text, content) => {
1196
+ if (!content) {
1197
+ return text;
1198
+ }
1199
+ const pfCodeBlock = jsx(CodeBlock, { children: content });
1200
+ return removeTemplateWhitespace(renderToStaticMarkup(pfCodeBlock));
1201
+ },
1202
+ }), []);
1203
+
1204
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
1205
+ const DOMPurify$1 = require('dompurify');
1206
+ const useAccordionShowdownExtension = () => useMemo(() => ({
1207
+ type: 'lang',
1208
+ regex: /\[(.+)]{{(accordion) (&quot;(.*?)&quot;)}}/g,
1209
+ replace: (_text, accordionContent, _command, _quotedHeading, accordionHeading) => {
1210
+ const accordionId = String(accordionHeading).replace(/\s/g, '-');
1211
+ // Process accordion content with markdown
1212
+ const processedContent = marked.parseInline(accordionContent);
1213
+ const sanitizedContent = DOMPurify$1.sanitize(processedContent);
1214
+ return removeTemplateWhitespace(renderToStaticMarkup(jsx(Accordion, { children: jsxs(AccordionItem, { children: [jsx(AccordionToggle, Object.assign({ id: `${ACCORDION_MARKDOWN_BUTTON_ID}-${accordionId}` }, { children: accordionHeading })), jsx(AccordionContent, Object.assign({ id: `${ACCORDION_MARKDOWN_CONTENT_ID}-${accordionId}`, hidden: true }, { children: jsx("div", { dangerouslySetInnerHTML: { __html: sanitizedContent } }) }))] }) })));
1215
+ },
1216
+ }), []);
1217
+
1218
+ const AccordionShowdownHandler = ({ buttonElement, contentElement, }) => {
1219
+ const [expanded, setExpanded] = useState(false);
1220
+ const handleClick = () => {
1221
+ const newExpanded = !expanded;
1222
+ const expandedModifier = 'pf-m-expanded';
1223
+ // Find the accordion item element (parent of the button)
1224
+ const accordionItem = buttonElement.closest('.pf-v6-c-accordion__item');
1225
+ // Update button - both visual state and aria-expanded
1226
+ buttonElement.className = `pf-v6-c-accordion__toggle ${newExpanded ? expandedModifier : ''}`;
1227
+ buttonElement.setAttribute('aria-expanded', newExpanded.toString());
1228
+ // Update content - both visual state and hidden attribute
1229
+ contentElement.hidden = !newExpanded;
1230
+ contentElement.className = `pf-v6-c-accordion__expandable-content ${newExpanded ? expandedModifier : ''}`;
1231
+ // Update accordion item
1232
+ if (accordionItem) {
1233
+ accordionItem.className = `pf-v6-c-accordion__item ${newExpanded ? expandedModifier : ''}`;
1234
+ }
1235
+ setExpanded(newExpanded);
1236
+ };
1237
+ useEventListener(buttonElement, 'click', handleClick);
1238
+ return jsx(Fragment$1, {});
1239
+ };
1240
+ const AccordionRenderExtension = ({ docContext }) => {
1241
+ const buttonElements = docContext.querySelectorAll(`[id ^= ${ACCORDION_MARKDOWN_BUTTON_ID}]`);
1242
+ const contentElements = docContext.querySelectorAll(`[id ^= ${ACCORDION_MARKDOWN_CONTENT_ID}]`);
1243
+ return buttonElements.length > 0 ? (jsx(Fragment$1, { children: Array.from(buttonElements).map((elm) => {
1244
+ const content = Array.from(contentElements).find((elm2) => {
1245
+ const elmId = elm.id.split(ACCORDION_MARKDOWN_BUTTON_ID)[1];
1246
+ const elm2Id = elm2.id.split(ACCORDION_MARKDOWN_CONTENT_ID)[1];
1247
+ return elmId === elm2Id;
1248
+ });
1249
+ return (jsx(AccordionShowdownHandler, { buttonElement: elm, contentElement: content }, elm.id.split(ACCORDION_MARKDOWN_BUTTON_ID)[1]));
1250
+ }) })) : null;
1251
+ };
1252
+
1253
+ const FallbackImg = ({ src, alt, className, fallback }) => {
1254
+ const [isSrcValid, setIsSrcValid] = useState(true);
1255
+ if (src && isSrcValid) {
1256
+ return jsx("img", { className: className, src: src, alt: alt, onError: () => setIsSrcValid(false) });
1257
+ }
1258
+ return jsx(Fragment$1, { children: fallback });
1259
+ };
1260
+
1261
+ const DASH = '-';
1262
+
1263
+ const PopoverStatus = ({ hideHeader, children, isVisible = null, statusBody, title, onHide, onShow, }) => (jsx(Popover, Object.assign({ position: PopoverPosition.right, headerContent: hideHeader ? null : title, bodyContent: children, "aria-label": title, onHide: onHide, onShow: onShow, isVisible: isVisible }, { children: jsx(Button, Object.assign({ variant: "link", isInline: true }, { children: statusBody })) })));
1264
+
1265
+ const StatusIconAndText = ({ icon, title, spin, iconOnly, noTooltip, className, }) => {
1266
+ if (!title) {
1267
+ return jsx(Fragment$1, { children: DASH });
1268
+ }
1269
+ return (jsxs("span", Object.assign({ className: css('pfext-icon-and-text', className), title: iconOnly && !noTooltip ? title : undefined }, { children: [icon &&
1270
+ cloneElement(icon, {
1271
+ className: css(spin && 'fa-spin', icon.props.className, !iconOnly && 'pfext-icon-and-text__icon pfext-icon-flex-child'),
1272
+ }), !iconOnly && jsx(CamelCaseWrap, { value: title, dataTest: "status-text" })] })));
1273
+ };
1274
+
1275
+ const GenericStatus = (props) => {
1276
+ const { Icon, children, popoverTitle, title, noTooltip, iconOnly } = props, restProps = __rest(props, ["Icon", "children", "popoverTitle", "title", "noTooltip", "iconOnly"]);
1277
+ const renderIcon = iconOnly && !noTooltip ? jsx(Icon, { title: title }) : jsx(Icon, {});
1278
+ const statusBody = (jsx(StatusIconAndText, Object.assign({}, restProps, { noTooltip: noTooltip, title: title, iconOnly: iconOnly, icon: renderIcon })));
1279
+ return Children.toArray(children).length ? (jsx(PopoverStatus, Object.assign({ title: popoverTitle || title }, restProps, { statusBody: statusBody }, { children: children }))) : (statusBody);
1280
+ };
1281
+
1282
+ const GreenCheckCircleIcon = ({ className, title, size }) => (jsx(Icon, Object.assign({ size: size, status: "success" }, { children: jsx(CheckCircleIcon, { "data-test": "success-icon", className: className, title: title }) })));
1283
+
1284
+ const SuccessStatus = (props) => (jsx(GenericStatus, Object.assign({}, props, { Icon: GreenCheckCircleIcon, title: props.title || 'Healthy' })));
1285
+ SuccessStatus.displayName = 'SuccessStatus';
1286
+
1287
+ const Status = ({ status, title, iconOnly, noTooltip, className }) => {
1288
+ const statusProps = { title: title || status, iconOnly, noTooltip, className };
1289
+ switch (status) {
1290
+ case 'In Progress':
1291
+ return jsx(StatusIconAndText, Object.assign({}, statusProps, { icon: jsx(SyncAltIcon, {}) }));
1292
+ case 'Complete':
1293
+ return jsx(SuccessStatus, Object.assign({}, statusProps));
1294
+ default:
1295
+ return jsx(Fragment$1, { children: status || DASH });
1296
+ }
1297
+ };
1298
+ const StatusIcon = ({ status }) => jsx(Status, { status: status, iconOnly: true });
1299
+
1169
1300
  // eslint-disable-next-line @typescript-eslint/no-require-imports
1170
1301
  const DOMPurify = require('dompurify');
1171
1302
  const markdownConvert = (markdown, extensions) => __awaiter(void 0, void 0, void 0, function* () {
@@ -1177,7 +1308,7 @@ const markdownConvert = (markdown, extensions) => __awaiter(void 0, void 0, void
1177
1308
  node.setAttribute('rel', 'noopener noreferrer');
1178
1309
  return node;
1179
1310
  }
1180
- // add PF content classes
1311
+ // add PF content classes to standard elements (details blocks get handled separately)
1181
1312
  if (node.nodeType === 1) {
1182
1313
  const contentElements = [
1183
1314
  'ul',
@@ -1228,13 +1359,82 @@ const markdownConvert = (markdown, extensions) => __awaiter(void 0, void 0, void
1228
1359
  const reversedMarkdown = reverseString(markdown);
1229
1360
  const reverseMarkdownWithSubstitutedCodeFences = reversedMarkdown.replace(/{{```((.|\n)*?)```/g, '{{@@@$1@@@');
1230
1361
  const markdownWithSubstitutedCodeFences = reverseString(reverseMarkdownWithSubstitutedCodeFences);
1231
- const parsedMarkdown = yield marked.parse(markdownWithSubstitutedCodeFences);
1362
+ // Fix malformed HTML entities early in the process
1363
+ let preprocessedMarkdown = markdownWithSubstitutedCodeFences;
1364
+ preprocessedMarkdown = preprocessedMarkdown
1365
+ .replace(/&nbsp([^;])/g, '&nbsp;$1')
1366
+ .replace(/&amp;nbsp;/g, '&nbsp;');
1367
+ preprocessedMarkdown = preprocessedMarkdown.replace(/&nbsp(?![;])/g, '&nbsp;');
1368
+ // Process content in segments to ensure markdown parsing continues after HTML blocks
1369
+ const htmlBlockRegex = /(<(?:details|div|section|article)[^>]*>[\s\S]*?<\/(?:details|div|section|article)>)/g;
1370
+ let parsedMarkdown = '';
1371
+ // Check if there are any HTML blocks
1372
+ if (htmlBlockRegex.test(preprocessedMarkdown)) {
1373
+ // Reset regex for actual processing
1374
+ htmlBlockRegex.lastIndex = 0;
1375
+ let lastIndex = 0;
1376
+ let match;
1377
+ while ((match = htmlBlockRegex.exec(preprocessedMarkdown)) !== null) {
1378
+ // Process markdown before the HTML block
1379
+ const markdownBefore = preprocessedMarkdown.slice(lastIndex, match.index).trim();
1380
+ if (markdownBefore) {
1381
+ const parsed = yield marked.parse(markdownBefore);
1382
+ parsedMarkdown += parsed;
1383
+ }
1384
+ // Process the HTML block: parse markdown content inside while preserving HTML structure
1385
+ let htmlBlock = match[1];
1386
+ // Find and process markdown content inside HTML tags
1387
+ const contentRegex = />(\s*[\s\S]*?)\s*</g;
1388
+ const contentMatches = [];
1389
+ let contentMatch;
1390
+ while ((contentMatch = contentRegex.exec(htmlBlock)) !== null) {
1391
+ const content = contentMatch[1];
1392
+ // Only process content that has markdown formatting but no extension syntax
1393
+ if (content.trim() &&
1394
+ !content.includes('{{') &&
1395
+ (content.includes('**') || content.includes('- ') || content.includes('\n'))) {
1396
+ // This looks like markdown content without extensions - parse it as block content
1397
+ const parsedContent = yield marked.parse(content.trim());
1398
+ // Remove wrapping <p> tags if they exist since we're inside HTML already
1399
+ const cleanedContent = parsedContent.replace(/^<p[^>]*>([\s\S]*)<\/p>[\s]*$/g, '$1');
1400
+ contentMatches.push({
1401
+ original: contentMatch[0],
1402
+ replacement: `>${cleanedContent}<`,
1403
+ });
1404
+ }
1405
+ }
1406
+ // Apply the content replacements
1407
+ contentMatches.forEach(({ original, replacement }) => {
1408
+ htmlBlock = htmlBlock.replace(original, replacement);
1409
+ });
1410
+ // Apply extensions (like admonitions) to the processed HTML block
1411
+ if (extensions) {
1412
+ extensions.forEach(({ regex, replace }) => {
1413
+ if (regex) {
1414
+ htmlBlock = htmlBlock.replace(regex, replace);
1415
+ }
1416
+ });
1417
+ }
1418
+ parsedMarkdown += htmlBlock;
1419
+ lastIndex = htmlBlockRegex.lastIndex;
1420
+ }
1421
+ // Process any remaining markdown after the last HTML block
1422
+ const markdownAfter = preprocessedMarkdown.slice(lastIndex).trim();
1423
+ if (markdownAfter) {
1424
+ const parsed = yield marked.parse(markdownAfter);
1425
+ parsedMarkdown += parsed;
1426
+ }
1427
+ }
1428
+ else {
1429
+ // No HTML blocks found, process normally
1430
+ parsedMarkdown = yield marked.parse(preprocessedMarkdown);
1431
+ }
1232
1432
  // Swap the temporary tokens back to code fences before we run the extensions
1233
1433
  let md = parsedMarkdown.replace(/@@@/g, '```');
1234
1434
  if (extensions) {
1235
1435
  // Convert code spans back to md format before we run the custom extension regexes
1236
1436
  md = md.replace(/<code>(.*)<\/code>/g, '`$1`');
1237
- extensions.forEach(({ regex, replace }) => {
1437
+ extensions.forEach(({ regex, replace }, _index) => {
1238
1438
  if (regex) {
1239
1439
  md = md.replace(regex, replace);
1240
1440
  }
@@ -1245,9 +1445,9 @@ const markdownConvert = (markdown, extensions) => __awaiter(void 0, void 0, void
1245
1445
  return DOMPurify.sanitize(md);
1246
1446
  });
1247
1447
  const SyncMarkdownView = ({ content, emptyMsg, extensions, renderExtension, exactHeight, inline, className, }) => {
1248
- const { getResource } = React.useContext(QuickStartContext);
1249
- const [markup, setMarkup] = React.useState('');
1250
- React.useEffect(() => {
1448
+ const { getResource } = useContext(QuickStartContext);
1449
+ const [markup, setMarkup] = useState('');
1450
+ useEffect(() => {
1251
1451
  function getMd() {
1252
1452
  return __awaiter(this, void 0, void 0, function* () {
1253
1453
  const md = yield markdownConvert(content || emptyMsg || getResource('Not available'), extensions);
@@ -1263,7 +1463,7 @@ const SyncMarkdownView = ({ content, emptyMsg, extensions, renderExtension, exac
1263
1463
  isEmpty: !content,
1264
1464
  className,
1265
1465
  };
1266
- return inline ? React.createElement(InlineMarkdownView, Object.assign({}, innerProps)) : React.createElement(IFrameMarkdownView, Object.assign({}, innerProps));
1466
+ return inline ? jsx(InlineMarkdownView, Object.assign({}, innerProps)) : jsx(IFrameMarkdownView, Object.assign({}, innerProps));
1267
1467
  };
1268
1468
  const uniqueId = (function () {
1269
1469
  let num = 0;
@@ -1275,8 +1475,8 @@ const uniqueId = (function () {
1275
1475
  })();
1276
1476
  const RenderExtension = ({ renderExtension, selector, markup, docContext, }) => {
1277
1477
  const forceRender = useForceRender();
1278
- const markupRef = React.useRef(null);
1279
- const shouldRenderExtension = React.useCallback(() => {
1478
+ const markupRef = useRef(null);
1479
+ const shouldRenderExtension = useCallback(() => {
1280
1480
  if (markupRef.current === markup) {
1281
1481
  return true;
1282
1482
  }
@@ -1289,25 +1489,23 @@ const RenderExtension = ({ renderExtension, selector, markup, docContext, }) =>
1289
1489
  * which causes the component rendered by renderExtension to receive old copy of document
1290
1490
  * use forceRender to delay the rendering of extension by one render cycle
1291
1491
  */
1292
- React.useEffect(() => {
1492
+ useEffect(() => {
1293
1493
  if (renderExtension) {
1294
1494
  forceRender();
1295
1495
  }
1296
1496
  // eslint-disable-next-line react-hooks/exhaustive-deps
1297
1497
  }, [markup]);
1298
- return (React.createElement(React.Fragment, null, shouldRenderExtension() ? renderExtension === null || renderExtension === void 0 ? void 0 : renderExtension(docContext !== null && docContext !== void 0 ? docContext : document, selector) : null));
1498
+ return (jsx(Fragment$1, { children: shouldRenderExtension() ? renderExtension === null || renderExtension === void 0 ? void 0 : renderExtension(docContext !== null && docContext !== void 0 ? docContext : document, selector) : null }));
1299
1499
  };
1300
1500
  const InlineMarkdownView = ({ markup, isEmpty, renderExtension, className, }) => {
1301
- const id = React.useMemo(() => uniqueId('markdown'), []);
1302
- return (React.createElement("div", { className: css({ 'is-empty': isEmpty }, className), id: id },
1303
- React.createElement("div", { dangerouslySetInnerHTML: { __html: markup } }),
1304
- renderExtension && (React.createElement(RenderExtension, { renderExtension: renderExtension, selector: `#${id}`, markup: markup }))));
1501
+ const id = useMemo(() => uniqueId('markdown'), []);
1502
+ return (jsxs("div", Object.assign({ className: css({ 'is-empty': isEmpty }, className), id: id }, { children: [jsx("div", { style: { marginBlockEnd: 'var(--pf-t-global--spacer--md)' }, dangerouslySetInnerHTML: { __html: markup } }), renderExtension && (jsx(RenderExtension, { renderExtension: renderExtension, selector: `#${id}`, markup: markup }))] })));
1305
1503
  };
1306
1504
  const IFrameMarkdownView = ({ exactHeight, markup, isEmpty, renderExtension, className, }) => {
1307
- const [frame, setFrame] = React.useState();
1308
- const [loaded, setLoaded] = React.useState(false);
1309
- const updateTimeoutHandle = React.useRef();
1310
- const updateDimensions = React.useCallback(() => {
1505
+ const [frame, setFrame] = useState();
1506
+ const [loaded, setLoaded] = useState(false);
1507
+ const updateTimeoutHandle = useRef(null);
1508
+ const updateDimensions = useCallback(() => {
1311
1509
  var _a;
1312
1510
  if (!((_a = frame === null || frame === void 0 ? void 0 : frame.contentWindow) === null || _a === void 0 ? void 0 : _a.document.body.firstChild)) {
1313
1511
  return;
@@ -1324,10 +1522,10 @@ const IFrameMarkdownView = ({ exactHeight, markup, isEmpty, renderExtension, cla
1324
1522
  }
1325
1523
  });
1326
1524
  }, [frame, exactHeight]);
1327
- React.useEffect(() => () => {
1525
+ useEffect(() => () => {
1328
1526
  clearTimeout(updateTimeoutHandle.current);
1329
1527
  }, []);
1330
- const onLoad = React.useCallback(() => {
1528
+ const onLoad = useCallback(() => {
1331
1529
  updateDimensions();
1332
1530
  setLoaded(true);
1333
1531
  }, [updateDimensions]);
@@ -1360,9 +1558,9 @@ const IFrameMarkdownView = ({ exactHeight, markup, isEmpty, renderExtension, cla
1360
1558
  }
1361
1559
  </style>
1362
1560
  <body class="pf-m-redhat-font"><div style="overflow-y: auto;">${markup}</div></body>`;
1363
- return (React.createElement(React.Fragment, null,
1364
- React.createElement("iframe", { sandbox: "allow-popups allow-popups-to-escape-sandbox allow-same-origin", srcDoc: contents, style: { border: '0px', display: 'block', width: '100%', height: '0' }, ref: (r) => setFrame(r), onLoad: () => onLoad(), className: className }),
1365
- loaded && frame && renderExtension && (React.createElement(RenderExtension, { markup: markup, selector: '', renderExtension: renderExtension, docContext: frame.contentDocument }))));
1561
+ return (jsxs(Fragment$1, { children: [jsx("iframe", { title: "Markdown content preview", sandbox: "allow-popups allow-popups-to-escape-sandbox allow-same-origin", srcDoc: contents, style: { border: '0px', display: 'block', width: '100%', height: '0' }, ref: (r) => {
1562
+ setFrame(r);
1563
+ }, onLoad: () => onLoad(), className: className }), loaded && frame && renderExtension && (jsx(RenderExtension, { markup: markup, selector: '', renderExtension: renderExtension, docContext: frame.contentDocument }))] }));
1366
1564
  };
1367
1565
 
1368
1566
  const LINK_LABEL = '[\\d\\w\\s-()$!]+';
@@ -1372,13 +1570,13 @@ const SELECTOR_ID = `[\\w-]+`;
1372
1570
  const HIGHLIGHT_REGEXP = new RegExp(`\\[(${LINK_LABEL})]{{(${HIGHLIGHT_ACTIONS.join('|')}) (${SELECTOR_ID})}}`, 'g');
1373
1571
 
1374
1572
  const QuickStartMarkdownView = ({ content, exactHeight, className, }) => {
1375
- const { markdown } = React.useContext(QuickStartContext);
1573
+ const { markdown } = useContext(QuickStartContext);
1376
1574
  const inlineCopyClipboardShowdownExtension = useInlineCopyClipboardShowdownExtension();
1377
1575
  const multilineCopyClipboardShowdownExtension = useMultilineCopyClipboardShowdownExtension();
1378
1576
  const admonitionShowdownExtension = useAdmonitionShowdownExtension();
1379
1577
  const codeShowdownExtension = useCodeShowdownExtension();
1380
1578
  const accordionShowdownExtension = useAccordionShowdownExtension();
1381
- return (React.createElement(SyncMarkdownView, { inline: true, content: content, exactHeight: exactHeight, extensions: [
1579
+ return (jsx(SyncMarkdownView, { inline: true, content: content, exactHeight: exactHeight, extensions: [
1382
1580
  {
1383
1581
  type: 'lang',
1384
1582
  regex: HIGHLIGHT_REGEXP,
@@ -1403,203 +1601,45 @@ const QuickStartMarkdownView = ({ content, exactHeight, className, }) => {
1403
1601
  codeShowdownExtension,
1404
1602
  accordionShowdownExtension,
1405
1603
  ...(markdown ? markdown.extensions : []),
1406
- ], renderExtension: (docContext, rootSelector) => (React.createElement(React.Fragment, null,
1407
- React.createElement(AccordionRenderExtension, { docContext: docContext }),
1408
- React.createElement(MarkdownHighlightExtension, { docContext: docContext, rootSelector: rootSelector }),
1409
- React.createElement(MarkdownCopyClipboard, { docContext: docContext, rootSelector: rootSelector }),
1410
- markdown &&
1411
- markdown.renderExtension &&
1412
- markdown.renderExtension(docContext, rootSelector))), className: className }));
1413
- };
1414
-
1415
- var AdmonitionType;
1416
- (function (AdmonitionType) {
1417
- AdmonitionType["TIP"] = "TIP";
1418
- AdmonitionType["NOTE"] = "NOTE";
1419
- AdmonitionType["IMPORTANT"] = "IMPORTANT";
1420
- AdmonitionType["WARNING"] = "WARNING";
1421
- AdmonitionType["CAUTION"] = "CAUTION";
1422
- })(AdmonitionType || (AdmonitionType = {}));
1423
- const admonitionToAlertVariantMap = {
1424
- [AdmonitionType.NOTE]: { variant: 'info' },
1425
- [AdmonitionType.TIP]: { variant: 'custom', customIcon: React.createElement(LightbulbIcon, null) },
1426
- [AdmonitionType.IMPORTANT]: { variant: 'danger' },
1427
- [AdmonitionType.CAUTION]: { variant: 'warning', customIcon: React.createElement(FireIcon, null) },
1428
- [AdmonitionType.WARNING]: { variant: 'warning' },
1429
- };
1430
- const useAdmonitionShowdownExtension = () =>
1431
- // const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
1432
- React.useMemo(() => ({
1433
- type: 'lang',
1434
- regex: /\[(.+)]{{(admonition) ([\w-]+)}}/g,
1435
- replace: (text, content, admonitionLabel, admonitionType, groupId) => {
1436
- if (!content || !admonitionLabel || !admonitionType || !groupId) {
1437
- return text;
1438
- }
1439
- admonitionType = admonitionType.toUpperCase();
1440
- const { variant, customIcon } = admonitionToAlertVariantMap[admonitionType];
1441
- const mdContent = React.createElement(QuickStartMarkdownView, { content: content });
1442
- const pfAlert = (React.createElement(Alert, Object.assign({ variant: variant }, (customIcon && { customIcon }), { isInline: true, title: admonitionType, className: "pfext-markdown-admonition" }), mdContent));
1443
- return removeTemplateWhitespace(renderToStaticMarkup(pfAlert));
1444
- },
1445
- }), []);
1446
-
1447
- const useCodeShowdownExtension = () => React.useMemo(() => ({
1448
- type: 'output',
1449
- regex: /<pre><code>(.*?)\n?<\/code><\/pre>/g,
1450
- replace: (text, content) => {
1451
- if (!content) {
1452
- return text;
1453
- }
1454
- const pfCodeBlock = React.createElement(CodeBlock, null, content);
1455
- return removeTemplateWhitespace(renderToStaticMarkup(pfCodeBlock));
1456
- },
1457
- }), []);
1458
-
1459
- const useAccordionShowdownExtension = () => React.useMemo(() => ({
1460
- type: 'lang',
1461
- regex: /\[(.+)]{{(accordion) ("(.*?)")}}/g,
1462
- replace: (_text, accordionContent, _command, accordionHeading) => {
1463
- const accordionId = String(accordionHeading).replace(/\s/g, '-');
1464
- return removeTemplateWhitespace(renderToStaticMarkup(React.createElement(React.Fragment, null,
1465
- React.createElement(Accordion, { asDefinitionList: true },
1466
- React.createElement(AccordionItem, { isExpanded: false },
1467
- React.createElement(AccordionToggle, { id: `${ACCORDION_MARKDOWN_BUTTON_ID}-${accordionId}` }, accordionHeading),
1468
- React.createElement(AccordionContent, { id: `${ACCORDION_MARKDOWN_CONTENT_ID}-${accordionId}` }, accordionContent))))));
1469
- },
1470
- }), []);
1471
-
1472
- const AccordionShowdownHandler = ({ buttonElement, contentElement, }) => {
1473
- const [expanded, setExpanded] = React.useState(false);
1474
- const handleClick = () => {
1475
- const expandedModifier = 'pf-m-expanded';
1476
- buttonElement.className = `pf-v6-c-accordion__toggle ${!expanded ? expandedModifier : ''}`;
1477
- contentElement.hidden = expanded;
1478
- contentElement.className = `pf-v6-c-accordion__expanded-content ${!expanded ? expandedModifier : ''}`;
1479
- setExpanded(!expanded);
1480
- };
1481
- useEventListener(buttonElement, 'click', handleClick);
1482
- return React.createElement(React.Fragment, null);
1483
- };
1484
- const AccordionRenderExtension = ({ docContext }) => {
1485
- const buttonElements = docContext.querySelectorAll(`[id ^= ${ACCORDION_MARKDOWN_BUTTON_ID}]`);
1486
- const contentElements = docContext.querySelectorAll(`[id ^= ${ACCORDION_MARKDOWN_CONTENT_ID}]`);
1487
- return buttonElements.length > 0 ? (React.createElement(React.Fragment, null, Array.from(buttonElements).map((elm) => {
1488
- const content = Array.from(contentElements).find((elm2) => {
1489
- const elmId = elm.id.split(ACCORDION_MARKDOWN_BUTTON_ID)[1];
1490
- const elm2Id = elm2.id.split(ACCORDION_MARKDOWN_CONTENT_ID)[1];
1491
- return elmId === elm2Id;
1492
- });
1493
- return (React.createElement(AccordionShowdownHandler, { key: elm.id.split(ACCORDION_MARKDOWN_BUTTON_ID)[1], buttonElement: elm, contentElement: content }));
1494
- }))) : null;
1495
- };
1496
-
1497
- const FallbackImg = ({ src, alt, className, fallback }) => {
1498
- const [isSrcValid, setIsSrcValid] = React.useState(true);
1499
- if (src && isSrcValid) {
1500
- return React.createElement("img", { className: className, src: src, alt: alt, onError: () => setIsSrcValid(false) });
1501
- }
1502
- return React.createElement(React.Fragment, null, fallback);
1503
- };
1504
-
1505
- const DASH = '-';
1506
-
1507
- const PopoverStatus = ({ hideHeader, children, isVisible = null, statusBody, title, onHide, onShow, }) => (React.createElement(Popover, { position: PopoverPosition.right, headerContent: hideHeader ? null : title, bodyContent: children, "aria-label": title, onHide: onHide, onShow: onShow, isVisible: isVisible },
1508
- React.createElement(Button, { variant: "link", isInline: true }, statusBody)));
1509
-
1510
- const StatusIconAndText = ({ icon, title, spin, iconOnly, noTooltip, className, }) => {
1511
- if (!title) {
1512
- return React.createElement(React.Fragment, null, DASH);
1513
- }
1514
- return (React.createElement("span", { className: css('pfext-icon-and-text', className), title: iconOnly && !noTooltip ? title : undefined },
1515
- icon &&
1516
- React.cloneElement(icon, {
1517
- className: css(spin && 'fa-spin', icon.props.className, !iconOnly && 'pfext-icon-and-text__icon pfext-icon-flex-child'),
1518
- }),
1519
- !iconOnly && React.createElement(CamelCaseWrap, { value: title, dataTest: "status-text" })));
1520
- };
1521
-
1522
- const GenericStatus = (props) => {
1523
- const { Icon, children, popoverTitle, title, noTooltip, iconOnly } = props, restProps = __rest(props, ["Icon", "children", "popoverTitle", "title", "noTooltip", "iconOnly"]);
1524
- const renderIcon = iconOnly && !noTooltip ? React.createElement(Icon, { title: title }) : React.createElement(Icon, null);
1525
- const statusBody = (React.createElement(StatusIconAndText, Object.assign({}, restProps, { noTooltip: noTooltip, title: title, iconOnly: iconOnly, icon: renderIcon })));
1526
- return React.Children.toArray(children).length ? (React.createElement(PopoverStatus, Object.assign({ title: popoverTitle || title }, restProps, { statusBody: statusBody }), children)) : (statusBody);
1527
- };
1528
-
1529
- const GreenCheckCircleIcon = ({ className, title, size }) => (React.createElement(Icon, { size: size, status: "success" },
1530
- React.createElement(CheckCircleIcon, { "data-test": "success-icon", className: className, title: title })));
1531
-
1532
- const SuccessStatus = (props) => (React.createElement(GenericStatus, Object.assign({}, props, { Icon: GreenCheckCircleIcon, title: props.title || 'Healthy' })));
1533
- SuccessStatus.displayName = 'SuccessStatus';
1534
-
1535
- const Status = ({ status, title, iconOnly, noTooltip, className, }) => {
1536
- const statusProps = { title: title || status, iconOnly, noTooltip, className };
1537
- switch (status) {
1538
- case 'In Progress':
1539
- return React.createElement(StatusIconAndText, Object.assign({}, statusProps, { icon: React.createElement(SyncAltIcon, null) }));
1540
- case 'Complete':
1541
- return React.createElement(SuccessStatus, Object.assign({}, statusProps));
1542
- default:
1543
- return React.createElement(React.Fragment, null, status || DASH);
1544
- }
1604
+ ], renderExtension: (docContext, rootSelector) => (jsxs(Fragment$1, { children: [jsx(AccordionRenderExtension, { docContext: docContext }), jsx(MarkdownHighlightExtension, { docContext: docContext, rootSelector: rootSelector }), jsx(MarkdownCopyClipboard, { docContext: docContext, rootSelector: rootSelector }), markdown &&
1605
+ markdown.renderExtension &&
1606
+ markdown.renderExtension(docContext, rootSelector)] })), className: className }));
1545
1607
  };
1546
- const StatusIcon = ({ status }) => (React.createElement(Status, { status: status, iconOnly: true }));
1547
1608
 
1548
1609
  const QuickStartTileDescription = ({ description, prerequisites, }) => {
1549
- const { getResource } = React.useContext(QuickStartContext);
1610
+ const { getResource } = useContext(QuickStartContext);
1550
1611
  const prereqs = prerequisites === null || prerequisites === void 0 ? void 0 : prerequisites.filter((p) => p);
1551
- const buttonRef = React.useRef(null);
1552
- return (React.createElement(React.Fragment, null,
1553
- React.createElement(QuickStartMarkdownView, { content: description }),
1554
- (prereqs === null || prereqs === void 0 ? void 0 : prereqs.length) > 0 && (React.createElement(Flex, { spaceItems: { default: 'spaceItemsSm' } },
1555
- React.createElement("h5", null,
1556
- getResource('Prerequisites ({{totalPrereqs}})').replace('{{totalPrereqs}}', prereqs.length),
1557
- ' '),
1558
- React.createElement(Button, { variant: "link", isInline: true, "data-testid": "qs-card-prereqs", ref: buttonRef, onClick: (e) => {
1559
- e.preventDefault();
1560
- e.stopPropagation();
1561
- }, "aria-label": getResource('Show prerequisites') },
1562
- React.createElement(InfoCircleIcon, null)),
1563
- React.createElement(Popover, { "aria-label": getResource('Prerequisites'), headerContent: getResource('Prerequisites'), triggerRef: buttonRef, bodyContent: React.createElement("div", null,
1564
- React.createElement("ul", { "aria-label": getResource('Prerequisites') }, prereqs.map((prerequisite, index) => (
1565
- // eslint-disable-next-line react/no-array-index-key
1566
- React.createElement("li", { key: index },
1567
- React.createElement(QuickStartMarkdownView, { content: prerequisite })))))) })))));
1612
+ const buttonRef = useRef(null);
1613
+ return (jsxs(Fragment$1, { children: [jsx(QuickStartMarkdownView, { content: description }), (prereqs === null || prereqs === void 0 ? void 0 : prereqs.length) > 0 && (jsxs(Flex, Object.assign({ spaceItems: { default: 'spaceItemsSm' } }, { children: [jsxs("h5", { children: [getResource('Prerequisites ({{totalPrereqs}})').replace('{{totalPrereqs}}', prereqs.length), ' '] }), jsx(Button, Object.assign({ variant: "link", isInline: true, "data-testid": "qs-card-prereqs", ref: buttonRef, onClick: (e) => {
1614
+ e.preventDefault();
1615
+ e.stopPropagation();
1616
+ }, "aria-label": getResource('Show prerequisites') }, { children: jsx(InfoCircleIcon, {}) })), jsx(Popover, { "aria-label": getResource('Prerequisites'), headerContent: getResource('Prerequisites'), triggerRef: buttonRef, bodyContent: jsx("div", { children: jsx("ul", Object.assign({ "aria-label": getResource('Prerequisites') }, { children: prereqs.map((prerequisite, index) => (
1617
+ // eslint-disable-next-line react/no-array-index-key
1618
+ jsx("li", { children: jsx(QuickStartMarkdownView, { content: prerequisite }) }, index))) })) }) })] })))] }));
1568
1619
  };
1569
1620
 
1570
1621
  const QuickStartTileFooter = ({ quickStartId, status, totalTasks, onClickContinue, }) => {
1571
- const { getResource } = React.useContext(QuickStartContext);
1572
- const { activeQuickStartID, startQuickStart, restartQuickStart } = React.useContext(QuickStartContext);
1573
- const start = React.useCallback(() => {
1622
+ const { getResource } = useContext(QuickStartContext);
1623
+ const { activeQuickStartID, startQuickStart, restartQuickStart } = useContext(QuickStartContext);
1624
+ const start = useCallback(() => {
1574
1625
  startQuickStart(quickStartId, totalTasks);
1575
1626
  }, [quickStartId, startQuickStart, totalTasks]);
1576
- const restart = React.useCallback(() => {
1627
+ const restart = useCallback(() => {
1577
1628
  restartQuickStart(quickStartId, totalTasks);
1578
1629
  }, [quickStartId, restartQuickStart, totalTasks]);
1579
- return (React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
1580
- status === QuickStartStatus.NOT_STARTED && (React.createElement(FlexItem, null,
1581
- React.createElement(Button, { onClick: start, variant: "link", isInline: true, "data-testid": "qs-card-notStarted-start", id: `${quickStartId}-start`, "aria-labelledby": `${quickStartId}-start ${quickStartId}` }, getResource('Start')))),
1582
- status === QuickStartStatus.IN_PROGRESS && activeQuickStartID !== quickStartId && (React.createElement(FlexItem, null,
1583
- React.createElement(Button, { variant: "link", onClick: onClickContinue, isInline: true, "data-testid": "qs-card-inProgress-resume", id: `${quickStartId}-continue`, "aria-labelledby": `${quickStartId}-continue ${quickStartId}` }, getResource('Continue')))),
1584
- status === QuickStartStatus.COMPLETE && (React.createElement(FlexItem, null,
1585
- React.createElement(Button, { onClick: restart, variant: "link", isInline: true, "data-testid": "qs-card-complete-restart", id: `${quickStartId}-restart`, "aria-labelledby": `${quickStartId}-restart ${quickStartId}` }, getResource('Restart')))),
1586
- status === QuickStartStatus.IN_PROGRESS && (React.createElement(FlexItem, null,
1587
- React.createElement(Button, { onClick: restart, variant: "link", isInline: true, "data-testid": "qs-card-inProgress-restart", id: `${quickStartId}-restart`, "aria-labelledby": `${quickStartId}-restart ${quickStartId}` }, getResource('Restart'))))));
1588
- };
1589
-
1590
- const QuickStartTileFooterExternal = ({ link, quickStartId, }) => {
1630
+ return (jsxs(Flex, Object.assign({ justifyContent: { default: 'justifyContentSpaceBetween' } }, { children: [status === QuickStartStatus.NOT_STARTED && (jsx(FlexItem, { children: jsx(Button, Object.assign({ onClick: start, variant: "link", isInline: true, "data-testid": "qs-card-notStarted-start", id: `${quickStartId}-start`, "aria-labelledby": `${quickStartId}-start ${quickStartId}` }, { children: getResource('Start') })) })), status === QuickStartStatus.IN_PROGRESS && activeQuickStartID !== quickStartId && (jsx(FlexItem, { children: jsx(Button, Object.assign({ variant: "link", onClick: onClickContinue, isInline: true, "data-testid": "qs-card-inProgress-resume", id: `${quickStartId}-continue`, "aria-labelledby": `${quickStartId}-continue ${quickStartId}` }, { children: getResource('Continue') })) })), status === QuickStartStatus.COMPLETE && (jsx(FlexItem, { children: jsx(Button, Object.assign({ onClick: restart, variant: "link", isInline: true, "data-testid": "qs-card-complete-restart", id: `${quickStartId}-restart`, "aria-labelledby": `${quickStartId}-restart ${quickStartId}` }, { children: getResource('Restart') })) })), status === QuickStartStatus.IN_PROGRESS && (jsx(FlexItem, { children: jsx(Button, Object.assign({ onClick: restart, variant: "link", isInline: true, "data-testid": "qs-card-inProgress-restart", id: `${quickStartId}-restart`, "aria-labelledby": `${quickStartId}-restart ${quickStartId}` }, { children: getResource('Restart') })) }))] })));
1631
+ };
1632
+
1633
+ const QuickStartTileFooterExternal = ({ link, quickStartId }) => {
1591
1634
  const { href, text } = link;
1592
- return (React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
1593
- React.createElement(FlexItem, null,
1594
- React.createElement(Button, { component: "a", href: href, target: "_blank", rel: "noopener noreferrer", variant: "link", "aria-label": `Open documentation in new window`, isInline: true, icon: React.createElement(ExternalLinkAltIcon, null), iconPosition: "right", id: quickStartId, "aria-labelledby": `${quickStartId}-external ${quickStartId}` }, text || href))));
1635
+ return (jsx(Flex, Object.assign({ justifyContent: { default: 'justifyContentSpaceBetween' } }, { children: jsx(FlexItem, { children: jsx(Button, Object.assign({ component: "a", href: href, target: "_blank", rel: "noopener noreferrer", variant: "link", "aria-label": `Open documentation in new window`, isInline: true, icon: jsx(ExternalLinkAltIcon, {}), iconPosition: "right", id: quickStartId, "aria-labelledby": `${quickStartId}-external ${quickStartId}` }, { children: text || href })) }) })));
1595
1636
  };
1596
1637
 
1597
- const QuickStartTileHeader = ({ name, quickStartId, onSelect, }) => (React.createElement(Flex, { flexWrap: { default: 'nowrap' } },
1598
- React.createElement(Button, { "data-test": "title", id: quickStartId, variant: "link", isInline: true, onClick: onSelect }, name)));
1638
+ const QuickStartTileHeader = ({ name, quickStartId, onSelect }) => (jsx(Flex, Object.assign({ flexWrap: { default: 'nowrap' } }, { children: jsx(Button, Object.assign({ "data-test": "title", id: quickStartId, variant: "link", isInline: true, onClick: onSelect }, { children: name })) })));
1599
1639
 
1600
1640
  const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, action, }) => {
1601
1641
  const { metadata: { name: id }, spec: { icon, tasks, displayName, description, durationMinutes, prerequisites, link, type }, } = quickStart;
1602
- const { setActiveQuickStart, footer, getResource } = React.useContext(QuickStartContext);
1642
+ const { setActiveQuickStart, footer, getResource } = useContext(QuickStartContext);
1603
1643
  const statusColorMap = {
1604
1644
  [QuickStartStatus.COMPLETE]: 'green',
1605
1645
  [QuickStartStatus.IN_PROGRESS]: 'purple',
@@ -1612,11 +1652,10 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, act
1612
1652
  };
1613
1653
  let quickStartIcon;
1614
1654
  if (typeof icon === 'object') {
1615
- quickStartIcon = React.createElement(Icon, { size: "2xl" }, icon);
1655
+ quickStartIcon = jsx(Icon, Object.assign({ size: "2xl" }, { children: icon }));
1616
1656
  }
1617
1657
  else {
1618
- quickStartIcon = (React.createElement(Icon, { size: "2xl" },
1619
- React.createElement(FallbackImg, { src: icon, alt: "", className: "pfext-catalog-item-icon__img", fallback: React.createElement(RocketIcon, null) })));
1658
+ quickStartIcon = (jsx(Icon, Object.assign({ size: "2xl" }, { children: jsx(FallbackImg, { src: icon, alt: "", className: "pfext-catalog-item-icon__img", fallback: jsx(RocketIcon, {}) }) })));
1620
1659
  }
1621
1660
  const onSelect = () => {
1622
1661
  if (!link) {
@@ -1627,70 +1666,53 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, act
1627
1666
  }
1628
1667
  onClick();
1629
1668
  };
1630
- const footerComponent = React.useMemo(() => {
1669
+ const footerComponent = useMemo(() => {
1631
1670
  if (footer && footer.show === false) {
1632
1671
  return null;
1633
1672
  }
1634
1673
  if (link) {
1635
- return React.createElement(QuickStartTileFooterExternal, { link: link, quickStartId: id });
1674
+ return jsx(QuickStartTileFooterExternal, { link: link, quickStartId: id });
1636
1675
  }
1637
- return (React.createElement(QuickStartTileFooter, { quickStartId: id, status: status, totalTasks: tasks === null || tasks === void 0 ? void 0 : tasks.length, onClickContinue: onSelect }));
1676
+ return (jsx(QuickStartTileFooter, { quickStartId: id, status: status, totalTasks: tasks === null || tasks === void 0 ? void 0 : tasks.length, onClickContinue: onSelect }));
1638
1677
  }, [footer, id, link, status, tasks === null || tasks === void 0 ? void 0 : tasks.length]);
1639
1678
  const ActionIcon = (action === null || action === void 0 ? void 0 : action.icon) || OutlinedBookmarkIcon;
1640
- const additionalAction = action ? (React.createElement(Button, Object.assign({ "aria-label": action['aria-label'], icon: React.createElement(ActionIcon, null), variant: "plain", onClick: action.onClick }, action.buttonProps))) : undefined;
1641
- return (React.createElement(Card, Object.assign({ id: `${id}-catalog-tile`, style: { height: '100%' }, "data-testid": `qs-card-${camelize(displayName)}`, className: "pfext-catalog-item" }, (isActive && {
1679
+ const additionalAction = action ? (jsx(Button, Object.assign({ "aria-label": action['aria-label'], icon: jsx(ActionIcon, {}), variant: "plain", onClick: action.onClick }, action.buttonProps))) : undefined;
1680
+ return (jsxs(Card, Object.assign({ id: `${id}-catalog-tile`, style: { height: '100%' }, "data-testid": `qs-card-${camelize(displayName)}`, className: "pfext-catalog-item" }, (isActive && {
1642
1681
  isClickable: true,
1643
1682
  isSelectable: true,
1644
1683
  isSelected: true,
1645
1684
  isClicked: true,
1646
- })),
1647
- React.createElement(CardHeader, Object.assign({}, (action && {
1648
- actions: { actions: additionalAction },
1649
- })), quickStartIcon),
1650
- React.createElement(CardTitle, null,
1651
- React.createElement(QuickStartTileHeader, { name: displayName, onSelect: onSelect, quickStartId: id })),
1652
- React.createElement(CardBody, null,
1653
- React.createElement(Stack, { hasGutter: true },
1654
- React.createElement(Flex, { spaceItems: { default: 'spaceItemsSm' } },
1655
- type && React.createElement(Label, { color: type.color }, type.text),
1656
- durationMinutes && (React.createElement(Label, { variant: "outline", "data-test": "duration", icon: React.createElement(OutlinedClockIcon, null) }, getResource('{{duration, number}} minutes', durationMinutes).replace('{{duration, number}}', durationMinutes))),
1657
- status !== QuickStartStatus.NOT_STARTED && (React.createElement(Label, { variant: "outline", color: statusColorMap[status], icon: React.createElement(StatusIcon, { status: status }), "data-test": "status" }, statusLocaleMap[status]))),
1658
- React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }))),
1659
- React.createElement(CardFooter, null, footerComponent)));
1685
+ }), { children: [jsx(CardHeader, Object.assign({}, (action && {
1686
+ actions: { actions: additionalAction },
1687
+ }), { children: quickStartIcon })), jsx(CardTitle, { children: jsx(QuickStartTileHeader, { name: displayName, onSelect: onSelect, quickStartId: id }) }), jsx(CardBody, { children: jsxs(Stack, Object.assign({ hasGutter: true }, { children: [jsxs(Flex, Object.assign({ spaceItems: { default: 'spaceItemsSm' } }, { children: [type && jsx(Label, Object.assign({ color: type.color }, { children: type.text })), durationMinutes && (jsx(Label, Object.assign({ variant: "outline", "data-test": "duration", icon: jsx(OutlinedClockIcon, {}) }, { children: getResource('{{duration, number}} minutes', durationMinutes).replace('{{duration, number}}', durationMinutes) }))), status !== QuickStartStatus.NOT_STARTED && (jsx(Label, Object.assign({ variant: "outline", color: statusColorMap[status], icon: jsx(StatusIcon, { status: status }), "data-test": "status" }, { children: statusLocaleMap[status] })))] })), jsx(QuickStartTileDescription, { description: description, prerequisites: prerequisites })] })) }), jsx(CardFooter, { children: footerComponent })] })));
1660
1688
  };
1661
1689
 
1662
1690
  const QuickStartCatalog = ({ quickStarts }) => {
1663
- const { activeQuickStartID, allQuickStartStates } = React.useContext(QuickStartContext);
1664
- return (React.createElement("div", null,
1665
- React.createElement(Gallery, { hasGutter: true, className: "pfext-quick-start-catalog__gallery" }, quickStarts.map((quickStart, index) => {
1666
- const { metadata: { name: id }, } = quickStart;
1667
- return (React.createElement(QuickStartTile, { key: index, quickStart: quickStart, isActive: id === activeQuickStartID, status: getQuickStartStatus(allQuickStartStates, id) }));
1668
- }))));
1691
+ const { activeQuickStartID, allQuickStartStates } = useContext(QuickStartContext);
1692
+ return (jsx("div", { children: jsx(Gallery, Object.assign({ hasGutter: true, className: "pfext-quick-start-catalog__gallery" }, { children: quickStarts.map((quickStart, index) => {
1693
+ const { metadata: { name: id }, } = quickStart;
1694
+ return (jsx(QuickStartTile, { quickStart: quickStart, isActive: id === activeQuickStartID, status: getQuickStartStatus(allQuickStartStates, id) }, index));
1695
+ }) })) }));
1669
1696
  };
1670
1697
 
1671
1698
  const QuickStartCatalogFilterSearch = (_a) => {
1672
1699
  var { searchInputText, handleTextChange } = _a, props = __rest(_a, ["searchInputText", "handleTextChange"]);
1673
- const { getResource } = React.useContext(QuickStartContext);
1674
- return (React.createElement(ToolbarItem, null,
1675
- React.createElement(SearchInput, Object.assign({ placeholder: getResource('Filter by keyword...'), value: searchInputText, onChange: (_ev, value) => handleTextChange(value), onClear: () => handleTextChange('') }, props))));
1700
+ const { getResource } = useContext(QuickStartContext);
1701
+ return (jsx(ToolbarItem, { children: jsx(SearchInput, Object.assign({ placeholder: getResource('Filter by keyword...'), value: searchInputText, onChange: (_ev, value) => handleTextChange(value), onClear: () => handleTextChange('') }, props)) }));
1676
1702
  };
1677
1703
  const QuickStartCatalogFilterSelect = (_a) => {
1678
1704
  var { isDropdownOpen, setIsDropdownOpen, onRowfilterSelect, selectedFilters, dropdownItems } = _a, props = __rest(_a, ["isDropdownOpen", "setIsDropdownOpen", "onRowfilterSelect", "selectedFilters", "dropdownItems"]);
1679
- const { getResource } = React.useContext(QuickStartContext);
1680
- const toggle = (toggleRef) => (React.createElement(MenuToggle, { isFullWidth: true, ref: toggleRef, onClick: () => setIsDropdownOpen(!isDropdownOpen), isExpanded: isDropdownOpen },
1681
- getResource('Status'),
1682
- selectedFilters.length > 0 && React.createElement(Badge, { isRead: true }, selectedFilters.length)));
1683
- return (React.createElement(ToolbarItem, null,
1684
- React.createElement(Select, Object.assign({ "aria-label": getResource('Select filter'), isOpen: isDropdownOpen, selected: selectedFilters, onSelect: onRowfilterSelect, onOpenChange: (isOpen) => setIsDropdownOpen(isOpen), toggle: toggle }, props),
1685
- React.createElement(SelectList, null, dropdownItems))));
1705
+ const { getResource } = useContext(QuickStartContext);
1706
+ const toggle = (toggleRef) => (jsxs(MenuToggle, Object.assign({ isFullWidth: true, ref: toggleRef, onClick: () => setIsDropdownOpen(!isDropdownOpen), isExpanded: isDropdownOpen }, { children: [getResource('Status'), selectedFilters.length > 0 && jsx(Badge, Object.assign({ isRead: true }, { children: selectedFilters.length }))] })));
1707
+ return (jsx(ToolbarItem, { children: jsx(Select, Object.assign({ "aria-label": getResource('Select filter'), isOpen: isDropdownOpen, selected: selectedFilters, onSelect: onRowfilterSelect, onOpenChange: (isOpen) => setIsDropdownOpen(isOpen), toggle: toggle }, props, { children: jsx(SelectList, { children: dropdownItems }) })) }));
1686
1708
  };
1687
1709
  const QuickStartCatalogFilterCount = ({ quickStartsCount }) => {
1688
- const { getResource } = React.useContext(QuickStartContext);
1689
- return (React.createElement(ToolbarItem, { align: { default: 'alignEnd' } }, getResource('{{count, number}} item', quickStartsCount).replace('{{count, number}}', quickStartsCount)));
1710
+ const { getResource } = useContext(QuickStartContext);
1711
+ return (jsx(ToolbarItem, Object.assign({ align: { default: 'alignEnd' } }, { children: getResource("{{count, number}} item", quickStartsCount).replace('{{count, number}}', quickStartsCount) })));
1690
1712
  };
1691
1713
  const QuickStartCatalogFilterSearchWrapper = ({ onSearchInputChange = () => { } }) => {
1692
- const { useQueryParams, filter, setFilter } = React.useContext(QuickStartContext);
1693
- React.useEffect(() => {
1714
+ const { useQueryParams, filter, setFilter } = useContext(QuickStartContext);
1715
+ useEffect(() => {
1694
1716
  // use this effect to clear the search when a `clear all` action is performed higher up
1695
1717
  const unlisten = history.listen(({ location }) => {
1696
1718
  const searchParams = new URLSearchParams(location.search);
@@ -1716,7 +1738,7 @@ const QuickStartCatalogFilterSearchWrapper = ({ onSearchInputChange = () => { }
1716
1738
  }
1717
1739
  onSearchInputChange(val);
1718
1740
  };
1719
- return (React.createElement(QuickStartCatalogFilterSearch, { searchInputText: filter === null || filter === void 0 ? void 0 : filter.keyword, handleTextChange: handleTextChange }));
1741
+ return (jsx(QuickStartCatalogFilterSearch, { searchInputText: filter === null || filter === void 0 ? void 0 : filter.keyword, handleTextChange: handleTextChange }));
1720
1742
  };
1721
1743
  // compare string/number arrays
1722
1744
  const equalsIgnoreOrder = (a, b) => {
@@ -1734,8 +1756,8 @@ const equalsIgnoreOrder = (a, b) => {
1734
1756
  return true;
1735
1757
  };
1736
1758
  const QuickStartCatalogFilterStatusWrapper = ({ onStatusChange = () => { } }) => {
1737
- const { useQueryParams, filter, setFilter } = React.useContext(QuickStartContext);
1738
- React.useEffect(() => {
1759
+ const { useQueryParams, filter, setFilter } = useContext(QuickStartContext);
1760
+ useEffect(() => {
1739
1761
  // use this effect to clear the status when a `clear all` action is performed higher up
1740
1762
  const unlisten = history.listen(({ location }) => {
1741
1763
  var _a;
@@ -1750,8 +1772,8 @@ const QuickStartCatalogFilterStatusWrapper = ({ onStatusChange = () => { } }) =>
1750
1772
  unlisten();
1751
1773
  };
1752
1774
  });
1753
- const [isDropdownOpen, setIsDropdownOpen] = React.useState(false);
1754
- const onRowfilterSelect = React.useCallback((_e, selectedValue) => {
1775
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false);
1776
+ const onRowfilterSelect = useCallback((_e, selectedValue) => {
1755
1777
  setIsDropdownOpen(false);
1756
1778
  const selection = Object.entries(filter.status.statusTypes).find(([_key, value]) => value === selectedValue)[0];
1757
1779
  const selectedFiltersList = filter.status.statusFilters.includes(selection)
@@ -1768,33 +1790,24 @@ const QuickStartCatalogFilterStatusWrapper = ({ onStatusChange = () => { } }) =>
1768
1790
  }
1769
1791
  onStatusChange(selectedFiltersList);
1770
1792
  }, [filter.status.statusFilters, onStatusChange, setFilter, useQueryParams]);
1771
- const dropdownItems = Object.entries(filter.status.statusTypes).map(([key, value]) => (React.createElement(SelectOption, { key: key, "data-key": key, value: value, hasCheckbox: true, isSelected: filter.status.statusFilters.includes(key) },
1772
- React.createElement(React.Fragment, null, value))));
1773
- return (React.createElement(QuickStartCatalogFilterSelect, { isDropdownOpen: isDropdownOpen, setIsDropdownOpen: setIsDropdownOpen, onRowfilterSelect: onRowfilterSelect, selectedFilters: filter.status.statusFilters, dropdownItems: dropdownItems }));
1793
+ const dropdownItems = Object.entries(filter.status.statusTypes).map(([key, value]) => (jsx(SelectOption, Object.assign({ "data-key": key, value: value, hasCheckbox: true, isSelected: filter.status.statusFilters.includes(key) }, { children: jsx(Fragment$1, { children: value }) }), key)));
1794
+ return (jsx(QuickStartCatalogFilterSelect, { isDropdownOpen: isDropdownOpen, setIsDropdownOpen: setIsDropdownOpen, onRowfilterSelect: onRowfilterSelect, selectedFilters: filter.status.statusFilters, dropdownItems: dropdownItems }));
1774
1795
  };
1775
- const QuickStartCatalogFilterCountWrapper = ({ quickStartsCount }) => React.createElement(QuickStartCatalogFilterCount, { quickStartsCount: quickStartsCount });
1796
+ const QuickStartCatalogFilterCountWrapper = ({ quickStartsCount, }) => jsx(QuickStartCatalogFilterCount, { quickStartsCount: quickStartsCount });
1776
1797
 
1777
1798
  const QuickStartCatalogFilter = (_a) => {
1778
1799
  var { quickStartsCount, onSearchInputChange = () => { }, onStatusChange = () => { } } = _a, props = __rest(_a, ["quickStartsCount", "onSearchInputChange", "onStatusChange"]);
1779
- return (React.createElement(Toolbar, Object.assign({}, props),
1780
- React.createElement(ToolbarContent, null,
1781
- React.createElement(QuickStartCatalogFilterSearchWrapper, { onSearchInputChange: onSearchInputChange }),
1782
- React.createElement(QuickStartCatalogFilterStatusWrapper, { onStatusChange: onStatusChange }),
1783
- React.createElement(QuickStartCatalogFilterCountWrapper, { quickStartsCount: quickStartsCount }))));
1800
+ return (jsx(Toolbar, Object.assign({}, props, { children: jsxs(ToolbarContent, { children: [jsx(QuickStartCatalogFilterSearchWrapper, { onSearchInputChange: onSearchInputChange }), jsx(QuickStartCatalogFilterStatusWrapper, { onStatusChange: onStatusChange }), jsx(QuickStartCatalogFilterCountWrapper, { quickStartsCount: quickStartsCount })] }) })));
1784
1801
  };
1785
1802
 
1786
1803
  const QuickStartCatalogEmptyState = ({ clearFilters }) => {
1787
- const { getResource } = React.useContext(QuickStartContext);
1788
- return (React.createElement(EmptyState, { headingLevel: "h4", icon: SearchIcon, titleText: React.createElement(React.Fragment, null, getResource('No results found')) },
1789
- React.createElement(EmptyStateBody, null, getResource('No results match the filter criteria. Remove filters or clear all filters to show results.')),
1790
- React.createElement(EmptyStateFooter, null,
1791
- React.createElement(EmptyStateActions, null,
1792
- React.createElement(Button, { variant: "link", onClick: clearFilters, "data-test": "clear-filter button" }, getResource('Clear all filters'))))));
1804
+ const { getResource } = useContext(QuickStartContext);
1805
+ return (jsxs(EmptyState, Object.assign({ headingLevel: "h4", icon: SearchIcon, titleText: jsx(Fragment$1, { children: getResource('No results found') }) }, { children: [jsx(EmptyStateBody, { children: getResource('No results match the filter criteria. Remove filters or clear all filters to show results.') }), jsx(EmptyStateFooter, { children: jsx(EmptyStateActions, { children: jsx(Button, Object.assign({ variant: "link", onClick: clearFilters, "data-test": "clear-filter button" }, { children: getResource('Clear all filters') })) }) })] })));
1793
1806
  };
1794
1807
  const QuickStartCatalogPage = ({ quickStarts, showFilter, sortFnc = (q1, q2) => q1.spec.displayName.localeCompare(q2.spec.displayName), title, hint, showTitle = true, }) => {
1795
- const sortFncCallback = React.useCallback(sortFnc, [sortFnc]);
1796
- const { allQuickStarts = [], setAllQuickStarts, allQuickStartStates, getResource, filter, setFilter, loading, } = React.useContext(QuickStartContext);
1797
- React.useEffect(() => {
1808
+ const sortFncCallback = useCallback(sortFnc, [sortFnc]);
1809
+ const { allQuickStarts = [], setAllQuickStarts, allQuickStartStates, getResource, filter, setFilter, loading, } = useContext(QuickStartContext);
1810
+ useEffect(() => {
1798
1811
  // passed through prop, not context
1799
1812
  if (quickStarts && JSON.stringify(quickStarts) !== JSON.stringify(allQuickStarts)) {
1800
1813
  setAllQuickStarts(quickStarts);
@@ -1803,8 +1816,8 @@ const QuickStartCatalogPage = ({ quickStarts, showFilter, sortFnc = (q1, q2) =>
1803
1816
  const initialFilteredQuickStarts = showFilter
1804
1817
  ? filterQuickStarts(allQuickStarts, filter.keyword, filter.status.statusFilters, allQuickStartStates).sort(sortFncCallback)
1805
1818
  : allQuickStarts;
1806
- const [filteredQuickStarts, setFilteredQuickStarts] = React.useState(initialFilteredQuickStarts);
1807
- React.useEffect(() => {
1819
+ const [filteredQuickStarts, setFilteredQuickStarts] = useState(initialFilteredQuickStarts);
1820
+ useEffect(() => {
1808
1821
  const filteredQs = showFilter
1809
1822
  ? filterQuickStarts(allQuickStarts, filter.keyword, filter.status.statusFilters, allQuickStartStates).sort(sortFncCallback)
1810
1823
  : allQuickStarts;
@@ -1847,59 +1860,37 @@ const QuickStartCatalogPage = ({ quickStarts, showFilter, sortFnc = (q1, q2) =>
1847
1860
  }
1848
1861
  };
1849
1862
  if (loading) {
1850
- return React.createElement(LoadingBox, null);
1863
+ return jsx(LoadingBox, {});
1851
1864
  }
1852
1865
  if (!allQuickStarts || allQuickStarts.length === 0) {
1853
- return React.createElement(EmptyBox, { label: getResource('Quick Starts') });
1866
+ return jsx(EmptyBox, { label: getResource('Quick Starts') });
1854
1867
  }
1855
- return (React.createElement(React.Fragment, null,
1856
- (showTitle || showFilter) && (React.createElement(PageSection, { hasBodyWrapper: false },
1857
- showTitle && (React.createElement(Content, { isEditorial: true },
1858
- React.createElement(Title, { headingLevel: "h1", "data-test": "page-title" }, title || getResource('Quick Starts')),
1859
- hint && React.createElement("div", null, hint))),
1860
- showTitle && React.createElement(Divider, { component: "div" }),
1861
- showFilter && (React.createElement(React.Fragment, null,
1862
- React.createElement(QuickStartCatalogFilter, { quickStartsCount: filteredQuickStarts.length, onSearchInputChange: onSearchInputChange, onStatusChange: onStatusChange }))))),
1863
- React.createElement(PageSection, { hasBodyWrapper: false }, filteredQuickStarts.length === 0 ? (React.createElement(QuickStartCatalogEmptyState, { clearFilters: clearFilters })) : (React.createElement(QuickStartCatalog, { quickStarts: filteredQuickStarts })))));
1868
+ return (jsxs(Fragment$1, { children: [(showTitle || showFilter) && (jsxs(PageSection, Object.assign({ hasBodyWrapper: false }, { children: [showTitle && (jsxs(Content, Object.assign({ isEditorial: true }, { children: [jsx(Title, Object.assign({ headingLevel: "h1", "data-test": "page-title" }, { children: title || getResource('Quick Starts') })), hint && jsx("div", { children: hint })] }))), showTitle && jsx(Divider, { component: "div" }), showFilter && (jsx(Fragment$1, { children: jsx(QuickStartCatalogFilter, { quickStartsCount: filteredQuickStarts.length, onSearchInputChange: onSearchInputChange, onStatusChange: onStatusChange }) }))] }))), jsx(PageSection, Object.assign({ hasBodyWrapper: false }, { children: filteredQuickStarts.length === 0 ? (jsx(QuickStartCatalogEmptyState, { clearFilters: clearFilters })) : (jsx(QuickStartCatalog, { quickStarts: filteredQuickStarts })) }))] }));
1864
1869
  };
1865
1870
 
1866
- const QuickStartCatalogHeader = ({ title, hint, }) => (React.createElement("div", null,
1867
- React.createElement(Title, { headingLevel: "h1", "data-pf-content": "true" }, title),
1868
- hint && React.createElement("div", null, hint)));
1871
+ const QuickStartCatalogHeader = ({ title, hint, }) => (jsxs("div", { children: [jsx(Title, Object.assign({ headingLevel: "h1", "data-pf-content": "true" }, { children: title })), hint && jsx("div", { children: hint })] }));
1869
1872
 
1870
- const QuickStartCatalogSection = ({ children }) => (React.createElement("div", null, children));
1873
+ const QuickStartCatalogSection = ({ children }) => (jsx("div", { children: children }));
1871
1874
 
1872
- const QuickStartCatalogToolbar = ({ children }) => (React.createElement(Toolbar, null, children));
1875
+ const QuickStartCatalogToolbar = ({ children }) => (jsx(Toolbar, { children: children }));
1873
1876
 
1874
- const QuickStartCloseModal = ({ isOpen, onConfirm, onCancel, }) => {
1875
- const { getResource } = React.useContext(QuickStartContext);
1876
- return (React.createElement(Modal, { isOpen: isOpen, variant: ModalVariant.small, showClose: false, "data-test": "leave-quickstart", title: getResource('Leave quick start?'), footer: React.createElement(Flex, null,
1877
- React.createElement(FlexItem, { align: { default: 'alignRight' } },
1878
- React.createElement(Button, { variant: "secondary", "data-test": "cancel button", onClick: onCancel }, getResource('Cancel'))),
1879
- React.createElement(FlexItem, null,
1880
- React.createElement(Button, { variant: "primary", "data-test": "leave button", onClick: onConfirm }, getResource('Leave')))), isFullScreen: true }, getResource('Your progress will be saved.')));
1877
+ const QuickStartCloseModal = ({ isOpen, onConfirm, onCancel }) => {
1878
+ const { getResource } = useContext(QuickStartContext);
1879
+ return (jsx(Modal, Object.assign({ isOpen: isOpen, variant: ModalVariant.small, showClose: false, "data-test": "leave-quickstart", title: getResource('Leave quick start?'), footer: jsxs(Flex, { children: [jsx(FlexItem, Object.assign({ align: { default: 'alignRight' } }, { children: jsx(Button, Object.assign({ variant: "secondary", "data-test": "cancel button", onClick: onCancel }, { children: getResource('Cancel') })) })), jsx(FlexItem, { children: jsx(Button, Object.assign({ variant: "primary", "data-test": "leave button", onClick: onConfirm }, { children: getResource('Leave') })) })] }), isFullScreen: true }, { children: getResource('Your progress will be saved.') })));
1881
1880
  };
1882
1881
 
1883
1882
  const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, isActiveTask, onTaskSelect, children, }) => {
1884
- const titleRef = React.useRef(null);
1885
- const { focusOnQuickStart } = React.useContext(QuickStartContext);
1886
- React.useEffect(() => {
1883
+ const titleRef = useRef(null);
1884
+ const { focusOnQuickStart } = useContext(QuickStartContext);
1885
+ useEffect(() => {
1887
1886
  if (focusOnQuickStart && isActiveTask) {
1888
1887
  // Focus the WizardNavItem button element that contains the title
1889
1888
  titleRef.current.parentNode.focus();
1890
1889
  }
1891
1890
  }, [focusOnQuickStart, isActiveTask]);
1892
1891
  const failedReview = taskStatus === QuickStartTaskStatus.FAILED;
1893
- const tryAgain = failedReview && (React.createElement(React.Fragment, null,
1894
- React.createElement("div", null),
1895
- React.createElement("div", { className: "pfext-quick-start-task-header__tryagain" }, "Try the steps again.")));
1896
- const content = (React.createElement("div", { ref: titleRef },
1897
- React.createElement(Title, { headingLevel: "h3", size: size },
1898
- React.createElement("span", { className: "pfext-quick-start-task-header__title" }, title),
1899
- isActiveTask && subtitle && (React.createElement("span", null,
1900
- ' ',
1901
- React.createElement("span", { "data-test-id": "quick-start-task-subtitle", className: "pfext-quick-start-task-header__subtitle" }, subtitle))),
1902
- tryAgain)));
1892
+ const tryAgain = failedReview && (jsxs(Fragment$1, { children: [jsx("div", {}), jsx("div", Object.assign({ className: "pfext-quick-start-task-header__tryagain" }, { children: "Try the steps again." }))] }));
1893
+ const content = (jsx("div", Object.assign({ ref: titleRef }, { children: jsxs(Title, Object.assign({ headingLevel: "h3", size: size }, { children: [jsx("span", Object.assign({ className: "pfext-quick-start-task-header__title" }, { children: title })), isActiveTask && subtitle && (jsxs("span", { children: [' ', jsx("span", Object.assign({ "data-test-id": "quick-start-task-subtitle", className: "pfext-quick-start-task-header__subtitle" }, { children: subtitle }))] })), tryAgain] })) })));
1903
1894
  let status = 'default';
1904
1895
  if (taskStatus === QuickStartTaskStatus.FAILED) {
1905
1896
  status = 'error';
@@ -1907,42 +1898,31 @@ const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, is
1907
1898
  else if (taskStatus === QuickStartTaskStatus.SUCCESS) {
1908
1899
  status = 'success';
1909
1900
  }
1910
- return (React.createElement(WizardNavItem, { content: content, stepIndex: taskIndex, onClick: () => onTaskSelect(taskIndex - 1), component: "button", isCurrent: isActiveTask, status: status, className: "pfext-quick-start-task-header" }, children));
1901
+ return (jsx(WizardNavItem, Object.assign({ content: content, stepIndex: taskIndex, onClick: () => onTaskSelect(taskIndex - 1), component: "button", isCurrent: isActiveTask, status: status, className: "pfext-quick-start-task-header" }, { children: children })));
1911
1902
  };
1912
1903
 
1913
- const QuickStartTaskHeaderList = ({ tasks, allTaskStatuses, onTaskSelect, }) => (tasks === null || tasks === void 0 ? void 0 : tasks.length) > 0 ? (React.createElement("ul", { className: "pf-v6-c-wizard pf-v6-c-wizard__nav-list" }, tasks.map((task, index) => (React.createElement(QuickStartTaskHeader, { key: task.title, title: task.title, taskIndex: index + 1, size: "md", taskStatus: allTaskStatuses[index], onTaskSelect: onTaskSelect }))))) : null;
1904
+ const QuickStartTaskHeaderList = ({ tasks, allTaskStatuses, onTaskSelect, }) => (tasks === null || tasks === void 0 ? void 0 : tasks.length) > 0 ? (jsx("ul", Object.assign({ className: "pf-v6-c-wizard pf-v6-c-wizard__nav-list" }, { children: tasks.map((task, index) => (jsx(QuickStartTaskHeader, { title: task.title, taskIndex: index + 1, size: "md", taskStatus: allTaskStatuses[index], onTaskSelect: onTaskSelect }, task.title))) }))) : null;
1914
1905
 
1915
1906
  const QuickStartConclusion = ({ tasks, conclusion, allTaskStatuses, nextQuickStarts, onQuickStartChange, onTaskSelect, }) => {
1916
1907
  const hasFailedTask = allTaskStatuses.includes(QuickStartTaskStatus.FAILED);
1917
- const { getResource } = React.useContext(QuickStartContext);
1918
- return (React.createElement(React.Fragment, null,
1919
- React.createElement(QuickStartTaskHeaderList, { tasks: tasks, allTaskStatuses: allTaskStatuses, onTaskSelect: onTaskSelect }),
1920
- React.createElement(QuickStartMarkdownView, { content: hasFailedTask
1921
- ? getResource('One or more verifications did not pass during this quick start. Revisit the tasks or the help links, and then try again.')
1922
- : conclusion }),
1923
- !hasFailedTask &&
1924
- nextQuickStarts &&
1925
- nextQuickStarts.length > 0 &&
1926
- nextQuickStarts.map((nextQuickStart, index) => {
1927
- var _a;
1928
- return (React.createElement(Button, { variant: "link", onClick: () => onQuickStartChange(nextQuickStart.metadata.name), isInline: true, icon: React.createElement(ArrowRightIcon, null), iconPosition: "end", isBlock: true, key: index, style: { marginTop: 'var(--pf-t--global--spacer--md' } }, getResource('Start {{nextQSDisplayName}} quick start').replace('{{nextQSDisplayName}}', (_a = nextQuickStart === null || nextQuickStart === void 0 ? void 0 : nextQuickStart.spec) === null || _a === void 0 ? void 0 : _a.displayName)));
1929
- })));
1908
+ const { getResource } = useContext(QuickStartContext);
1909
+ return (jsxs(Fragment$1, { children: [jsx(QuickStartTaskHeaderList, { tasks: tasks, allTaskStatuses: allTaskStatuses, onTaskSelect: onTaskSelect }), jsx(QuickStartMarkdownView, { content: hasFailedTask
1910
+ ? getResource('One or more verifications did not pass during this quick start. Revisit the tasks or the help links, and then try again.')
1911
+ : conclusion }), !hasFailedTask &&
1912
+ nextQuickStarts &&
1913
+ nextQuickStarts.length > 0 &&
1914
+ nextQuickStarts.map((nextQuickStart, index) => {
1915
+ var _a;
1916
+ return (jsx(Button, Object.assign({ variant: "link", onClick: () => onQuickStartChange(nextQuickStart.metadata.name), isInline: true, icon: jsx(ArrowRightIcon, {}), iconPosition: "end", isBlock: true, style: { marginTop: 'var(--pf-t--global--spacer--md' } }, { children: getResource('Start {{nextQSDisplayName}} quick start').replace('{{nextQSDisplayName}}', (_a = nextQuickStart === null || nextQuickStart === void 0 ? void 0 : nextQuickStart.spec) === null || _a === void 0 ? void 0 : _a.displayName) }), index));
1917
+ })] }));
1930
1918
  };
1931
1919
 
1932
1920
  const QuickStartIntroduction = ({ tasks, introduction, allTaskStatuses, prerequisites, onTaskSelect, }) => {
1933
- const { getResource } = React.useContext(QuickStartContext);
1921
+ const { getResource } = useContext(QuickStartContext);
1934
1922
  const prereqs = prerequisites === null || prerequisites === void 0 ? void 0 : prerequisites.filter((p) => p);
1935
- const [isPrereqsExpanded, setIsPrereqsExpanded] = React.useState(false);
1936
- const prereqList = (prereqs === null || prereqs === void 0 ? void 0 : prereqs.length) > 0 && (React.createElement(ExpandableSection, { toggleText: getResource('View Prerequisites ({{totalPrereqs}})').replace('{{totalPrereqs}}', prereqs.length), onToggle: () => setIsPrereqsExpanded(!isPrereqsExpanded) },
1937
- React.createElement(List, null, prereqs.map((pr) => (React.createElement(ListItem, { key: pr },
1938
- React.createElement(QuickStartMarkdownView, { content: pr })))))));
1939
- return (React.createElement(Stack, { hasGutter: true },
1940
- React.createElement(QuickStartMarkdownView, { content: introduction }),
1941
- prereqList,
1942
- React.createElement("p", null,
1943
- getResource('In this quick start, you will complete {{count, number}} task', tasks === null || tasks === void 0 ? void 0 : tasks.length).replace('{{count, number}}', (tasks === null || tasks === void 0 ? void 0 : tasks.length) || 0),
1944
- ":"),
1945
- React.createElement(QuickStartTaskHeaderList, { tasks: tasks, allTaskStatuses: allTaskStatuses, onTaskSelect: onTaskSelect })));
1923
+ const [isPrereqsExpanded, setIsPrereqsExpanded] = useState(false);
1924
+ const prereqList = (prereqs === null || prereqs === void 0 ? void 0 : prereqs.length) > 0 && (jsx(ExpandableSection, Object.assign({ toggleText: getResource('View Prerequisites ({{totalPrereqs}})').replace('{{totalPrereqs}}', prereqs.length), onToggle: () => setIsPrereqsExpanded(!isPrereqsExpanded) }, { children: jsx(List, { children: prereqs.map((pr) => (jsx(ListItem, { children: jsx(QuickStartMarkdownView, { content: pr }) }, pr))) }) })));
1925
+ return (jsxs(Stack, Object.assign({ hasGutter: true }, { children: [jsx(QuickStartMarkdownView, { content: introduction }), prereqList, jsxs("p", { children: [getResource('In this quick start, you will complete {{count, number}} task', (tasks === null || tasks === void 0 ? void 0 : tasks.length) || 0).replace('{{count, number}}', (tasks === null || tasks === void 0 ? void 0 : tasks.length) || 0), ":"] }), jsx(QuickStartTaskHeaderList, { tasks: tasks, allTaskStatuses: allTaskStatuses, onTaskSelect: onTaskSelect })] })));
1946
1926
  };
1947
1927
 
1948
1928
  const getAlertVariant = (status) => {
@@ -1957,64 +1937,52 @@ const getAlertVariant = (status) => {
1957
1937
  };
1958
1938
  const QuickStartTaskReview = ({ review, taskStatus, onTaskReview, }) => {
1959
1939
  const { instructions, failedTaskHelp: taskHelp } = review;
1960
- const { getResource } = React.useContext(QuickStartContext);
1961
- return (React.createElement(Alert, { variant: getAlertVariant(taskStatus), title: getResource('Check your work'), isInline: true, role: "alert", style: {
1940
+ const { getResource } = useContext(QuickStartContext);
1941
+ return (jsxs(Alert, Object.assign({ variant: getAlertVariant(taskStatus), title: getResource('Check your work'), isInline: true, role: "alert", style: {
1962
1942
  marginBottom: 'var(--pf-t--global--spacer--md)',
1963
- } },
1964
- React.createElement(QuickStartMarkdownView, { content: instructions }),
1965
- React.createElement("span", { className: "pfext-quick-start-task-review__actions" },
1966
- React.createElement(Radio, { id: "review-success", name: "review-success", "data-testid": "qs-drawer-check-yes", label: getResource('Yes'), className: "pfext-quick-start-task-review__radio", isChecked: taskStatus === QuickStartTaskStatus.SUCCESS, onChange: () => onTaskReview(QuickStartTaskStatus.SUCCESS) }),
1967
- React.createElement(Radio, { id: "review-failed", name: "review-failed", "data-testid": "qs-drawer-check-no", label: getResource('No'), className: "pfext-quick-start-task-review__radio", isChecked: taskStatus === QuickStartTaskStatus.FAILED, onChange: () => onTaskReview(QuickStartTaskStatus.FAILED) })),
1968
- taskStatus === QuickStartTaskStatus.FAILED && taskHelp && (React.createElement(QuickStartMarkdownView, { content: taskHelp, exactHeight: true }))));
1943
+ } }, { children: [jsx(QuickStartMarkdownView, { content: instructions }), jsxs("span", Object.assign({ className: "pfext-quick-start-task-review__actions" }, { children: [jsx(Radio, { id: "review-success", name: "review-success", "data-testid": "qs-drawer-check-yes", label: getResource('Yes'), className: "pfext-quick-start-task-review__radio", isChecked: taskStatus === QuickStartTaskStatus.SUCCESS, onChange: () => onTaskReview(QuickStartTaskStatus.SUCCESS) }), jsx(Radio, { id: "review-failed", name: "review-failed", "data-testid": "qs-drawer-check-no", label: getResource('No'), className: "pfext-quick-start-task-review__radio", isChecked: taskStatus === QuickStartTaskStatus.FAILED, onChange: () => onTaskReview(QuickStartTaskStatus.FAILED) })] })), taskStatus === QuickStartTaskStatus.FAILED && taskHelp && (jsx(QuickStartMarkdownView, { content: taskHelp, exactHeight: true }))] })));
1969
1944
  };
1970
1945
 
1971
1946
  const QuickStartTasks = ({ tasks, taskNumber, allTaskStatuses, onTaskReview, onTaskSelect, }) => {
1972
- const { getResource, alwaysShowTaskReview } = React.useContext(QuickStartContext);
1973
- return (React.createElement("div", { className: "pf-v6-c-wizard pf-v6-c-wizard__nav-list", style: { padding: '0 0 0 0' } },
1974
- React.createElement("ul", null, tasks
1975
- .filter((_, index) => allTaskStatuses[index] !== QuickStartTaskStatus.INIT)
1976
- .map((task, index) => {
1977
- const { title, description, review } = task;
1978
- const isActiveTask = index === taskNumber;
1979
- const taskStatus = allTaskStatuses[index];
1980
- const shouldShowTaskReview = (!QUICKSTART_TASKS_INITIAL_STATES.includes(taskStatus) || alwaysShowTaskReview) &&
1981
- review;
1982
- return (React.createElement(React.Fragment, { key: title },
1983
- React.createElement(QuickStartTaskHeader, { taskIndex: index + 1, title: title, size: "md", subtitle: getResource('{{index, number}} of {{tasks, number}}')
1984
- .replace('{{index, number}}', index + 1)
1985
- .replace('{{tasks, number}}', tasks.length), taskStatus: taskStatus, isActiveTask: isActiveTask, onTaskSelect: onTaskSelect }, isActiveTask && (React.createElement(Stack, { hasGutter: true },
1986
- React.createElement(QuickStartMarkdownView, { content: description }),
1987
- shouldShowTaskReview && (React.createElement(QuickStartTaskReview, { review: review, taskStatus: taskStatus, onTaskReview: onTaskReview })))))));
1988
- }))));
1989
- };
1990
-
1991
- const QuickStartContent = React.forwardRef(({ quickStart, nextQuickStarts = [], taskNumber, allTaskStatuses, onTaskSelect, onTaskReview, onQuickStartChange, }, ref) => {
1947
+ const { getResource, alwaysShowTaskReview } = useContext(QuickStartContext);
1948
+ return (jsx("div", Object.assign({ className: "pf-v6-c-wizard pf-v6-c-wizard__nav-list", style: { padding: '0 0 0 0' } }, { children: jsx("ul", { children: tasks
1949
+ .filter((_, index) => allTaskStatuses[index] !== QuickStartTaskStatus.INIT)
1950
+ .map((task, index) => {
1951
+ const { title, description, review } = task;
1952
+ const isActiveTask = index === taskNumber;
1953
+ const taskStatus = allTaskStatuses[index];
1954
+ const shouldShowTaskReview = (!QUICKSTART_TASKS_INITIAL_STATES.includes(taskStatus) || alwaysShowTaskReview) &&
1955
+ review;
1956
+ return (jsx(Fragment, { children: jsx(QuickStartTaskHeader, Object.assign({ taskIndex: index + 1, title: title, size: "md", subtitle: getResource('{{index, number}} of {{tasks, number}}')
1957
+ .replace('{{index, number}}', index + 1)
1958
+ .replace('{{tasks, number}}', tasks.length), taskStatus: taskStatus, isActiveTask: isActiveTask, onTaskSelect: onTaskSelect }, { children: isActiveTask && (jsxs(Stack, Object.assign({ hasGutter: true }, { children: [jsx(QuickStartMarkdownView, { content: description }), shouldShowTaskReview && (jsx(QuickStartTaskReview, { review: review, taskStatus: taskStatus, onTaskReview: onTaskReview }))] }))) })) }, title));
1959
+ }) }) })));
1960
+ };
1961
+
1962
+ const QuickStartContent = forwardRef(({ quickStart, nextQuickStarts = [], taskNumber, allTaskStatuses, onTaskSelect, onTaskReview, onQuickStartChange, }, ref) => {
1992
1963
  const { spec: { introduction, tasks, conclusion, prerequisites }, } = quickStart;
1993
1964
  const totalTasks = tasks === null || tasks === void 0 ? void 0 : tasks.length;
1994
- return (React.createElement("div", { className: "pfext-quick-start-task", ref: ref },
1995
- taskNumber === -1 && (React.createElement(QuickStartIntroduction, { tasks: tasks, allTaskStatuses: allTaskStatuses, introduction: introduction, prerequisites: prerequisites, onTaskSelect: onTaskSelect })),
1996
- taskNumber > -1 && taskNumber < totalTasks && (React.createElement(QuickStartTasks, { tasks: tasks, taskNumber: taskNumber, allTaskStatuses: allTaskStatuses, onTaskReview: onTaskReview, onTaskSelect: onTaskSelect })),
1997
- taskNumber === totalTasks && (React.createElement(QuickStartConclusion, { tasks: tasks, conclusion: conclusion, allTaskStatuses: allTaskStatuses, nextQuickStarts: nextQuickStarts, onQuickStartChange: onQuickStartChange, onTaskSelect: onTaskSelect }))));
1965
+ return (jsxs("div", Object.assign({ className: "pfext-quick-start-task", ref: ref }, { children: [taskNumber === -1 && (jsx(QuickStartIntroduction, { tasks: tasks, allTaskStatuses: allTaskStatuses, introduction: introduction, prerequisites: prerequisites, onTaskSelect: onTaskSelect })), taskNumber > -1 && taskNumber < totalTasks && (jsx(QuickStartTasks, { tasks: tasks, taskNumber: taskNumber, allTaskStatuses: allTaskStatuses, onTaskReview: onTaskReview, onTaskSelect: onTaskSelect })), taskNumber === totalTasks && (jsx(QuickStartConclusion, { tasks: tasks, conclusion: conclusion, allTaskStatuses: allTaskStatuses, nextQuickStarts: nextQuickStarts, onQuickStartChange: onQuickStartChange, onTaskSelect: onTaskSelect }))] })));
1998
1966
  });
1999
1967
 
2000
1968
  const QuickStartFooter = ({ status, taskNumber, totalTasks, onNext, onBack, quickStartId, className, }) => {
2001
- const { restartQuickStart, getResource } = React.useContext(QuickStartContext);
2002
- const PrimaryButtonText = React.useMemo(() => ({
1969
+ const { restartQuickStart, getResource } = useContext(QuickStartContext);
1970
+ const PrimaryButtonText = useMemo(() => ({
2003
1971
  START: getResource('Start'),
2004
1972
  CONTINUE: getResource('Continue'),
2005
1973
  NEXT: getResource('Next'),
2006
1974
  CLOSE: getResource('Close'),
2007
1975
  }), [getResource]);
2008
- const SecondaryButtonText = React.useMemo(() => ({
1976
+ const SecondaryButtonText = useMemo(() => ({
2009
1977
  BACK: getResource('Back'),
2010
1978
  RESTART: getResource('Restart'),
2011
1979
  }), [getResource]);
2012
- const onRestart = React.useCallback((e) => {
1980
+ const onRestart = useCallback((e) => {
2013
1981
  e.preventDefault();
2014
1982
  e.stopPropagation();
2015
1983
  restartQuickStart(quickStartId, totalTasks);
2016
1984
  }, [quickStartId, restartQuickStart, totalTasks]);
2017
- const getPrimaryButtonText = React.useMemo(() => {
1985
+ const getPrimaryButtonText = useMemo(() => {
2018
1986
  if (status === QuickStartStatus.NOT_STARTED) {
2019
1987
  return PrimaryButtonText.START;
2020
1988
  }
@@ -2026,23 +1994,17 @@ const QuickStartFooter = ({ status, taskNumber, totalTasks, onNext, onBack, quic
2026
1994
  }
2027
1995
  return PrimaryButtonText.CONTINUE;
2028
1996
  }, [taskNumber, totalTasks, PrimaryButtonText, status]);
2029
- const getPrimaryButton = React.useMemo(() => (React.createElement(Button, { variant: "primary", className: "pfext-quick-start-footer__actionbtn", onClick: onNext, "data-testid": `qs-drawer-${camelize(getPrimaryButtonText)}`, "data-test": `${getPrimaryButtonText} button` }, getPrimaryButtonText)), [getPrimaryButtonText, onNext]);
2030
- const getSecondaryButton = React.useMemo(() => taskNumber === -1 && status !== QuickStartStatus.NOT_STARTED ? (React.createElement(Button, { variant: "secondary", onClick: onRestart, "data-testid": "qs-drawer-restart" }, SecondaryButtonText.RESTART)) : (taskNumber > -1 && (React.createElement(Button, { variant: "secondary", onClick: onBack, "data-testid": "qs-drawer-back" }, SecondaryButtonText.BACK))), [onRestart, onBack, SecondaryButtonText, status, taskNumber]);
2031
- const getSideNoteAction = React.useMemo(() => taskNumber !== -1 && (React.createElement(Button, { variant: "link", onClick: onRestart, "data-testid": "qs-drawer-side-note-action" }, SecondaryButtonText.RESTART)), [taskNumber, onRestart, SecondaryButtonText.RESTART]);
2032
- return (React.createElement("div", { className: css('pfext-quick-start-footer', className) },
2033
- React.createElement(ActionList, null,
2034
- React.createElement(ActionListGroup, null,
2035
- React.createElement(ActionListItem, null, getPrimaryButton),
2036
- React.createElement(ActionListItem, null, getSecondaryButton)),
2037
- React.createElement(ActionListGroup, null,
2038
- React.createElement(ActionListItem, null, getSideNoteAction)))));
1997
+ const getPrimaryButton = useMemo(() => (jsx(Button, Object.assign({ variant: "primary", className: "pfext-quick-start-footer__actionbtn", onClick: onNext, "data-testid": `qs-drawer-${camelize(getPrimaryButtonText)}`, "data-test": `${getPrimaryButtonText} button` }, { children: getPrimaryButtonText }))), [getPrimaryButtonText, onNext]);
1998
+ const getSecondaryButton = useMemo(() => taskNumber === -1 && status !== QuickStartStatus.NOT_STARTED ? (jsx(Button, Object.assign({ variant: "secondary", onClick: onRestart, "data-testid": "qs-drawer-restart" }, { children: SecondaryButtonText.RESTART }))) : (taskNumber > -1 && (jsx(Button, Object.assign({ variant: "secondary", onClick: onBack, "data-testid": "qs-drawer-back" }, { children: SecondaryButtonText.BACK })))), [onRestart, onBack, SecondaryButtonText, status, taskNumber]);
1999
+ const getSideNoteAction = useMemo(() => taskNumber !== -1 && (jsx(Button, Object.assign({ variant: "link", onClick: onRestart, "data-testid": "qs-drawer-side-note-action" }, { children: SecondaryButtonText.RESTART }))), [taskNumber, onRestart, SecondaryButtonText.RESTART]);
2000
+ return (jsx("div", Object.assign({ className: css('pfext-quick-start-footer', className) }, { children: jsxs(ActionList, { children: [jsxs(ActionListGroup, { children: [jsx(ActionListItem, { children: getPrimaryButton }), jsx(ActionListItem, { children: getSecondaryButton })] }), jsx(ActionListGroup, { children: jsx(ActionListItem, { children: getSideNoteAction }) })] }) })));
2039
2001
  };
2040
2002
 
2041
2003
  const QuickStartController = ({ quickStart, nextQuickStarts, contentRef, footerClass, }) => {
2042
2004
  const { metadata: { name }, spec: { tasks = [] }, } = quickStart;
2043
2005
  const totalTasks = tasks === null || tasks === void 0 ? void 0 : tasks.length;
2044
- const { activeQuickStartID, allQuickStartStates, setAllQuickStartStates, activeQuickStartState, setActiveQuickStart, setQuickStartTaskNumber, setQuickStartTaskStatus, nextStep, previousStep, } = React.useContext(QuickStartContext);
2045
- React.useEffect(() => {
2006
+ const { activeQuickStartID, allQuickStartStates, setAllQuickStartStates, activeQuickStartState, setActiveQuickStart, setQuickStartTaskNumber, setQuickStartTaskStatus, nextStep, previousStep, } = useContext(QuickStartContext);
2007
+ useEffect(() => {
2046
2008
  // If activeQuickStartID was changed through prop from QuickStartContainer, need to init the state if it does not exist yet
2047
2009
  if (activeQuickStartID && !allQuickStartStates[activeQuickStartID]) {
2048
2010
  setAllQuickStartStates(Object.assign(Object.assign({}, allQuickStartStates), { [activeQuickStartID]: getDefaultQuickStartState() }));
@@ -2051,9 +2013,9 @@ const QuickStartController = ({ quickStart, nextQuickStarts, contentRef, footerC
2051
2013
  const status = activeQuickStartState === null || activeQuickStartState === void 0 ? void 0 : activeQuickStartState.status;
2052
2014
  const taskNumber = activeQuickStartState === null || activeQuickStartState === void 0 ? void 0 : activeQuickStartState.taskNumber;
2053
2015
  const allTaskStatuses = tasks.map((task, index) => activeQuickStartState[`taskStatus${index}`]);
2054
- const handleQuickStartChange = React.useCallback((quickStartId) => setActiveQuickStart(quickStartId), [setActiveQuickStart]);
2055
- const handleTaskStatusChange = React.useCallback((newTaskStatus) => setQuickStartTaskStatus(newTaskStatus), [setQuickStartTaskStatus]);
2056
- const getQuickStartActiveTask = React.useCallback(() => {
2016
+ const handleQuickStartChange = useCallback((quickStartId) => setActiveQuickStart(quickStartId), [setActiveQuickStart]);
2017
+ const handleTaskStatusChange = useCallback((newTaskStatus) => setQuickStartTaskStatus(newTaskStatus), [setQuickStartTaskStatus]);
2018
+ const getQuickStartActiveTask = useCallback(() => {
2057
2019
  let activeTaskNumber = 0;
2058
2020
  while (activeTaskNumber !== totalTasks &&
2059
2021
  activeQuickStartState[`taskStatus${activeTaskNumber}`] === QuickStartTaskStatus.SUCCESS) {
@@ -2061,11 +2023,11 @@ const QuickStartController = ({ quickStart, nextQuickStarts, contentRef, footerC
2061
2023
  }
2062
2024
  return activeTaskNumber;
2063
2025
  }, [totalTasks, activeQuickStartState]);
2064
- const handleQuickStartContinue = React.useCallback(() => {
2026
+ const handleQuickStartContinue = useCallback(() => {
2065
2027
  const activeTaskNumber = getQuickStartActiveTask();
2066
2028
  setQuickStartTaskNumber(name, activeTaskNumber);
2067
2029
  }, [getQuickStartActiveTask, setQuickStartTaskNumber, name]);
2068
- const handleNext = React.useCallback(() => {
2030
+ const handleNext = useCallback(() => {
2069
2031
  if (status === QuickStartStatus.COMPLETE && taskNumber === totalTasks) {
2070
2032
  return handleQuickStartChange('');
2071
2033
  }
@@ -2074,13 +2036,11 @@ const QuickStartController = ({ quickStart, nextQuickStarts, contentRef, footerC
2074
2036
  }
2075
2037
  return nextStep(totalTasks);
2076
2038
  }, [handleQuickStartChange, nextStep, status, taskNumber, totalTasks, handleQuickStartContinue]);
2077
- const handleBack = React.useCallback(() => previousStep(), [previousStep]);
2078
- const handleTaskSelect = React.useCallback((selectedTaskNumber) => {
2039
+ const handleBack = useCallback(() => previousStep(), [previousStep]);
2040
+ const handleTaskSelect = useCallback((selectedTaskNumber) => {
2079
2041
  setQuickStartTaskNumber(name, selectedTaskNumber);
2080
2042
  }, [name, setQuickStartTaskNumber]);
2081
- return (React.createElement(React.Fragment, null,
2082
- React.createElement(QuickStartContent, { quickStart: quickStart, nextQuickStarts: nextQuickStarts, taskNumber: taskNumber, allTaskStatuses: allTaskStatuses, onTaskSelect: handleTaskSelect, onTaskReview: handleTaskStatusChange, onQuickStartChange: handleQuickStartChange, ref: contentRef }),
2083
- React.createElement(QuickStartFooter, { status: status, taskNumber: taskNumber, totalTasks: totalTasks, onNext: handleNext, onBack: handleBack, className: footerClass, quickStartId: quickStart.metadata.name })));
2043
+ return (jsxs(Fragment$1, { children: [jsx(QuickStartContent, { quickStart: quickStart, nextQuickStarts: nextQuickStarts, taskNumber: taskNumber, allTaskStatuses: allTaskStatuses, onTaskSelect: handleTaskSelect, onTaskReview: handleTaskStatusChange, onQuickStartChange: handleQuickStartChange, ref: contentRef }), jsx(QuickStartFooter, { status: status, taskNumber: taskNumber, totalTasks: totalTasks, onNext: handleNext, onBack: handleBack, className: footerClass, quickStartId: quickStart.metadata.name })] }));
2084
2044
  };
2085
2045
 
2086
2046
  const getElement = (appendTo) => {
@@ -2090,7 +2050,7 @@ const getElement = (appendTo) => {
2090
2050
  return appendTo;
2091
2051
  };
2092
2052
  const useScrollTopOnTaskNumberChange = (node, taskNumber) => {
2093
- React.useEffect(() => {
2053
+ useEffect(() => {
2094
2054
  if (node) {
2095
2055
  node.scrollTo({ top: 0, behavior: 'smooth' });
2096
2056
  }
@@ -2098,9 +2058,9 @@ const useScrollTopOnTaskNumberChange = (node, taskNumber) => {
2098
2058
  };
2099
2059
  const QuickStartPanelContent = (_a) => {
2100
2060
  var { quickStarts = [], handleClose, activeQuickStartID, appendTo, isResizable = true, showClose = true, footerClass } = _a, props = __rest(_a, ["quickStarts", "handleClose", "activeQuickStartID", "appendTo", "isResizable", "showClose", "footerClass"]);
2101
- const titleRef = React.useRef(null);
2102
- const { getResource, activeQuickStartState, focusOnQuickStart } = React.useContext(QuickStartContext);
2103
- const [contentRef, setContentRef] = React.useState();
2061
+ const titleRef = useRef(null);
2062
+ const { getResource, activeQuickStartState, focusOnQuickStart } = useContext(QuickStartContext);
2063
+ const [contentRef, setContentRef] = useState();
2104
2064
  const quickStart = quickStarts.find((qs) => qs.metadata.name === activeQuickStartID);
2105
2065
  const taskNumber = activeQuickStartState === null || activeQuickStartState === void 0 ? void 0 : activeQuickStartState.taskNumber;
2106
2066
  useScrollTopOnTaskNumberChange(contentRef, taskNumber);
@@ -2116,27 +2076,16 @@ const QuickStartPanelContent = (_a) => {
2116
2076
  }
2117
2077
  return Number.parseInt(taskNumber) + 1;
2118
2078
  };
2119
- React.useEffect(() => {
2079
+ useEffect(() => {
2120
2080
  if (focusOnQuickStart && quickStart) {
2121
2081
  titleRef.current.focus();
2122
2082
  }
2123
2083
  }, [focusOnQuickStart, quickStart]);
2124
- const content = quickStart ? (React.createElement(DrawerPanelContent, Object.assign({ isResizable: isResizable, "data-testid": `qs-drawer-${camelize(quickStart.spec.displayName)}`, "data-qs": `qs-step-${getStep()}`, "data-test": "quickstart drawer", style: { '--pf-v6-c-drawer__panel--PaddingBlockStart': '0' } }, props),
2125
- React.createElement("div", { className: "pfext-quick-start-panel-content" },
2126
- React.createElement(DrawerHead, null,
2127
- React.createElement("div", { tabIndex: -1, ref: titleRef },
2128
- React.createElement(Title, { headingLevel: "h2", size: "xl", style: { marginRight: 'var(--pf-t--global--spacer--md)' } },
2129
- React.createElement("span", null, quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.displayName),
2130
- ' '),
2131
- React.createElement("span", null, (quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes)
2132
- ? getResource('{{type}} • {{duration, number}} minutes', quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes)
2133
- .replace('{{duration, number}}', quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes)
2134
- .replace('{{type}}', getResource('Type'))
2135
- : getResource('Type'))),
2136
- showClose && (React.createElement(DrawerActions, null,
2137
- React.createElement(DrawerCloseButton, { onClick: handleClose, className: "pfext-quick-start-panel-content__close-button", "data-testid": "qs-drawer-close" }))))),
2138
- React.createElement(DrawerPanelBody, { className: "pfext-quick-start-panel-content__body", "data-test": "content" },
2139
- React.createElement(QuickStartController, { quickStart: quickStart, nextQuickStarts: nextQuickStarts, footerClass: footerClass, contentRef: setContentRef })))) : null;
2084
+ const content = quickStart ? (jsxs(DrawerPanelContent, Object.assign({ isResizable: isResizable, "data-testid": `qs-drawer-${camelize(quickStart.spec.displayName)}`, "data-qs": `qs-step-${getStep()}`, "data-test": "quickstart drawer", style: { '--pf-v6-c-drawer__panel--PaddingBlockStart': '0' } }, props, { children: [jsx("div", Object.assign({ className: "pfext-quick-start-panel-content" }, { children: jsxs(DrawerHead, { children: [jsxs("div", Object.assign({ tabIndex: -1, ref: titleRef }, { children: [jsxs(Title, Object.assign({ headingLevel: "h2", size: "xl", style: { marginRight: 'var(--pf-t--global--spacer--md)' } }, { children: [jsx("span", { children: quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.displayName }), ' '] })), jsx("span", { children: (quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes)
2085
+ ? getResource('{{type}} {{duration, number}} minutes', quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes)
2086
+ .replace('{{duration, number}}', quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes)
2087
+ .replace('{{type}}', getResource('Type'))
2088
+ : getResource('Type') })] })), showClose && (jsx(DrawerActions, { children: jsx(DrawerCloseButton, { onClick: handleClose, className: "pfext-quick-start-panel-content__close-button", "data-testid": "qs-drawer-close" }) }))] }) })), jsx(DrawerPanelBody, Object.assign({ className: "pfext-quick-start-panel-content__body", "data-test": "content" }, { children: jsx(QuickStartController, { quickStart: quickStart, nextQuickStarts: nextQuickStarts, footerClass: footerClass, contentRef: setContentRef }) }))] }))) : null;
2140
2089
  if (appendTo) {
2141
2090
  return ReactDOM.createPortal(content, getElement(appendTo));
2142
2091
  }
@@ -2145,8 +2094,8 @@ const QuickStartPanelContent = (_a) => {
2145
2094
 
2146
2095
  const QuickStartDrawerContent = (_a) => {
2147
2096
  var { quickStarts = [], appendTo, fullWidth, handleDrawerClose } = _a, props = __rest(_a, ["quickStarts", "appendTo", "fullWidth", "handleDrawerClose"]);
2148
- const { activeQuickStartID, allQuickStarts = [], activeQuickStartState, } = React.useContext(QuickStartContext);
2149
- const combinedQuickStarts = allQuickStarts.concat(quickStarts);
2097
+ const { activeQuickStartID, allQuickStarts = [], activeQuickStartState, } = useContext(QuickStartContext);
2098
+ const combinedQuickStarts = [...allQuickStarts, ...quickStarts].filter((qs, idx, arr) => arr.findIndex((q) => q.metadata.name === qs.metadata.name) === idx);
2150
2099
  const handleClose = () => {
2151
2100
  handleDrawerClose && handleDrawerClose(activeQuickStartState === null || activeQuickStartState === void 0 ? void 0 : activeQuickStartState.status);
2152
2101
  };
@@ -2157,14 +2106,14 @@ const QuickStartDrawerContent = (_a) => {
2157
2106
  },
2158
2107
  }
2159
2108
  : {};
2160
- return (React.createElement(QuickStartPanelContent, Object.assign({ quickStarts: combinedQuickStarts, handleClose: handleClose, activeQuickStartID: activeQuickStartID, appendTo: appendTo, isResizable: !fullWidth }, fullWidthPanelStyle, props)));
2109
+ return (jsx(QuickStartPanelContent, Object.assign({ quickStarts: combinedQuickStarts, handleClose: handleClose, activeQuickStartID: activeQuickStartID, appendTo: appendTo, isResizable: !fullWidth }, fullWidthPanelStyle, props)));
2161
2110
  };
2162
2111
 
2163
2112
  const QuickStartDrawer = (_a) => {
2164
2113
  var { quickStarts = [], children, appendTo, fullWidth, onCloseInProgress, onCloseNotInProgress } = _a, props = __rest(_a, ["quickStarts", "children", "appendTo", "fullWidth", "onCloseInProgress", "onCloseNotInProgress"]);
2165
- const { activeQuickStartID, setActiveQuickStart, allQuickStarts = [], allQuickStartStates, setAllQuickStartStates, } = React.useContext(QuickStartContext);
2114
+ const { activeQuickStartID, setActiveQuickStart, allQuickStarts = [], allQuickStartStates, setAllQuickStartStates, } = useContext(QuickStartContext);
2166
2115
  const combinedQuickStarts = allQuickStarts.concat(quickStarts);
2167
- React.useEffect(() => {
2116
+ useEffect(() => {
2168
2117
  const params = new URLSearchParams(window.location.search);
2169
2118
  // if there is a quick start param, but the quick start is not active, set it
2170
2119
  // this can happen if a new browser session is opened or an incognito window for example
@@ -2177,13 +2126,13 @@ const QuickStartDrawer = (_a) => {
2177
2126
  }
2178
2127
  }
2179
2128
  }, [activeQuickStartID, combinedQuickStarts, setActiveQuickStart]);
2180
- React.useEffect(() => {
2129
+ useEffect(() => {
2181
2130
  // If activeQuickStartID was changed through prop from QuickStartContainer, need to init the state if it does not exist yet
2182
2131
  if (activeQuickStartID && !allQuickStartStates[activeQuickStartID]) {
2183
2132
  setAllQuickStartStates(Object.assign(Object.assign({}, allQuickStartStates), { [activeQuickStartID]: getDefaultQuickStartState() }));
2184
2133
  }
2185
2134
  }, [activeQuickStartID, allQuickStartStates, setAllQuickStartStates]);
2186
- const [modalOpen, setModalOpen] = React.useState(false);
2135
+ const [modalOpen, setModalOpen] = useState(false);
2187
2136
  const onClose = () => setActiveQuickStart('');
2188
2137
  const handleClose = (activeQuickStartStatus) => {
2189
2138
  if (activeQuickStartStatus === QuickStartStatus.IN_PROGRESS) {
@@ -2213,11 +2162,7 @@ const QuickStartDrawer = (_a) => {
2213
2162
  },
2214
2163
  }
2215
2164
  : {};
2216
- return (React.createElement(React.Fragment, null,
2217
- React.createElement(Drawer, Object.assign({ isExpanded: !!activeQuickStartID, isInline: true }, props),
2218
- React.createElement(DrawerContent, Object.assign({ panelContent: React.createElement(QuickStartDrawerContent, { quickStarts: combinedQuickStarts, handleDrawerClose: handleClose, appendTo: appendTo, fullWidth: fullWidth }) }, fullWidthBodyStyle),
2219
- React.createElement(DrawerContentBody, null, children))),
2220
- React.createElement(QuickStartCloseModal, { isOpen: modalOpen, onConfirm: onModalConfirm, onCancel: onModalCancel })));
2165
+ return (jsxs(Fragment$1, { children: [jsx(Drawer, Object.assign({ isExpanded: !!activeQuickStartID, isInline: true }, props, { children: jsx(DrawerContent, Object.assign({ panelContent: jsx(QuickStartDrawerContent, { quickStarts: combinedQuickStarts, handleDrawerClose: handleClose, appendTo: appendTo, fullWidth: fullWidth }) }, fullWidthBodyStyle, { children: jsx(DrawerContentBody, { children: children }) })) })), jsx(QuickStartCloseModal, { isOpen: modalOpen, onConfirm: onModalConfirm, onCancel: onModalCancel })] }));
2221
2166
  };
2222
2167
 
2223
2168
  const QuickStartContainer = (_a) => {
@@ -2232,13 +2177,13 @@ const QuickStartContainer = (_a) => {
2232
2177
  useQueryParams,
2233
2178
  markdown,
2234
2179
  alwaysShowTaskReview }, contextProps));
2235
- React.useEffect(() => {
2180
+ useEffect(() => {
2236
2181
  if (quickStarts &&
2237
2182
  JSON.stringify(quickStarts) !== JSON.stringify(valuesForQuickstartContext.allQuickStarts)) {
2238
2183
  valuesForQuickstartContext.setAllQuickStarts(quickStarts);
2239
2184
  }
2240
2185
  }, [quickStarts, valuesForQuickstartContext]);
2241
- React.useEffect(() => {
2186
+ useEffect(() => {
2242
2187
  if (loading !== valuesForQuickstartContext.loading) {
2243
2188
  valuesForQuickstartContext.setLoading(loading);
2244
2189
  }
@@ -2247,7 +2192,7 @@ const QuickStartContainer = (_a) => {
2247
2192
  fullWidth,
2248
2193
  onCloseInProgress,
2249
2194
  onCloseNotInProgress }, props);
2250
- return (React.createElement(QuickStartContext.Provider, { value: valuesForQuickstartContext }, isManagedDrawer ? (React.createElement(QuickStartDrawer, Object.assign({}, drawerProps), children)) : (children)));
2195
+ return (jsx(QuickStartContext.Provider, Object.assign({ value: valuesForQuickstartContext }, { children: isManagedDrawer ? (jsx(QuickStartDrawer, Object.assign({}, drawerProps, { children: children }))) : (children) })));
2251
2196
  };
2252
2197
 
2253
2198
  const HelpTopicContextDefaults = {
@@ -2259,14 +2204,14 @@ const HelpTopicContextDefaults = {
2259
2204
  setFilteredHelpTopics: () => { },
2260
2205
  loading: false,
2261
2206
  };
2262
- const HelpTopicContext = React__default.createContext(HelpTopicContextDefaults);
2207
+ const HelpTopicContext = createContext(HelpTopicContextDefaults);
2263
2208
  const useValuesForHelpTopicContext = (value = {}) => {
2264
2209
  const combinedValue = Object.assign(Object.assign({}, HelpTopicContextDefaults), value);
2265
- const [loading, setLoading] = React__default.useState(combinedValue.loading);
2210
+ const [loading, setLoading] = useState(combinedValue.loading);
2266
2211
  // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
2267
- const [helpTopics, setHelpTopics] = React__default.useState(combinedValue.helpTopics || []);
2268
- const [activeHelpTopic, setActiveHelpTopic] = React__default.useState(combinedValue.activeHelpTopic || null);
2269
- const setActiveHelpTopicByName = React__default.useCallback((helpTopicName) => {
2212
+ const [helpTopics, setHelpTopics] = useState(combinedValue.helpTopics || []);
2213
+ const [activeHelpTopic, setActiveHelpTopic] = useState(combinedValue.activeHelpTopic || null);
2214
+ const setActiveHelpTopicByName = useCallback((helpTopicName) => {
2270
2215
  const topic = helpTopics.find((t) => t.name === helpTopicName);
2271
2216
  if (!helpTopicName) {
2272
2217
  setActiveHelpTopic(null);
@@ -2274,7 +2219,7 @@ const useValuesForHelpTopicContext = (value = {}) => {
2274
2219
  }
2275
2220
  setActiveHelpTopic(topic);
2276
2221
  }, [helpTopics]);
2277
- const [filteredHelpTopics, setFilteredHelpTopics] = React__default.useState(combinedValue.filteredHelpTopics || []);
2222
+ const [filteredHelpTopics, setFilteredHelpTopics] = useState(combinedValue.filteredHelpTopics || []);
2278
2223
  return {
2279
2224
  helpTopics,
2280
2225
  setHelpTopics,
@@ -2290,8 +2235,8 @@ const useValuesForHelpTopicContext = (value = {}) => {
2290
2235
  const HelpTopicPanelContent = (_a) => {
2291
2236
  var _b, _c;
2292
2237
  var { activeHelpTopic = null, filteredHelpTopics = [], isResizable = true, onClose } = _a, props = __rest(_a, ["activeHelpTopic", "filteredHelpTopics", "isResizable", "onClose"]);
2293
- const { setActiveHelpTopicByName } = React.useContext(HelpTopicContext);
2294
- const [isHelpTopicMenuOpen, setIsHelpTopicMenuOpen] = React.useState(false);
2238
+ const { setActiveHelpTopicByName } = useContext(HelpTopicContext);
2239
+ const [isHelpTopicMenuOpen, setIsHelpTopicMenuOpen] = useState(false);
2295
2240
  const toggleHelpTopicMenu = () => {
2296
2241
  setIsHelpTopicMenuOpen(!isHelpTopicMenuOpen);
2297
2242
  };
@@ -2301,24 +2246,10 @@ const HelpTopicPanelContent = (_a) => {
2301
2246
  toggleHelpTopicMenu();
2302
2247
  };
2303
2248
  const helpTopicOptions = filteredHelpTopics.length > 1 &&
2304
- filteredHelpTopics.map((topic) => (React.createElement(SelectOption, { key: topic.name, value: topic.name }, topic.title)));
2305
- const paddingContainer = (children) => React.createElement("div", { style: { padding: '24px' } }, children);
2306
- const panelBodyItems = (React.createElement(React.Fragment, null,
2307
- paddingContainer(React.createElement(QuickStartMarkdownView, { content: activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.content })),
2308
- !!((_b = activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.links) === null || _b === void 0 ? void 0 : _b.length) && React.createElement(Divider, null),
2309
- paddingContainer(React.createElement(Stack, { hasGutter: true }, (_c = activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.links) === null || _c === void 0 ? void 0 : _c.map(({ href, text, newTab, isExternal }, index) => (React.createElement(StackItem, { key: index },
2310
- React.createElement(Button, { component: "a", href: href, target: newTab ? '_blank' : '', rel: "noopener noreferrer", variant: "link", "aria-label": `Open documentation in new window`, isInline: true, icon: isExternal ? React.createElement(ExternalLinkAltIcon, null) : null, iconPosition: "right", style: { fontSize: 'inherit' } }, text || href))))))));
2311
- const content = (React.createElement(DrawerPanelContent, Object.assign({ isResizable: isResizable }, props),
2312
- React.createElement("div", null,
2313
- React.createElement(DrawerHead, null,
2314
- React.createElement("div", null,
2315
- helpTopicOptions && (React.createElement(Select, { isPlain: true, id: "help-topics-select", selected: activeHelpTopic, isOpen: isHelpTopicMenuOpen, onSelect: onSelectHelpTopic, onOpenChange: (isOpen) => setIsHelpTopicMenuOpen(isOpen), toggle: (toggleRef) => (React.createElement(MenuToggle, { isFullWidth: true, ref: toggleRef, icon: React.createElement(BarsIcon, null), onClick: toggleHelpTopicMenu, isExpanded: isHelpTopicMenuOpen }, activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.title)) },
2316
- React.createElement(SelectList, null, helpTopicOptions))),
2317
- React.createElement(Title, { headingLevel: "h1", size: "xl", style: { marginRight: 'var(--pf-t--global--spacer--md)' } }, activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.title)),
2318
- React.createElement(DrawerActions, null,
2319
- React.createElement(DrawerCloseButton, { onClick: onClose, "data-testid": "qs-drawer-close" }))),
2320
- React.createElement(Divider, null),
2321
- React.createElement(DrawerPanelBody, { "data-test": "content" }, panelBodyItems))));
2249
+ filteredHelpTopics.map((topic) => (jsx(SelectOption, Object.assign({ value: topic.name }, { children: topic.title }), topic.name)));
2250
+ const paddingContainer = (children) => jsx("div", Object.assign({ style: { padding: '24px' } }, { children: children }));
2251
+ const panelBodyItems = (jsxs(Fragment$1, { children: [paddingContainer(jsx(QuickStartMarkdownView, { content: activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.content })), !!((_b = activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.links) === null || _b === void 0 ? void 0 : _b.length) && jsx(Divider, {}), paddingContainer(jsx(Stack, Object.assign({ hasGutter: true }, { children: (_c = activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.links) === null || _c === void 0 ? void 0 : _c.map(({ href, text, newTab, isExternal }, index) => (jsx(StackItem, { children: jsx(Button, Object.assign({ component: "a", href: href, target: newTab ? '_blank' : '', rel: "noopener noreferrer", variant: "link", "aria-label": `Open documentation in new window`, isInline: true, icon: isExternal ? jsx(ExternalLinkAltIcon, {}) : null, iconPosition: "right", style: { fontSize: 'inherit' } }, { children: text || href })) }, index))) })))] }));
2252
+ const content = (jsx(DrawerPanelContent, Object.assign({ isResizable: isResizable }, props, { children: jsxs("div", { children: [jsxs(DrawerHead, { children: [jsxs("div", { children: [helpTopicOptions && (jsx(Select, Object.assign({ isPlain: true, id: "help-topics-select", selected: activeHelpTopic, isOpen: isHelpTopicMenuOpen, onSelect: onSelectHelpTopic, onOpenChange: (isOpen) => setIsHelpTopicMenuOpen(isOpen), toggle: (toggleRef) => (jsx(MenuToggle, Object.assign({ isFullWidth: true, ref: toggleRef, icon: jsx(BarsIcon, {}), onClick: toggleHelpTopicMenu, isExpanded: isHelpTopicMenuOpen }, { children: activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.title }))) }, { children: jsx(SelectList, { children: helpTopicOptions }) }))), jsx(Title, Object.assign({ headingLevel: "h1", size: "xl", style: { marginRight: 'var(--pf-t--global--spacer--md)' } }, { children: activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.title }))] }), jsx(DrawerActions, { children: jsx(DrawerCloseButton, { onClick: onClose, "data-testid": "qs-drawer-close" }) })] }), jsx(Divider, {}), jsx(DrawerPanelBody, Object.assign({ "data-test": "content" }, { children: panelBodyItems }))] }) })));
2322
2253
  return content;
2323
2254
  };
2324
2255
 
@@ -2327,30 +2258,27 @@ const HelpTopicContainer = (_a) => {
2327
2258
  const valuesForHelpTopicContext = useValuesForHelpTopicContext(Object.assign({ helpTopics,
2328
2259
  language, resourceBundle: Object.assign({}, resourceBundle), loading,
2329
2260
  markdown }, contextProps));
2330
- React.useEffect(() => {
2261
+ useEffect(() => {
2331
2262
  if (loading !== valuesForHelpTopicContext.loading) {
2332
2263
  valuesForHelpTopicContext.setLoading(loading);
2333
2264
  }
2334
2265
  }, [loading, valuesForHelpTopicContext]);
2335
- React.useEffect(() => {
2266
+ useEffect(() => {
2336
2267
  if (helpTopics &&
2337
2268
  JSON.stringify(helpTopics) !== JSON.stringify(valuesForHelpTopicContext.helpTopics)) {
2338
2269
  valuesForHelpTopicContext.setHelpTopics(helpTopics);
2339
2270
  }
2340
2271
  }, [helpTopics, valuesForHelpTopicContext]);
2341
- return (React.createElement(HelpTopicContext.Provider, { value: valuesForHelpTopicContext },
2342
- React.createElement(HelpTopicDrawer, Object.assign({}, props), children)));
2272
+ return (jsx(HelpTopicContext.Provider, Object.assign({ value: valuesForHelpTopicContext }, { children: jsx(HelpTopicDrawer, Object.assign({}, props, { children: children })) })));
2343
2273
  };
2344
2274
  const HelpTopicDrawer = (_a) => {
2345
2275
  var { children } = _a, props = __rest(_a, ["children"]);
2346
- const { activeHelpTopic, filteredHelpTopics, setActiveHelpTopicByName } = React.useContext(HelpTopicContext);
2276
+ const { activeHelpTopic, filteredHelpTopics, setActiveHelpTopicByName } = useContext(HelpTopicContext);
2347
2277
  const onClose = () => {
2348
2278
  setActiveHelpTopicByName('');
2349
2279
  };
2350
- const panelContent = (React.createElement(HelpTopicPanelContent, { activeHelpTopic: activeHelpTopic, filteredHelpTopics: filteredHelpTopics, onClose: onClose }));
2351
- return (React.createElement(React.Fragment, null,
2352
- React.createElement(Drawer, Object.assign({ isExpanded: !!activeHelpTopic, isInline: true }, props), children ? (React.createElement(DrawerContent, { panelContent: panelContent },
2353
- React.createElement(DrawerContentBody, null, children))) : (React.createElement("div", { className: "pf-v6-c-drawer__main" }, panelContent)))));
2280
+ const panelContent = (jsx(HelpTopicPanelContent, { activeHelpTopic: activeHelpTopic, filteredHelpTopics: filteredHelpTopics, onClose: onClose }));
2281
+ return (jsx(Fragment$1, { children: jsx(Drawer, Object.assign({ isExpanded: !!activeHelpTopic, isInline: true }, props, { children: children ? (jsx(DrawerContent, Object.assign({ panelContent: panelContent }, { children: jsx(DrawerContentBody, { children: children }) }))) : (jsx("div", Object.assign({ className: "pf-v6-c-drawer__main" }, { children: panelContent }))) })) }));
2354
2282
  };
2355
2283
 
2356
2284
  const useLocalStorage = (key, initialValue) => {