@patternfly/quickstarts 2.0.1 → 2.1.0
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 +12 -33
- package/dist/ConsoleInternal/module/k8s/types.d.ts +5 -1
- package/dist/ConsoleShared/src/components/markdown-extensions/admonition-extension.d.ts +7 -0
- package/dist/ConsoleShared/src/components/markdown-extensions/index.d.ts +1 -0
- package/dist/QuickStartCatalogPage.d.ts +1 -2
- package/dist/controller/QuickStartTaskHeader.d.ts +1 -0
- package/dist/index.es.js +101 -33
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +102 -32
- package/dist/index.js.map +1 -1
- package/dist/quickstarts-base.css +27 -4
- package/dist/quickstarts-full.es.js +130 -32
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/quickstarts-standalone.css +14 -4
- package/dist/quickstarts-standalone.min.css +1 -1
- package/dist/quickstarts.css +27 -4
- package/dist/quickstarts.min.css +1 -1
- package/package.json +1 -1
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
.pfext-quick-start-panel-content__body input[type="radio"] {
|
|
21
21
|
margin-right: 7px; }
|
|
22
22
|
|
|
23
|
+
.pfext-quick-start-panel-content__body .pf-c-list {
|
|
24
|
+
--pf-c-list--PaddingLeft: 20px; }
|
|
25
|
+
|
|
23
26
|
.pfext-quick-start-panel-content__header,
|
|
24
27
|
.pfext-quick-start-panel-content__body,
|
|
25
28
|
.pfext-page-layout__content,
|
|
@@ -369,6 +372,7 @@
|
|
|
369
372
|
background: var(--pf-global--palette--black-150); }
|
|
370
373
|
|
|
371
374
|
.pfext-page-layout__header {
|
|
375
|
+
padding-top: 1px;
|
|
372
376
|
background-color: var(--pf-global--BackgroundColor--light-100); }
|
|
373
377
|
|
|
374
378
|
.pfext-page-layout__hint {
|
|
@@ -408,6 +412,17 @@
|
|
|
408
412
|
.pfext-markdown-view .pfext-markdown-execute-snippet__button[data-executed] > i.fa-play {
|
|
409
413
|
display: none; }
|
|
410
414
|
|
|
415
|
+
.pfext-markdown-view .pfext-markdown-admonition.pf-c-alert {
|
|
416
|
+
margin: var(--pf-global--spacer--md) 0; }
|
|
417
|
+
.pfext-markdown-view .pfext-markdown-admonition.pf-c-alert .pf-c-alert__title {
|
|
418
|
+
margin-top: 0;
|
|
419
|
+
margin-bottom: 0;
|
|
420
|
+
font-weight: var(--pf-c-alert__title--FontWeight);
|
|
421
|
+
font-family: inherit;
|
|
422
|
+
line-height: inherit;
|
|
423
|
+
color: var(--pf-c-alert__title--Color);
|
|
424
|
+
word-break: break-word; }
|
|
425
|
+
|
|
411
426
|
.pfext-modal {
|
|
412
427
|
position: absolute !important; }
|
|
413
428
|
|
|
@@ -615,8 +630,6 @@
|
|
|
615
630
|
.pfext-quick-start-panel-content__body {
|
|
616
631
|
display: flex;
|
|
617
632
|
flex-direction: column; }
|
|
618
|
-
.pfext-quick-start-panel-content__body ul, .pfext-quick-start-panel-content__body ol {
|
|
619
|
-
padding-left: 20px; }
|
|
620
633
|
|
|
621
634
|
.pfext-quick-start-panel-content__title {
|
|
622
635
|
display: flex;
|
|
@@ -765,7 +778,6 @@
|
|
|
765
778
|
margin-bottom: var(--pf-global--spacer--xs); }
|
|
766
779
|
|
|
767
780
|
.pfext-quick-start-tasks__list .pfext-quick-start-task__content {
|
|
768
|
-
margin-left: var(--pf-global--spacer--lg);
|
|
769
781
|
margin-bottom: var(--pf-global--spacer--md); }
|
|
770
782
|
|
|
771
783
|
.pfext-quick-start-tasks__list .task-pflist-title {
|
|
@@ -836,7 +848,7 @@
|
|
|
836
848
|
margin-right: var(--pf-global--spacer--md) !important; }
|
|
837
849
|
.pfext-quick-start-task-header__subtitle {
|
|
838
850
|
font-size: var(--pf-global--FontSize--sm);
|
|
839
|
-
color: var(--pf-global--Color--
|
|
851
|
+
color: var(--pf-global--Color--dark-200) !important; }
|
|
840
852
|
.pfext-quick-start-task-header__tryagain {
|
|
841
853
|
display: block;
|
|
842
854
|
font-size: var(--pf-global--FontSize--md);
|
|
@@ -905,6 +917,17 @@
|
|
|
905
917
|
.pfext-markdown-view .pfext-markdown-execute-snippet__button[data-executed] > i.fa-play {
|
|
906
918
|
display: none; }
|
|
907
919
|
|
|
920
|
+
.pfext-markdown-view .pfext-markdown-admonition.pf-c-alert {
|
|
921
|
+
margin: var(--pf-global--spacer--md) 0; }
|
|
922
|
+
.pfext-markdown-view .pfext-markdown-admonition.pf-c-alert .pf-c-alert__title {
|
|
923
|
+
margin-top: 0;
|
|
924
|
+
margin-bottom: 0;
|
|
925
|
+
font-weight: var(--pf-c-alert__title--FontWeight);
|
|
926
|
+
font-family: inherit;
|
|
927
|
+
line-height: inherit;
|
|
928
|
+
color: var(--pf-c-alert__title--Color);
|
|
929
|
+
word-break: break-word; }
|
|
930
|
+
|
|
908
931
|
@keyframes pfext-spotlight-expand {
|
|
909
932
|
0% {
|
|
910
933
|
outline-offset: -4px;
|
|
@@ -8792,6 +8792,7 @@ var Yes = "Yes";
|
|
|
8792
8792
|
var No = "No";
|
|
8793
8793
|
var Cancel = "Cancel";
|
|
8794
8794
|
var Leave = "Leave";
|
|
8795
|
+
var Type = "Quick start";
|
|
8795
8796
|
var en = {
|
|
8796
8797
|
"No results found": "No results found",
|
|
8797
8798
|
"No results match the filter criteria. Remove filters or clear all filters to show results.": "No results match the filter criteria. Remove filters or clear all filters to show results.",
|
|
@@ -8835,7 +8836,8 @@ var en = {
|
|
|
8835
8836
|
"Not available": "Not available",
|
|
8836
8837
|
"Copy to clipboard": "Copy to clipboard",
|
|
8837
8838
|
"Successfully copied to clipboard!": "Successfully copied to clipboard!",
|
|
8838
|
-
|
|
8839
|
+
Type: Type,
|
|
8840
|
+
"{{type}} • {{duration, number}} minutes": "{{type}} • {{duration, number}} minutes"
|
|
8839
8841
|
};
|
|
8840
8842
|
|
|
8841
8843
|
/* eslint-disable */
|
|
@@ -9248,7 +9250,7 @@ const QuickStartContextDefaults = {
|
|
|
9248
9250
|
useLegacyHeaderColors: false,
|
|
9249
9251
|
markdown: null,
|
|
9250
9252
|
loading: false,
|
|
9251
|
-
alwaysShowTaskReview:
|
|
9253
|
+
alwaysShowTaskReview: true,
|
|
9252
9254
|
};
|
|
9253
9255
|
const QuickStartContext = createContext(QuickStartContextDefaults);
|
|
9254
9256
|
const getResource = (resource, options, resourceBundle, lng) => {
|
|
@@ -9345,7 +9347,7 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
9345
9347
|
useQueryParams && setQueryArgument(QUICKSTART_ID_FILTER_KEY, id);
|
|
9346
9348
|
return id;
|
|
9347
9349
|
});
|
|
9348
|
-
setAllQuickStartStates((qs) => (Object.assign(Object.assign({}, qs), { [quickStartId]: getDefaultQuickStartState(totalTasks, QuickStartStatus.
|
|
9350
|
+
setAllQuickStartStates((qs) => (Object.assign(Object.assign({}, qs), { [quickStartId]: getDefaultQuickStartState(totalTasks, QuickStartStatus.NOT_STARTED) })));
|
|
9349
9351
|
}, [setActiveQuickStartID, setAllQuickStartStates, useQueryParams]);
|
|
9350
9352
|
// When alwaysShowTaskReview preference is enabled, skip visited step and go directly to review
|
|
9351
9353
|
const stepAfterInitial = alwaysShowTaskReview
|
|
@@ -14325,6 +14327,71 @@ const useMultilineCopyClipboardShowdownExtension = () => {
|
|
|
14325
14327
|
}), [getResource]);
|
|
14326
14328
|
};
|
|
14327
14329
|
|
|
14330
|
+
var lightbulbIcon = createCommonjsModule(function (module, exports) {
|
|
14331
|
+
exports.__esModule = true;
|
|
14332
|
+
exports.LightbulbIconConfig = {
|
|
14333
|
+
name: 'LightbulbIcon',
|
|
14334
|
+
height: 512,
|
|
14335
|
+
width: 352,
|
|
14336
|
+
svgPath: 'M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z',
|
|
14337
|
+
yOffset: 0,
|
|
14338
|
+
xOffset: 0,
|
|
14339
|
+
};
|
|
14340
|
+
exports.LightbulbIcon = createIcon_1.createIcon(exports.LightbulbIconConfig);
|
|
14341
|
+
exports["default"] = exports.LightbulbIcon;
|
|
14342
|
+
});
|
|
14343
|
+
|
|
14344
|
+
var LightbulbIcon = /*@__PURE__*/getDefaultExportFromCjs(lightbulbIcon);
|
|
14345
|
+
|
|
14346
|
+
var fireIcon = createCommonjsModule(function (module, exports) {
|
|
14347
|
+
exports.__esModule = true;
|
|
14348
|
+
exports.FireIconConfig = {
|
|
14349
|
+
name: 'FireIcon',
|
|
14350
|
+
height: 512,
|
|
14351
|
+
width: 384,
|
|
14352
|
+
svgPath: 'M216 23.86c0-23.8-30.65-32.77-44.15-13.04C48 191.85 224 200 224 288c0 35.63-29.11 64.46-64.85 63.99-35.17-.45-63.15-29.77-63.15-64.94v-85.51c0-21.7-26.47-32.23-41.43-16.5C27.8 213.16 0 261.33 0 320c0 105.87 86.13 192 192 192s192-86.13 192-192c0-170.29-168-193-168-296.14z',
|
|
14353
|
+
yOffset: 0,
|
|
14354
|
+
xOffset: 0,
|
|
14355
|
+
};
|
|
14356
|
+
exports.FireIcon = createIcon_1.createIcon(exports.FireIconConfig);
|
|
14357
|
+
exports["default"] = exports.FireIcon;
|
|
14358
|
+
});
|
|
14359
|
+
|
|
14360
|
+
var FireIcon = /*@__PURE__*/getDefaultExportFromCjs(fireIcon);
|
|
14361
|
+
|
|
14362
|
+
var AdmonitionType;
|
|
14363
|
+
(function (AdmonitionType) {
|
|
14364
|
+
AdmonitionType["TIP"] = "TIP";
|
|
14365
|
+
AdmonitionType["NOTE"] = "NOTE";
|
|
14366
|
+
AdmonitionType["IMPORTANT"] = "IMPORTANT";
|
|
14367
|
+
AdmonitionType["WARNING"] = "WARNING";
|
|
14368
|
+
AdmonitionType["CAUTION"] = "CAUTION";
|
|
14369
|
+
})(AdmonitionType || (AdmonitionType = {}));
|
|
14370
|
+
const admonitionToAlertVariantMap = {
|
|
14371
|
+
[AdmonitionType.NOTE]: { variant: 'info' },
|
|
14372
|
+
[AdmonitionType.TIP]: { variant: 'default', customIcon: React.createElement(LightbulbIcon, null) },
|
|
14373
|
+
[AdmonitionType.IMPORTANT]: { variant: 'danger' },
|
|
14374
|
+
[AdmonitionType.CAUTION]: { variant: 'warning', customIcon: React.createElement(FireIcon, null) },
|
|
14375
|
+
[AdmonitionType.WARNING]: { variant: 'warning' },
|
|
14376
|
+
};
|
|
14377
|
+
const useAdmonitionShowdownExtension = () => {
|
|
14378
|
+
// const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
|
|
14379
|
+
return React.useMemo(() => ({
|
|
14380
|
+
type: 'lang',
|
|
14381
|
+
regex: /\[([\d\w\s-()$!]+)]{{(admonition) ([\w-]+)}}/g,
|
|
14382
|
+
replace: (text, content, admonitionLabel, admonitionType, groupId) => {
|
|
14383
|
+
if (!content || !admonitionLabel || !admonitionType || !groupId) {
|
|
14384
|
+
return text;
|
|
14385
|
+
}
|
|
14386
|
+
admonitionType = admonitionType.toUpperCase();
|
|
14387
|
+
const { variant, customIcon } = admonitionToAlertVariantMap[admonitionType];
|
|
14388
|
+
const style = admonitionType === AdmonitionType.CAUTION ? { backgroundColor: '#ec7a0915' } : {};
|
|
14389
|
+
const pfAlert = (React.createElement(Alert, { variant: variant, customIcon: customIcon && customIcon, isInline: true, title: admonitionType, className: "pfext-markdown-admonition", style: style }, content));
|
|
14390
|
+
return removeTemplateWhitespace(server.renderToStaticMarkup(pfAlert));
|
|
14391
|
+
},
|
|
14392
|
+
}), []);
|
|
14393
|
+
};
|
|
14394
|
+
|
|
14328
14395
|
const FallbackImg = ({ src, alt, className, fallback }) => {
|
|
14329
14396
|
const [isSrcValid, setIsSrcValid] = React.useState(true);
|
|
14330
14397
|
if (src && isSrcValid) {
|
|
@@ -18898,13 +18965,31 @@ const markdownConvert = (markdown, extensions) => {
|
|
|
18898
18965
|
if (extensions) {
|
|
18899
18966
|
converter.addExtension(extensions);
|
|
18900
18967
|
}
|
|
18901
|
-
// add hook to transform anchor tags
|
|
18902
18968
|
DOMPurify.addHook('beforeSanitizeElements', function (node) {
|
|
18903
18969
|
// nodeType 1 = element type
|
|
18970
|
+
// transform anchor tags
|
|
18904
18971
|
if (node.nodeType === 1 && node.nodeName.toLowerCase() === 'a') {
|
|
18905
18972
|
node.setAttribute('rel', 'noopener noreferrer');
|
|
18906
18973
|
return node;
|
|
18907
18974
|
}
|
|
18975
|
+
// add PF class to ul and ol lists
|
|
18976
|
+
if (node.nodeType === 1 &&
|
|
18977
|
+
(node.nodeName.toLowerCase() === 'ul' || node.nodeName.toLowerCase() === 'ol')) {
|
|
18978
|
+
node.setAttribute('class', 'pf-c-list');
|
|
18979
|
+
return node;
|
|
18980
|
+
}
|
|
18981
|
+
});
|
|
18982
|
+
// Add a hook to make all links open a new window
|
|
18983
|
+
DOMPurify.addHook('afterSanitizeAttributes', function (node) {
|
|
18984
|
+
// set all elements owning target to target=_blank
|
|
18985
|
+
if ('target' in node) {
|
|
18986
|
+
node.setAttribute('target', '_blank');
|
|
18987
|
+
}
|
|
18988
|
+
// set non-HTML/MathML links to xlink:show=new
|
|
18989
|
+
if (!node.hasAttribute('target') &&
|
|
18990
|
+
(node.hasAttribute('xlink:href') || node.hasAttribute('href'))) {
|
|
18991
|
+
node.setAttribute('xlink:show', 'new');
|
|
18992
|
+
}
|
|
18908
18993
|
});
|
|
18909
18994
|
return DOMPurify.sanitize(converter.makeHtml(markdown), {
|
|
18910
18995
|
USE_PROFILES: {
|
|
@@ -19042,6 +19127,7 @@ const QuickStartMarkdownView = ({ content, exactHeight, className, }) => {
|
|
|
19042
19127
|
const { markdown } = React.useContext(QuickStartContext);
|
|
19043
19128
|
const inlineCopyClipboardShowdownExtension = useInlineCopyClipboardShowdownExtension();
|
|
19044
19129
|
const multilineCopyClipboardShowdownExtension = useMultilineCopyClipboardShowdownExtension();
|
|
19130
|
+
const admonitionShowdownExtension = useAdmonitionShowdownExtension();
|
|
19045
19131
|
return (React.createElement(SyncMarkdownView, { inline: true, content: content, exactHeight: exactHeight, extensions: [
|
|
19046
19132
|
{
|
|
19047
19133
|
type: 'lang',
|
|
@@ -19063,6 +19149,7 @@ const QuickStartMarkdownView = ({ content, exactHeight, className, }) => {
|
|
|
19063
19149
|
},
|
|
19064
19150
|
inlineCopyClipboardShowdownExtension,
|
|
19065
19151
|
multilineCopyClipboardShowdownExtension,
|
|
19152
|
+
admonitionShowdownExtension,
|
|
19066
19153
|
...(markdown ? markdown.extensions : []),
|
|
19067
19154
|
], renderExtension: (docContext, rootSelector) => (React.createElement(React.Fragment, null,
|
|
19068
19155
|
React.createElement(MarkdownHighlightExtension, { docContext: docContext, rootSelector: rootSelector }),
|
|
@@ -19205,7 +19292,9 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, })
|
|
|
19205
19292
|
// @ts-ignore
|
|
19206
19293
|
component: "div", style: {
|
|
19207
19294
|
cursor: 'pointer',
|
|
19208
|
-
}, icon: quickStartIcon, className: "pfext-quick-start-tile", "data-testid": `qs-card-${camelize(displayName)}`, featured: isActive, title: React.createElement(QuickStartTileHeader, { name: displayName, status: status, duration: durationMinutes, type: type, quickStartId: id }), onClick: handleClick,
|
|
19295
|
+
}, icon: quickStartIcon, className: "pfext-quick-start-tile", "data-testid": `qs-card-${camelize(displayName)}`, featured: isActive, title: React.createElement(QuickStartTileHeader, { name: displayName, status: status, duration: durationMinutes, type: type, quickStartId: id }), onClick: handleClick,
|
|
19296
|
+
// https://github.com/patternfly/patternfly-react/issues/7039
|
|
19297
|
+
href: "#", "data-test": `tile ${id}`, description: React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent })));
|
|
19209
19298
|
};
|
|
19210
19299
|
|
|
19211
19300
|
const QuickStartCatalog = ({ quickStarts }) => {
|
|
@@ -19356,7 +19445,9 @@ const QuickStartCatalogPage = ({ quickStarts, showFilter, sortFnc = (q1, q2) =>
|
|
|
19356
19445
|
const filteredQs = showFilter
|
|
19357
19446
|
? filterQuickStarts(allQuickStarts, filter.keyword, filter.status.statusFilters, allQuickStartStates).sort(sortFncCallback)
|
|
19358
19447
|
: allQuickStarts;
|
|
19359
|
-
|
|
19448
|
+
// also needs a check whether the content of the QS changed
|
|
19449
|
+
if (filteredQs.length !== filteredQuickStarts.length ||
|
|
19450
|
+
JSON.stringify(filteredQs) !== JSON.stringify(filteredQuickStarts)) {
|
|
19360
19451
|
setFilteredQuickStarts(filteredQs);
|
|
19361
19452
|
}
|
|
19362
19453
|
}, [
|
|
@@ -19461,14 +19552,17 @@ const TaskIcon = ({ taskIndex, taskStatus }) => {
|
|
|
19461
19552
|
}
|
|
19462
19553
|
return React.createElement("span", { className: classNames }, content);
|
|
19463
19554
|
};
|
|
19464
|
-
const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, isActiveTask, onTaskSelect, }) => {
|
|
19555
|
+
const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, isActiveTask, onTaskSelect, children, }) => {
|
|
19465
19556
|
const classNames = css('pfext-quick-start-task-header__title', {
|
|
19466
19557
|
'pfext-quick-start-task-header__title-success': taskStatus === QuickStartTaskStatus.SUCCESS,
|
|
19467
19558
|
'pfext-quick-start-task-header__title-failed': taskStatus === (QuickStartTaskStatus.FAILED || QuickStartTaskStatus.VISITED),
|
|
19468
19559
|
});
|
|
19469
|
-
const notCompleted = taskStatus === QuickStartTaskStatus.VISITED;
|
|
19470
|
-
const
|
|
19471
|
-
const
|
|
19560
|
+
// const notCompleted = taskStatus === QuickStartTaskStatus.VISITED;
|
|
19561
|
+
// const skippedReview = taskStatus === QuickStartTaskStatus.REVIEW;
|
|
19562
|
+
const failedReview = taskStatus === QuickStartTaskStatus.FAILED;
|
|
19563
|
+
// TODO: toned down when this is shown, investigate further when we should display it
|
|
19564
|
+
// related: https://github.com/patternfly/patternfly-quickstarts/issues/104
|
|
19565
|
+
const tryAgain = failedReview && (React.createElement(React.Fragment, null,
|
|
19472
19566
|
React.createElement("div", null),
|
|
19473
19567
|
React.createElement("div", { className: "pfext-quick-start-task-header__tryagain" }, "Try the steps again.")));
|
|
19474
19568
|
const content = (React.createElement("div", { className: "pfext-quick-start-task-header" },
|
|
@@ -19479,7 +19573,7 @@ const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, is
|
|
|
19479
19573
|
' ',
|
|
19480
19574
|
subtitle))),
|
|
19481
19575
|
tryAgain));
|
|
19482
|
-
return (React.createElement(WizardNavItem, { content: content, step: taskIndex, onNavItemClick: () => onTaskSelect(taskIndex - 1), navItemComponent: "button", isCurrent: isActiveTask }));
|
|
19576
|
+
return (React.createElement(WizardNavItem, { content: content, step: taskIndex, onNavItemClick: () => onTaskSelect(taskIndex - 1), navItemComponent: "button", isCurrent: isActiveTask }, children));
|
|
19483
19577
|
};
|
|
19484
19578
|
|
|
19485
19579
|
const QuickStartTaskHeaderList = ({ tasks, allTaskStatuses, onTaskSelect, }) => {
|
|
@@ -19513,7 +19607,8 @@ const QuickStartIntroduction = ({ tasks, introduction, allTaskStatuses, prerequi
|
|
|
19513
19607
|
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), className: "pfext-quick-start-intro__prereq" },
|
|
19514
19608
|
React.createElement(List, { className: "pfext-quick-start-intro__prereq-list" }, prereqs.map((pr) => {
|
|
19515
19609
|
return (React.createElement(ListItem, { key: pr, className: "pfext-quick-start-intro__prereq-list__item" },
|
|
19516
|
-
React.createElement("span", { className: "pfext-quick-start-intro__prereq-list__item-content" },
|
|
19610
|
+
React.createElement("span", { className: "pfext-quick-start-intro__prereq-list__item-content" },
|
|
19611
|
+
React.createElement(QuickStartMarkdownView, { content: pr }))));
|
|
19517
19612
|
}))));
|
|
19518
19613
|
return (React.createElement(React.Fragment, null,
|
|
19519
19614
|
React.createElement(QuickStartMarkdownView, { content: introduction }),
|
|
@@ -19542,7 +19637,7 @@ const QuickStartTaskReview = ({ review, taskStatus, onTaskReview, }) => {
|
|
|
19542
19637
|
'pfext-quick-start-task-review--failed': taskStatus === QuickStartTaskStatus.FAILED,
|
|
19543
19638
|
});
|
|
19544
19639
|
const title = React.createElement("span", { className: alertClassNames }, getResource('Check your work'));
|
|
19545
|
-
return (React.createElement(Alert, { className: "pfext-quick-start-task-review-alert", variant: getAlertVariant(taskStatus), title: title, isInline: true },
|
|
19640
|
+
return (React.createElement(Alert, { className: "pfext-quick-start-task-review-alert", variant: getAlertVariant(taskStatus), title: title, isInline: true, role: "alert" },
|
|
19546
19641
|
React.createElement(QuickStartMarkdownView, { content: instructions }),
|
|
19547
19642
|
React.createElement("span", { className: "pfext-quick-start-task-review__actions" },
|
|
19548
19643
|
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) }),
|
|
@@ -19552,22 +19647,22 @@ const QuickStartTaskReview = ({ review, taskStatus, onTaskReview, }) => {
|
|
|
19552
19647
|
|
|
19553
19648
|
const QuickStartTasks = ({ tasks, taskNumber, allTaskStatuses, onTaskReview, onTaskSelect, }) => {
|
|
19554
19649
|
const { getResource, alwaysShowTaskReview } = React.useContext(QuickStartContext);
|
|
19555
|
-
return (React.createElement("div", { className: "pfext-quick-start-tasks__list" },
|
|
19556
|
-
.
|
|
19557
|
-
|
|
19558
|
-
|
|
19559
|
-
|
|
19560
|
-
|
|
19561
|
-
|
|
19562
|
-
|
|
19563
|
-
|
|
19564
|
-
React.createElement(
|
|
19565
|
-
|
|
19566
|
-
|
|
19567
|
-
|
|
19568
|
-
|
|
19569
|
-
|
|
19570
|
-
|
|
19650
|
+
return (React.createElement("div", { className: "pfext-quick-start-tasks__list" },
|
|
19651
|
+
React.createElement("ul", null, tasks
|
|
19652
|
+
.filter((_, index) => allTaskStatuses[index] !== QuickStartTaskStatus.INIT)
|
|
19653
|
+
.map((task, index) => {
|
|
19654
|
+
const { title, description, review } = task;
|
|
19655
|
+
const isActiveTask = index === taskNumber;
|
|
19656
|
+
const taskStatus = allTaskStatuses[index];
|
|
19657
|
+
const shouldShowTaskReview = (!QUICKSTART_TASKS_INITIAL_STATES.includes(taskStatus) || alwaysShowTaskReview) &&
|
|
19658
|
+
review;
|
|
19659
|
+
return (React.createElement(React.Fragment, { key: title },
|
|
19660
|
+
React.createElement(QuickStartTaskHeader, { taskIndex: index + 1, title: title, size: "md", subtitle: getResource('{{index, number}} of {{tasks, number}}')
|
|
19661
|
+
.replace('{{index, number}}', index + 1)
|
|
19662
|
+
.replace('{{tasks, number}}', tasks.length), taskStatus: taskStatus, isActiveTask: isActiveTask, onTaskSelect: onTaskSelect }, isActiveTask && (React.createElement("div", { className: "pfext-quick-start-task__content" },
|
|
19663
|
+
React.createElement(QuickStartMarkdownView, { content: description }),
|
|
19664
|
+
shouldShowTaskReview && (React.createElement(QuickStartTaskReview, { review: review, taskStatus: taskStatus, onTaskReview: onTaskReview })))))));
|
|
19665
|
+
}))));
|
|
19571
19666
|
};
|
|
19572
19667
|
|
|
19573
19668
|
const QuickStartContent = React.forwardRef(({ quickStart, nextQuickStarts = [], taskNumber, allTaskStatuses, onTaskSelect, onTaskReview, onQuickStartChange, }, ref) => {
|
|
@@ -19709,7 +19804,10 @@ const QuickStartPanelContent = (_a) => {
|
|
|
19709
19804
|
React.createElement(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 :
|
|
19710
19805
|
quickStart.spec.displayName,
|
|
19711
19806
|
' ',
|
|
19712
|
-
React.createElement("small", { className: "pfext-quick-start-panel-content__duration" },
|
|
19807
|
+
React.createElement("small", { className: "pfext-quick-start-panel-content__duration" }, (quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes) ? getResource('{{type}} • {{duration, number}} minutes', quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes)
|
|
19808
|
+
.replace('{{duration, number}}', quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes)
|
|
19809
|
+
.replace('{{type}}', getResource('Type'))
|
|
19810
|
+
: getResource('Type')))),
|
|
19713
19811
|
showClose && (React.createElement(DrawerActions, null,
|
|
19714
19812
|
React.createElement(DrawerCloseButton, { onClick: handleClose, className: "pfext-quick-start-panel-content__close-button", "data-testid": "qs-drawer-close" }))))),
|
|
19715
19813
|
React.createElement(DrawerPanelBody, { hasNoPadding: true, className: "pfext-quick-start-panel-content__body", "data-test": "content" },
|
|
@@ -19721,7 +19819,7 @@ const QuickStartPanelContent = (_a) => {
|
|
|
19721
19819
|
};
|
|
19722
19820
|
|
|
19723
19821
|
const QuickStartContainer = (_a) => {
|
|
19724
|
-
var { quickStarts, children, activeQuickStartID, allQuickStartStates, setActiveQuickStartID, setAllQuickStartStates, appendTo, fullWidth, onCloseInProgress, onCloseNotInProgress, resourceBundle, showCardFooters, useLegacyHeaderColors, language, loading = false, useQueryParams = true, markdown, contextProps, alwaysShowTaskReview =
|
|
19822
|
+
var { quickStarts, children, activeQuickStartID, allQuickStartStates, setActiveQuickStartID, setAllQuickStartStates, appendTo, fullWidth, onCloseInProgress, onCloseNotInProgress, resourceBundle, showCardFooters, useLegacyHeaderColors, language, loading = false, useQueryParams = true, markdown, contextProps, alwaysShowTaskReview = true } = _a, props = __rest$1(_a, ["quickStarts", "children", "activeQuickStartID", "allQuickStartStates", "setActiveQuickStartID", "setAllQuickStartStates", "appendTo", "fullWidth", "onCloseInProgress", "onCloseNotInProgress", "resourceBundle", "showCardFooters", "useLegacyHeaderColors", "language", "loading", "useQueryParams", "markdown", "contextProps", "alwaysShowTaskReview"]);
|
|
19725
19823
|
const valuesForQuickstartContext = useValuesForQuickStartContext(Object.assign({ allQuickStarts: quickStarts, activeQuickStartID,
|
|
19726
19824
|
setActiveQuickStartID,
|
|
19727
19825
|
allQuickStartStates,
|
|
@@ -19759,7 +19857,7 @@ const QuickStartDrawer = (_a) => {
|
|
|
19759
19857
|
// if there is a quick start param, but the quick start is not active, set it
|
|
19760
19858
|
// this can happen if a new browser session is opened or an incognito window for example
|
|
19761
19859
|
const quickStartIdFromParam = params.get(QUICKSTART_ID_FILTER_KEY) || '';
|
|
19762
|
-
if (quickStartIdFromParam &&
|
|
19860
|
+
if (quickStartIdFromParam && activeQuickStartID !== quickStartIdFromParam) {
|
|
19763
19861
|
const activeQuickStart = getQuickStartByName(quickStartIdFromParam, combinedQuickStarts);
|
|
19764
19862
|
// don't try to load a quick start that is actually just an external resource (spec.link)
|
|
19765
19863
|
if (combinedQuickStarts.length > 0 && activeQuickStart && !activeQuickStart.spec.link) {
|