@patternfly/quickstarts 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +138 -119
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +138 -119
- package/dist/index.js.map +1 -1
- package/dist/quickstarts-base.css +24 -24
- package/dist/quickstarts-full.es.js +211 -192
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/quickstarts.css +24 -24
- package/dist/quickstarts.min.css +1 -1
- package/dist/utils/quick-start-context.d.ts +1 -1
- package/package.json +1 -1
- package/src/ConsoleShared/src/components/markdown-extensions/admonition-extension.tsx +3 -2
- package/src/QuickStartPanelContent.tsx +8 -1
- package/src/catalog/QuickStartTile.tsx +7 -0
- package/src/controller/QuickStartTaskHeader.tsx +8 -1
- package/src/utils/quick-start-context.tsx +2 -2
|
@@ -784,6 +784,27 @@
|
|
|
784
784
|
.pfext-markdown-view th {
|
|
785
785
|
padding-top: 0; }
|
|
786
786
|
|
|
787
|
+
.pfext-quick-start-intro__prereq {
|
|
788
|
+
margin-bottom: var(--pf-global--spacer--md); }
|
|
789
|
+
.pfext-quick-start-intro__prereq .pf-c-expandable-section__content {
|
|
790
|
+
margin-top: var(--pf-global--spacer--sm); }
|
|
791
|
+
.pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle {
|
|
792
|
+
padding-top: 0;
|
|
793
|
+
padding-bottom: 0; }
|
|
794
|
+
.pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-text {
|
|
795
|
+
margin-left: var(--pf-global--spacer--sm); }
|
|
796
|
+
.pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-icon {
|
|
797
|
+
color: var(--pf-c-expandable-section__toggle--Color); }
|
|
798
|
+
.pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-icon:focus, .pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-icon:hover {
|
|
799
|
+
--pf-c-expandable-section__toggle--Color: var(--pf-c-expandable-section__toggle--focus--Color); }
|
|
800
|
+
.pfext-quick-start-intro__prereq-list {
|
|
801
|
+
padding-left: 20px; }
|
|
802
|
+
.pfext-quick-start-intro__prereq-list__item::marker {
|
|
803
|
+
font-size: 0.8rem; }
|
|
804
|
+
.pfext-quick-start-intro__prereq-list__item-content {
|
|
805
|
+
position: relative;
|
|
806
|
+
left: 2px; }
|
|
807
|
+
|
|
787
808
|
.pfext-quick-start-tasks__list button::before {
|
|
788
809
|
content: none; }
|
|
789
810
|
|
|
@@ -842,27 +863,6 @@
|
|
|
842
863
|
.pfext-quick-start-tasks__list .task-pflist-list__item__content .task-pflist-list__item__content__note__body {
|
|
843
864
|
font-size: 14px; }
|
|
844
865
|
|
|
845
|
-
.pfext-quick-start-intro__prereq {
|
|
846
|
-
margin-bottom: var(--pf-global--spacer--md); }
|
|
847
|
-
.pfext-quick-start-intro__prereq .pf-c-expandable-section__content {
|
|
848
|
-
margin-top: var(--pf-global--spacer--sm); }
|
|
849
|
-
.pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle {
|
|
850
|
-
padding-top: 0;
|
|
851
|
-
padding-bottom: 0; }
|
|
852
|
-
.pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-text {
|
|
853
|
-
margin-left: var(--pf-global--spacer--sm); }
|
|
854
|
-
.pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-icon {
|
|
855
|
-
color: var(--pf-c-expandable-section__toggle--Color); }
|
|
856
|
-
.pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-icon:focus, .pfext-quick-start-intro__prereq .pf-c-expandable-section__toggle-icon:hover {
|
|
857
|
-
--pf-c-expandable-section__toggle--Color: var(--pf-c-expandable-section__toggle--focus--Color); }
|
|
858
|
-
.pfext-quick-start-intro__prereq-list {
|
|
859
|
-
padding-left: 20px; }
|
|
860
|
-
.pfext-quick-start-intro__prereq-list__item::marker {
|
|
861
|
-
font-size: 0.8rem; }
|
|
862
|
-
.pfext-quick-start-intro__prereq-list__item-content {
|
|
863
|
-
position: relative;
|
|
864
|
-
left: 2px; }
|
|
865
|
-
|
|
866
866
|
.pfext-quick-start-task-header__list {
|
|
867
867
|
padding: 0 !important; }
|
|
868
868
|
.pfext-quick-start-task-header__list button::before {
|
|
@@ -931,6 +931,9 @@
|
|
|
931
931
|
.pfext-quick-start-task-review--failed {
|
|
932
932
|
color: var(--pf-chart-global--danger--Color--100); }
|
|
933
933
|
|
|
934
|
+
.pfext-modal {
|
|
935
|
+
position: absolute !important; }
|
|
936
|
+
|
|
934
937
|
.pfext-markdown-view .pfext-code-block__pre {
|
|
935
938
|
/* override the styles applied by showdown while parsing <pre /> */
|
|
936
939
|
display: flex;
|
|
@@ -963,9 +966,6 @@
|
|
|
963
966
|
color: var(--pf-c-alert__title--Color);
|
|
964
967
|
word-break: break-word; }
|
|
965
968
|
|
|
966
|
-
.pfext-modal {
|
|
967
|
-
position: absolute !important; }
|
|
968
|
-
|
|
969
969
|
@keyframes pfext-spotlight-expand {
|
|
970
970
|
0% {
|
|
971
971
|
outline-offset: -4px;
|
|
@@ -9675,7 +9675,7 @@ const QuickStartContextDefaults = {
|
|
|
9675
9675
|
activeQuickStartState: {},
|
|
9676
9676
|
setAllQuickStarts: () => { },
|
|
9677
9677
|
resourceBundle: en,
|
|
9678
|
-
getResource: () =>
|
|
9678
|
+
getResource: (resource) => resource,
|
|
9679
9679
|
language: 'en',
|
|
9680
9680
|
useQueryParams: true,
|
|
9681
9681
|
filter: {
|
|
@@ -9701,7 +9701,7 @@ const getResource = (resource, options, resourceBundle, lng) => {
|
|
|
9701
9701
|
return resourceBundle[`${resource}_${suffix}`];
|
|
9702
9702
|
}
|
|
9703
9703
|
}
|
|
9704
|
-
return (resourceBundle && resourceBundle[resource]) ||
|
|
9704
|
+
return (resourceBundle && resourceBundle[resource]) || resource;
|
|
9705
9705
|
};
|
|
9706
9706
|
const useValuesForQuickStartContext = (value = {}) => {
|
|
9707
9707
|
var _a, _b;
|
|
@@ -14800,192 +14800,6 @@ exports["default"] = exports.FireIcon;
|
|
|
14800
14800
|
|
|
14801
14801
|
var FireIcon = /*@__PURE__*/getDefaultExportFromCjs(fireIcon);
|
|
14802
14802
|
|
|
14803
|
-
var AdmonitionType;
|
|
14804
|
-
(function (AdmonitionType) {
|
|
14805
|
-
AdmonitionType["TIP"] = "TIP";
|
|
14806
|
-
AdmonitionType["NOTE"] = "NOTE";
|
|
14807
|
-
AdmonitionType["IMPORTANT"] = "IMPORTANT";
|
|
14808
|
-
AdmonitionType["WARNING"] = "WARNING";
|
|
14809
|
-
AdmonitionType["CAUTION"] = "CAUTION";
|
|
14810
|
-
})(AdmonitionType || (AdmonitionType = {}));
|
|
14811
|
-
const admonitionToAlertVariantMap = {
|
|
14812
|
-
[AdmonitionType.NOTE]: { variant: 'info' },
|
|
14813
|
-
[AdmonitionType.TIP]: { variant: 'default', customIcon: React.createElement(LightbulbIcon, null) },
|
|
14814
|
-
[AdmonitionType.IMPORTANT]: { variant: 'danger' },
|
|
14815
|
-
[AdmonitionType.CAUTION]: { variant: 'warning', customIcon: React.createElement(FireIcon, null) },
|
|
14816
|
-
[AdmonitionType.WARNING]: { variant: 'warning' },
|
|
14817
|
-
};
|
|
14818
|
-
const useAdmonitionShowdownExtension = () => {
|
|
14819
|
-
// const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
|
|
14820
|
-
return React.useMemo(() => ({
|
|
14821
|
-
type: 'lang',
|
|
14822
|
-
regex: /\[(.+)]{{(admonition) ([\w-]+)}}/g,
|
|
14823
|
-
replace: (text, content, admonitionLabel, admonitionType, groupId) => {
|
|
14824
|
-
if (!content || !admonitionLabel || !admonitionType || !groupId) {
|
|
14825
|
-
return text;
|
|
14826
|
-
}
|
|
14827
|
-
admonitionType = admonitionType.toUpperCase();
|
|
14828
|
-
const { variant, customIcon } = admonitionToAlertVariantMap[admonitionType];
|
|
14829
|
-
const style = admonitionType === AdmonitionType.CAUTION ? { backgroundColor: '#ec7a0915' } : {};
|
|
14830
|
-
const pfAlert = (React.createElement(Alert, { variant: variant, customIcon: customIcon && customIcon, isInline: true, title: admonitionType, className: "pfext-markdown-admonition", style: style }, content));
|
|
14831
|
-
return removeTemplateWhitespace(server.renderToStaticMarkup(pfAlert));
|
|
14832
|
-
},
|
|
14833
|
-
}), []);
|
|
14834
|
-
};
|
|
14835
|
-
|
|
14836
|
-
const useCodeShowdownExtension = () => {
|
|
14837
|
-
return React.useMemo(() => ({
|
|
14838
|
-
type: 'output',
|
|
14839
|
-
regex: /<pre><code>(.*?)\n?<\/code><\/pre>/g,
|
|
14840
|
-
replace: (text, content) => {
|
|
14841
|
-
if (!content) {
|
|
14842
|
-
return text;
|
|
14843
|
-
}
|
|
14844
|
-
const pfCodeBlock = React.createElement(CodeBlock, null, content);
|
|
14845
|
-
return removeTemplateWhitespace(server.renderToStaticMarkup(pfCodeBlock));
|
|
14846
|
-
},
|
|
14847
|
-
}), []);
|
|
14848
|
-
};
|
|
14849
|
-
|
|
14850
|
-
const FallbackImg = ({ src, alt, className, fallback }) => {
|
|
14851
|
-
const [isSrcValid, setIsSrcValid] = React.useState(true);
|
|
14852
|
-
if (src && isSrcValid) {
|
|
14853
|
-
return React.createElement("img", { className: className, src: src, alt: alt, onError: () => setIsSrcValid(false) });
|
|
14854
|
-
}
|
|
14855
|
-
return React.createElement(React.Fragment, null, fallback);
|
|
14856
|
-
};
|
|
14857
|
-
|
|
14858
|
-
var syncAltIcon = createCommonjsModule(function (module, exports) {
|
|
14859
|
-
exports.__esModule = true;
|
|
14860
|
-
exports.SyncAltIconConfig = {
|
|
14861
|
-
name: 'SyncAltIcon',
|
|
14862
|
-
height: 512,
|
|
14863
|
-
width: 512,
|
|
14864
|
-
svgPath: 'M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z',
|
|
14865
|
-
yOffset: 0,
|
|
14866
|
-
xOffset: 0,
|
|
14867
|
-
};
|
|
14868
|
-
exports.SyncAltIcon = createIcon_1.createIcon(exports.SyncAltIconConfig);
|
|
14869
|
-
exports["default"] = exports.SyncAltIcon;
|
|
14870
|
-
});
|
|
14871
|
-
|
|
14872
|
-
var SyncAltIcon = /*@__PURE__*/getDefaultExportFromCjs(syncAltIcon);
|
|
14873
|
-
|
|
14874
|
-
const DASH = '-';
|
|
14875
|
-
|
|
14876
|
-
const PopoverStatus = ({ hideHeader, children, isVisible = null, shouldClose = null, statusBody, title, onHide, onShow, }) => {
|
|
14877
|
-
return (React.createElement(Popover, { position: PopoverPosition.right, headerContent: hideHeader ? null : title, bodyContent: children, "aria-label": title, onHide: onHide, onShow: onShow, isVisible: isVisible, shouldClose: shouldClose },
|
|
14878
|
-
React.createElement(Button$1, { variant: "link", isInline: true }, statusBody)));
|
|
14879
|
-
};
|
|
14880
|
-
|
|
14881
|
-
const StatusIconAndText = ({ icon, title, spin, iconOnly, noTooltip, className, }) => {
|
|
14882
|
-
if (!title) {
|
|
14883
|
-
return React.createElement(React.Fragment, null, DASH);
|
|
14884
|
-
}
|
|
14885
|
-
return (React.createElement("span", { className: css('pfext-icon-and-text', className), title: iconOnly && !noTooltip ? title : undefined },
|
|
14886
|
-
icon &&
|
|
14887
|
-
React.cloneElement(icon, {
|
|
14888
|
-
className: css(spin && 'fa-spin', icon.props.className, !iconOnly && 'pfext-icon-and-text__icon pfext-icon-flex-child'),
|
|
14889
|
-
}),
|
|
14890
|
-
!iconOnly && React.createElement(CamelCaseWrap, { value: title, dataTest: "status-text" })));
|
|
14891
|
-
};
|
|
14892
|
-
|
|
14893
|
-
const GenericStatus = (props) => {
|
|
14894
|
-
const { Icon, children, popoverTitle, title, noTooltip, iconOnly } = props, restProps = __rest$1(props, ["Icon", "children", "popoverTitle", "title", "noTooltip", "iconOnly"]);
|
|
14895
|
-
const renderIcon = iconOnly && !noTooltip ? React.createElement(Icon, { title: title }) : React.createElement(Icon, null);
|
|
14896
|
-
const statusBody = (React.createElement(StatusIconAndText, Object.assign({}, restProps, { noTooltip: noTooltip, title: title, iconOnly: iconOnly, icon: renderIcon })));
|
|
14897
|
-
return React.Children.toArray(children).length ? (React.createElement(PopoverStatus, Object.assign({ title: popoverTitle || title }, restProps, { statusBody: statusBody }), children)) : (statusBody);
|
|
14898
|
-
};
|
|
14899
|
-
|
|
14900
|
-
var checkCircleIcon = createCommonjsModule(function (module, exports) {
|
|
14901
|
-
exports.__esModule = true;
|
|
14902
|
-
exports.CheckCircleIconConfig = {
|
|
14903
|
-
name: 'CheckCircleIcon',
|
|
14904
|
-
height: 512,
|
|
14905
|
-
width: 512,
|
|
14906
|
-
svgPath: 'M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z',
|
|
14907
|
-
yOffset: 0,
|
|
14908
|
-
xOffset: 0,
|
|
14909
|
-
};
|
|
14910
|
-
exports.CheckCircleIcon = createIcon_1.createIcon(exports.CheckCircleIconConfig);
|
|
14911
|
-
exports["default"] = exports.CheckCircleIcon;
|
|
14912
|
-
});
|
|
14913
|
-
|
|
14914
|
-
var CheckCircleIcon = /*@__PURE__*/getDefaultExportFromCjs(checkCircleIcon);
|
|
14915
|
-
|
|
14916
|
-
var exclamationCircleIcon = createCommonjsModule(function (module, exports) {
|
|
14917
|
-
exports.__esModule = true;
|
|
14918
|
-
exports.ExclamationCircleIconConfig = {
|
|
14919
|
-
name: 'ExclamationCircleIcon',
|
|
14920
|
-
height: 512,
|
|
14921
|
-
width: 512,
|
|
14922
|
-
svgPath: 'M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z',
|
|
14923
|
-
yOffset: 0,
|
|
14924
|
-
xOffset: 0,
|
|
14925
|
-
};
|
|
14926
|
-
exports.ExclamationCircleIcon = createIcon_1.createIcon(exports.ExclamationCircleIconConfig);
|
|
14927
|
-
exports["default"] = exports.ExclamationCircleIcon;
|
|
14928
|
-
});
|
|
14929
|
-
|
|
14930
|
-
var ExclamationCircleIcon = /*@__PURE__*/getDefaultExportFromCjs(exclamationCircleIcon);
|
|
14931
|
-
|
|
14932
|
-
var infoCircleIcon = createCommonjsModule(function (module, exports) {
|
|
14933
|
-
exports.__esModule = true;
|
|
14934
|
-
exports.InfoCircleIconConfig = {
|
|
14935
|
-
name: 'InfoCircleIcon',
|
|
14936
|
-
height: 512,
|
|
14937
|
-
width: 512,
|
|
14938
|
-
svgPath: 'M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z',
|
|
14939
|
-
yOffset: 0,
|
|
14940
|
-
xOffset: 0,
|
|
14941
|
-
};
|
|
14942
|
-
exports.InfoCircleIcon = createIcon_1.createIcon(exports.InfoCircleIconConfig);
|
|
14943
|
-
exports["default"] = exports.InfoCircleIcon;
|
|
14944
|
-
});
|
|
14945
|
-
|
|
14946
|
-
var InfoCircleIcon = /*@__PURE__*/getDefaultExportFromCjs(infoCircleIcon);
|
|
14947
|
-
|
|
14948
|
-
var global_palette_green_500 = createCommonjsModule(function (module, exports) {
|
|
14949
|
-
exports.__esModule = true;
|
|
14950
|
-
exports.global_palette_green_500 = {
|
|
14951
|
-
"name": "--pf-global--palette--green-500",
|
|
14952
|
-
"value": "#3e8635",
|
|
14953
|
-
"var": "var(--pf-global--palette--green-500)"
|
|
14954
|
-
};
|
|
14955
|
-
exports["default"] = exports.global_palette_green_500;
|
|
14956
|
-
});
|
|
14957
|
-
|
|
14958
|
-
// import { global_warning_color_100 as warningColor } from '@patternfly/react-tokens/dist/js/global_warning_color_100';
|
|
14959
|
-
const GreenCheckCircleIcon = ({ className, title, size }) => (React.createElement(CheckCircleIcon, { "data-test": "success-icon", size: size, color: global_palette_green_500.global_palette_green_500.value, className: className, title: title }));
|
|
14960
|
-
|
|
14961
|
-
// export const PendingStatus: React.FC<StatusComponentProps> = (props) => (
|
|
14962
|
-
// <GenericStatus {...props} Icon={HourglassHalfIcon} title={props.title || 'Pending'} />
|
|
14963
|
-
// );
|
|
14964
|
-
// PendingStatus.displayName = 'PendingStatus';
|
|
14965
|
-
// export const ProgressStatus: React.FC<StatusComponentProps> = (props) => (
|
|
14966
|
-
// <GenericStatus {...props} Icon={InProgressIcon} title={props.title || 'In progress'} />
|
|
14967
|
-
// );
|
|
14968
|
-
// ProgressStatus.displayName = 'ProgressStatus';
|
|
14969
|
-
const SuccessStatus = (props) => (React.createElement(GenericStatus, Object.assign({}, props, { Icon: GreenCheckCircleIcon, title: props.title || 'Healthy' })));
|
|
14970
|
-
SuccessStatus.displayName = 'SuccessStatus';
|
|
14971
|
-
// export const WarningStatus: React.FC<StatusComponentProps> = (props) => (
|
|
14972
|
-
// <GenericStatus {...props} Icon={YellowExclamationTriangleIcon} title={props.title || 'Warning'} />
|
|
14973
|
-
// );
|
|
14974
|
-
// WarningStatus.displayName = 'WarningStatus';
|
|
14975
|
-
|
|
14976
|
-
const Status = ({ status, title, iconOnly, noTooltip, className, }) => {
|
|
14977
|
-
const statusProps = { title: title || status, iconOnly, noTooltip, className };
|
|
14978
|
-
switch (status) {
|
|
14979
|
-
case 'In Progress':
|
|
14980
|
-
return React.createElement(StatusIconAndText, Object.assign({}, statusProps, { icon: React.createElement(SyncAltIcon, null) }));
|
|
14981
|
-
case 'Complete':
|
|
14982
|
-
return React.createElement(SuccessStatus, Object.assign({}, statusProps));
|
|
14983
|
-
default:
|
|
14984
|
-
return React.createElement(React.Fragment, null, status || DASH);
|
|
14985
|
-
}
|
|
14986
|
-
};
|
|
14987
|
-
const StatusIcon = ({ status }) => (React.createElement(Status, { status: status, iconOnly: true }));
|
|
14988
|
-
|
|
14989
14803
|
var showdown = createCommonjsModule(function (module) {
|
|
14990
14804
|
(function(){
|
|
14991
14805
|
/**
|
|
@@ -19616,6 +19430,193 @@ const QuickStartMarkdownView = ({ content, exactHeight, className, }) => {
|
|
|
19616
19430
|
markdown.renderExtension(docContext, rootSelector))), className: className }));
|
|
19617
19431
|
};
|
|
19618
19432
|
|
|
19433
|
+
var AdmonitionType;
|
|
19434
|
+
(function (AdmonitionType) {
|
|
19435
|
+
AdmonitionType["TIP"] = "TIP";
|
|
19436
|
+
AdmonitionType["NOTE"] = "NOTE";
|
|
19437
|
+
AdmonitionType["IMPORTANT"] = "IMPORTANT";
|
|
19438
|
+
AdmonitionType["WARNING"] = "WARNING";
|
|
19439
|
+
AdmonitionType["CAUTION"] = "CAUTION";
|
|
19440
|
+
})(AdmonitionType || (AdmonitionType = {}));
|
|
19441
|
+
const admonitionToAlertVariantMap = {
|
|
19442
|
+
[AdmonitionType.NOTE]: { variant: 'info' },
|
|
19443
|
+
[AdmonitionType.TIP]: { variant: 'default', customIcon: React.createElement(LightbulbIcon, null) },
|
|
19444
|
+
[AdmonitionType.IMPORTANT]: { variant: 'danger' },
|
|
19445
|
+
[AdmonitionType.CAUTION]: { variant: 'warning', customIcon: React.createElement(FireIcon, null) },
|
|
19446
|
+
[AdmonitionType.WARNING]: { variant: 'warning' },
|
|
19447
|
+
};
|
|
19448
|
+
const useAdmonitionShowdownExtension = () => {
|
|
19449
|
+
// const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
|
|
19450
|
+
return React.useMemo(() => ({
|
|
19451
|
+
type: 'lang',
|
|
19452
|
+
regex: /\[(.+)]{{(admonition) ([\w-]+)}}/g,
|
|
19453
|
+
replace: (text, content, admonitionLabel, admonitionType, groupId) => {
|
|
19454
|
+
if (!content || !admonitionLabel || !admonitionType || !groupId) {
|
|
19455
|
+
return text;
|
|
19456
|
+
}
|
|
19457
|
+
admonitionType = admonitionType.toUpperCase();
|
|
19458
|
+
const { variant, customIcon } = admonitionToAlertVariantMap[admonitionType];
|
|
19459
|
+
const style = admonitionType === AdmonitionType.CAUTION ? { backgroundColor: '#ec7a0915' } : {};
|
|
19460
|
+
const mdContent = React.createElement(QuickStartMarkdownView, { content: content });
|
|
19461
|
+
const pfAlert = (React.createElement(Alert, { variant: variant, customIcon: customIcon && customIcon, isInline: true, title: admonitionType, className: "pfext-markdown-admonition", style: style }, mdContent));
|
|
19462
|
+
return removeTemplateWhitespace(server.renderToStaticMarkup(pfAlert));
|
|
19463
|
+
},
|
|
19464
|
+
}), []);
|
|
19465
|
+
};
|
|
19466
|
+
|
|
19467
|
+
const useCodeShowdownExtension = () => {
|
|
19468
|
+
return React.useMemo(() => ({
|
|
19469
|
+
type: 'output',
|
|
19470
|
+
regex: /<pre><code>(.*?)\n?<\/code><\/pre>/g,
|
|
19471
|
+
replace: (text, content) => {
|
|
19472
|
+
if (!content) {
|
|
19473
|
+
return text;
|
|
19474
|
+
}
|
|
19475
|
+
const pfCodeBlock = React.createElement(CodeBlock, null, content);
|
|
19476
|
+
return removeTemplateWhitespace(server.renderToStaticMarkup(pfCodeBlock));
|
|
19477
|
+
},
|
|
19478
|
+
}), []);
|
|
19479
|
+
};
|
|
19480
|
+
|
|
19481
|
+
const FallbackImg = ({ src, alt, className, fallback }) => {
|
|
19482
|
+
const [isSrcValid, setIsSrcValid] = React.useState(true);
|
|
19483
|
+
if (src && isSrcValid) {
|
|
19484
|
+
return React.createElement("img", { className: className, src: src, alt: alt, onError: () => setIsSrcValid(false) });
|
|
19485
|
+
}
|
|
19486
|
+
return React.createElement(React.Fragment, null, fallback);
|
|
19487
|
+
};
|
|
19488
|
+
|
|
19489
|
+
var syncAltIcon = createCommonjsModule(function (module, exports) {
|
|
19490
|
+
exports.__esModule = true;
|
|
19491
|
+
exports.SyncAltIconConfig = {
|
|
19492
|
+
name: 'SyncAltIcon',
|
|
19493
|
+
height: 512,
|
|
19494
|
+
width: 512,
|
|
19495
|
+
svgPath: 'M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z',
|
|
19496
|
+
yOffset: 0,
|
|
19497
|
+
xOffset: 0,
|
|
19498
|
+
};
|
|
19499
|
+
exports.SyncAltIcon = createIcon_1.createIcon(exports.SyncAltIconConfig);
|
|
19500
|
+
exports["default"] = exports.SyncAltIcon;
|
|
19501
|
+
});
|
|
19502
|
+
|
|
19503
|
+
var SyncAltIcon = /*@__PURE__*/getDefaultExportFromCjs(syncAltIcon);
|
|
19504
|
+
|
|
19505
|
+
const DASH = '-';
|
|
19506
|
+
|
|
19507
|
+
const PopoverStatus = ({ hideHeader, children, isVisible = null, shouldClose = null, statusBody, title, onHide, onShow, }) => {
|
|
19508
|
+
return (React.createElement(Popover, { position: PopoverPosition.right, headerContent: hideHeader ? null : title, bodyContent: children, "aria-label": title, onHide: onHide, onShow: onShow, isVisible: isVisible, shouldClose: shouldClose },
|
|
19509
|
+
React.createElement(Button$1, { variant: "link", isInline: true }, statusBody)));
|
|
19510
|
+
};
|
|
19511
|
+
|
|
19512
|
+
const StatusIconAndText = ({ icon, title, spin, iconOnly, noTooltip, className, }) => {
|
|
19513
|
+
if (!title) {
|
|
19514
|
+
return React.createElement(React.Fragment, null, DASH);
|
|
19515
|
+
}
|
|
19516
|
+
return (React.createElement("span", { className: css('pfext-icon-and-text', className), title: iconOnly && !noTooltip ? title : undefined },
|
|
19517
|
+
icon &&
|
|
19518
|
+
React.cloneElement(icon, {
|
|
19519
|
+
className: css(spin && 'fa-spin', icon.props.className, !iconOnly && 'pfext-icon-and-text__icon pfext-icon-flex-child'),
|
|
19520
|
+
}),
|
|
19521
|
+
!iconOnly && React.createElement(CamelCaseWrap, { value: title, dataTest: "status-text" })));
|
|
19522
|
+
};
|
|
19523
|
+
|
|
19524
|
+
const GenericStatus = (props) => {
|
|
19525
|
+
const { Icon, children, popoverTitle, title, noTooltip, iconOnly } = props, restProps = __rest$1(props, ["Icon", "children", "popoverTitle", "title", "noTooltip", "iconOnly"]);
|
|
19526
|
+
const renderIcon = iconOnly && !noTooltip ? React.createElement(Icon, { title: title }) : React.createElement(Icon, null);
|
|
19527
|
+
const statusBody = (React.createElement(StatusIconAndText, Object.assign({}, restProps, { noTooltip: noTooltip, title: title, iconOnly: iconOnly, icon: renderIcon })));
|
|
19528
|
+
return React.Children.toArray(children).length ? (React.createElement(PopoverStatus, Object.assign({ title: popoverTitle || title }, restProps, { statusBody: statusBody }), children)) : (statusBody);
|
|
19529
|
+
};
|
|
19530
|
+
|
|
19531
|
+
var checkCircleIcon = createCommonjsModule(function (module, exports) {
|
|
19532
|
+
exports.__esModule = true;
|
|
19533
|
+
exports.CheckCircleIconConfig = {
|
|
19534
|
+
name: 'CheckCircleIcon',
|
|
19535
|
+
height: 512,
|
|
19536
|
+
width: 512,
|
|
19537
|
+
svgPath: 'M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z',
|
|
19538
|
+
yOffset: 0,
|
|
19539
|
+
xOffset: 0,
|
|
19540
|
+
};
|
|
19541
|
+
exports.CheckCircleIcon = createIcon_1.createIcon(exports.CheckCircleIconConfig);
|
|
19542
|
+
exports["default"] = exports.CheckCircleIcon;
|
|
19543
|
+
});
|
|
19544
|
+
|
|
19545
|
+
var CheckCircleIcon = /*@__PURE__*/getDefaultExportFromCjs(checkCircleIcon);
|
|
19546
|
+
|
|
19547
|
+
var exclamationCircleIcon = createCommonjsModule(function (module, exports) {
|
|
19548
|
+
exports.__esModule = true;
|
|
19549
|
+
exports.ExclamationCircleIconConfig = {
|
|
19550
|
+
name: 'ExclamationCircleIcon',
|
|
19551
|
+
height: 512,
|
|
19552
|
+
width: 512,
|
|
19553
|
+
svgPath: 'M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z',
|
|
19554
|
+
yOffset: 0,
|
|
19555
|
+
xOffset: 0,
|
|
19556
|
+
};
|
|
19557
|
+
exports.ExclamationCircleIcon = createIcon_1.createIcon(exports.ExclamationCircleIconConfig);
|
|
19558
|
+
exports["default"] = exports.ExclamationCircleIcon;
|
|
19559
|
+
});
|
|
19560
|
+
|
|
19561
|
+
var ExclamationCircleIcon = /*@__PURE__*/getDefaultExportFromCjs(exclamationCircleIcon);
|
|
19562
|
+
|
|
19563
|
+
var infoCircleIcon = createCommonjsModule(function (module, exports) {
|
|
19564
|
+
exports.__esModule = true;
|
|
19565
|
+
exports.InfoCircleIconConfig = {
|
|
19566
|
+
name: 'InfoCircleIcon',
|
|
19567
|
+
height: 512,
|
|
19568
|
+
width: 512,
|
|
19569
|
+
svgPath: 'M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z',
|
|
19570
|
+
yOffset: 0,
|
|
19571
|
+
xOffset: 0,
|
|
19572
|
+
};
|
|
19573
|
+
exports.InfoCircleIcon = createIcon_1.createIcon(exports.InfoCircleIconConfig);
|
|
19574
|
+
exports["default"] = exports.InfoCircleIcon;
|
|
19575
|
+
});
|
|
19576
|
+
|
|
19577
|
+
var InfoCircleIcon = /*@__PURE__*/getDefaultExportFromCjs(infoCircleIcon);
|
|
19578
|
+
|
|
19579
|
+
var global_palette_green_500 = createCommonjsModule(function (module, exports) {
|
|
19580
|
+
exports.__esModule = true;
|
|
19581
|
+
exports.global_palette_green_500 = {
|
|
19582
|
+
"name": "--pf-global--palette--green-500",
|
|
19583
|
+
"value": "#3e8635",
|
|
19584
|
+
"var": "var(--pf-global--palette--green-500)"
|
|
19585
|
+
};
|
|
19586
|
+
exports["default"] = exports.global_palette_green_500;
|
|
19587
|
+
});
|
|
19588
|
+
|
|
19589
|
+
// import { global_warning_color_100 as warningColor } from '@patternfly/react-tokens/dist/js/global_warning_color_100';
|
|
19590
|
+
const GreenCheckCircleIcon = ({ className, title, size }) => (React.createElement(CheckCircleIcon, { "data-test": "success-icon", size: size, color: global_palette_green_500.global_palette_green_500.value, className: className, title: title }));
|
|
19591
|
+
|
|
19592
|
+
// export const PendingStatus: React.FC<StatusComponentProps> = (props) => (
|
|
19593
|
+
// <GenericStatus {...props} Icon={HourglassHalfIcon} title={props.title || 'Pending'} />
|
|
19594
|
+
// );
|
|
19595
|
+
// PendingStatus.displayName = 'PendingStatus';
|
|
19596
|
+
// export const ProgressStatus: React.FC<StatusComponentProps> = (props) => (
|
|
19597
|
+
// <GenericStatus {...props} Icon={InProgressIcon} title={props.title || 'In progress'} />
|
|
19598
|
+
// );
|
|
19599
|
+
// ProgressStatus.displayName = 'ProgressStatus';
|
|
19600
|
+
const SuccessStatus = (props) => (React.createElement(GenericStatus, Object.assign({}, props, { Icon: GreenCheckCircleIcon, title: props.title || 'Healthy' })));
|
|
19601
|
+
SuccessStatus.displayName = 'SuccessStatus';
|
|
19602
|
+
// export const WarningStatus: React.FC<StatusComponentProps> = (props) => (
|
|
19603
|
+
// <GenericStatus {...props} Icon={YellowExclamationTriangleIcon} title={props.title || 'Warning'} />
|
|
19604
|
+
// );
|
|
19605
|
+
// WarningStatus.displayName = 'WarningStatus';
|
|
19606
|
+
|
|
19607
|
+
const Status = ({ status, title, iconOnly, noTooltip, className, }) => {
|
|
19608
|
+
const statusProps = { title: title || status, iconOnly, noTooltip, className };
|
|
19609
|
+
switch (status) {
|
|
19610
|
+
case 'In Progress':
|
|
19611
|
+
return React.createElement(StatusIconAndText, Object.assign({}, statusProps, { icon: React.createElement(SyncAltIcon, null) }));
|
|
19612
|
+
case 'Complete':
|
|
19613
|
+
return React.createElement(SuccessStatus, Object.assign({}, statusProps));
|
|
19614
|
+
default:
|
|
19615
|
+
return React.createElement(React.Fragment, null, status || DASH);
|
|
19616
|
+
}
|
|
19617
|
+
};
|
|
19618
|
+
const StatusIcon = ({ status }) => (React.createElement(Status, { status: status, iconOnly: true }));
|
|
19619
|
+
|
|
19619
19620
|
const QuickStartTileDescription = ({ description, prerequisites, }) => {
|
|
19620
19621
|
const { getResource } = React.useContext(QuickStartContext);
|
|
19621
19622
|
const prereqs = prerequisites === null || prerequisites === void 0 ? void 0 : prerequisites.filter((p) => p);
|
|
@@ -19751,9 +19752,14 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, })
|
|
|
19751
19752
|
// @ts-ignore
|
|
19752
19753
|
component: "div", style: {
|
|
19753
19754
|
cursor: 'pointer',
|
|
19754
|
-
}, 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,
|
|
19755
|
+
}, 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, onKeyDown: (event) => {
|
|
19756
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
19757
|
+
setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
|
|
19758
|
+
onClick();
|
|
19759
|
+
}
|
|
19760
|
+
},
|
|
19755
19761
|
// https://github.com/patternfly/patternfly-react/issues/7039
|
|
19756
|
-
href: "#", "data-test": `tile ${id}`, description: React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent })));
|
|
19762
|
+
href: "#", "data-test": `tile ${id}`, description: React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent, tabIndex: 0 })));
|
|
19757
19763
|
};
|
|
19758
19764
|
|
|
19759
19765
|
const QuickStartCatalog = ({ quickStarts }) => {
|
|
@@ -20012,6 +20018,13 @@ const TaskIcon = ({ taskIndex, taskStatus }) => {
|
|
|
20012
20018
|
return React.createElement("span", { className: classNames }, content);
|
|
20013
20019
|
};
|
|
20014
20020
|
const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, isActiveTask, onTaskSelect, children, }) => {
|
|
20021
|
+
const titleRef = React.useRef(null);
|
|
20022
|
+
React.useEffect(() => {
|
|
20023
|
+
if (isActiveTask) {
|
|
20024
|
+
// Focus the WizardNavItem button element that contains the title
|
|
20025
|
+
titleRef.current.parentNode.focus();
|
|
20026
|
+
}
|
|
20027
|
+
}, [isActiveTask]);
|
|
20015
20028
|
const classNames = css('pfext-quick-start-task-header__title', {
|
|
20016
20029
|
'pfext-quick-start-task-header__title-success': taskStatus === QuickStartTaskStatus.SUCCESS,
|
|
20017
20030
|
'pfext-quick-start-task-header__title-failed': taskStatus === (QuickStartTaskStatus.FAILED || QuickStartTaskStatus.VISITED),
|
|
@@ -20024,7 +20037,7 @@ const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, is
|
|
|
20024
20037
|
const tryAgain = failedReview && (React.createElement(React.Fragment, null,
|
|
20025
20038
|
React.createElement("div", null),
|
|
20026
20039
|
React.createElement("div", { className: "pfext-quick-start-task-header__tryagain" }, "Try the steps again.")));
|
|
20027
|
-
const content = (React.createElement("div", { className: "pfext-quick-start-task-header" },
|
|
20040
|
+
const content = (React.createElement("div", { className: "pfext-quick-start-task-header", ref: titleRef },
|
|
20028
20041
|
React.createElement(TaskIcon, { taskIndex: taskIndex, taskStatus: taskStatus }),
|
|
20029
20042
|
React.createElement(Title, { headingLevel: "h3", size: size, className: classNames },
|
|
20030
20043
|
React.createElement("span", { dangerouslySetInnerHTML: { __html: removeParagraphWrap(markdownConvert(title)) } }),
|
|
@@ -20231,6 +20244,7 @@ const useScrollTopOnTaskNumberChange = (node, taskNumber) => {
|
|
|
20231
20244
|
};
|
|
20232
20245
|
const QuickStartPanelContent = (_a) => {
|
|
20233
20246
|
var { quickStarts = [], handleClose, activeQuickStartID, appendTo, isResizable = true, showClose = true, headerVariant = '' } = _a, props = __rest$1(_a, ["quickStarts", "handleClose", "activeQuickStartID", "appendTo", "isResizable", "showClose", "headerVariant"]);
|
|
20247
|
+
const titleRef = React.useRef(null);
|
|
20234
20248
|
const { getResource, activeQuickStartState } = React.useContext(QuickStartContext);
|
|
20235
20249
|
const [contentRef, setContentRef] = React.useState();
|
|
20236
20250
|
const shadows = useScrollShadows(contentRef);
|
|
@@ -20255,10 +20269,15 @@ const QuickStartPanelContent = (_a) => {
|
|
|
20255
20269
|
}
|
|
20256
20270
|
return Number.parseInt(taskNumber, 10) + 1;
|
|
20257
20271
|
};
|
|
20272
|
+
React.useEffect(() => {
|
|
20273
|
+
if (quickStart) {
|
|
20274
|
+
titleRef.current.focus();
|
|
20275
|
+
}
|
|
20276
|
+
}, [quickStart]);
|
|
20258
20277
|
const content = quickStart ? (React.createElement(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),
|
|
20259
20278
|
React.createElement("div", { className: headerClasses },
|
|
20260
20279
|
React.createElement(DrawerHead, null,
|
|
20261
|
-
React.createElement("div", { className: "pfext-quick-start-panel-content__title" },
|
|
20280
|
+
React.createElement("div", { className: "pfext-quick-start-panel-content__title", tabIndex: -1, ref: titleRef },
|
|
20262
20281
|
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 :
|
|
20263
20282
|
quickStart.spec.displayName,
|
|
20264
20283
|
' ',
|