@patternfly/quickstarts 1.2.3 → 1.4.1-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -2
- package/dist/QuickStartDrawer.d.ts +2 -0
- package/dist/QuickStartPanelContent.d.ts +1 -0
- package/dist/catalog/QuickStartTileFooterExternal.d.ts +1 -0
- package/dist/catalog/QuickStartTileHeader.d.ts +1 -0
- package/dist/controller/QuickStartIntroduction.d.ts +2 -0
- package/dist/index.es.js +107 -62
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +106 -61
- package/dist/index.js.map +1 -1
- package/dist/patternfly-global.css +1189 -0
- package/dist/patternfly-nested.css +7243 -0
- package/dist/quickstarts-base.css +232 -47
- package/dist/quickstarts-full.es.js +375 -254
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/quickstarts-standalone.css +640 -0
- package/dist/quickstarts-standalone.min.css +4 -0
- package/dist/quickstarts.css +232 -47
- package/dist/quickstarts.min.css +1 -1
- package/dist/styles/patternfly-global-entry.d.ts +1 -0
- package/dist/styles/patternfly-nested-entry.d.ts +1 -0
- package/dist/styles/quickstarts-standalone-entry.d.ts +1 -0
- package/dist/utils/quick-start-context.d.ts +5 -0
- package/package.json +9 -7
package/dist/index.js
CHANGED
|
@@ -178,6 +178,7 @@ var en = {
|
|
|
178
178
|
"{{count, number}} item": "{{count, number}} item",
|
|
179
179
|
"{{count, number}} item_plural": "{{count, number}} items",
|
|
180
180
|
"Prerequisites ({{totalPrereqs}})": "Prerequisites ({{totalPrereqs}})",
|
|
181
|
+
"View Prerequisites ({{totalPrereqs}})": "View Prerequisites ({{totalPrereqs}})",
|
|
181
182
|
Prerequisites: Prerequisites,
|
|
182
183
|
"Show prerequisites": "Show prerequisites",
|
|
183
184
|
Complete: Complete,
|
|
@@ -205,7 +206,8 @@ var en = {
|
|
|
205
206
|
"Your progress will be saved.": "Your progress will be saved.",
|
|
206
207
|
"Not available": "Not available",
|
|
207
208
|
"Copy to clipboard": "Copy to clipboard",
|
|
208
|
-
"Successfully copied to clipboard!": "Successfully copied to clipboard!"
|
|
209
|
+
"Successfully copied to clipboard!": "Successfully copied to clipboard!",
|
|
210
|
+
"Quick start • {{duration, number}} minutes": "Quick start • {{duration, number}} minutes"
|
|
209
211
|
};
|
|
210
212
|
|
|
211
213
|
/* eslint-disable */
|
|
@@ -615,8 +617,10 @@ const QuickStartContextDefaults = {
|
|
|
615
617
|
},
|
|
616
618
|
setFilter: () => { },
|
|
617
619
|
footer: null,
|
|
620
|
+
useLegacyHeaderColors: false,
|
|
618
621
|
markdown: null,
|
|
619
622
|
loading: false,
|
|
623
|
+
alwaysShowTaskReview: false,
|
|
620
624
|
};
|
|
621
625
|
const QuickStartContext = React.createContext(QuickStartContextDefaults);
|
|
622
626
|
const getResource = (resource, options, resourceBundle, lng) => {
|
|
@@ -632,7 +636,7 @@ const getResource = (resource, options, resourceBundle, lng) => {
|
|
|
632
636
|
const useValuesForQuickStartContext = (value = {}) => {
|
|
633
637
|
var _a, _b;
|
|
634
638
|
const combinedValue = Object.assign(Object.assign({}, QuickStartContextDefaults), value);
|
|
635
|
-
const { activeQuickStartID, setActiveQuickStartID, setAllQuickStartStates, useQueryParams, allQuickStartStates, allQuickStarts = [], footer, markdown, } = combinedValue;
|
|
639
|
+
const { activeQuickStartID, setActiveQuickStartID, setAllQuickStartStates, useQueryParams, allQuickStartStates, allQuickStarts = [], footer, useLegacyHeaderColors, markdown, } = combinedValue;
|
|
636
640
|
const [quickStarts, setQuickStarts] = React__default['default'].useState(combinedValue.allQuickStarts || []);
|
|
637
641
|
const [resourceBundle, setResourceBundle] = React__default['default'].useState(Object.assign(Object.assign({}, en), combinedValue.resourceBundle));
|
|
638
642
|
const [language, setLanguage] = React__default['default'].useState(combinedValue.language);
|
|
@@ -644,6 +648,7 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
644
648
|
return getResource(resource, count !== undefined ? { count } : null, resourceBundle, language);
|
|
645
649
|
}, [resourceBundle, language]);
|
|
646
650
|
const [loading, setLoading] = React__default['default'].useState(combinedValue.loading);
|
|
651
|
+
const [alwaysShowTaskReview, setAlwaysShowTaskReview] = React__default['default'].useState(combinedValue.alwaysShowTaskReview);
|
|
647
652
|
const initialSearchParams = new URLSearchParams(window.location.search);
|
|
648
653
|
const initialSearchQuery = initialSearchParams.get(QUICKSTART_SEARCH_FILTER_KEY) || '';
|
|
649
654
|
const initialStatusFilters = ((_a = initialSearchParams.get(QUICKSTART_STATUS_FILTER_KEY)) === null || _a === void 0 ? void 0 : _a.split(',')) || [];
|
|
@@ -714,6 +719,10 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
714
719
|
});
|
|
715
720
|
setAllQuickStartStates((qs) => (Object.assign(Object.assign({}, qs), { [quickStartId]: getDefaultQuickStartState(totalTasks, exports.QuickStartStatus.IN_PROGRESS) })));
|
|
716
721
|
}, [setActiveQuickStartID, setAllQuickStartStates, useQueryParams]);
|
|
722
|
+
// When alwaysShowTaskReview preference is enabled, skip visited step and go directly to review
|
|
723
|
+
const stepAfterInitial = alwaysShowTaskReview
|
|
724
|
+
? exports.QuickStartTaskStatus.REVIEW
|
|
725
|
+
: exports.QuickStartTaskStatus.VISITED;
|
|
717
726
|
const nextStep = React.useCallback((totalTasks) => {
|
|
718
727
|
if (!activeQuickStartID) {
|
|
719
728
|
return;
|
|
@@ -740,19 +749,19 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
740
749
|
if (taskNumber < totalTasks && !updatedTaskStatus) {
|
|
741
750
|
updatedTaskNumber = taskNumber + 1;
|
|
742
751
|
}
|
|
743
|
-
const
|
|
752
|
+
const markInitialStepVisitedOrReview = updatedTaskNumber > -1 &&
|
|
744
753
|
quickStart[getTaskStatusKey(updatedTaskNumber)] === exports.QuickStartTaskStatus.INIT
|
|
745
|
-
?
|
|
754
|
+
? stepAfterInitial
|
|
746
755
|
: quickStart[getTaskStatusKey(updatedTaskNumber)];
|
|
747
756
|
const newState = Object.assign(Object.assign({}, qs), { [activeQuickStartID]: Object.assign(Object.assign(Object.assign(Object.assign({}, quickStart), (updatedStatus ? { status: updatedStatus } : {})), (updatedTaskNumber > -1
|
|
748
757
|
? {
|
|
749
758
|
taskNumber: updatedTaskNumber,
|
|
750
|
-
[getTaskStatusKey(updatedTaskNumber)]:
|
|
759
|
+
[getTaskStatusKey(updatedTaskNumber)]: markInitialStepVisitedOrReview,
|
|
751
760
|
}
|
|
752
761
|
: {})), (updatedTaskStatus ? { [getTaskStatusKey(taskNumber)]: updatedTaskStatus } : {})) });
|
|
753
762
|
return newState;
|
|
754
763
|
});
|
|
755
|
-
}, [activeQuickStartID, setAllQuickStartStates]);
|
|
764
|
+
}, [activeQuickStartID, setAllQuickStartStates, stepAfterInitial]);
|
|
756
765
|
const previousStep = React.useCallback(() => {
|
|
757
766
|
setAllQuickStartStates((qs) => {
|
|
758
767
|
const quickStart = qs[activeQuickStartID];
|
|
@@ -774,7 +783,7 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
774
783
|
let updatedTaskStatus = {};
|
|
775
784
|
for (let taskIndex = 0; taskIndex <= taskNumber; taskIndex++) {
|
|
776
785
|
const taskStatus = quickStart[getTaskStatusKey(taskIndex)];
|
|
777
|
-
const newTaskStatus = taskStatus === exports.QuickStartTaskStatus.INIT ?
|
|
786
|
+
const newTaskStatus = taskStatus === exports.QuickStartTaskStatus.INIT ? stepAfterInitial : undefined;
|
|
778
787
|
if (newTaskStatus) {
|
|
779
788
|
updatedTaskStatus = Object.assign(Object.assign({}, updatedTaskStatus), { [getTaskStatusKey(taskIndex)]: newTaskStatus });
|
|
780
789
|
}
|
|
@@ -782,7 +791,7 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
782
791
|
const updatedQuickStart = Object.assign(Object.assign(Object.assign(Object.assign({}, quickStart), (updatedStatus ? { status: updatedStatus } : {})), { taskNumber }), updatedTaskStatus);
|
|
783
792
|
return Object.assign(Object.assign({}, qs), { [quickStartId]: updatedQuickStart });
|
|
784
793
|
});
|
|
785
|
-
}, [setAllQuickStartStates]);
|
|
794
|
+
}, [setAllQuickStartStates, stepAfterInitial]);
|
|
786
795
|
const setQuickStartTaskStatus = React.useCallback((taskStatus) => {
|
|
787
796
|
const quickStart = allQuickStartStates[activeQuickStartID];
|
|
788
797
|
const { taskNumber } = quickStart;
|
|
@@ -810,6 +819,7 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
810
819
|
setQuickStartTaskStatus,
|
|
811
820
|
getQuickStartForId,
|
|
812
821
|
footer,
|
|
822
|
+
useLegacyHeaderColors,
|
|
813
823
|
useQueryParams,
|
|
814
824
|
markdown,
|
|
815
825
|
resourceBundle,
|
|
@@ -828,6 +838,8 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
828
838
|
setFilter,
|
|
829
839
|
loading,
|
|
830
840
|
setLoading,
|
|
841
|
+
alwaysShowTaskReview,
|
|
842
|
+
setAlwaysShowTaskReview,
|
|
831
843
|
};
|
|
832
844
|
};
|
|
833
845
|
const QuickStartContextProvider = ({ children, value }) => {
|
|
@@ -993,7 +1005,7 @@ const SimplePopper = ({ children }) => {
|
|
|
993
1005
|
}
|
|
994
1006
|
}, [destroy, isOpen]);
|
|
995
1007
|
return isOpen ? (React__namespace.createElement(Portal, null,
|
|
996
|
-
React__namespace.createElement("div", { ref: nodeRefCallback, style: { zIndex: 9999, position: 'absolute', top: 0, left: 0 } }, children))) : null;
|
|
1008
|
+
React__namespace.createElement("div", { ref: nodeRefCallback, style: { zIndex: 9999, position: 'absolute', top: 0, left: 0 }, className: "pfext-quick-start__base" }, children))) : null;
|
|
997
1009
|
};
|
|
998
1010
|
|
|
999
1011
|
const isInViewport = (elementToCheck) => {
|
|
@@ -1236,7 +1248,7 @@ const CopyClipboard = ({ element, rootSelector, docContext, }) => {
|
|
|
1236
1248
|
useEventListener(element, 'mouseleave', React__namespace.useCallback(() => {
|
|
1237
1249
|
setShowSuccessContent(false);
|
|
1238
1250
|
}, []));
|
|
1239
|
-
return showSuccessContent ? (React__namespace.createElement(reactCore.Tooltip, { key: "after-copy", isVisible: true, reference: () => element, content: getResource('Successfully copied to clipboard!') })) : (React__namespace.createElement(reactCore.Tooltip, { key: "before-copy", reference: () => element, content: getResource('Copy to clipboard') }));
|
|
1251
|
+
return showSuccessContent ? (React__namespace.createElement(reactCore.Tooltip, { key: "after-copy", isVisible: true, reference: () => element, content: getResource('Successfully copied to clipboard!'), className: "pfext-quick-start__base" })) : (React__namespace.createElement(reactCore.Tooltip, { key: "before-copy", reference: () => element, content: getResource('Copy to clipboard'), className: "pfext-quick-start__base" }));
|
|
1240
1252
|
};
|
|
1241
1253
|
const MarkdownCopyClipboard = ({ docContext, rootSelector, }) => {
|
|
1242
1254
|
const elements = docContext.querySelectorAll(`${rootSelector} [${MARKDOWN_COPY_BUTTON_ID}]`);
|
|
@@ -1561,10 +1573,11 @@ const QuickStartTileDescription = ({ description, prerequisites, }) => {
|
|
|
1561
1573
|
React__namespace.createElement(reactCore.Text, { component: reactCore.TextVariants.h5, className: "pfext-quick-start-tile-prerequisites__text" },
|
|
1562
1574
|
getResource('Prerequisites ({{totalPrereqs}})').replace('{{totalPrereqs}}', prereqs.length),
|
|
1563
1575
|
' '),
|
|
1564
|
-
React__namespace.createElement(reactCore.Popover, { "aria-label": getResource('Prerequisites'), headerContent: getResource('Prerequisites'), className: "pfext-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
React__namespace.createElement(
|
|
1576
|
+
React__namespace.createElement(reactCore.Popover, { "aria-label": getResource('Prerequisites'), headerContent: getResource('Prerequisites'), className: "pfext-quick-start__base", bodyContent: React__namespace.createElement("div", { className: "pfext-popover__base" },
|
|
1577
|
+
React__namespace.createElement(reactCore.TextList, { "aria-label": getResource('Prerequisites'), className: "pfext-quick-start-tile-prerequisites-list" }, prereqs.map((prerequisite, index) => (
|
|
1578
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
1579
|
+
React__namespace.createElement(reactCore.TextListItem, { key: index },
|
|
1580
|
+
React__namespace.createElement(QuickStartMarkdownView, { content: prerequisite })))))) },
|
|
1568
1581
|
React__namespace.createElement(reactCore.Button, { variant: "link", isInline: true, className: "pfext-quick-start-tile-prerequisites__icon", "data-testid": "qs-card-prereqs", onClick: (e) => {
|
|
1569
1582
|
e.preventDefault();
|
|
1570
1583
|
e.stopPropagation();
|
|
@@ -1587,20 +1600,20 @@ const QuickStartTileFooter = ({ quickStartId, status, totalTasks, }) => {
|
|
|
1587
1600
|
}, [quickStartId, restartQuickStart, totalTasks]);
|
|
1588
1601
|
return (React__namespace.createElement(reactCore.Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
|
|
1589
1602
|
status === exports.QuickStartStatus.NOT_STARTED && (React__namespace.createElement(reactCore.FlexItem, null,
|
|
1590
|
-
React__namespace.createElement(reactCore.Button, { onClick: start, variant: "link", isInline: true, "data-testid": "qs-card-notStarted-start" }, getResource('Start')))),
|
|
1603
|
+
React__namespace.createElement(reactCore.Button, { onClick: start, variant: "link", isInline: true, "data-testid": "qs-card-notStarted-start", id: `${quickStartId}-start`, "aria-labelledby": `${quickStartId}-start ${quickStartId}` }, getResource('Start')))),
|
|
1591
1604
|
status === exports.QuickStartStatus.IN_PROGRESS && activeQuickStartID !== quickStartId && (React__namespace.createElement(reactCore.FlexItem, null,
|
|
1592
|
-
React__namespace.createElement(reactCore.Button, { variant: "link", isInline: true, "data-testid": "qs-card-inProgress-resume" }, getResource('Continue')))),
|
|
1605
|
+
React__namespace.createElement(reactCore.Button, { variant: "link", isInline: true, "data-testid": "qs-card-inProgress-resume", id: `${quickStartId}-continue`, "aria-labelledby": `${quickStartId}-continue ${quickStartId}` }, getResource('Continue')))),
|
|
1593
1606
|
status === exports.QuickStartStatus.COMPLETE && (React__namespace.createElement(reactCore.FlexItem, null,
|
|
1594
|
-
React__namespace.createElement(reactCore.Button, { onClick: restart, variant: "link", isInline: true, "data-testid": "qs-card-complete-restart" }, getResource('
|
|
1607
|
+
React__namespace.createElement(reactCore.Button, { onClick: restart, variant: "link", isInline: true, "data-testid": "qs-card-complete-restart", id: `${quickStartId}-restart`, "aria-labelledby": `${quickStartId}-restart ${quickStartId}` }, getResource('Restart')))),
|
|
1595
1608
|
status === exports.QuickStartStatus.IN_PROGRESS && (React__namespace.createElement(reactCore.FlexItem, null,
|
|
1596
|
-
React__namespace.createElement(reactCore.Button, { onClick: restart, variant: "link", isInline: true, "data-testid": "qs-card-inProgress-restart" }, getResource('Restart'))))));
|
|
1609
|
+
React__namespace.createElement(reactCore.Button, { onClick: restart, variant: "link", isInline: true, "data-testid": "qs-card-inProgress-restart", id: `${quickStartId}-restart`, "aria-labelledby": `${quickStartId}-restart ${quickStartId}` }, getResource('Restart'))))));
|
|
1597
1610
|
};
|
|
1598
1611
|
|
|
1599
|
-
const QuickStartTileFooterExternal = ({ link }) => {
|
|
1612
|
+
const QuickStartTileFooterExternal = ({ link, quickStartId, }) => {
|
|
1600
1613
|
const { href, text } = link;
|
|
1601
1614
|
return (React__namespace.createElement(reactCore.Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
|
|
1602
1615
|
React__namespace.createElement(reactCore.FlexItem, null,
|
|
1603
|
-
React__namespace.createElement(reactCore.Button, { component: "a", href: href, target: "_blank", rel: "noopener noreferrer", variant: "link", "aria-label": `Open documentation in new window`, isInline: true, icon: React__namespace.createElement(ExternalLinkAltIcon__default['default'], null), iconPosition: "right" }, text || href))));
|
|
1616
|
+
React__namespace.createElement(reactCore.Button, { component: "a", href: href, target: "_blank", rel: "noopener noreferrer", variant: "link", "aria-label": `Open documentation in new window`, isInline: true, icon: React__namespace.createElement(ExternalLinkAltIcon__default['default'], null), iconPosition: "right", id: quickStartId, "aria-labelledby": `${quickStartId}-external ${quickStartId}` }, text || href))));
|
|
1604
1617
|
};
|
|
1605
1618
|
|
|
1606
1619
|
const statusColorMap = {
|
|
@@ -1608,7 +1621,7 @@ const statusColorMap = {
|
|
|
1608
1621
|
[exports.QuickStartStatus.IN_PROGRESS]: 'purple',
|
|
1609
1622
|
[exports.QuickStartStatus.NOT_STARTED]: 'grey',
|
|
1610
1623
|
};
|
|
1611
|
-
const QuickStartTileHeader = ({ status, duration, name, type, }) => {
|
|
1624
|
+
const QuickStartTileHeader = ({ status, duration, name, type, quickStartId, }) => {
|
|
1612
1625
|
const { getResource } = React__namespace.useContext(QuickStartContext);
|
|
1613
1626
|
const statusLocaleMap = {
|
|
1614
1627
|
[exports.QuickStartStatus.COMPLETE]: getResource('Complete'),
|
|
@@ -1616,7 +1629,7 @@ const QuickStartTileHeader = ({ status, duration, name, type, }) => {
|
|
|
1616
1629
|
[exports.QuickStartStatus.NOT_STARTED]: getResource('Not started'),
|
|
1617
1630
|
};
|
|
1618
1631
|
return (React__namespace.createElement("div", { className: "pfext-quick-start-tile-header" },
|
|
1619
|
-
React__namespace.createElement(reactCore.Title, { headingLevel: "h3", "data-test": "title" }, name),
|
|
1632
|
+
React__namespace.createElement(reactCore.Title, { headingLevel: "h3", "data-test": "title", id: quickStartId }, name),
|
|
1620
1633
|
React__namespace.createElement("div", { className: "pfext-quick-start-tile-header__status" },
|
|
1621
1634
|
type && (React__namespace.createElement(reactCore.Label, { className: "pfext-quick-start-tile-header--margin", color: type.color }, type.text)),
|
|
1622
1635
|
duration && (React__namespace.createElement(reactCore.Label, { variant: "outline", "data-test": "duration", icon: React__namespace.createElement(OutlinedClockIcon__default['default'], null), className: "pfext-quick-start-tile-header--margin" }, getResource('{{duration, number}} minutes', duration).replace('{{duration, number}}', duration))),
|
|
@@ -1634,7 +1647,7 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, })
|
|
|
1634
1647
|
else {
|
|
1635
1648
|
quickStartIcon = (React__namespace.createElement(FallbackImg, { className: "pfext-catalog-item-icon__img--large", src: icon, alt: "", fallback: React__namespace.createElement(RocketIcon__default['default'], null) }));
|
|
1636
1649
|
}
|
|
1637
|
-
const footerComponent = footer && footer.show === false ? null : link ? (React__namespace.createElement(QuickStartTileFooterExternal, { link: link })) : (React__namespace.createElement(QuickStartTileFooter, { quickStartId: id, status: status, totalTasks: tasks === null || tasks === void 0 ? void 0 : tasks.length }));
|
|
1650
|
+
const footerComponent = footer && footer.show === false ? null : link ? (React__namespace.createElement(QuickStartTileFooterExternal, { link: link, quickStartId: id })) : (React__namespace.createElement(QuickStartTileFooter, { quickStartId: id, status: status, totalTasks: tasks === null || tasks === void 0 ? void 0 : tasks.length }));
|
|
1638
1651
|
const handleClick = (e) => {
|
|
1639
1652
|
var _a;
|
|
1640
1653
|
if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) {
|
|
@@ -1654,7 +1667,7 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, })
|
|
|
1654
1667
|
// @ts-ignore
|
|
1655
1668
|
component: "div", style: {
|
|
1656
1669
|
cursor: 'pointer',
|
|
1657
|
-
}, icon: quickStartIcon, className: "pfext-quick-start-tile", "data-testid": `qs-card-${camelize(displayName)}`, featured: isActive, title: React__namespace.createElement(QuickStartTileHeader, { name: displayName, status: status, duration: durationMinutes, type: type }), onClick: handleClick, "data-test": `tile ${id}`, description: React__namespace.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent })));
|
|
1670
|
+
}, icon: quickStartIcon, className: "pfext-quick-start-tile", "data-testid": `qs-card-${camelize(displayName)}`, featured: isActive, title: React__namespace.createElement(QuickStartTileHeader, { name: displayName, status: status, duration: durationMinutes, type: type, quickStartId: id }), onClick: handleClick, "data-test": `tile ${id}`, description: React__namespace.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent })));
|
|
1658
1671
|
};
|
|
1659
1672
|
|
|
1660
1673
|
const QuickStartCatalog = ({ quickStarts }) => {
|
|
@@ -1847,7 +1860,7 @@ const QuickStartCatalogPage = ({ quickStarts, showFilter, sortFnc = (q1, q2) =>
|
|
|
1847
1860
|
if (!allQuickStarts || allQuickStarts.length === 0) {
|
|
1848
1861
|
return React__namespace.createElement(EmptyBox, { label: getResource('Quick Starts') });
|
|
1849
1862
|
}
|
|
1850
|
-
return (React__namespace.createElement(
|
|
1863
|
+
return (React__namespace.createElement("div", { className: "pfext-quick-start__base" },
|
|
1851
1864
|
showTitle && (React__namespace.createElement("div", { className: "pfext-page-layout__header" },
|
|
1852
1865
|
React__namespace.createElement(reactCore.Text, { component: "h1", className: "pfext-page-layout__title", "data-test": "page-title" }, title || getResource('Quick Starts')),
|
|
1853
1866
|
hint && React__namespace.createElement("div", { className: "pfext-page-layout__hint" }, hint))),
|
|
@@ -1868,39 +1881,51 @@ const QuickStartCatalogToolbar = ({ children }) => (React__namespace.createEleme
|
|
|
1868
1881
|
|
|
1869
1882
|
const QuickStartCloseModal = ({ isOpen, onConfirm, onCancel, }) => {
|
|
1870
1883
|
const { getResource } = React__namespace.useContext(QuickStartContext);
|
|
1871
|
-
return (React__namespace.createElement(Modal, { className: "pfext-quick-start-drawer__modal", isOpen: isOpen, variant: reactCore.ModalVariant.small, showClose: false, "data-test": "leave-quickstart", title: getResource('Leave quick start?'), footer: React__namespace.createElement(reactCore.Flex, null,
|
|
1884
|
+
return (React__namespace.createElement(Modal, { className: "pfext-quick-start-drawer__modal pfext-quick-start__base", isOpen: isOpen, variant: reactCore.ModalVariant.small, showClose: false, "data-test": "leave-quickstart", title: getResource('Leave quick start?'), footer: React__namespace.createElement(reactCore.Flex, null,
|
|
1872
1885
|
React__namespace.createElement(reactCore.FlexItem, { align: { default: 'alignRight' } },
|
|
1873
1886
|
React__namespace.createElement(reactCore.Button, { variant: "secondary", "data-test": "cancel button", onClick: onCancel }, getResource('Cancel'))),
|
|
1874
1887
|
React__namespace.createElement(reactCore.FlexItem, null,
|
|
1875
1888
|
React__namespace.createElement(reactCore.Button, { variant: "primary", "data-test": "leave button", onClick: onConfirm }, getResource('Leave')))), isFullScreen: true }, getResource('Your progress will be saved.')));
|
|
1876
1889
|
};
|
|
1877
1890
|
|
|
1878
|
-
const TaskIcon = ({ taskIndex, taskStatus
|
|
1891
|
+
const TaskIcon = ({ taskIndex, taskStatus }) => {
|
|
1879
1892
|
const { getResource } = React__namespace.useContext(QuickStartContext);
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
default:
|
|
1888
|
-
|
|
1893
|
+
const success = taskStatus === exports.QuickStartTaskStatus.SUCCESS;
|
|
1894
|
+
const failed = taskStatus === exports.QuickStartTaskStatus.FAILED;
|
|
1895
|
+
const classNames = reactStyles.css('pfext-icon-and-text__icon', {
|
|
1896
|
+
'pfext-quick-start-task-header__task-icon-init': !failed && !success,
|
|
1897
|
+
});
|
|
1898
|
+
let content;
|
|
1899
|
+
if (success) {
|
|
1900
|
+
content = (React__namespace.createElement(CheckCircleIcon__default['default'], { size: "md", className: "pfext-quick-start-task-header__task-icon-success" }));
|
|
1901
|
+
}
|
|
1902
|
+
else if (failed) {
|
|
1903
|
+
content = (React__namespace.createElement(ExclamationCircleIcon__default['default'], { size: "md", className: "pfext-quick-start-task-header__task-icon-failed" }));
|
|
1904
|
+
}
|
|
1905
|
+
else {
|
|
1906
|
+
content = getResource('{{taskIndex, number}}', taskIndex).replace('{{taskIndex, number}}', taskIndex);
|
|
1889
1907
|
}
|
|
1908
|
+
return React__namespace.createElement("span", { className: classNames }, content);
|
|
1890
1909
|
};
|
|
1891
1910
|
const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, isActiveTask, onTaskSelect, }) => {
|
|
1892
1911
|
const classNames = reactStyles.css('pfext-quick-start-task-header__title', {
|
|
1893
1912
|
'pfext-quick-start-task-header__title-success': taskStatus === exports.QuickStartTaskStatus.SUCCESS,
|
|
1894
|
-
'pfext-quick-start-task-header__title-failed': taskStatus === exports.QuickStartTaskStatus.FAILED,
|
|
1913
|
+
'pfext-quick-start-task-header__title-failed': taskStatus === (exports.QuickStartTaskStatus.FAILED || exports.QuickStartTaskStatus.VISITED),
|
|
1895
1914
|
});
|
|
1896
|
-
const
|
|
1915
|
+
const notCompleted = taskStatus === exports.QuickStartTaskStatus.VISITED;
|
|
1916
|
+
const skippedReviewOrFailed = taskStatus === exports.QuickStartTaskStatus.REVIEW || taskStatus === exports.QuickStartTaskStatus.FAILED;
|
|
1917
|
+
const tryAgain = !isActiveTask && (skippedReviewOrFailed || notCompleted) && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1918
|
+
React__namespace.createElement("div", null),
|
|
1919
|
+
React__namespace.createElement("div", { className: "pfext-quick-start-task-header__tryagain" }, "Try the steps again.")));
|
|
1920
|
+
const content = (React__namespace.createElement("div", { className: "pfext-quick-start-task-header" },
|
|
1921
|
+
React__namespace.createElement(TaskIcon, { taskIndex: taskIndex, taskStatus: taskStatus }),
|
|
1897
1922
|
React__namespace.createElement(reactCore.Title, { headingLevel: "h3", size: size, className: classNames },
|
|
1898
|
-
React__namespace.createElement(TaskIcon, { taskIndex: taskIndex, taskStatus: taskStatus }),
|
|
1899
1923
|
React__namespace.createElement("span", { dangerouslySetInnerHTML: { __html: removeParagraphWrap(markdownConvert(title)) } }),
|
|
1900
|
-
isActiveTask && subtitle && (React__namespace.createElement(
|
|
1924
|
+
isActiveTask && subtitle && (React__namespace.createElement("span", { className: "pfext-quick-start-task-header__subtitle", "data-test-id": "quick-start-task-subtitle" },
|
|
1901
1925
|
' ',
|
|
1902
|
-
|
|
1903
|
-
|
|
1926
|
+
subtitle))),
|
|
1927
|
+
tryAgain));
|
|
1928
|
+
return (React__namespace.createElement(reactCore.WizardNavItem, { content: content, step: taskIndex, onNavItemClick: () => onTaskSelect(taskIndex - 1), navItemComponent: "button", isCurrent: isActiveTask }));
|
|
1904
1929
|
};
|
|
1905
1930
|
|
|
1906
1931
|
const QuickStartTaskHeaderList = ({ tasks, allTaskStatuses, onTaskSelect, }) => {
|
|
@@ -1927,10 +1952,18 @@ const QuickStartConclusion = ({ tasks, conclusion, allTaskStatuses, nextQuickSta
|
|
|
1927
1952
|
})));
|
|
1928
1953
|
};
|
|
1929
1954
|
|
|
1930
|
-
const QuickStartIntroduction = ({ tasks, introduction, allTaskStatuses, onTaskSelect, }) => {
|
|
1955
|
+
const QuickStartIntroduction = ({ tasks, introduction, allTaskStatuses, prerequisites, onTaskSelect, }) => {
|
|
1931
1956
|
const { getResource } = React__namespace.useContext(QuickStartContext);
|
|
1957
|
+
const prereqs = prerequisites === null || prerequisites === void 0 ? void 0 : prerequisites.filter((p) => p);
|
|
1958
|
+
const [isPrereqsExpanded, setIsPrereqsExpanded] = React__namespace.useState(false);
|
|
1959
|
+
const prereqList = (prereqs === null || prereqs === void 0 ? void 0 : prereqs.length) > 0 && (React__namespace.createElement(reactCore.ExpandableSection, { toggleText: getResource('View Prerequisites ({{totalPrereqs}})').replace('{{totalPrereqs}}', prereqs.length), onToggle: () => setIsPrereqsExpanded(!isPrereqsExpanded), className: "pfext-quick-start-intro__prereq" },
|
|
1960
|
+
React__namespace.createElement(reactCore.List, { className: "pfext-quick-start-intro__prereq-list" }, prereqs.map((pr) => {
|
|
1961
|
+
return (React__namespace.createElement(reactCore.ListItem, { key: pr, className: "pfext-quick-start-intro__prereq-list__item" },
|
|
1962
|
+
React__namespace.createElement("span", { className: "pfext-quick-start-intro__prereq-list__item-content" }, pr)));
|
|
1963
|
+
}))));
|
|
1932
1964
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1933
1965
|
React__namespace.createElement(QuickStartMarkdownView, { content: introduction }),
|
|
1966
|
+
prereqList,
|
|
1934
1967
|
React__namespace.createElement("p", { style: { marginBottom: 'var(--pf-global--spacer--md)' } },
|
|
1935
1968
|
getResource('In this quick start, you will complete {{count, number}} task', tasks.length).replace('{{count, number}}', tasks.length),
|
|
1936
1969
|
":"),
|
|
@@ -1955,7 +1988,7 @@ const QuickStartTaskReview = ({ review, taskStatus, onTaskReview, }) => {
|
|
|
1955
1988
|
'pfext-quick-start-task-review--failed': taskStatus === exports.QuickStartTaskStatus.FAILED,
|
|
1956
1989
|
});
|
|
1957
1990
|
const title = React__namespace.createElement("span", { className: alertClassNames }, getResource('Check your work'));
|
|
1958
|
-
return (React__namespace.createElement(reactCore.Alert, { variant: getAlertVariant(taskStatus), title: title, isInline: true },
|
|
1991
|
+
return (React__namespace.createElement(reactCore.Alert, { className: "pfext-quick-start-task-review-alert", variant: getAlertVariant(taskStatus), title: title, isInline: true },
|
|
1959
1992
|
React__namespace.createElement(QuickStartMarkdownView, { content: instructions }),
|
|
1960
1993
|
React__namespace.createElement("span", { className: "pfext-quick-start-task-review__actions" },
|
|
1961
1994
|
React__namespace.createElement(reactCore.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 === exports.QuickStartTaskStatus.SUCCESS, onChange: () => onTaskReview(exports.QuickStartTaskStatus.SUCCESS) }),
|
|
@@ -1964,28 +1997,30 @@ const QuickStartTaskReview = ({ review, taskStatus, onTaskReview, }) => {
|
|
|
1964
1997
|
};
|
|
1965
1998
|
|
|
1966
1999
|
const QuickStartTasks = ({ tasks, taskNumber, allTaskStatuses, onTaskReview, onTaskSelect, }) => {
|
|
1967
|
-
const { getResource } = React__namespace.useContext(QuickStartContext);
|
|
2000
|
+
const { getResource, alwaysShowTaskReview } = React__namespace.useContext(QuickStartContext);
|
|
1968
2001
|
return (React__namespace.createElement("div", { className: "pfext-quick-start-tasks__list" }, tasks
|
|
1969
2002
|
.filter((_, index) => allTaskStatuses[index] !== exports.QuickStartTaskStatus.INIT)
|
|
1970
2003
|
.map((task, index) => {
|
|
1971
2004
|
const { title, description, review } = task;
|
|
1972
2005
|
const isActiveTask = index === taskNumber;
|
|
1973
2006
|
const taskStatus = allTaskStatuses[index];
|
|
2007
|
+
const shouldShowTaskReview = (!QUICKSTART_TASKS_INITIAL_STATES.includes(taskStatus) || alwaysShowTaskReview) &&
|
|
2008
|
+
review;
|
|
1974
2009
|
return (React__namespace.createElement(React__namespace.Fragment, { key: title },
|
|
1975
2010
|
React__namespace.createElement(QuickStartTaskHeader, { taskIndex: index + 1, title: title, size: "md", subtitle: getResource('{{index, number}} of {{tasks, number}}')
|
|
1976
2011
|
.replace('{{index, number}}', index + 1)
|
|
1977
2012
|
.replace('{{tasks, number}}', tasks.length), taskStatus: taskStatus, isActiveTask: isActiveTask, onTaskSelect: onTaskSelect }),
|
|
1978
|
-
isActiveTask && (React__namespace.createElement("div", {
|
|
2013
|
+
isActiveTask && (React__namespace.createElement("div", { className: "pfext-quick-start-task__content" },
|
|
1979
2014
|
React__namespace.createElement(QuickStartMarkdownView, { content: description }),
|
|
1980
|
-
|
|
2015
|
+
shouldShowTaskReview && (React__namespace.createElement(QuickStartTaskReview, { review: review, taskStatus: taskStatus, onTaskReview: onTaskReview }))))));
|
|
1981
2016
|
})));
|
|
1982
2017
|
};
|
|
1983
2018
|
|
|
1984
2019
|
const QuickStartContent = React__namespace.forwardRef(({ quickStart, nextQuickStarts = [], taskNumber, allTaskStatuses, onTaskSelect, onTaskReview, onQuickStartChange, }, ref) => {
|
|
1985
|
-
const { spec: { introduction, tasks, conclusion }, } = quickStart;
|
|
2020
|
+
const { spec: { introduction, tasks, conclusion, prerequisites }, } = quickStart;
|
|
1986
2021
|
const totalTasks = tasks.length;
|
|
1987
2022
|
return (React__namespace.createElement("div", { className: "pfext-quick-start-content", ref: ref },
|
|
1988
|
-
taskNumber === -1 && (React__namespace.createElement(QuickStartIntroduction, { tasks: tasks, allTaskStatuses: allTaskStatuses, introduction: introduction, onTaskSelect: onTaskSelect })),
|
|
2023
|
+
taskNumber === -1 && (React__namespace.createElement(QuickStartIntroduction, { tasks: tasks, allTaskStatuses: allTaskStatuses, introduction: introduction, prerequisites: prerequisites, onTaskSelect: onTaskSelect })),
|
|
1989
2024
|
taskNumber > -1 && taskNumber < totalTasks && (React__namespace.createElement(QuickStartTasks, { tasks: tasks, taskNumber: taskNumber, allTaskStatuses: allTaskStatuses, onTaskReview: onTaskReview, onTaskSelect: onTaskSelect })),
|
|
1990
2025
|
taskNumber === totalTasks && (React__namespace.createElement(QuickStartConclusion, { tasks: tasks, conclusion: conclusion, allTaskStatuses: allTaskStatuses, nextQuickStarts: nextQuickStarts, onQuickStartChange: onQuickStartChange, onTaskSelect: onTaskSelect }))));
|
|
1991
2026
|
});
|
|
@@ -2025,8 +2060,7 @@ const QuickStartFooter = ({ status, taskNumber, totalTasks, onNext, onBack, foot
|
|
|
2025
2060
|
}, [taskNumber, totalTasks, PrimaryButtonText, status]);
|
|
2026
2061
|
const getPrimaryButton = React__namespace.useMemo(() => (React__namespace.createElement(reactCore.Button, { variant: "primary", className: "pfext-quick-start-footer__actionbtn", onClick: onNext, "data-testid": `qs-drawer-${camelize(getPrimaryButtonText)}`, "data-test": `${getPrimaryButtonText} button` }, getPrimaryButtonText)), [getPrimaryButtonText, onNext]);
|
|
2027
2062
|
const getSecondaryButton = React__namespace.useMemo(() => taskNumber === -1 && status !== exports.QuickStartStatus.NOT_STARTED ? (React__namespace.createElement(reactCore.Button, { variant: "secondary", onClick: onRestart, "data-testid": "qs-drawer-restart" }, SecondaryButtonText.RESTART)) : (taskNumber > -1 && (React__namespace.createElement(reactCore.Button, { variant: "secondary", onClick: onBack, "data-testid": "qs-drawer-back" }, SecondaryButtonText.BACK))), [onRestart, onBack, SecondaryButtonText, status, taskNumber]);
|
|
2028
|
-
const getSideNoteAction = React__namespace.useMemo(() =>
|
|
2029
|
-
taskNumber === totalTasks && (React__namespace.createElement(reactCore.Button, { variant: "link", className: "pfext-quick-start-footer__restartbtn", onClick: onRestart, "data-testid": "qs-drawer-side-note-action" }, SecondaryButtonText.RESTART)), [status, SecondaryButtonText, onRestart, taskNumber, totalTasks]);
|
|
2063
|
+
const getSideNoteAction = React__namespace.useMemo(() => taskNumber !== -1 && (React__namespace.createElement(reactCore.Button, { variant: "link", className: "pfext-quick-start-footer__restartbtn", onClick: onRestart, "data-testid": "qs-drawer-side-note-action" }, SecondaryButtonText.RESTART)), [taskNumber, onRestart, SecondaryButtonText.RESTART]);
|
|
2030
2064
|
return (React__namespace.createElement("div", { className: `pfext-quick-start-footer ${footerClass}` },
|
|
2031
2065
|
getPrimaryButton,
|
|
2032
2066
|
getSecondaryButton,
|
|
@@ -2080,17 +2114,26 @@ const getElement = (appendTo) => {
|
|
|
2080
2114
|
}
|
|
2081
2115
|
return appendTo;
|
|
2082
2116
|
};
|
|
2117
|
+
const useScrollTopOnTaskNumberChange = (node, taskNumber) => {
|
|
2118
|
+
React__namespace.useEffect(() => {
|
|
2119
|
+
if (node) {
|
|
2120
|
+
node.scrollTo({ top: 0, behavior: 'smooth' });
|
|
2121
|
+
}
|
|
2122
|
+
}, [taskNumber, node]);
|
|
2123
|
+
};
|
|
2083
2124
|
const QuickStartPanelContent = (_a) => {
|
|
2084
|
-
var { quickStarts = [], handleClose, activeQuickStartID, appendTo, isResizable = true, showClose = true } = _a, props = tslib.__rest(_a, ["quickStarts", "handleClose", "activeQuickStartID", "appendTo", "isResizable", "showClose"]);
|
|
2125
|
+
var { quickStarts = [], handleClose, activeQuickStartID, appendTo, isResizable = true, showClose = true, headerVariant = '' } = _a, props = tslib.__rest(_a, ["quickStarts", "handleClose", "activeQuickStartID", "appendTo", "isResizable", "showClose", "headerVariant"]);
|
|
2085
2126
|
const { getResource } = React__namespace.useContext(QuickStartContext);
|
|
2086
2127
|
const [contentRef, setContentRef] = React__namespace.useState();
|
|
2087
2128
|
const shadows = useScrollShadows(contentRef);
|
|
2088
2129
|
const quickStart = quickStarts.find((qs) => qs.metadata.name === activeQuickStartID);
|
|
2089
2130
|
const { activeQuickStartState } = React__namespace.useContext(QuickStartContext);
|
|
2090
2131
|
const taskNumber = activeQuickStartState === null || activeQuickStartState === void 0 ? void 0 : activeQuickStartState.taskNumber;
|
|
2132
|
+
useScrollTopOnTaskNumberChange(contentRef, taskNumber);
|
|
2091
2133
|
const nextQuickStarts = quickStarts.filter((qs) => { var _a; return (_a = quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.nextQuickStart) === null || _a === void 0 ? void 0 : _a.includes(qs.metadata.name); });
|
|
2092
2134
|
const headerClasses = reactStyles.css('pfext-quick-start-panel-content__header', {
|
|
2093
2135
|
'pfext-quick-start-panel-content__header__shadow': shadows === Shadows.top || shadows === Shadows.both,
|
|
2136
|
+
'pfext-quick-start-panel-content__header--blue-white': headerVariant === 'blue-white',
|
|
2094
2137
|
});
|
|
2095
2138
|
const footerClass = reactStyles.css({
|
|
2096
2139
|
'pfext-quick-start-panel-content__footer__shadow': shadows === Shadows.bottom || shadows === Shadows.both,
|
|
@@ -2105,16 +2148,16 @@ const QuickStartPanelContent = (_a) => {
|
|
|
2105
2148
|
}
|
|
2106
2149
|
return Number.parseInt(taskNumber, 10) + 1;
|
|
2107
2150
|
};
|
|
2108
|
-
const content = quickStart ? (React__namespace.createElement(reactCore.DrawerPanelContent, Object.assign({ isResizable: isResizable, className: "pfext-quick-
|
|
2151
|
+
const content = quickStart ? (React__namespace.createElement(reactCore.DrawerPanelContent, Object.assign({ isResizable: isResizable, className: "pfext-quick-start__base", "data-testid": `qs-drawer-${camelize(quickStart.spec.displayName)}`, "data-qs": `qs-step-${getStep()}`, "data-test": "quickstart drawer" }, props),
|
|
2109
2152
|
React__namespace.createElement("div", { className: headerClasses },
|
|
2110
2153
|
React__namespace.createElement(reactCore.DrawerHead, null,
|
|
2111
2154
|
React__namespace.createElement("div", { className: "pfext-quick-start-panel-content__title" },
|
|
2112
|
-
React__namespace.createElement(reactCore.Title, { headingLevel: "h1", size: "xl", style: { marginRight: 'var(--pf-global--spacer--md)' } }, quickStart === null || quickStart === void 0 ? void 0 :
|
|
2155
|
+
React__namespace.createElement(reactCore.Title, { headingLevel: "h1", size: "xl", className: "pfext-quick-start-panel-content__name", style: { marginRight: 'var(--pf-global--spacer--md)' } }, quickStart === null || quickStart === void 0 ? void 0 :
|
|
2113
2156
|
quickStart.spec.displayName,
|
|
2114
2157
|
' ',
|
|
2115
|
-
React__namespace.createElement("small", { className: "pfext-quick-start-panel-content__duration
|
|
2158
|
+
React__namespace.createElement("small", { className: "pfext-quick-start-panel-content__duration" }, getResource('Quick start • {{duration, number}} minutes', quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes).replace('{{duration, number}}', quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes)))),
|
|
2116
2159
|
showClose && (React__namespace.createElement(reactCore.DrawerActions, null,
|
|
2117
|
-
React__namespace.createElement(reactCore.DrawerCloseButton, { onClick: handleClose, "data-testid": "qs-drawer-close" }))))),
|
|
2160
|
+
React__namespace.createElement(reactCore.DrawerCloseButton, { onClick: handleClose, className: "pfext-quick-start-panel-content__close-button", "data-testid": "qs-drawer-close" }))))),
|
|
2118
2161
|
React__namespace.createElement(reactCore.DrawerPanelBody, { hasNoPadding: true, className: "pfext-quick-start-panel-content__body", "data-test": "content" },
|
|
2119
2162
|
React__namespace.createElement(QuickStartController, { quickStart: quickStart, nextQuickStarts: nextQuickStarts, footerClass: footerClass, contentRef: setContentRef })))) : null;
|
|
2120
2163
|
if (appendTo) {
|
|
@@ -2124,15 +2167,17 @@ const QuickStartPanelContent = (_a) => {
|
|
|
2124
2167
|
};
|
|
2125
2168
|
|
|
2126
2169
|
const QuickStartContainer = (_a) => {
|
|
2127
|
-
var { quickStarts, children, activeQuickStartID, allQuickStartStates, setActiveQuickStartID, setAllQuickStartStates, appendTo, fullWidth, onCloseInProgress, onCloseNotInProgress, resourceBundle, showCardFooters, language, loading = false, useQueryParams = true, markdown, contextProps } = _a, props = tslib.__rest(_a, ["quickStarts", "children", "activeQuickStartID", "allQuickStartStates", "setActiveQuickStartID", "setAllQuickStartStates", "appendTo", "fullWidth", "onCloseInProgress", "onCloseNotInProgress", "resourceBundle", "showCardFooters", "language", "loading", "useQueryParams", "markdown", "contextProps"]);
|
|
2170
|
+
var { quickStarts, children, activeQuickStartID, allQuickStartStates, setActiveQuickStartID, setAllQuickStartStates, appendTo, fullWidth, onCloseInProgress, onCloseNotInProgress, resourceBundle, showCardFooters, useLegacyHeaderColors, language, loading = false, useQueryParams = true, markdown, contextProps, alwaysShowTaskReview = false } = _a, props = tslib.__rest(_a, ["quickStarts", "children", "activeQuickStartID", "allQuickStartStates", "setActiveQuickStartID", "setAllQuickStartStates", "appendTo", "fullWidth", "onCloseInProgress", "onCloseNotInProgress", "resourceBundle", "showCardFooters", "useLegacyHeaderColors", "language", "loading", "useQueryParams", "markdown", "contextProps", "alwaysShowTaskReview"]);
|
|
2128
2171
|
const valuesForQuickstartContext = useValuesForQuickStartContext(Object.assign({ allQuickStarts: quickStarts, activeQuickStartID,
|
|
2129
2172
|
setActiveQuickStartID,
|
|
2130
2173
|
allQuickStartStates,
|
|
2131
2174
|
setAllQuickStartStates, footer: {
|
|
2132
2175
|
show: showCardFooters,
|
|
2133
|
-
},
|
|
2176
|
+
}, useLegacyHeaderColors,
|
|
2177
|
+
language, resourceBundle: Object.assign({}, resourceBundle), loading,
|
|
2134
2178
|
useQueryParams,
|
|
2135
|
-
markdown
|
|
2179
|
+
markdown,
|
|
2180
|
+
alwaysShowTaskReview }, contextProps));
|
|
2136
2181
|
React__namespace.useEffect(() => {
|
|
2137
2182
|
if (quickStarts &&
|
|
2138
2183
|
JSON.stringify(quickStarts) !== JSON.stringify(valuesForQuickstartContext.allQuickStarts)) {
|
|
@@ -2153,7 +2198,7 @@ const QuickStartContainer = (_a) => {
|
|
|
2153
2198
|
};
|
|
2154
2199
|
const QuickStartDrawer = (_a) => {
|
|
2155
2200
|
var { quickStarts = [], children, appendTo, fullWidth, onCloseInProgress, onCloseNotInProgress } = _a, props = tslib.__rest(_a, ["quickStarts", "children", "appendTo", "fullWidth", "onCloseInProgress", "onCloseNotInProgress"]);
|
|
2156
|
-
const { activeQuickStartID, setActiveQuickStart, allQuickStarts = [], activeQuickStartState, allQuickStartStates, setAllQuickStartStates, } = React__namespace.useContext(QuickStartContext);
|
|
2201
|
+
const { activeQuickStartID, setActiveQuickStart, allQuickStarts = [], activeQuickStartState, allQuickStartStates, setAllQuickStartStates, useLegacyHeaderColors, } = React__namespace.useContext(QuickStartContext);
|
|
2157
2202
|
const combinedQuickStarts = allQuickStarts.concat(quickStarts);
|
|
2158
2203
|
React__namespace.useEffect(() => {
|
|
2159
2204
|
const params = new URLSearchParams(window.location.search);
|
|
@@ -2212,7 +2257,7 @@ const QuickStartDrawer = (_a) => {
|
|
|
2212
2257
|
},
|
|
2213
2258
|
}
|
|
2214
2259
|
: {};
|
|
2215
|
-
const panelContent = (React__namespace.createElement(QuickStartPanelContent, Object.assign({ quickStarts: combinedQuickStarts, handleClose: handleClose, activeQuickStartID: activeQuickStartID, appendTo: appendTo, isResizable: !fullWidth }, fullWidthPanelStyle)));
|
|
2260
|
+
const panelContent = (React__namespace.createElement(QuickStartPanelContent, Object.assign({ quickStarts: combinedQuickStarts, handleClose: handleClose, activeQuickStartID: activeQuickStartID, appendTo: appendTo, isResizable: !fullWidth, headerVariant: useLegacyHeaderColors ? '' : 'blue-white' }, fullWidthPanelStyle)));
|
|
2216
2261
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
2217
2262
|
React__namespace.createElement(reactCore.Drawer, Object.assign({ isExpanded: !!activeQuickStartID, isInline: true }, props), children ? (React__namespace.createElement(reactCore.DrawerContent, Object.assign({ panelContent: panelContent }, fullWidthBodyStyle),
|
|
2218
2263
|
React__namespace.createElement(reactCore.DrawerContentBody, { className: "pfext-quick-start-drawer__body" }, children))) : (React__namespace.createElement("div", { className: "pf-c-drawer__main" }, panelContent))),
|