@patternfly/quickstarts 1.4.0 → 1.4.1-rc.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 +8 -1
- package/dist/QuickStartDrawer.d.ts +1 -0
- package/dist/QuickStartPanelContent.d.ts +1 -0
- package/dist/index.es.js +26 -21
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +26 -21
- package/dist/index.js.map +1 -1
- package/dist/patternfly-nested.css +12 -4
- package/dist/quickstarts-base.css +120 -56
- package/dist/quickstarts-full.es.js +26 -21
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/quickstarts-standalone.css +23 -5
- package/dist/quickstarts-standalone.min.css +2 -2
- package/dist/quickstarts.css +120 -56
- package/dist/quickstarts.min.css +1 -1
- package/dist/utils/quick-start-context.d.ts +2 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -206,7 +206,8 @@ var en = {
|
|
|
206
206
|
"Your progress will be saved.": "Your progress will be saved.",
|
|
207
207
|
"Not available": "Not available",
|
|
208
208
|
"Copy to clipboard": "Copy to clipboard",
|
|
209
|
-
"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"
|
|
210
211
|
};
|
|
211
212
|
|
|
212
213
|
/* eslint-disable */
|
|
@@ -616,6 +617,7 @@ const QuickStartContextDefaults = {
|
|
|
616
617
|
},
|
|
617
618
|
setFilter: () => { },
|
|
618
619
|
footer: null,
|
|
620
|
+
useLegacyHeaderColors: false,
|
|
619
621
|
markdown: null,
|
|
620
622
|
loading: false,
|
|
621
623
|
alwaysShowTaskReview: false,
|
|
@@ -634,7 +636,7 @@ const getResource = (resource, options, resourceBundle, lng) => {
|
|
|
634
636
|
const useValuesForQuickStartContext = (value = {}) => {
|
|
635
637
|
var _a, _b;
|
|
636
638
|
const combinedValue = Object.assign(Object.assign({}, QuickStartContextDefaults), value);
|
|
637
|
-
const { activeQuickStartID, setActiveQuickStartID, setAllQuickStartStates, useQueryParams, allQuickStartStates, allQuickStarts = [], footer, markdown, } = combinedValue;
|
|
639
|
+
const { activeQuickStartID, setActiveQuickStartID, setAllQuickStartStates, useQueryParams, allQuickStartStates, allQuickStarts = [], footer, useLegacyHeaderColors, markdown, } = combinedValue;
|
|
638
640
|
const [quickStarts, setQuickStarts] = React__default['default'].useState(combinedValue.allQuickStarts || []);
|
|
639
641
|
const [resourceBundle, setResourceBundle] = React__default['default'].useState(Object.assign(Object.assign({}, en), combinedValue.resourceBundle));
|
|
640
642
|
const [language, setLanguage] = React__default['default'].useState(combinedValue.language);
|
|
@@ -817,6 +819,7 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
817
819
|
setQuickStartTaskStatus,
|
|
818
820
|
getQuickStartForId,
|
|
819
821
|
footer,
|
|
822
|
+
useLegacyHeaderColors,
|
|
820
823
|
useQueryParams,
|
|
821
824
|
markdown,
|
|
822
825
|
resourceBundle,
|
|
@@ -1911,16 +1914,16 @@ const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, is
|
|
|
1911
1914
|
});
|
|
1912
1915
|
const notCompleted = taskStatus === exports.QuickStartTaskStatus.VISITED;
|
|
1913
1916
|
const skippedReviewOrFailed = taskStatus === exports.QuickStartTaskStatus.REVIEW || taskStatus === exports.QuickStartTaskStatus.FAILED;
|
|
1914
|
-
const tryAgain = !isActiveTask && (skippedReviewOrFailed || notCompleted) && (React__namespace.createElement(
|
|
1915
|
-
React__namespace.createElement(
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
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 }),
|
|
1922
|
+
React__namespace.createElement(reactCore.Title, { headingLevel: "h3", size: size, className: classNames },
|
|
1923
|
+
React__namespace.createElement("span", { dangerouslySetInnerHTML: { __html: removeParagraphWrap(markdownConvert(title)) } }),
|
|
1924
|
+
isActiveTask && subtitle && (React__namespace.createElement("span", { className: "pfext-quick-start-task-header__subtitle", "data-test-id": "quick-start-task-subtitle" },
|
|
1925
|
+
' ',
|
|
1926
|
+
subtitle))),
|
|
1924
1927
|
tryAgain));
|
|
1925
1928
|
return (React__namespace.createElement(reactCore.WizardNavItem, { content: content, step: taskIndex, onNavItemClick: () => onTaskSelect(taskIndex - 1), navItemComponent: "button", isCurrent: isActiveTask }));
|
|
1926
1929
|
};
|
|
@@ -2007,7 +2010,7 @@ const QuickStartTasks = ({ tasks, taskNumber, allTaskStatuses, onTaskReview, onT
|
|
|
2007
2010
|
React__namespace.createElement(QuickStartTaskHeader, { taskIndex: index + 1, title: title, size: "md", subtitle: getResource('{{index, number}} of {{tasks, number}}')
|
|
2008
2011
|
.replace('{{index, number}}', index + 1)
|
|
2009
2012
|
.replace('{{tasks, number}}', tasks.length), taskStatus: taskStatus, isActiveTask: isActiveTask, onTaskSelect: onTaskSelect }),
|
|
2010
|
-
isActiveTask && (React__namespace.createElement("div", {
|
|
2013
|
+
isActiveTask && (React__namespace.createElement("div", { className: "pfext-quick-start-task__content" },
|
|
2011
2014
|
React__namespace.createElement(QuickStartMarkdownView, { content: description }),
|
|
2012
2015
|
shouldShowTaskReview && (React__namespace.createElement(QuickStartTaskReview, { review: review, taskStatus: taskStatus, onTaskReview: onTaskReview }))))));
|
|
2013
2016
|
})));
|
|
@@ -2119,7 +2122,7 @@ const useScrollTopOnTaskNumberChange = (node, taskNumber) => {
|
|
|
2119
2122
|
}, [taskNumber, node]);
|
|
2120
2123
|
};
|
|
2121
2124
|
const QuickStartPanelContent = (_a) => {
|
|
2122
|
-
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"]);
|
|
2123
2126
|
const { getResource } = React__namespace.useContext(QuickStartContext);
|
|
2124
2127
|
const [contentRef, setContentRef] = React__namespace.useState();
|
|
2125
2128
|
const shadows = useScrollShadows(contentRef);
|
|
@@ -2130,6 +2133,7 @@ const QuickStartPanelContent = (_a) => {
|
|
|
2130
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); });
|
|
2131
2134
|
const headerClasses = reactStyles.css('pfext-quick-start-panel-content__header', {
|
|
2132
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',
|
|
2133
2137
|
});
|
|
2134
2138
|
const footerClass = reactStyles.css({
|
|
2135
2139
|
'pfext-quick-start-panel-content__footer__shadow': shadows === Shadows.bottom || shadows === Shadows.both,
|
|
@@ -2148,12 +2152,12 @@ const QuickStartPanelContent = (_a) => {
|
|
|
2148
2152
|
React__namespace.createElement("div", { className: headerClasses },
|
|
2149
2153
|
React__namespace.createElement(reactCore.DrawerHead, null,
|
|
2150
2154
|
React__namespace.createElement("div", { className: "pfext-quick-start-panel-content__title" },
|
|
2151
|
-
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 :
|
|
2152
2156
|
quickStart.spec.displayName,
|
|
2153
2157
|
' ',
|
|
2154
|
-
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)))),
|
|
2155
2159
|
showClose && (React__namespace.createElement(reactCore.DrawerActions, null,
|
|
2156
|
-
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" }))))),
|
|
2157
2161
|
React__namespace.createElement(reactCore.DrawerPanelBody, { hasNoPadding: true, className: "pfext-quick-start-panel-content__body", "data-test": "content" },
|
|
2158
2162
|
React__namespace.createElement(QuickStartController, { quickStart: quickStart, nextQuickStarts: nextQuickStarts, footerClass: footerClass, contentRef: setContentRef })))) : null;
|
|
2159
2163
|
if (appendTo) {
|
|
@@ -2163,13 +2167,14 @@ const QuickStartPanelContent = (_a) => {
|
|
|
2163
2167
|
};
|
|
2164
2168
|
|
|
2165
2169
|
const QuickStartContainer = (_a) => {
|
|
2166
|
-
var { quickStarts, children, activeQuickStartID, allQuickStartStates, setActiveQuickStartID, setAllQuickStartStates, appendTo, fullWidth, onCloseInProgress, onCloseNotInProgress, resourceBundle, showCardFooters, 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", "language", "loading", "useQueryParams", "markdown", "contextProps", "alwaysShowTaskReview"]);
|
|
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"]);
|
|
2167
2171
|
const valuesForQuickstartContext = useValuesForQuickStartContext(Object.assign({ allQuickStarts: quickStarts, activeQuickStartID,
|
|
2168
2172
|
setActiveQuickStartID,
|
|
2169
2173
|
allQuickStartStates,
|
|
2170
2174
|
setAllQuickStartStates, footer: {
|
|
2171
2175
|
show: showCardFooters,
|
|
2172
|
-
},
|
|
2176
|
+
}, useLegacyHeaderColors,
|
|
2177
|
+
language, resourceBundle: Object.assign({}, resourceBundle), loading,
|
|
2173
2178
|
useQueryParams,
|
|
2174
2179
|
markdown,
|
|
2175
2180
|
alwaysShowTaskReview }, contextProps));
|
|
@@ -2193,7 +2198,7 @@ const QuickStartContainer = (_a) => {
|
|
|
2193
2198
|
};
|
|
2194
2199
|
const QuickStartDrawer = (_a) => {
|
|
2195
2200
|
var { quickStarts = [], children, appendTo, fullWidth, onCloseInProgress, onCloseNotInProgress } = _a, props = tslib.__rest(_a, ["quickStarts", "children", "appendTo", "fullWidth", "onCloseInProgress", "onCloseNotInProgress"]);
|
|
2196
|
-
const { activeQuickStartID, setActiveQuickStart, allQuickStarts = [], activeQuickStartState, allQuickStartStates, setAllQuickStartStates, } = React__namespace.useContext(QuickStartContext);
|
|
2201
|
+
const { activeQuickStartID, setActiveQuickStart, allQuickStarts = [], activeQuickStartState, allQuickStartStates, setAllQuickStartStates, useLegacyHeaderColors, } = React__namespace.useContext(QuickStartContext);
|
|
2197
2202
|
const combinedQuickStarts = allQuickStarts.concat(quickStarts);
|
|
2198
2203
|
React__namespace.useEffect(() => {
|
|
2199
2204
|
const params = new URLSearchParams(window.location.search);
|
|
@@ -2252,7 +2257,7 @@ const QuickStartDrawer = (_a) => {
|
|
|
2252
2257
|
},
|
|
2253
2258
|
}
|
|
2254
2259
|
: {};
|
|
2255
|
-
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)));
|
|
2256
2261
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
2257
2262
|
React__namespace.createElement(reactCore.Drawer, Object.assign({ isExpanded: !!activeQuickStartID, isInline: true }, props), children ? (React__namespace.createElement(reactCore.DrawerContent, Object.assign({ panelContent: panelContent }, fullWidthBodyStyle),
|
|
2258
2263
|
React__namespace.createElement(reactCore.DrawerContentBody, { className: "pfext-quick-start-drawer__body" }, children))) : (React__namespace.createElement("div", { className: "pf-c-drawer__main" }, panelContent))),
|