@patternfly/quickstarts 2.2.1 → 2.2.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/README.md +20 -20
- package/dist/ConsoleShared/src/components/markdown-extensions/code-extension.d.ts +7 -0
- package/dist/ConsoleShared/src/components/markdown-extensions/index.d.ts +1 -0
- package/dist/index.es.js +26 -20
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +25 -19
- package/dist/index.js.map +1 -1
- package/dist/patternfly-nested.css +11 -1
- package/dist/quickstarts-base.css +49 -11
- package/dist/quickstarts-full.es.js +350 -304
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/quickstarts-standalone.css +5 -15
- package/dist/quickstarts-standalone.min.css +1 -1
- package/dist/quickstarts.css +49 -11
- package/dist/quickstarts.min.css +1 -1
- package/dist/utils/help-topic-types.d.ts +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1357,6 +1357,20 @@ const useAdmonitionShowdownExtension = () => {
|
|
|
1357
1357
|
}), []);
|
|
1358
1358
|
};
|
|
1359
1359
|
|
|
1360
|
+
const useCodeShowdownExtension = () => {
|
|
1361
|
+
return React__namespace.useMemo(() => ({
|
|
1362
|
+
type: 'output',
|
|
1363
|
+
regex: /<pre><code>(.*?)\n?<\/code><\/pre>/g,
|
|
1364
|
+
replace: (text, content) => {
|
|
1365
|
+
if (!content) {
|
|
1366
|
+
return text;
|
|
1367
|
+
}
|
|
1368
|
+
const pfCodeBlock = React__namespace.createElement(reactCore.CodeBlock, null, content);
|
|
1369
|
+
return removeTemplateWhitespace(server.renderToStaticMarkup(pfCodeBlock));
|
|
1370
|
+
},
|
|
1371
|
+
}), []);
|
|
1372
|
+
};
|
|
1373
|
+
|
|
1360
1374
|
const FallbackImg = ({ src, alt, className, fallback }) => {
|
|
1361
1375
|
const [isSrcValid, setIsSrcValid] = React__namespace.useState(true);
|
|
1362
1376
|
if (src && isSrcValid) {
|
|
@@ -1597,6 +1611,7 @@ const QuickStartMarkdownView = ({ content, exactHeight, className, }) => {
|
|
|
1597
1611
|
const inlineCopyClipboardShowdownExtension = useInlineCopyClipboardShowdownExtension();
|
|
1598
1612
|
const multilineCopyClipboardShowdownExtension = useMultilineCopyClipboardShowdownExtension();
|
|
1599
1613
|
const admonitionShowdownExtension = useAdmonitionShowdownExtension();
|
|
1614
|
+
const codeShowdownExtension = useCodeShowdownExtension();
|
|
1600
1615
|
return (React__namespace.createElement(SyncMarkdownView, { inline: true, content: content, exactHeight: exactHeight, extensions: [
|
|
1601
1616
|
{
|
|
1602
1617
|
type: 'lang',
|
|
@@ -1619,6 +1634,7 @@ const QuickStartMarkdownView = ({ content, exactHeight, className, }) => {
|
|
|
1619
1634
|
inlineCopyClipboardShowdownExtension,
|
|
1620
1635
|
multilineCopyClipboardShowdownExtension,
|
|
1621
1636
|
admonitionShowdownExtension,
|
|
1637
|
+
codeShowdownExtension,
|
|
1622
1638
|
...(markdown ? markdown.extensions : []),
|
|
1623
1639
|
], renderExtension: (docContext, rootSelector) => (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1624
1640
|
React__namespace.createElement(MarkdownHighlightExtension, { docContext: docContext, rootSelector: rootSelector }),
|
|
@@ -1738,7 +1754,7 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, })
|
|
|
1738
1754
|
|
|
1739
1755
|
const QuickStartCatalog = ({ quickStarts }) => {
|
|
1740
1756
|
const { activeQuickStartID, allQuickStartStates } = React__namespace.useContext(QuickStartContext);
|
|
1741
|
-
return (React__namespace.createElement("div", { className: "pfext-page-layout__content
|
|
1757
|
+
return (React__namespace.createElement("div", { className: "pfext-page-layout__content" },
|
|
1742
1758
|
React__namespace.createElement(reactCore.Gallery, { className: "pfext-quick-start-catalog__gallery", hasGutter: true }, quickStarts.map((quickStart) => {
|
|
1743
1759
|
const { metadata: { name: id }, } = quickStart;
|
|
1744
1760
|
return (React__namespace.createElement(reactCore.GalleryItem, { key: id, className: "pfext-quick-start-catalog__gallery-item" },
|
|
@@ -1943,7 +1959,7 @@ const QuickStartCatalogHeader = ({ title, hint, }) => (React__namespace.createEl
|
|
|
1943
1959
|
React__namespace.createElement("h1", { "data-pf-content": "true", className: "pfext-page-layout__title" }, title),
|
|
1944
1960
|
hint && React__namespace.createElement("div", { className: "pfext-page-layout__hint" }, hint)));
|
|
1945
1961
|
|
|
1946
|
-
const QuickStartCatalogSection = ({ children }) => (React__namespace.createElement("div", { className: "pfext-page-layout__content
|
|
1962
|
+
const QuickStartCatalogSection = ({ children }) => (React__namespace.createElement("div", { className: "pfext-page-layout__content" }, children));
|
|
1947
1963
|
|
|
1948
1964
|
const QuickStartCatalogToolbar = ({ children }) => (React__namespace.createElement(reactCore.Toolbar, { usePageInsets: true, className: "pfext-quick-start-catalog-filter__flex" }, children));
|
|
1949
1965
|
|
|
@@ -2378,6 +2394,7 @@ const useValuesForHelpTopicContext = (value = {}) => {
|
|
|
2378
2394
|
};
|
|
2379
2395
|
|
|
2380
2396
|
const HelpTopicPanelContent = (_a) => {
|
|
2397
|
+
var _b, _c;
|
|
2381
2398
|
var { activeHelpTopic = null, filteredHelpTopics = [], isResizable = true, onClose } = _a, props = tslib.__rest(_a, ["activeHelpTopic", "filteredHelpTopics", "isResizable", "onClose"]);
|
|
2382
2399
|
const { setActiveHelpTopicByName } = React__namespace.useContext(HelpTopicContext);
|
|
2383
2400
|
const [isHelpTopicMenuOpen, setIsHelpTopicMenuOpen] = React__namespace.useState(false);
|
|
@@ -2396,10 +2413,11 @@ const HelpTopicPanelContent = (_a) => {
|
|
|
2396
2413
|
const paddingContainer = (children) => React__namespace.createElement("div", { style: { padding: '24px' } }, children);
|
|
2397
2414
|
const panelBodyItems = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
2398
2415
|
paddingContainer(React__namespace.createElement(QuickStartMarkdownView, { content: activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.content })),
|
|
2399
|
-
React__namespace.createElement(reactCore.Divider, null),
|
|
2400
|
-
paddingContainer(activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.links.map((
|
|
2401
|
-
return React__namespace.createElement(
|
|
2402
|
-
|
|
2416
|
+
((_b = activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.links) === null || _b === void 0 ? void 0 : _b.length) && React__namespace.createElement(reactCore.Divider, null),
|
|
2417
|
+
paddingContainer(React__namespace.createElement(reactCore.Stack, { hasGutter: true }, (_c = activeHelpTopic === null || activeHelpTopic === void 0 ? void 0 : activeHelpTopic.links) === null || _c === void 0 ? void 0 : _c.map(({ href, text, newTab, isExternal }, index) => {
|
|
2418
|
+
return (React__namespace.createElement(reactCore.StackItem, { key: index },
|
|
2419
|
+
React__namespace.createElement(reactCore.Button, { component: "a", href: href, target: newTab ? '_blank' : '', rel: "noopener noreferrer", variant: "link", "aria-label": `Open documentation in new window`, isInline: true, icon: isExternal ? React__namespace.createElement(ExternalLinkAltIcon__default['default'], null) : null, iconPosition: "right", style: { fontSize: 'inherit' } }, text || href)));
|
|
2420
|
+
})))));
|
|
2403
2421
|
const content = (React__namespace.createElement(reactCore.DrawerPanelContent, Object.assign({ isResizable: isResizable, className: "pfext-quick-start__base" }, props),
|
|
2404
2422
|
React__namespace.createElement("div", null,
|
|
2405
2423
|
React__namespace.createElement(reactCore.DrawerHead, null,
|
|
@@ -2434,20 +2452,8 @@ const HelpTopicContainer = (_a) => {
|
|
|
2434
2452
|
React__namespace.createElement(HelpTopicDrawer, Object.assign({}, drawerProps), children)));
|
|
2435
2453
|
};
|
|
2436
2454
|
const HelpTopicDrawer = (_a) => {
|
|
2437
|
-
var {
|
|
2438
|
-
// helpTopics,
|
|
2439
|
-
children } = _a, props = tslib.__rest(_a, ["children"]);
|
|
2455
|
+
var { children } = _a, props = tslib.__rest(_a, ["children"]);
|
|
2440
2456
|
const { activeHelpTopic, filteredHelpTopics, setActiveHelpTopicByName } = React__namespace.useContext(HelpTopicContext);
|
|
2441
|
-
// Leave here if query param is desired for help topics later
|
|
2442
|
-
// React.useEffect(() => {
|
|
2443
|
-
// const params = new URLSearchParams(window.location.search);
|
|
2444
|
-
// // if there is a quick start param, but the quick start is not active, set it
|
|
2445
|
-
// // this can happen if a new browser session is opened or an incognito window for example
|
|
2446
|
-
// const helpTopicNameFromParam = params.get(HELP_TOPIC_NAME_KEY) || '';
|
|
2447
|
-
// if (helpTopicNameFromParam) {
|
|
2448
|
-
// setActiveHelpTopicByName(helpTopicNameFromParam);
|
|
2449
|
-
// }
|
|
2450
|
-
// }, [inContextHelpTopics, setActiveHelpTopicByName]);
|
|
2451
2457
|
const onClose = () => {
|
|
2452
2458
|
setActiveHelpTopicByName('');
|
|
2453
2459
|
};
|